Feat/sdk 2606 migration - #140
Merged
Merged
Conversation
…fc-* test-target split
…ner survive low memory
…and wire the benchmarked weights
…e upstream verification
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.
What this does
Two changes that had to land together: the polkadot-sdk bump from
stable2512to2606, and the Hyperbridge/ISMP integration that depends on it.pallet-ismp 2606.1.0pins
polkadot-sdk =2606.0.0exactly, so the integration could not be built againstthe old SDK line.
124 files changed, +20064 −12757across 25 commits.SDK migration
frame-supportsp-runtimesp-corepallet-ismpAlso in here:
deny.tomladvisory ignores removed. They were pinned bystable2512's wasmtime 35.0.0 — three of them sandbox escapes. SDK 2606 brings
wasmtime 36.0.14, which fixes every one. Verified by emptying the list and
re-running
cargo deny check advisories.core2git patch dropped. Itscid -> sc-networkdependency chain isgone since 2606, so the patch silently applied to nothing and emitted a warning.
harnesses dropped to resolve the
fc-*test-target split.Weights were not invalidated by the bump. The SDK weight constants
(
block_weights,extrinsic_weights,rocksdb_weights,paritydb_weights) arebyte-identical between frame-support 45.1.3 and 48.0.0 — checked before trusting the
existing measurements.
Hyperbridge integration
Orbinum joins as a solochain via the GRANDPA consensus client, following
Polytope's solochain guide.
SUBSTRATE-orbiKusama(4009)Polkadot(3367)The testnet coprocessor is
Kusama(4009)even though the deployment runs on thePaseo relay:
StateMachinehas noPaseovariant, so Hyperbridge labels itsPaseo deployment as
Kusama. Confirmed against their published relayer config(
# For Paseo Testnet: KUSAMA-4009), not inferred.Runtime block length raised to 8 MiB with extrinsics at 85%, per the guide's
recommendation for large GRANDPA proofs.
The compile-time constant that bites
The coprocessor is selected by the
hyperbridge-testnetcargo feature. Build atestnet node without it and the runtime ships mainnet's
Polkadot(3367). Sinceis_allowed_proxycompares the whole SCALE variant with==, every proxied requestis then rejected with
RequestProxyProhibited— and nothing fails at build ordeploy time. It surfaces when a relayer first tries to work.
Three things now guard that:
scripts/verify-coprocessor.sh <testnet|mainnet> [binary]boots a node and readsOrbinumIsmpApi_coprocessorback off it. Asking the runtime what it was compiledwith is the one check that cannot be self-consistently wrong.
release.ymlpasses the feature per environment, for both the native build andthe Docker image, and runs the verifier on each.
docker-publishis now build → verify → push. It compiles its own imageindependently of the
buildjob, so a wrongbuild-argsthere would have passedbuildgreen and shipped the wrong deployment. Once a tag reaches GHCR thevalidators may pull it before anyone can delete it, so the check gates the push
rather than following it.
Verified locally against a real image, not just the shell expansion:
Conclusive because the control — a binary built without the feature — reports
0x0101270d0000=Polkadot(3367). Different values, so the--build-arggenuinelychanged what the compiler produced.
Benchmarks
pallet-ismp-messagingweights are now real measurements (Hetzner CPX62, 16 vCPU /32 GB), replacing hand-written estimates.
type WeightInfowent from()toSubstrateWeight<Runtime>, so measured weights enter block calculation for the firsttime.
One value is hand-corrected:
dispatch_post'sproof_sizeis3550, not thegenerator's
2585700789447993344.frame-benchmarking'smin_squares_iqr(
analysis.rs:419) lacks the.max(0f64)clamp thatmedian_slopes(
analysis.rs:338) has, so a negative regression coefficient underflows on cast tou64. Reported upstream; the file header documents it, because regenerating thefile reintroduces the bad value.
The runner also got fixes worth noting: it no longer targets
pallet_ismp(which hasno
define_benchmarks!entry post-2606), and it reports a SIGKILLed pallet as afailure instead of printing "All benchmarks completed successfully" —
if ! cmd; then local rc=$?captured theif's status, not the command's.Also here
slot_duration.rswent from dead code to a compile-time assertion on the valuethis runtime whitelists. Mutation-tested:
0,999,3_600_001each fail thebuild.
SignedExtra's ordering invariant is now documented — Tesseract builds signedpayloads against that exact tuple, so reordering it invalidates every signature the
relayer produces.
.dockerignoreadded (the repo had none). Without itCOPY . .ships adeveloper's
target/— over 100 GB here — to the daemon. CI never noticed becauseits checkout is clean.
.git/is deliberately not excluded: substrate's buildscript reads
.git/HEADto stamp the commit hash into--version, and dropping itleaves every image reporting a bare version.
spec_version10 → 11.Testing
cargo test -p pallet-ismp-messaging,-p orbinum-runtime --lib configs::ismpmake clippy-releasesetCodeupgrade on a 2-validator chain running the old 2512 binary — theexact operation this enables on testnet
node-deploy/common/Dockerfileand its coprocessor readback from a node running inside the container
Known debt (not blocking)
polkavm0.29.1 vs 0.33.1 availablepallet-ismp's exact=2606.0.0pindispatch_post'sproof_sizecorrection is lost if weights are regeneratedDispatchOriginis root-onlyDeploy order
release.ymlbuilds withhyperbridge-testnetand verifiesbefore publishing
OrbinumIsmpApi_coprocessor,IsmpRuntimeApi_host_state_machineandOrbinumIsmpApi_hyperbridge_slot_durationover RPC
(
KUSAMA-4009/PAS0/para_ids [4009]/ Keccak),create_consensus_client, and the onboarding request to polytope-labsOne thing to watch on the first release run: if Push Docker image takes ~25 minutes
instead of seconds, the buildx cache didn't carry over from the verify step and it
should move to
outputs: type=docker,dest=…plusdocker load.