Skip to content

update to latest polkadot-sdk#467

Merged
pkhry merged 42 commits intomasterfrom
pkhry/polkadot-sdk-upd
Jan 16, 2026
Merged

update to latest polkadot-sdk#467
pkhry merged 42 commits intomasterfrom
pkhry/polkadot-sdk-upd

Conversation

@pkhry
Copy link
Copy Markdown

@pkhry pkhry commented Dec 9, 2025

No description provided.

Comment thread crates/anvil-polkadot/tests/it/gas.rs Outdated
async fn test_next_fee_multiplier_minimum() {
// 1e18 denomination.
let new_base_fee = U256::from(50_123);
let new_base_fee = U256::from(50_1230);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This will not fix the actual issue. You will have to set the GasScale to 1.
Like this: f522500#diff-bf8d1cad61c801a9cfd0ba5917125913b960af9bdbeba4fbfe846bb86e3c3d0dR310-R311

Copy link
Copy Markdown

@AlexandruCihodaru AlexandruCihodaru Dec 10, 2025

Choose a reason for hiding this comment

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

The default value in test config I think is 10, hence the off by 10

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

i'll revert the anvil change in this PR then and cherry-pick your changes then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You can directly add GasScale I think there is no need to cherry-pick

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The default pallet-revive config for GasScale is 10 based on this PR: https://github.com/paritytech/polkadot-sdk/pull/10393/changes (which also multiplies the next_fee_multiplier by gas scale, not just NATIVE_TO_ETH_RATIO). That's why, given our substrate-runtime not setting it up specifically with this PR, or before it, we get in practice 10 times bigger base fee. For these tests to pass it is enough to configure the GasScale under the pallet-revive config in the anvil-polkadot's substrate-runtime to 1, but that might not do it for certain users tests (outside anvil-polkadot) that rely on a bigger value (e.g. dev-node sets it to 50_000).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Removing the extra zero at the end fixes this test too. The GasScale set to 1 works fine with the test - at least locally for me with this branch.

Comment thread crates/revive-env/src/runtime.rs
Comment thread crates/revive-env/src/runtime.rs Outdated
@filip-parity filip-parity self-requested a review December 10, 2025 13:00
@pgherveou
Copy link
Copy Markdown

pgherveou commented Jan 9, 2026

hey there can we get that merged.
did it for myself here as well #483

just fixed the compiler error without looking too much at the details
take mine or fix up the conflicts here, and let's merge it asap

@pgherveou
Copy link
Copy Markdown

pgherveou commented Jan 9, 2026

hey there can we get that merged. did it for myself here as well #483
just fixed the compiler error without looking too much at the details take mine or fix up the conflicts here, and let's merge it asap

I’m finishing it up, need to finish he cleanup and update forge-std. the tests also pass on this branch

make sure to cargo update polkadot-sdk one last time to make sure we are on the current latest and get the latest patches

pkhry and others added 8 commits January 9, 2026 16:23
* chore: bump forge-std version used for tests

* bump

* fix brittle test, previously broke if there are commits after release and prior to ci run

* fix gas cost

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: zerosnacks <zerosnacks@protonmail.com>
* chore: bump forge-std version used for tests

* bump

* fix gas cost

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: zerosnacks <zerosnacks@protonmail.com>
Comment thread crates/anvil-polkadot/tests/it/standard_rpc.rs Outdated
Comment thread crates/anvil-polkadot/tests/it/gas.rs Outdated
async fn test_next_fee_multiplier_minimum() {
// 1e18 denomination.
let new_base_fee = U256::from(50_123);
let new_base_fee = U256::from(50_1230);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Removing the extra zero at the end fixes this test too. The GasScale set to 1 works fine with the test - at least locally for me with this branch.

@iulianbarbu
Copy link
Copy Markdown

iulianbarbu commented Jan 13, 2026

Locally I get the same error. We can updat this test to pass. It usually fails whenever we update to a more recent polkadot-sdk version, which based on our investigations in the past comes also with weights updates. It is strange though that all the time the difference is scoped to the 999906 != 999907, while the rest of the values are the same.

Screenshot 2026-01-13 at 13 19 25

@pkhry pkhry force-pushed the pkhry/polkadot-sdk-upd branch from 266513f to e7e190b Compare January 13, 2026 21:04
Copy link
Copy Markdown

@alindima alindima left a comment

Choose a reason for hiding this comment

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

anvil side LGTM

Comment thread crates/revive-strategy/src/cheatcodes/mod.rs Outdated
let origin = OriginFor::<Runtime>::signed(origin_account_id.clone());
let evm_value = sp_core::U256::from_little_endian(&input.value().as_le_bytes());
mock_handler.fund_pranked_accounts(input.caller());
if !exists {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is this needed?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

to sync nonces for pranked or mock accounts, makes the prank and mock tests consistent

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you explain this more in details or do you have code snippet, I would like to understand the use case we are going to address here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

you can add a log there to see that it's getting triggered inside polkadot_skip tests and prank tests. i added this to ensure consistent nonces between foundry and revive accounts in case that when we create pranked or mocked account by funding them we also consistently set it's nonce to be the same as revm expects to avoid spurious DuplicateContractErrors

@pkhry pkhry requested a review from smiasojed January 15, 2026 13:18
Copy link
Copy Markdown
Collaborator

@smiasojed smiasojed left a comment

Choose a reason for hiding this comment

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

This out of sync for nonces when using pranks requires investigation.
The rest of the PR LGTM. Thanks

@pkhry pkhry merged commit 7f60f20 into master Jan 16, 2026
309 of 365 checks passed
@pkhry pkhry deleted the pkhry/polkadot-sdk-upd branch January 16, 2026 10:48
dimartiro pushed a commit to ChainSafe/foundry-polkadot that referenced this pull request Feb 9, 2026
---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: zerosnacks <zerosnacks@protonmail.com>
re-gius added a commit that referenced this pull request Feb 10, 2026
* [Anvil] Fix impersonation marker collision with storage keys (#489)

* [Anvil] Fix impersonation marker collision with storage keys

Use 0xDE marker instead of 0x00 for impersonated transaction signatures
to avoid collision with Solidity mapping key computations for slot 0.

Closes #488

* !fixup af24a53a0

* Use original syntax

* fix

* update to latest polkadot-sdk (#467)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: zerosnacks <zerosnacks@protonmail.com>

* Fix etch cheatcode (#486)

* Add initial sync between REVM and pallet-revive (#487)

* add more deposit_limits (#493)

* add more deposit_limits

* clippy

* update compilers (#497)

* update foundry-compilers

* hardcode resolc version

* Fix external-projects results parsing (#499)

* Fix external-projects results parsing

* Change to json

* Add check for cheatcodes usage in pallet-revive (#494)

* Add immutable support (#498)

* add immutable

* Remove unnecessary genesis.rs changes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* add test

* refactor: improve anvil_setImmutableStorageAt API to accept Vec<Bytes>

- Changed RPC interface to accept individual immutable values instead of concatenated bytes
- Moved endianness conversion (big-endian to little-endian) from test to RPC handler
- Updated test to pass immutable values as separate ABI-encoded Bytes elements
- Simplified byte conversion logic: removed unnecessary intermediate vector, using direct indexing
- Added comprehensive documentation explaining data format and conversion process
- All immutable values now handled consistently with better API clarity

This makes the RPC easier to invoke and aligns with how Sourcify and solc provide immutable data.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* Fix polkadotskip test (#502)

* Fix JSON parsing in external-projects CI (#501)

Co-authored-by: Pavlo Khrystenko <45178695+pkhry@users.noreply.github.com>

* Fix contract storage migration (#500)

* Skip auto-funding for accounts that were explicitly dealt (#496)

* Skip auto-funding for accounts that were explicitly dealt

* Use existing eth_deals

* Add repro test case for fund_pranked_accounts bug

* Remove unnecessary test

* Sync dealt balances to pallet-revive when pranking and pass eth_deals directly instead of cloning

* Add warning when overflow happens (#503)

* Set storage deposit for etched accounts (#504)

* Limit uint to u64::MAX for fuzz tests (#507)

* Add cheatcode tests (#435)

* update compilers (#511)

* Fix timestamp clamping to prevent overflow when converting to milliseconds (#510)

* Default eth_estimateGas block parameter to pending to match Anvil/EDR behavior (#509)

* Default eth_estimateGas to pending block to match Anvil/EDR

* Fix snapshot issues (#512)

* Add Claude config (#517)

* Attempt to fix CI (#513)

* change urls

* add transient storage support in `polkadot` test execution mode (#449)

* improve logging to match upstream anvil (#522)

* Fix compatibility issues after syncing with master

* Fmt

* Remove consensus.rs

* Fix retrieve para id

* skip proof recorder when forking is enabled

* Add comment explaining the irrelevant harcoded slot duration

* Fix fmt and clippy

---------

Co-authored-by: PG Herveou <pgherveou@parity.io>
Co-authored-by: Pavlo Khrystenko <45178695+pkhry@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: zerosnacks <zerosnacks@protonmail.com>
Co-authored-by: Sebastian Miasojed <s.miasojed@gmail.com>
Co-authored-by: filip-parity <filip.baciu@parity.io>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Marian Radu <marian@parity.io>
Co-authored-by: Giuseppe Re <giuseppe.re@parity.io>
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.

8 participants