Upgrade Polkadot SDK and Frontier to stable2512 - #2
Conversation
vedhavyas
left a comment
There was a problem hiding this comment.
not sure why workspace lints are introduced. Unnecessary move of same code from one line to another
| runtime-benchmarks = [] | ||
|
|
||
| # @claude why is this required? | ||
| [lints] |
|
|
||
| runtime-benchmarks = [] | ||
|
|
||
| # @claude why is this required? |
| domain_runtime_code: Vec<u8>, | ||
| bundle_body: Vec<OpaqueExtrinsic>, | ||
| ) -> Option<H256> { | ||
| domain_runtime_code: PassFatPointerAndDecode<Vec<u8>>, |
There was a problem hiding this comment.
can you drop the PR that introduced this change upstream ?
| let state = alice.backend.state_at(best_hash).expect("Get state"); | ||
| let state = alice | ||
| .backend | ||
| .state_at(best_hash, sc_client_api::TrieCacheContext::Trusted) |
There was a problem hiding this comment.
ensure Trusted is waht we need for all the places we use the state_at
| "Parent hash should be valid.", | ||
| ); | ||
|
|
||
| match ExecutiveConfig::ensure_inherents_are_first(block) { |
There was a problem hiding this comment.
ensure_inherents_are_first
is this removed upstream ?
| impl frame_system::Config for Runtime { | ||
| /// The ubiquitous event type. | ||
| type RuntimeEvent = RuntimeEvent; | ||
| /// The ubiquitous event type. |
There was a problem hiding this comment.
dont understand this change
| } | ||
|
|
||
| impl pallet_balances::Config for Runtime { | ||
| type RuntimeEvent = RuntimeEvent; |
There was a problem hiding this comment.
dont understand this one too
Polkadot SDK fork: subspace-v13 (8 custom commits on stable2506) Frontier: upstream stable2506 (b70f725a8) Breaking changes addressed: - sp-io ABI: replace PassBy/Codec with explicit wrapper types (PassFatPointerAndDecode, PassPointerAndReadCopy, AllocateAndReturnByCodec) - EnsureInherentsAreFirst removed: domain executive aligned with upstream frame_executive structure (inline inherent check in apply_extrinsics) - RuntimeEvent removed from pallet configs (moved to trait bound) - frame_system::initialize() strict sequential block numbers: guard check_extrinsics_and_do_pre_dispatch, fix test and benchmark helpers - Backend::state_at() gains TrieCacheContext parameter - memory-db 0.32 -> 0.34 with explicit sp_trie::RandomState for WASM - NetworkConfiguration gains min_peers_to_start_warp_sync - sc_service::Configuration gains warm_up_trie_cache - StorageCmd::run gains trie_cache parameter - try_sqrt -> checked_sqrt, create_inherent -> create_bare - workspace lints for substrate_runtime cfg (set by wasm-builder) - skip frame-storage-access-test-runtime wasm build in benchmarks (upstream bug: with_current_project() fails outside polkadot-sdk workspace)
2eb73fb to
58f8400
Compare
| let storage = backend.expose_storage(); | ||
|
|
||
| cmd.run(config, client, db, storage) | ||
| cmd.run(config, client, db, storage, None) |
|
|
||
| [[package]] | ||
| name = "darling_macro" | ||
| version = "0.21.3" |
There was a problem hiding this comment.
two versions of darling_macro ?
| pub struct OnChargeTransaction; | ||
|
|
||
| impl pallet_transaction_payment::TxCreditHold<Runtime> for OnChargeTransaction { | ||
| type Credit = (); |
| telemetry: telemetry.as_mut(), | ||
| tx_handler_controller, | ||
| sync_service: sync_service.clone(), | ||
| tracing_execute_block: None, |
| filter_pool, | ||
| 500_usize, // max stored filters | ||
| max_past_logs, | ||
| 10_000_u32, // max block range for eth_getLogs |
| PrecompileAt<AddressU64<5>, Modexp, EthereumPrecompilesChecks>, | ||
| // Non-Frontier specific nor Ethereum precompiles : | ||
| PrecompileAt<AddressU64<1024>, Sha3FIPS256, (CallableByContract, CallableByPrecompile)>, | ||
| PrecompileAt<AddressU64<1024>, Sha3FIPS256<R, ()>, (CallableByContract, CallableByPrecompile)>, |
| &block_hash, | ||
| &Default::default(), | ||
| ); | ||
| // Only initialize if not already at the expected block number, |
There was a problem hiding this comment.
can you point me where in the Executive change happened that broke this change
| _prev_block_number: BlockNumber, | ||
| _best_known_block_number: Option<BlockNumber>, | ||
| ) -> Result<mmr::AncestryProof<mmr::Hash>, mmr::Error> { | ||
| Err(mmr::Error::GenerateProof) |
There was a problem hiding this comment.
why is this not implemented?
578cfc6 to
89d297e
Compare
89d297e to
10db821
Compare
Summary
Two-phase Substrate upgrade: stable2503 → stable2506 → stable2512.
Recommend reviewing commit-by-commit.
Commits
844a7dfbb— upgrade polkadot-sdk and frontier to stable2506Polkadot SDK fork:
subspace-v13(9 commits on stable2506)subspace-v12, 1 dropped (already upstream)Breaking changes addressed:
sp-ioABI rework: custom#[runtime_interface]traits updated with explicit wrapper types (PassFatPointerAndDecode,PassPointerAndReadCopy,AllocateAndReturnByCodec)EnsureInherentsAreFirst→IsInherentin domain executiveRuntimeEventmoved from associated type to trait bound in all Subspace palletsframe_system::initialize()strict sequential assertion: guardedcheck_extrinsics_and_do_pre_dispatchBackend::state_at()gainsTrieCacheContextmemory-db0.32 → 0.34:MemoryDBrequires explicitsp_trie::RandomStatetry_sqrt→checked_sqrt,create_inherent→create_baresubstrate_runtimeadded tocheck-cfge90bda32b— upgrade polkadot-sdk and frontier to stable2512Polkadot SDK fork:
subspace-v14(10 commits on stable2512)subspace-v13, 1 new (frame-storage-access-test-runtime graceful fallback)Frontier: updated to commit
9d49e36e(compatible with stable2512)Breaking changes addressed:
-C debuginfo=0 -C link-arg=/DEBUG:NONEfor PDB size limits (wasmtime 35)ForkAwaretxpool default (addressed in fix commit below)Vec<u8>(addressed in fix commit below)bd67ddc53— fix host function ABI compat and default txpool to SingleStateTwo fixes found during local dev network upgrade testing with XDM:
ABI fix: The old
sp-runtime-interfacehad aTypeId::of::<u8>()special case —Vec<u8>was passed as raw bytes without SCALE encoding. The newPassFatPointerAndDecodealways SCALE-encodes, breaking ABI compatibility with old domain WASM callingverify_mmr_proof. Changedencoded_proofparameter to usePassFatPointerAndRead<Vec<u8>>which preserves the raw-bytes behavior. Only this one parameter was affected — all other host function types verified compatible.TxPool default: polkadot-sdk stable2512 changed the CLI default for
--pool-typetoForkAware. The ForkAware pool crashes when domain subsystem is active (tokio::select!exits when any subtask completes). Reverted the default toSingleStatein the fork.Local dev network test results
Code contributor checklist: