Repository navigation
feat!: release 0.6.0 — spec 16 relay fee claim, memo_hash and v2 reci… - #5
Merged
Merged
Conversation
…pient binding, drop every legacy shim
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.
Summary
Releases
@orbinum/protocol0.6.0 for runtime spec 16 and@orbinum/circuits0.15.0:memo_hashand the v2 recipient binding for the memo-bound circuits;Every compatibility shim is removed: consumers moving to 0.6.0 update to the current API instead of carrying legacy paths.
Breaking:
claimShieldedFees,CircuitId.ValueProof,RECOVERED_TX_RESULT,evmAddressToAccountId, and the fabricated zk-verifier fields;addressToFieldElementnow requires the circuit version;CURRENT_CIRCUIT_VERSIONis 2.What changed
Circuits v2
memoHash(memos): thememo_hashpublic input. It is blake2_256 over the SCALE-encoded memo list, read little-endian, mod BN254r.addressToFieldElement(address, circuitVersion):blake2_256(accountId32)LE modr. v1's rawmod rlet an aliasR ± rredirect a pending unshield.CURRENT_CIRCUIT_VERSION = 2: new notes are v2, and v1 notes spend under v2.statement.rs,encoding.rs).Relay fees (spec 16)
ShieldedPoolModule.claimRelayFees(claim_relay_fees) andShieldedPoolPrecompile.claimRelayFees/buildClaimRelayFeesCalldata/estimateClaimRelayFeesGas(0x2a3274dd). The claim is public, with no note or proof.shielded-pool/validation.ts):assetIda u32 andamountin1..2^128-1.SP_SEL.COMMIT_RELAY(0xc9b235ff) andSP_SEL.CLAIM_RELAY_FEES, with decoders.CommitRelayArgs/ClaimRelayFeesArgsinShieldedPoolCall, andRelayFeesClaimedEventinShieldedPoolEvent.Errors
extractPoolRejection/poolRejectionKind: pool-admission codes 1–4 and 10–13 (matchingvalidate_unsigned/codes.rs), plusStale/Payment.classifyChainErrorfalls back to them.RelayerNotRegistered,NotRegistered,TooManyCommits.Mappers
mapExtrinsicArgsnow covers spec 16:private_transfer/unshieldwith fee, change note andcircuit_version;commit_relayandclaim_relay_fees;retire_version/unretire_version/purge_circuit.mapZkEventDatanow coversUnshielded's change note,TreeSealed,RelayFeesClaimed,VersionRetired/VersionUnretired,CircuitPurgedandBatchVerificationKeysRegistered.deposit/withdrawaliases for shielded events swallowedbalances.Deposit/Withdraw(fee refunds and withdrawals) with the wrong fields.Removed
claimShieldedFees: builders, the0x88d9debaselector and its decoder. The call was never used on-chain.'shieldBatch'fromPrecompileMethod: the precompile has no such selector.CircuitId.ValueProof(6).CircuitIdis now{ Transfer: 1, Unshield: 2 }, in its own module.ZkVerifierCircuitVersionInfo.proofSystem/historicalVersionsandZkVerifierVkHash.stats: the RPC returns none of them.RECOVERED_TX_RESULT: userecoveredTxResult(txHash).evmAddressToAccountId: Ethereum prefix padding, which does not match the runtime.Test plan
npm run check(typecheck, lint, format, build, test): 868 passingZkVerifierModule, the shared claim validation,ShieldedPoolModule.claimRelayFees, the spec-16 mapper calls and events, the balancesDeposit/Withdrawregression, recipient version guards, retired circuit idse2e-memo-clients-live.cjsagainst thisdist/on a dev node: 32/32, includingmemoHashagainst the node formula