Skip to content

Fix snaphot fn after metadata update#1037

Merged
sigurpol merged 3 commits intomainfrom
fix_snaphot_fn_after_metadata_update
Apr 25, 2025
Merged

Fix snaphot fn after metadata update#1037
sigurpol merged 3 commits intomainfrom
fix_snaphot_fn_after_metadata_update

Conversation

@sigurpol
Copy link
Copy Markdown
Contributor

@sigurpol sigurpol commented Apr 25, 2025

SDK #8304 has introduced a breaking change for which also snapshot methods are keyed on round index. Update code accordingly

Quick test on zombienet looks ok:

2025-04-25T16:33:21.104437Z  INFO polkadot-staking-miner: Page 24 included in block 0x2d714dd92336ee6df4c025b377e41bffe4a4320743f9986a8957a539bc49367c
2025-04-25T16:33:21.104509Z TRACE polkadot-staking-miner: Register score and solution pages took 94853ms
2025-04-25T16:33:28.957356Z TRACE polkadot-staking-miner: Processing block=212 round=0, phase=Signed(14)

and user got rewarded.

`desired_targets` storage item now requires the round index
as a parameter, so this change correctly aligns our code with
the updated storage API in the Polkadot SDK.

See [SDK PR](paritytech/polkadot-sdk#8304).
[SDK #8304](https://github.com/paritytech/polkadot-sdk/pull/8304/files)
has introduced a breaking change for which also snapshot methods are
keyed on round index.

Update the code accordingly.
@sigurpol sigurpol force-pushed the fix_snaphot_fn_after_metadata_update branch from d41b64f to a42a233 Compare April 25, 2025 16:43
@sigurpol sigurpol merged commit 693d8b6 into main Apr 25, 2025
10 checks passed
@sigurpol sigurpol deleted the fix_snaphot_fn_after_metadata_update branch April 25, 2025 16:52
sigurpol added a commit that referenced this pull request May 12, 2025
* Update multiblock metadata (tracking SDK rev 8da42e8fae)

`desired_targets` storage item now requires the round index
as a parameter, so this change correctly aligns our code with
the updated storage API in the Polkadot SDK.

See [SDK PR](paritytech/polkadot-sdk#8304).

* Handle round parameter in snapshot functions

[SDK #8304](https://github.com/paritytech/polkadot-sdk/pull/8304/files)
has introduced a breaking change for which also snapshot methods are
keyed on round index.

Update the code accordingly.

* Fix fmt
sigurpol added a commit that referenced this pull request May 13, 2025
* tests: add e2e tests for multi-block miner

* tweak config files for gha

* fix fmt

* Fix snaphot fn after metadata update (#1037)

* Update multiblock metadata (tracking SDK rev 8da42e8fae)

`desired_targets` storage item now requires the round index
as a parameter, so this change correctly aligns our code with
the updated storage API in the Polkadot SDK.

See [SDK PR](paritytech/polkadot-sdk#8304).

* Handle round parameter in snapshot functions

[SDK #8304](https://github.com/paritytech/polkadot-sdk/pull/8304/files)
has introduced a breaking change for which also snapshot methods are
keyed on round index.

Update the code accordingly.

* Fix fmt

* chore(deps): bump actions/download-artifact from 4.2.1 to 4.3.0 (#1039)

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.2.1 to 4.3.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v4.2.1...v4.3.0)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 4.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Do not build omni-node

* Check RPC port for the parachain collator before running the miner

Do not rely on specific text in polkadot logs but on the parachain
collator to be up and running on the RPC port specified on the
zombienet configuration.

* Fix wrong page index while checking page submissions

* Test successful <=> users is rewarded after score and all pages are submitted

* Cleanup

* Improve error handling

* Add a TODO around proper zombienet cleanup

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Paolo La Camera <paolo@parity.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants