Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
375a5c7
feat: add a read-only observer channel for keyless sandbox execution
RealiCZ Aug 25, 2026
df5f2c4
test: cover sandbox observer parity, event streams, and inspector ada…
RealiCZ Aug 25, 2026
a60ff17
fix: keep pre-REX4 sandbox EmptyExternalEnv when an observer is attached
RealiCZ Aug 25, 2026
c80372a
fix: close sandbox observer review findings
RealiCZ Aug 25, 2026
7e8582a
test: pin split-CREATE interceptor overflow and override saturation
RealiCZ Aug 26, 2026
a96e795
test: assert split CREATE committed code length and hash independently
RealiCZ Aug 26, 2026
38fe24c
feat(mega-evme): include keyless sandbox frames in traces
RealiCZ Aug 26, 2026
6311c67
fix(mega-evme): include sandbox steps in default opcode traces
RealiCZ Aug 26, 2026
f1dd017
test: compare keyless sandbox observer usage field-by-field
RealiCZ Sep 2, 2026
f3be3a1
feat: add a rewriting inspector channel for keyless sandbox execution
RealiCZ Sep 2, 2026
62b2b61
test: cover keyless sandbox inspector interventions
RealiCZ Sep 2, 2026
60a14c4
docs: document the keyless sandbox inspector channel
RealiCZ Sep 2, 2026
e737429
test: tighten keyless sandbox inspector assertions
RealiCZ Sep 2, 2026
c67826b
docs: unlink ExtEnvs rustdoc and note malformed synthetic panics
RealiCZ Sep 2, 2026
d48dce3
test: add mainnet keyless deploy replay fixtures
RealiCZ Sep 2, 2026
a788b95
feat: share sandbox trace splicing and expose KeylessSandboxHooks
RealiCZ Sep 2, 2026
ed906da
test: pin keyless sandbox corner cases on both channels and the tracer
RealiCZ Sep 2, 2026
8adcf03
test: pin caller/creator pranks on the sandbox inspector and the flat…
RealiCZ Sep 2, 2026
6e5a1a4
refactor(sandbox): collapse the keyless hook channels onto one inspec…
RealiCZ Sep 2, 2026
f663967
refactor(sandbox): name the read-only hook constructor new
RealiCZ Sep 2, 2026
ce43e5b
fix(sandbox): skip trace splicing into an empty outer and pin read-on…
RealiCZ Sep 2, 2026
655770d
fix(sandbox): skip splicing when the outer trace has no KeylessDeploy…
RealiCZ Sep 3, 2026
0502ab2
test(sandbox): cover default hook bodies, slot clearing, and adapter …
RealiCZ Sep 3, 2026
f344f5c
fix(sandbox): record each sandbox execution in its own trace arena an…
RealiCZ Sep 3, 2026
cbe58f0
test(sandbox): pin the outer-frame pairing key and SandboxTracer::clear
RealiCZ Sep 3, 2026
f511680
fix(sandbox): keep the public keyless-deploy API shape and pin the tr…
RealiCZ Sep 3, 2026
ab11c3b
refactor(sandbox): collapse the hook channels into SandboxInspector
RealiCZ Sep 8, 2026
4a59093
docs(sandbox): finish the single-hook wording and keep the blanket ov…
RealiCZ Sep 8, 2026
7041fec
Merge branch 'main' into cz/feat/keyless-sandbox-observer
RealiCZ Sep 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions bench/replay/fixtures/keyless_deploy_rex2_large.json

Large diffs are not rendered by default.

106 changes: 106 additions & 0 deletions bench/replay/fixtures/keyless_deploy_rex2_medium.json

Large diffs are not rendered by default.

106 changes: 106 additions & 0 deletions bench/replay/fixtures/keyless_deploy_rex2_small.json

Large diffs are not rendered by default.

