Skip to content

Conversation

@girazoki
Copy link
Contributor

@girazoki girazoki commented Mar 13, 2025

Currently parachains are injecting through the xcm-emulator the default digests in each block, something that can prevent testing certain consensus aspects.

We propose to add the type DigestProvider, which needs to implement the trait Convert<blockNumber, Digest>. The idea is that we can call the implementation of this trait before initializing every block, and thus, allowing us to inject custom digests provided by this trait.

Obviously the default behavior persists if you set this type to ().

The utilization of the Convert trait was arbitrary, as it was the easiest to accomplish the solution. I am not against using a custom trait defined for this purpose if that is preferred.

@girazoki
Copy link
Contributor Author

@franciscoaguirre any opinion for this?

Copy link
Contributor

@acatangiu acatangiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, go ahead

@acatangiu acatangiu added T10-tests This PR/Issue is related to tests. R0-no-crate-publish-required The change does not require any crates to be re-published. labels Mar 20, 2025
@bkchr
Copy link
Member

bkchr commented Mar 21, 2025

/cmd fmt

@bkchr bkchr enabled auto-merge March 21, 2025 12:12
@bkchr bkchr added this pull request to the merge queue Mar 21, 2025
auto-merge was automatically disabled March 21, 2025 12:55

Pull Request is not mergeable

Merged via the queue into paritytech:master with commit 1a514f6 Mar 21, 2025
250 of 256 checks passed
ordian added a commit that referenced this pull request Apr 28, 2025
* master: (26 commits)
  Snowbridge V2 (#7402)
  [AHM] Revert multi-block election, slashing and staking client pallets (#7939)
  docs: update local ci execution instruction (#8003)
  Upgrade deps to eliminate ancient dependencies (#7999)
  Removed `pallet:getter` from XCM pallets (#7916)
  Add digest processor xcm emulator (#7915)
  Fix: [Referenda Tracks] Resolve representation issues that are breaking PJS apps (#7671)
  Improve XCMP weight metering (#7963)
  bump version of zombienet-sdk (#7964)
  rpc-v2/archive: Rename archive call method result to value (#7885)
  Bump parachains runtime api to 13 (#7981)
  `bp-runtime`: make macro expansion not rely on `sp-std` in scope. (#7978)
  [CI/CD] Refactor backports flow so that it can determine automatically where to do a backport based on labels (#7976)
  Treasury: update expire date on payout (#7958) (#7959)
  `fatxpool`: report_invalid: do not ban Future/Stale txs from re-entering the view (#7777)
  Fix XCM Barrier Rejection Handling to Return Incomplete with Weight (#7843)
  Bump openssl from 0.10.64 to 0.10.70 (#7442)
  runtime-api: remove redundant version checks (#7610)
  Upgrade link-checker cache to v4 (#7874)
  Updating readmes (#7950)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

R0-no-crate-publish-required The change does not require any crates to be re-published. T10-tests This PR/Issue is related to tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants