Add tests for PreImage#470
Merged
rockbmb merged 1 commit intoNov 4, 2025
Merged
Conversation
Add tests which verify PreImage behavior: - 1) A standard account registers (notes) and unregisters (unnotes) a preimage - 2) A manager account requests and unrequests a preimage hash - 3) A manager account requests a preimage hash once then unrequests it multiple times - 4) A manager account requests and unrequests the hash of a previously-registered preimage - 5) A standard account should not be able to register and unregister preimage hashes Issue: open-web3-stack#453
Contributor
There was a problem hiding this comment.
The code looks good overall and the new tests cover the intended scenarios. The refactoring to move preimage tests into a dedicated file is a good improvement. I've found a few minor issues related to code clarity, redundancy, and use of magic numbers.
rockbmb
approved these changes
Nov 4, 2025
andreitrand
added a commit
to andreitrand/polkadot-ecosystem-tests
that referenced
this pull request
Nov 4, 2025
Add additional tests which verify PreImage behavior: This is a continuation of the PR: open-web3-stack#470. Also address outstanding comments from the original PR.
andreitrand
added a commit
to andreitrand/polkadot-ecosystem-tests
that referenced
this pull request
Nov 7, 2025
Add additional tests which verify PreImage behavior: This is a continuation of the PR: open-web3-stack#470. Also address outstanding comments from the original PR.
andreitrand
added a commit
to andreitrand/polkadot-ecosystem-tests
that referenced
this pull request
Nov 9, 2025
Add additional tests which verify PreImage behavior: This is a continuation of the PR: open-web3-stack#470. Also address outstanding comments from the original PR.
andreitrand
added a commit
to andreitrand/polkadot-ecosystem-tests
that referenced
this pull request
Nov 10, 2025
Add additional tests which verify PreImage behavior: This is a continuation of the PR: open-web3-stack#470. Also address outstanding comments from the original PR.
andreitrand
added a commit
to andreitrand/polkadot-ecosystem-tests
that referenced
this pull request
Nov 11, 2025
Add additional tests which verify PreImage behavior: - 1) A manager account requests a preimage hash once then unrequests it multiple times (added additional checks) - 2) Check the noting and unnoting of empty images - 3) Check the noting and unnoting of oversized images - 4) Check the repeated noting and unnoting of the same preimage - 5) Check preimage behavior when requesting, noting, unrequesting and unnoting occur in different orders - 6) Check the "ensure_updated" extrinsic applies fees depending on the update ratio Several utility functions have been moved to the helpers file as they are shared with other test files. This is a continuation of the PR: open-web3-stack#470. Also address outstanding comments from the original PR.
andreitrand
added a commit
to andreitrand/polkadot-ecosystem-tests
that referenced
this pull request
Nov 11, 2025
Add additional tests which verify PreImage behavior: - 1) A manager account requests a preimage hash once then unrequests it multiple times (added additional checks) - 2) Check the noting and unnoting of empty images - 3) Check the noting and unnoting of oversized images - 4) Check the repeated noting and unnoting of the same preimage - 5) Check preimage behavior when requesting, noting, unrequesting and unnoting occur in different orders - 6) Check the "ensure_updated" extrinsic applies fees depending on the update ratio Several utility functions have been moved to the helpers file as they are shared with other test files. This is a continuation of the PR: open-web3-stack#470. Also address outstanding comments from the original PR.
andreitrand
added a commit
to andreitrand/polkadot-ecosystem-tests
that referenced
this pull request
Nov 11, 2025
Add additional tests which verify PreImage behavior: - 1) A manager account requests a preimage hash once then unrequests it multiple times (added additional checks) - 2) Check the noting and unnoting of empty images - 3) Check the noting and unnoting of oversized images - 4) Check the repeated noting and unnoting of the same preimage - 5) Check preimage behavior when requesting, noting, unrequesting and unnoting occur in different orders - 6) Check the "ensure_updated" extrinsic applies fees depending on the update ratio Several utility functions have been moved to the helpers file as they are shared with other test files. This is a continuation of the PR: open-web3-stack#470. Also address outstanding comments from the original PR.
andreitrand
added a commit
to andreitrand/polkadot-ecosystem-tests
that referenced
this pull request
Nov 12, 2025
Add additional tests which verify PreImage behavior: - 1) A manager account requests a preimage hash once then unrequests it multiple times (added additional checks) - 2) Check the noting and unnoting of empty images - 3) Check the noting and unnoting of oversized images - 4) Check the repeated noting and unnoting of the same preimage - 5) Check preimage behavior when requesting, noting, unrequesting and unnoting occur in different orders - 6) Check the "ensure_updated" extrinsic applies fees depending on the update ratio Several utility functions have been moved to the helpers file as they are shared with other test files. This is a continuation of the PR: open-web3-stack#470. Also address outstanding comments from the original PR.
andreitrand
added a commit
to andreitrand/polkadot-ecosystem-tests
that referenced
this pull request
Nov 19, 2025
Add additional tests which verify PreImage behavior: - 1) A manager account requests a preimage hash once then unrequests it multiple times (added additional checks) - 2) Check the noting and unnoting of empty images - 3) Check the noting and unnoting of oversized images - 4) Check the repeated noting and unnoting of the same preimage - 5) Check preimage behavior when requesting, noting, unrequesting and unnoting occur in different orders - 6) Check the "ensure_updated" extrinsic applies fees depending on the update ratio Several utility functions have been moved to the helpers file as they are shared with other test files. This is a continuation of the PR: open-web3-stack#470. Also address outstanding comments from the original PR.
andreitrand
added a commit
to andreitrand/polkadot-ecosystem-tests
that referenced
this pull request
Nov 19, 2025
Add additional tests which verify PreImage behavior: - 1) A manager account requests a preimage hash once then unrequests it multiple times (added additional checks) - 2) Check the noting and unnoting of empty images - 3) Check the noting and unnoting of oversized images - 4) Check the repeated noting and unnoting of the same preimage - 5) Check preimage behavior when requesting, noting, unrequesting and unnoting occur in different orders - 6) Check the "ensure_updated" extrinsic applies fees depending on the update ratio Several utility functions have been moved to the helpers file as they are shared with other test files. This is a continuation of the PR: open-web3-stack#470. Also address outstanding comments from the original PR.
andreitrand
added a commit
to andreitrand/polkadot-ecosystem-tests
that referenced
this pull request
Nov 20, 2025
Add additional tests which verify PreImage behavior: - 1) A manager account requests a preimage hash once then unrequests it multiple times (added additional checks) - 2) Check the noting and unnoting of empty images - 3) Check the noting and unnoting of oversized images - 4) Check the repeated noting and unnoting of the same preimage - 5) Check preimage behavior when requesting, noting, unrequesting and unnoting occur in different orders - 6) Check the "ensure_updated" extrinsic applies fees depending on the update ratio Several utility functions have been moved to the helpers file as they are shared with other test files. This is a continuation of the PR: open-web3-stack#470. Also address outstanding comments from the original PR.
rockbmb
pushed a commit
that referenced
this pull request
Nov 20, 2025
Add additional tests which verify PreImage behavior: - 1) A manager account requests a preimage hash once then unrequests it multiple times (added additional checks) - 2) Check the noting and unnoting of empty images - 3) Check the noting and unnoting of oversized images - 4) Check the repeated noting and unnoting of the same preimage - 5) Check preimage behavior when requesting, noting, unrequesting and unnoting occur in different orders - 6) Check the "ensure_updated" extrinsic applies fees depending on the update ratio Several utility functions have been moved to the helpers file as they are shared with other test files. This is a continuation of the PR: #470. Also address outstanding comments from the original PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add tests which verify PreImage behavior:
Issue: #453