87 changes: 87 additions & 0 deletions bench/replay/fixtures/keyless_sandbox_deep_mixed_rex5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"keyless_sandbox_deep_mixed_rex5": {
"_info": {
"comment": "keyless sandbox corner case (deep_mixed): three CREATE levels, two reverting CALLs into 0x..aaaaaa, a LOG1, and a storage write inside one sandbox. Hand-built from mega_evm::test_utils::keyless, post filled offline with `state-test --fill --bench-spec Rex5`.",
"init_code": "0x604461006e600039604460006000f060005560006000600060006000730000000000000000000000000000000000aaaaaa61c350f15063646565706020527fdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd6004603ca1600060605360016060f369600060005360016000f3600052600a60166000f05060006000600060006000730000000000000000000000000000000000aaaaaa61c350f150600060405360016040f3",
"inner_signer": "0x7ce5403d2297e4ca6b648a723130e546d3741b17",
"deploy_address": "0x9dacb7da59642293dcf9f6a037ad6dd8e45ad876"
},
"env": {
"currentChainID": "0x10e6",
"currentCoinbase": "0x4200000000000000000000000000000000000011",
"currentDifficulty": "0x0",
"currentGasLimit": "0x2540be400",
"currentNumber": "0x735b75",
"currentTimestamp": "0x69858148",
"currentBaseFee": "0xf4240",
"currentRandom": "0x5ed22b2a6937705d6c9677f844729acf17d94ad1381c5bd88f3aa7ea2f178af6",
"currentExcessBlobGas": "0x0"
},
"pre": {
"0x0000000000000000000000000000000000aaaaaa": {
"balance": "0x0",
"code": "0x60006000fd",
"nonce": "0x1",
"storage": {}
},
"0x7ce5403d2297e4ca6b648a723130e546d3741b17": {
"balance": "0x3635c9adc5dea00000",
"code": "0x",
"nonce": "0x0",
"storage": {}
},
"0x7e5f4552091a69125d5dfcb7b8c2659029395bdf": {
"balance": "0x3635c9adc5dea00000",
"code": "0x",
"nonce": "0x0",
"storage": {}
}
},
"post": {
"Rex5": [
{
"indexes": {
"data": 0,
"gas": 0,
"value": 0
},
"hash": "0x51f08758161a6ef32d454fa79717733e944b17533075fb6aca256ec30860986c",
"logs": "0x8eafa7e60b3e427ae50fb227787e035402075a089427ec0f14041ace04baa5d5",
"megaGasUsed": 446122,
"megaStatus": "success"
}
]
},
"transaction": {
"type": 2,
"data": [
"0x846365d5000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000002540be4000000000000000000000000000000000000000000000000000000000000000107f901048085174876e800830f42408080b8b2604461006e600039604460006000f060005560006000600060006000730000000000000000000000000000000000aaaaaa61c350f15063646565706020527fdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd6004603ca1600060605360016060f369600060005360016000f3600052600a60166000f05060006000600060006000730000000000000000000000000000000000aaaaaa61c350f150600060405360016040f31ba02222222222222222222222222222222222222222222222222222222222222222a0222222222222222222222222222222222222222222222222222222222222222200000000000000000000000000000000000000000000000000"
],
"gasLimit": [
"0x1e8480"
],
"gasPrice": null,
"nonce": "0x0",
"secretKey": "0x0000000000000000000000000000000000000000000000000000000000000001",
"sender": "0x7e5f4552091a69125d5dfcb7b8c2659029395bdf",
"to": "0x6342000000000000000000000000000000000003",
"value": [
"0x0"
],
"maxFeePerGas": "0x1e8481",
"maxPriorityFeePerGas": "0x1",
"initcodes": null,
"accessLists": [
[]
],
"authorizationList": null,
"blobVersionedHashes": [],
"maxFeePerBlobGas": null
},
"out": "0x000000000000000000000000000000000000000000000000000000000003ab160000000000000000000000009dacb7da59642293dcf9f6a037ad6dd8e45ad87600000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"megaEnv": {
"bucketCapacities": [],
"oracleStorage": []
}
}
}
87 changes: 87 additions & 0 deletions bench/replay/fixtures/keyless_sandbox_deep_mixed_rex6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"keyless_sandbox_deep_mixed_rex6": {
"_info": {
"comment": "keyless sandbox corner case (deep_mixed): three CREATE levels, two reverting CALLs into 0x..aaaaaa, a LOG1, and a storage write inside one sandbox. Hand-built from mega_evm::test_utils::keyless, post filled offline with `state-test --fill --bench-spec Rex6`.",
"init_code": "0x604461006e600039604460006000f060005560006000600060006000730000000000000000000000000000000000aaaaaa61c350f15063646565706020527fdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd6004603ca1600060605360016060f369600060005360016000f3600052600a60166000f05060006000600060006000730000000000000000000000000000000000aaaaaa61c350f150600060405360016040f3",
"inner_signer": "0x7ce5403d2297e4ca6b648a723130e546d3741b17",
"deploy_address": "0x9dacb7da59642293dcf9f6a037ad6dd8e45ad876"
},
"env": {
"currentChainID": "0x10e6",
"currentCoinbase": "0x4200000000000000000000000000000000000011",
"currentDifficulty": "0x0",
"currentGasLimit": "0x2540be400",
"currentNumber": "0x735b75",
"currentTimestamp": "0x69858148",
"currentBaseFee": "0xf4240",
"currentRandom": "0x5ed22b2a6937705d6c9677f844729acf17d94ad1381c5bd88f3aa7ea2f178af6",
"currentExcessBlobGas": "0x0"
},
"pre": {
"0x0000000000000000000000000000000000aaaaaa": {
"balance": "0x0",
"code": "0x60006000fd",
"nonce": "0x1",
"storage": {}
},
"0x7ce5403d2297e4ca6b648a723130e546d3741b17": {
"balance": "0x3635c9adc5dea00000",
"code": "0x",
"nonce": "0x0",
"storage": {}
},
"0x7e5f4552091a69125d5dfcb7b8c2659029395bdf": {
"balance": "0x3635c9adc5dea00000",
"code": "0x",
"nonce": "0x0",
"storage": {}
}
},
"post": {
"Rex6": [
{
"indexes": {
"data": 0,
"gas": 0,
"value": 0
},
"hash": "0x51f08758161a6ef32d454fa79717733e944b17533075fb6aca256ec30860986c",
"logs": "0x8eafa7e60b3e427ae50fb227787e035402075a089427ec0f14041ace04baa5d5",
"megaGasUsed": 446122,
"megaStatus": "success"
}
]
},
"transaction": {
"type": 2,
"data": [
"0x846365d5000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000002540be4000000000000000000000000000000000000000000000000000000000000000107f901048085174876e800830f42408080b8b2604461006e600039604460006000f060005560006000600060006000730000000000000000000000000000000000aaaaaa61c350f15063646565706020527fdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd6004603ca1600060605360016060f369600060005360016000f3600052600a60166000f05060006000600060006000730000000000000000000000000000000000aaaaaa61c350f150600060405360016040f31ba02222222222222222222222222222222222222222222222222222222222222222a0222222222222222222222222222222222222222222222222222222222222222200000000000000000000000000000000000000000000000000"
],
"gasLimit": [
"0x1e8480"
],
"gasPrice": null,
"nonce": "0x0",
"secretKey": "0x0000000000000000000000000000000000000000000000000000000000000001",
"sender": "0x7e5f4552091a69125d5dfcb7b8c2659029395bdf",
"to": "0x6342000000000000000000000000000000000003",
"value": [
"0x0"
],
"maxFeePerGas": "0x1e8481",
"maxPriorityFeePerGas": "0x1",
"initcodes": null,
"accessLists": [
[]
],
"authorizationList": null,
"blobVersionedHashes": [],
"maxFeePerBlobGas": null
},
"out": "0x000000000000000000000000000000000000000000000000000000000003ab160000000000000000000000009dacb7da59642293dcf9f6a037ad6dd8e45ad87600000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"megaEnv": {
"bucketCapacities": [],
"oracleStorage": []
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"keyless_sandbox_nested_keyless_call_rex5": {
"_info": {
"comment": "keyless sandbox corner case (nested_keyless_call): constructor CALLs KeylessDeploy from inside the sandbox; not intercepted at depth > 0, the call reverts. Hand-built from mega_evm::test_utils::keyless, post filled offline with `state-test --fill --bench-spec Rex5`.",
"init_code": "0x6000600060006000600073634200000000000000000000000000000000000361c350f150600060005360016000f3",
"inner_signer": "0xdc7e3a94ba7db4c1de83a77223a5fced6d7273e8",
"deploy_address": "0x0fc32ba0751255e3057226a92cd310e022097093"
},
"env": {
"currentChainID": "0x10e6",
"currentCoinbase": "0x4200000000000000000000000000000000000011",
"currentDifficulty": "0x0",
"currentGasLimit": "0x2540be400",
"currentNumber": "0x735b75",
"currentTimestamp": "0x69858148",
"currentBaseFee": "0xf4240",
"currentRandom": "0x5ed22b2a6937705d6c9677f844729acf17d94ad1381c5bd88f3aa7ea2f178af6",
"currentExcessBlobGas": "0x0"
},
"pre": {
"0x6342000000000000000000000000000000000003": {
"balance": "0x0",
"code": "0x608060405234801561000f575f5ffd5b5060043610610034575f3560e01c806354fd4d5014610038578063846365d514610080575b5f5ffd5b604080518082018252600581527f312e302e30000000000000000000000000000000000000000000000000000000602082015290516100779190610124565b60405180910390f35b61009361008e36600461013d565b6100a2565b604051610077939291906101af565b5f5f60606040517f1894f07600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61013660208301846100d8565b9392505050565b5f5f5f6040848603121561014f575f5ffd5b833567ffffffffffffffff811115610165575f5ffd5b8401601f81018613610175575f5ffd5b803567ffffffffffffffff81111561018b575f5ffd5b86602082840101111561019c575f5ffd5b6020918201979096509401359392505050565b67ffffffffffffffff8416815273ffffffffffffffffffffffffffffffffffffffff83166020820152606060408201525f6101ed60608301846100d8565b9594505050505056fea164736f6c634300081e000a",
"nonce": "0x1",
"storage": {}
},
"0x7e5f4552091a69125d5dfcb7b8c2659029395bdf": {
"balance": "0x3635c9adc5dea00000",
"code": "0x",
"nonce": "0x0",
"storage": {}
},
"0xdc7e3a94ba7db4c1de83a77223a5fced6d7273e8": {
"balance": "0x3635c9adc5dea00000",
"code": "0x",
"nonce": "0x0",
"storage": {}
}
},
"post": {
"Rex5": [
{
"indexes": {
"data": 0,
"gas": 0,
"value": 0
},
"hash": "0x807d79c716cee6d2b0201f188cb3ad70276c40da705fd37bafd7708a6cddad16",
"logs": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"megaGasUsed": 296065,
"megaStatus": "success"
}
]
},
"transaction": {
"type": 2,
"data": [
"0x846365d5000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000002540be4000000000000000000000000000000000000000000000000000000000000000081f87f8085174876e800830f42408080ae6000600060006000600073634200000000000000000000000000000000000361c350f150600060005360016000f31ba02222222222222222222222222222222222222222222222222222222222222222a0222222222222222222222222222222222222222222222222222222222222222200000000000000000000000000000000000000000000000000000000000000"
],
"gasLimit": [
"0x1e8480"
],
"gasPrice": null,
"nonce": "0x0",
"secretKey": "0x0000000000000000000000000000000000000000000000000000000000000001",
"sender": "0x7e5f4552091a69125d5dfcb7b8c2659029395bdf",
"to": "0x6342000000000000000000000000000000000003",
"value": [
"0x0"
],
"maxFeePerGas": "0x1e8481",
"maxPriorityFeePerGas": "0x1",
"initcodes": null,
"accessLists": [
[]
],
"authorizationList": null,
"blobVersionedHashes": [],
"maxFeePerBlobGas": null
},
"out": "0x000000000000000000000000000000000000000000000000000000000001ac8d0000000000000000000000000fc32ba0751255e3057226a92cd310e02209709300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"megaEnv": {
"bucketCapacities": [],
"oracleStorage": []
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"keyless_sandbox_nested_keyless_call_rex6": {
"_info": {
"comment": "keyless sandbox corner case (nested_keyless_call): constructor CALLs KeylessDeploy from inside the sandbox; not intercepted at depth > 0, the call reverts. Hand-built from mega_evm::test_utils::keyless, post filled offline with `state-test --fill --bench-spec Rex6`.",
"init_code": "0x6000600060006000600073634200000000000000000000000000000000000361c350f150600060005360016000f3",
"inner_signer": "0xdc7e3a94ba7db4c1de83a77223a5fced6d7273e8",
"deploy_address": "0x0fc32ba0751255e3057226a92cd310e022097093"
},
"env": {
"currentChainID": "0x10e6",
"currentCoinbase": "0x4200000000000000000000000000000000000011",
"currentDifficulty": "0x0",
"currentGasLimit": "0x2540be400",
"currentNumber": "0x735b75",
"currentTimestamp": "0x69858148",
"currentBaseFee": "0xf4240",
"currentRandom": "0x5ed22b2a6937705d6c9677f844729acf17d94ad1381c5bd88f3aa7ea2f178af6",
"currentExcessBlobGas": "0x0"
},
"pre": {
"0x6342000000000000000000000000000000000003": {
"balance": "0x0",
"code": "0x608060405234801561000f575f5ffd5b5060043610610034575f3560e01c806354fd4d5014610038578063846365d514610080575b5f5ffd5b604080518082018252600581527f312e302e30000000000000000000000000000000000000000000000000000000602082015290516100779190610124565b60405180910390f35b61009361008e36600461013d565b6100a2565b604051610077939291906101af565b5f5f60606040517f1894f07600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61013660208301846100d8565b9392505050565b5f5f5f6040848603121561014f575f5ffd5b833567ffffffffffffffff811115610165575f5ffd5b8401601f81018613610175575f5ffd5b803567ffffffffffffffff81111561018b575f5ffd5b86602082840101111561019c575f5ffd5b6020918201979096509401359392505050565b67ffffffffffffffff8416815273ffffffffffffffffffffffffffffffffffffffff83166020820152606060408201525f6101ed60608301846100d8565b9594505050505056fea164736f6c634300081e000a",
"nonce": "0x1",
"storage": {}
},
"0x7e5f4552091a69125d5dfcb7b8c2659029395bdf": {
"balance": "0x3635c9adc5dea00000",
"code": "0x",
"nonce": "0x0",
"storage": {}
},
"0xdc7e3a94ba7db4c1de83a77223a5fced6d7273e8": {
"balance": "0x3635c9adc5dea00000",
"code": "0x",
"nonce": "0x0",
"storage": {}
}
},
"post": {
"Rex6": [
{
"indexes": {
"data": 0,
"gas": 0,
"value": 0
},
"hash": "0x807d79c716cee6d2b0201f188cb3ad70276c40da705fd37bafd7708a6cddad16",
"logs": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"megaGasUsed": 296065,
"megaStatus": "success"
}
]
},
"transaction": {
"type": 2,
"data": [
"0x846365d5000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000002540be4000000000000000000000000000000000000000000000000000000000000000081f87f8085174876e800830f42408080ae6000600060006000600073634200000000000000000000000000000000000361c350f150600060005360016000f31ba02222222222222222222222222222222222222222222222222222222222222222a0222222222222222222222222222222222222222222222222222222222222222200000000000000000000000000000000000000000000000000000000000000"
],
"gasLimit": [
"0x1e8480"
],
"gasPrice": null,
"nonce": "0x0",
"secretKey": "0x0000000000000000000000000000000000000000000000000000000000000001",
"sender": "0x7e5f4552091a69125d5dfcb7b8c2659029395bdf",
"to": "0x6342000000000000000000000000000000000003",
"value": [
"0x0"
],
"maxFeePerGas": "0x1e8481",
"maxPriorityFeePerGas": "0x1",
"initcodes": null,
"accessLists": [
[]
],
"authorizationList": null,
"blobVersionedHashes": [],
"maxFeePerBlobGas": null
},
"out": "0x000000000000000000000000000000000000000000000000000000000001ac8d0000000000000000000000000fc32ba0751255e3057226a92cd310e02209709300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"megaEnv": {
"bucketCapacities": [],
"oracleStorage": []
}
}
}
Loading
Loading