Repository navigation
Feat/remove relayer layer - #167
Merged
Merged
Conversation
…e block author and claimed with claim_fees; precompile keeps shield only
…ees and EVM tips to the block author's validator account, migrations for fees, stranded tips and relayer storage (spec 19, tx 7, node 0.5.0)
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
Removes the EVM relayer layer. A validator is now its account and session keys, nothing else. Private spends are submitted unsigned only, and every spend fee and EVM priority tip goes to the validator that authored the block. Builds on the spec 19 block-author fix.
Why
register_relayer, theevmrkey, relay commits,orbinum_relayShieldedCall) was unused in production, and it had bugs.Chain (
pallet-shielded-pool0.25.0, precompile 0.10.0, runtime-api 0.4.0)private_transferandunshieldaccept only an unsigned origin; signed and Root fail withBadOrigin.PendingFees(validator, asset), credited to the block author (Config::BlockAuthor) on every spend, with aFeeCreditedevent. The floor is the constantMinSpendFee(0.001 ORB).claim_relay_fees→claim_fees(asset_id, amount), signed and paid to the caller (FeesClaimed). Call 18commit_relayis retired.Relayedorigin,ensure_spend_origin, relay op hashes and thepallet-relayerdependency.try_state: pending native fees never exceed the pool ledger.0x…0801keeps onlyshield.privateTransfer,unshield,commitRelayandclaimRelayFeesrevert withretired in spec 19: submit spends unsigned via Substrate.ShieldedPoolRuntimeApiv5:relay_configandrelay_commit_hashremoved.Runtime (
orbinum-runtime0.5.0, spec 19, tx 7)pallet_relayerremoved. Index 16 is retired, andRelayerRuntimeApiand its benchmarks are gone.TipToValidatorpays a transaction's priority tip topallet_authorship::author(), the validator account, and burns it when there is no author.block.coinbaseis0x0: no H160 maps onto an sr25519 validator account.pallet_validator_set::OnValidatorRemoved = ().RelayerFeesToPooldrainsRelayer::PendingRelayerFeesintoPendingFees. A balance held by an Aura key is re-keyed to the validator that owns the key.RemoveRelayerPalletclears the rest of theRelayerprefix.MoveStrandedEvmTipsmoves each Aura-derived coinbase balance to the validator owning that key.Node (
orbinum-node0.5.0)orbinum_relayShieldedCall,orbinum_relayerStatus), the relayer RPC (relayer_*,relayer_getRelayInfo), theevmrkeystore key andEthValidatorSigner.Weights
private_transfer,unshield,claim_feesandremove_validatorwere adjusted by hand: they no longer count the removed relayer storage, and the spends now count the block-author lookup. Their time and proof-size terms still over-estimate until the next benchmark run (noted in each file header).Testing
pallet-shielded-pool384 (393 with benchmarks), precompile 40,orbinum-runtime54,pallet-validator-set60,fc-rpc48,pallet-ismp-messaging86.clippy -D warnings,cargo checkwithruntime-benchmarks,try-runtime, full node build.setCode→ spec 19, tx 7.Relayerprefix is empty;relayer_*RPCs;FeeCreditednames the author;claim_feespays from the real pool ledger;BadOrigin, and the precompile'sprivateTransferreverts;setMinAuthorVersionpasses the quorum.--checks allon that network's snapshot: migrations pass and every pallet'stry_statepasses.