[SEC-131] Enforce local Ethereum transaction expenditure policy#531
Draft
huangminghuang wants to merge 6 commits into
Draft
[SEC-131] Enforce local Ethereum transaction expenditure policy#531huangminghuang wants to merge 6 commits into
huangminghuang wants to merge 6 commits into
Conversation
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
gas_limit * max_fee_per_gas + value--outpost-ethereum-client-config-filea strict, versioned JSON document that keeps client id, signature-provider id, RPC URL, authoritative chain id, and optional nested policy togetheruint256defaults to all four policy caps whentransaction_policyis omitted, preserving pre-policy transaction behavior for existing deployments--outpost-ethereum-clientcompatibility; four-field clients use the local chain id, while the original three-field form resolveseth_chainIdunder one aggregate five-second startup deadline--outpost-ethereum-transaction-policy-fileoption and replace its example with the unified client configurationConfiguration
Preferred configuration:
{ "version": 1, "clients": [ { "client_id": "eth-mainnet", "signature_provider_id": "eth-01", "rpc_url": "https://rpc.example.invalid", "chain_id": "1", "transaction_policy": { "max_priority_fee_per_gas_wei": "2000000000", "max_fee_per_gas_wei": "100000000000", "max_gas_limit": "2000000", "max_total_native_cost_wei": "250000000000000000" } } ] }transaction_policyis optional. Omitting it sets each cap to2^256 - 1. Production operators should configure finite caps appropriate to their chain and workload.Multiple clients are supported for distinct EVM outposts, endpoints, or signers. Same-chain clients are not automatic failover: chain-id lookup fails closed when more than one client matches and the caller does not select a client id.
Enforcement details
1..UINT32_MAXand are authoritative for replay protectionuint256maxFeePerGasis derived as2 * baseFeePerGas + maxPriorityFeePerGas; insufficient dynamic headroom reports the formula operands and configured capValidation
test_fc: 512 tests passedtest_outpost_ethereum_client_plugin: 22 tests passednodeopgit diff --checkcleanflow-swap-with-underwritingwith wire-tools-ts#36: SUCCESS (40 phases, 127 steps, 935.1s); generated config omittedtransaction_policy, all four operator daemons used only the unified config option, both ETH→SOL and SOL→ETH settlements completed, and no policy rejection diagnostics were emittedDependency
The paired cluster-tool change is Wire-Network/wire-tools-ts#36.
Jira: SEC-131 / WSA-225