Skip to content

feat(relayer): introduce pallet-relayer with full relay infrastructure#74

Merged
nol4lej merged 12 commits intomainfrom
feat/pallet-relayer
Apr 23, 2026
Merged

feat(relayer): introduce pallet-relayer with full relay infrastructure#74
nol4lej merged 12 commits intomainfrom
feat/pallet-relayer

Conversation

@nol4lej
Copy link
Copy Markdown
Member

@nol4lej nol4lej commented Apr 21, 2026

Add meta-transaction relay support for shielded-pool operations, including the FRAME pallet, runtime-api, JSON-RPC server, client relay layer, node integration, and integration tests.

pallet-relayer (frame/relayer/)

  • Storage: RelayerByAccount, PendingRelayerFees, MinRelayFee, AllowedSelectors
  • Extrinsics: register_relayer, unregister_relayer, set_min_relay_fee, set_allowed_selectors, claim_fees
  • RelayerInterface trait for cross-pallet access
  • Weights, benchmarks, and inline unit tests (config, fees, registry)

pallet-relayer-runtime-api (frame/relayer/runtime-api/)

  • RelayerRuntimeApi trait: is_relayer, pending_fees, registered_evm_address

pallet-relayer-rpc (frame/relayer/rpc/)

  • JSON-RPC server exposing orbinum_relayerStatus

Client relay layer (client/rpc/)

  • relay.rs: orbinum_relayShieldedCall — validates calldata selector whitelist, enforces fee >= max(min_fee, 2gasbase_fee), submits EVM transaction on behalf of the user
  • signer.rs: EVM key loading and ECDSA signing utilities

Node integration (template/node/)

  • --evm-relayer-key CLI flag for providing the relay signing key
  • relayer_register.rs: background task that auto-registers the node as a relayer on startup when the key flag is present
  • Relay RPC merged into the node RPC stack

Runtime wiring (template/runtime/)

  • RelayerBlockAuthor adapter connecting pallet_authorship to pallet_relayer for fee attribution
  • pallet_relayer::Config with DefaultMinRelayFee = 1e15 planck
  • relay_config() Runtime API impl with day-0 selector fallback
  • pallet_relayer added to construct_runtime at index 16

Tests

  • ts-tests/test-relay-rpc.ts: integration suite covering disabled relay, validation errors, fee-slot regression, and tx lifecycle

nol4lej added 12 commits April 21, 2026 18:42
Add meta-transaction relay support for shielded-pool operations,
including the FRAME pallet, runtime-api, JSON-RPC server, client relay
layer, node integration, and integration tests.

pallet-relayer (frame/relayer/)
- Storage: RelayerByAccount, PendingRelayerFees, MinRelayFee,
  AllowedSelectors
- Extrinsics: register_relayer, unregister_relayer, set_min_relay_fee,
  set_allowed_selectors, claim_fees
- RelayerInterface trait for cross-pallet access
- Weights, benchmarks, and inline unit tests (config, fees, registry)

pallet-relayer-runtime-api (frame/relayer/runtime-api/)
- RelayerRuntimeApi trait: is_relayer, pending_fees,
  registered_evm_address

pallet-relayer-rpc (frame/relayer/rpc/)
- JSON-RPC server exposing orbinum_relayerStatus

Client relay layer (client/rpc/)
- relay.rs: orbinum_relayShieldedCall — validates calldata selector
  whitelist, enforces fee >= max(min_fee, 2*gas*base_fee), submits
  EVM transaction on behalf of the user
- signer.rs: EVM key loading and ECDSA signing utilities

Node integration (template/node/)
- --evm-relayer-key CLI flag for providing the relay signing key
- relayer_register.rs: background task that auto-registers the node
  as a relayer on startup when the key flag is present
- Relay RPC merged into the node RPC stack

Runtime wiring (template/runtime/)
- RelayerBlockAuthor adapter connecting pallet_authorship to
  pallet_relayer for fee attribution
- pallet_relayer::Config with DefaultMinRelayFee = 1e15 planck
- relay_config() Runtime API impl with day-0 selector fallback
- pallet_relayer added to construct_runtime at index 16

Tests
- ts-tests/test-relay-rpc.ts: integration suite covering disabled
  relay, validation errors, fee-slot regression, and tx lifecycle
@nol4lej nol4lej merged commit 36f5e3f into main Apr 23, 2026
6 checks passed
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.

1 participant