From 350f2d2563a2881ec95504480dc6f46afe93ff01 Mon Sep 17 00:00:00 2001 From: FlowMemory HQ Agent Date: Thu, 14 May 2026 13:42:20 -0500 Subject: [PATCH] Add production L1 execution implementation snapshot --- crates/flowmemory-devnet/src/cli.rs | 345 +++++- crates/flowmemory-devnet/src/lib.rs | 22 +- crates/flowmemory-devnet/src/model.rs | 1011 ++++++++++++++++- .../flowmemory-devnet/tests/devnet_tests.rs | 416 ++++++- docs/FLOWCHAIN_TESTNET_ACCEPTANCE.md | 52 +- docs/LOCAL_DEVNET.md | 69 +- .../production-l1-execution/BALANCE_MODEL.md | 57 + .../BRIDGE_CREDIT_SPEND_PROOF.md | 46 + .../production-l1-execution/CHECKLIST.md | 17 + .../COMPLETION_AUDIT.md | 100 ++ .../production-l1-execution/DEX_PROOF.md | 70 ++ .../production-l1-execution/EXPERIMENTS.md | 51 + .../production-l1-execution/HANDOFF.md | 172 +++ .../INVARIANT_PROOF.md | 63 + .../production-l1-execution/NOTES.md | 42 + .../production-l1-execution/PLAN.md | 21 + .../production-l1-execution/TOKEN_PROOF.md | 61 + .../dashboard/flowmemory-dashboard-v0.json | 18 +- .../devnet/control-plane-handoff.json | 658 ++++++++++- .../generated/devnet/dashboard-state.json | 506 ++++++++- .../generated/devnet/genesis-config.json | 4 +- .../generated/devnet/indexer-handoff.json | 631 +++++++++- .../launch-core/generated/devnet/state.json | 667 ++++++++++- .../generated/devnet/verifier-handoff.json | 491 +++++++- package.json | 2 + 25 files changed, 5456 insertions(+), 136 deletions(-) create mode 100644 docs/agent-runs/production-l1-execution/BALANCE_MODEL.md create mode 100644 docs/agent-runs/production-l1-execution/BRIDGE_CREDIT_SPEND_PROOF.md create mode 100644 docs/agent-runs/production-l1-execution/CHECKLIST.md create mode 100644 docs/agent-runs/production-l1-execution/COMPLETION_AUDIT.md create mode 100644 docs/agent-runs/production-l1-execution/DEX_PROOF.md create mode 100644 docs/agent-runs/production-l1-execution/EXPERIMENTS.md create mode 100644 docs/agent-runs/production-l1-execution/HANDOFF.md create mode 100644 docs/agent-runs/production-l1-execution/INVARIANT_PROOF.md create mode 100644 docs/agent-runs/production-l1-execution/NOTES.md create mode 100644 docs/agent-runs/production-l1-execution/PLAN.md create mode 100644 docs/agent-runs/production-l1-execution/TOKEN_PROOF.md diff --git a/crates/flowmemory-devnet/src/cli.rs b/crates/flowmemory-devnet/src/cli.rs index 9f92b9fe..0ba282e0 100644 --- a/crates/flowmemory-devnet/src/cli.rs +++ b/crates/flowmemory-devnet/src/cli.rs @@ -77,6 +77,9 @@ pub enum Command { ProductSmoke { out_dir: PathBuf, }, + ExecutionE2e { + out_dir: PathBuf, + }, } pub fn run_cli() -> Result<()> { @@ -196,6 +199,11 @@ fn parse_args(args: Vec) -> Result { .map(PathBuf::from) .unwrap_or_else(|_| PathBuf::from("fixtures/handoff/generated-product")), }, + "execution-e2e" => Command::ExecutionE2e { + out_dir: option_value(&positional[1..], "--out-dir") + .map(PathBuf::from) + .unwrap_or_else(|_| PathBuf::from("devnet/local/execution-e2e")), + }, unknown => return Err(anyhow!("unknown command '{unknown}'")), }; @@ -240,7 +248,7 @@ fn option_u64(args: &[String], name: &str) -> Result> { fn print_help() { println!( - "flowmemory-devnet --state --node-dir \n\nCommands:\n init\n reset-local\n node [--node-id ] [--block-ms ] [--max-blocks ] [--peer-config ]\n node-stop\n node-status\n tick [--node-id ] [--peer-config ]\n submit-tx --tx-file [--authorized-by ] [--direct]\n faucet --account --amount [--reason ] [--authorized-by ] [--direct]\n start|run [--blocks ]\n run-block\n submit-fixture --fixture \n inspect|inspect-state [--summary]\n export|export-fixtures [--out-dir ]\n export-state [--out ]\n import-state --from \n demo [--out-dir ]\n smoke [--out-dir ]\n product-demo|product-smoke [--out-dir ]\n" + "flowmemory-devnet --state --node-dir \n\nCommands:\n init\n reset-local\n node [--node-id ] [--block-ms ] [--max-blocks ] [--peer-config ]\n node-stop\n node-status\n tick [--node-id ] [--peer-config ]\n submit-tx --tx-file [--authorized-by ] [--direct]\n faucet --account --amount [--reason ] [--authorized-by ] [--direct]\n start|run [--blocks ]\n run-block\n submit-fixture --fixture \n inspect|inspect-state [--summary]\n export|export-fixtures [--out-dir ]\n export-state [--out ]\n import-state --from \n demo [--out-dir ]\n smoke [--out-dir ]\n product-demo|product-smoke [--out-dir ]\n execution-e2e [--out-dir ]\n" ); } @@ -470,6 +478,32 @@ fn run(cli: Cli) -> Result<()> { deterministic_replay, ))?; } + Command::ExecutionE2e { out_dir } => { + let run = build_execution_e2e_state(); + save_state(&cli.state, &run.state)?; + write_runtime_boundary_files(&cli.state, &run.state)?; + export_handoff(&run.state, &out_dir)?; + let report = ExecutionE2eReport::from_run(&run); + let report_path = out_dir.join("execution-e2e-report.json"); + write_json(report_path.clone(), &report)?; + print_json(&ExecutionE2eSummary { + schema: "flowmemory.local_devnet.execution_e2e_summary.v0".to_string(), + report_path, + state_root: state_root(&run.state), + success_receipts: run + .state + .execution_receipts + .values() + .filter(|receipt| receipt.success) + .count(), + failed_receipts: run + .state + .execution_receipts + .values() + .filter(|receipt| !receipt.success) + .count(), + })?; + } } Ok(()) } @@ -939,6 +973,15 @@ struct DemoRun { second_block_hash: String, } +struct ExecutionE2eRun { + state: crate::model::ChainState, + product_block_hash: String, + failure_block_hash: String, + anchor_block_hash: String, + product_tx_ids: Vec, + negative_tx_ids: Vec, +} + fn build_demo_state() -> DemoRun { let mut state = genesis_state(); for tx in demo_transactions() { @@ -993,6 +1036,174 @@ fn build_product_smoke_state() -> DemoRun { } } +fn build_execution_e2e_state() -> ExecutionE2eRun { + let mut state = genesis_state(); + let mut product_tx_ids = Vec::new(); + for tx in product_demo_transactions() { + product_tx_ids.push(queue_transaction(&mut state, tx)); + } + let product_block = build_block(&mut state); + + let token_id = crate::model::deterministic_token_id("FLOWT"); + let pool_id = + crate::model::deterministic_pool_id(crate::model::LOCAL_TEST_UNIT_ASSET_ID, &token_id); + let alice = "local-account:product:alice"; + let bob = "local-account:product:bob"; + let duplicate_bridge_deposit_id = "bridge-deposit:product:alice:001"; + let duplicate_bridge_credit_id = crate::model::deterministic_bridge_credit_id( + duplicate_bridge_deposit_id, + alice, + crate::model::LOCAL_TEST_UNIT_ASSET_ID, + 10_000, + ); + let negative_transactions = vec![ + Transaction::TransferLocalTestUnits { + transfer_id: "transfer:negative:insufficient-native".to_string(), + from_account_id: bob.to_string(), + to_account_id: alice.to_string(), + amount_units: 100_000, + account_nonce: 2, + memo: "negative-insufficient-native".to_string(), + }, + Transaction::TransferLocalTestUnits { + transfer_id: "transfer:negative:duplicate-nonce".to_string(), + from_account_id: alice.to_string(), + to_account_id: bob.to_string(), + amount_units: 1, + account_nonce: 7, + memo: "negative-duplicate-nonce".to_string(), + }, + Transaction::TransferLocalTestUnits { + transfer_id: "transfer:negative:stale-nonce".to_string(), + from_account_id: alice.to_string(), + to_account_id: bob.to_string(), + amount_units: 1, + account_nonce: 1, + memo: "negative-stale-nonce".to_string(), + }, + Transaction::TransferLocalTestUnits { + transfer_id: "transfer:product:alice-to-bob:native:001".to_string(), + from_account_id: alice.to_string(), + to_account_id: bob.to_string(), + amount_units: 1, + account_nonce: 8, + memo: "negative-duplicate-transfer-id".to_string(), + }, + Transaction::TransferToken { + transfer_id: crate::model::deterministic_token_transfer_id( + &token_id, bob, alice, 1_000_000, 2, + ), + token_id: token_id.clone(), + from_account_id: bob.to_string(), + to_account_id: alice.to_string(), + amount_units: 1_000_000, + account_nonce: 2, + }, + Transaction::TransferToken { + transfer_id: crate::model::deterministic_token_transfer_id( + "token:missing", + alice, + bob, + 1, + 8, + ), + token_id: "token:missing".to_string(), + from_account_id: alice.to_string(), + to_account_id: bob.to_string(), + amount_units: 1, + account_nonce: 8, + }, + Transaction::AddLiquidity { + liquidity_id: crate::model::deterministic_liquidity_id(&pool_id, alice, "add", "0:1:1"), + pool_id: pool_id.clone(), + provider_account_id: alice.to_string(), + base_amount_units: 0, + quote_amount_units: 1, + min_lp_units: 1, + account_nonce: 8, + }, + Transaction::SwapExactIn { + swap_id: crate::model::deterministic_swap_id( + "pool:missing", + bob, + crate::model::LOCAL_TEST_UNIT_ASSET_ID, + 1, + "1", + ), + pool_id: "pool:missing".to_string(), + trader_account_id: bob.to_string(), + asset_in_id: crate::model::LOCAL_TEST_UNIT_ASSET_ID.to_string(), + amount_in_units: 1, + min_amount_out_units: 1, + account_nonce: 2, + }, + Transaction::SwapExactIn { + swap_id: crate::model::deterministic_swap_id( + &pool_id, + bob, + crate::model::LOCAL_TEST_UNIT_ASSET_ID, + 0, + "1", + ), + pool_id: pool_id.clone(), + trader_account_id: bob.to_string(), + asset_in_id: crate::model::LOCAL_TEST_UNIT_ASSET_ID.to_string(), + amount_in_units: 0, + min_amount_out_units: 1, + account_nonce: 2, + }, + Transaction::SwapExactIn { + swap_id: crate::model::deterministic_swap_id( + &pool_id, + bob, + crate::model::LOCAL_TEST_UNIT_ASSET_ID, + 100, + "50000", + ), + pool_id, + trader_account_id: bob.to_string(), + asset_in_id: crate::model::LOCAL_TEST_UNIT_ASSET_ID.to_string(), + amount_in_units: 100, + min_amount_out_units: 50_000, + account_nonce: 2, + }, + Transaction::ApplyBridgeCredit { + credit_id: duplicate_bridge_credit_id, + deposit_id: duplicate_bridge_deposit_id.to_string(), + replay_key: "bridge-replay:product:alice:001".to_string(), + account_id: alice.to_string(), + asset_id: crate::model::LOCAL_TEST_UNIT_ASSET_ID.to_string(), + amount_units: 10_000, + acknowledged_at_block_number: 8, + account_nonce: 8, + }, + ]; + let mut negative_tx_ids = Vec::new(); + for tx in negative_transactions { + negative_tx_ids.push(queue_transaction(&mut state, tx)); + } + let failure_block = build_block(&mut state); + + let appchain_chain_id = state.chain_id.clone(); + queue_transaction( + &mut state, + Transaction::AnchorBatchToBasePlaceholder { + appchain_chain_id, + finality_status: "local-execution-e2e-placeholder".to_string(), + }, + ); + let anchor_block = build_block(&mut state); + + ExecutionE2eRun { + state, + product_block_hash: product_block.block_hash, + failure_block_hash: failure_block.block_hash, + anchor_block_hash: anchor_block.block_hash, + product_tx_ids, + negative_tx_ids, + } +} + fn transactions_from_fixture(path: &Path) -> Result> { let body = fs::read_to_string(path) .with_context(|| format!("failed to read fixture {}", path.display()))?; @@ -1109,11 +1320,14 @@ fn export_handoff(state: &crate::model::ChainState, out_dir: &Path) -> Result<() "rootfields": state.rootfields, "agentAccounts": state.agent_accounts, "localTestUnitBalances": state.local_test_unit_balances, + "accountNonces": state.account_nonces, "faucetRecords": state.faucet_records, "balanceTransfers": state.balance_transfers, + "bridgeCreditReceipts": state.bridge_credit_receipts, "tokenDefinitions": state.token_definitions, "tokenBalances": state.token_balances, "tokenMintReceipts": state.token_mint_receipts, + "tokenTransferReceipts": state.token_transfer_receipts, "dexPools": state.dex_pools, "lpPositions": state.lp_positions, "liquidityReceipts": state.liquidity_receipts, @@ -1128,6 +1342,8 @@ fn export_handoff(state: &crate::model::ChainState, out_dir: &Path) -> Result<() "workReceipts": state.work_receipts, "verifierReports": state.verifier_reports, "baseAnchors": state.base_anchors, + "executionReceipts": state.execution_receipts, + "executionEvents": state.execution_events, }); let indexer = serde_json::json!({ @@ -1137,11 +1353,14 @@ fn export_handoff(state: &crate::model::ChainState, out_dir: &Path) -> Result<() "operatorKeyReferences": state.operator_key_references, "agentAccounts": state.agent_accounts, "localTestUnitBalances": state.local_test_unit_balances, + "accountNonces": state.account_nonces, "faucetRecords": state.faucet_records, "balanceTransfers": state.balance_transfers, + "bridgeCreditReceipts": state.bridge_credit_receipts, "tokenDefinitions": state.token_definitions, "tokenBalances": state.token_balances, "tokenMintReceipts": state.token_mint_receipts, + "tokenTransferReceipts": state.token_transfer_receipts, "dexPools": state.dex_pools, "lpPositions": state.lp_positions, "liquidityReceipts": state.liquidity_receipts, @@ -1151,6 +1370,8 @@ fn export_handoff(state: &crate::model::ChainState, out_dir: &Path) -> Result<() "finalityReceipts": state.finality_receipts, "artifactAvailabilityProofs": state.artifact_availability_proofs, "blocks": state.blocks, + "executionReceipts": state.execution_receipts, + "executionEvents": state.execution_events, "mapRoots": state_map_roots(state), "stateRoot": state_root(state), }); @@ -1160,11 +1381,14 @@ fn export_handoff(state: &crate::model::ChainState, out_dir: &Path) -> Result<() "genesisConfig": state.config, "operatorKeyReferences": state.operator_key_references, "localTestUnitBalances": state.local_test_unit_balances, + "accountNonces": state.account_nonces, "faucetRecords": state.faucet_records, "balanceTransfers": state.balance_transfers, + "bridgeCreditReceipts": state.bridge_credit_receipts, "tokenDefinitions": state.token_definitions, "tokenBalances": state.token_balances, "tokenMintReceipts": state.token_mint_receipts, + "tokenTransferReceipts": state.token_transfer_receipts, "dexPools": state.dex_pools, "lpPositions": state.lp_positions, "liquidityReceipts": state.liquidity_receipts, @@ -1176,6 +1400,8 @@ fn export_handoff(state: &crate::model::ChainState, out_dir: &Path) -> Result<() "finalityReceipts": state.finality_receipts, "artifactAvailabilityProofs": state.artifact_availability_proofs, "importedVerifierReports": state.imported_verifier_reports, + "executionReceipts": state.execution_receipts, + "executionEvents": state.execution_events, "mapRoots": state_map_roots(state), "stateRoot": state_root(state), }); @@ -1194,11 +1420,14 @@ fn export_handoff(state: &crate::model::ChainState, out_dir: &Path) -> Result<() "rootfields": state.rootfields, "agentAccounts": state.agent_accounts, "localTestUnitBalances": state.local_test_unit_balances, + "accountNonces": state.account_nonces, "faucetRecords": state.faucet_records, "balanceTransfers": state.balance_transfers, + "bridgeCreditReceipts": state.bridge_credit_receipts, "tokenDefinitions": state.token_definitions, "tokenBalances": state.token_balances, "tokenMintReceipts": state.token_mint_receipts, + "tokenTransferReceipts": state.token_transfer_receipts, "dexPools": state.dex_pools, "lpPositions": state.lp_positions, "liquidityReceipts": state.liquidity_receipts, @@ -1212,7 +1441,9 @@ fn export_handoff(state: &crate::model::ChainState, out_dir: &Path) -> Result<() "verifierModules": state.verifier_modules, "workReceipts": state.work_receipts, "verifierReports": state.verifier_reports, - "baseAnchors": state.base_anchors + "baseAnchors": state.base_anchors, + "executionReceipts": state.execution_receipts, + "executionEvents": state.execution_events } }); @@ -1291,15 +1522,20 @@ struct NodeStatus { state_root: String, pending_txs: usize, local_test_unit_balances: usize, + account_nonces: usize, faucet_records: usize, balance_transfers: usize, + bridge_credit_receipts: usize, token_definitions: usize, token_balances: usize, token_mint_receipts: usize, + token_transfer_receipts: usize, dex_pools: usize, lp_positions: usize, liquidity_receipts: usize, swap_receipts: usize, + execution_receipts: usize, + execution_events: usize, static_peer_sync: Option, last_ingested_txs: usize, last_rejected_inbox_files: usize, @@ -1337,15 +1573,20 @@ impl NodeStatus { state_root: state_root(state), pending_txs: state.pending_txs.len(), local_test_unit_balances: state.local_test_unit_balances.len(), + account_nonces: state.account_nonces.len(), faucet_records: state.faucet_records.len(), balance_transfers: state.balance_transfers.len(), + bridge_credit_receipts: state.bridge_credit_receipts.len(), token_definitions: state.token_definitions.len(), token_balances: state.token_balances.len(), token_mint_receipts: state.token_mint_receipts.len(), + token_transfer_receipts: state.token_transfer_receipts.len(), dex_pools: state.dex_pools.len(), lp_positions: state.lp_positions.len(), liquidity_receipts: state.liquidity_receipts.len(), swap_receipts: state.swap_receipts.len(), + execution_receipts: state.execution_receipts.len(), + execution_events: state.execution_events.len(), static_peer_sync, last_ingested_txs, last_rejected_inbox_files, @@ -1428,11 +1669,14 @@ struct StateSummary { agent_accounts: usize, local_balances: usize, local_test_unit_balances: usize, + account_nonces: usize, faucet_records: usize, balance_transfers: usize, + bridge_credit_receipts: usize, token_definitions: usize, token_balances: usize, token_mint_receipts: usize, + token_transfer_receipts: usize, dex_pools: usize, lp_positions: usize, liquidity_receipts: usize, @@ -1449,6 +1693,8 @@ struct StateSummary { imported_observations: usize, imported_verifier_reports: usize, base_anchors: usize, + execution_receipts: usize, + execution_events: usize, } impl StateSummary { @@ -1468,11 +1714,14 @@ impl StateSummary { agent_accounts: state.agent_accounts.len(), local_balances: state.local_test_unit_balances.len(), local_test_unit_balances: state.local_test_unit_balances.len(), + account_nonces: state.account_nonces.len(), faucet_records: state.faucet_records.len(), balance_transfers: state.balance_transfers.len(), + bridge_credit_receipts: state.bridge_credit_receipts.len(), token_definitions: state.token_definitions.len(), token_balances: state.token_balances.len(), token_mint_receipts: state.token_mint_receipts.len(), + token_transfer_receipts: state.token_transfer_receipts.len(), dex_pools: state.dex_pools.len(), lp_positions: state.lp_positions.len(), liquidity_receipts: state.liquidity_receipts.len(), @@ -1489,6 +1738,8 @@ impl StateSummary { imported_observations: state.imported_observations.len(), imported_verifier_reports: state.imported_verifier_reports.len(), base_anchors: state.base_anchors.len(), + execution_receipts: state.execution_receipts.len(), + execution_events: state.execution_events.len(), } } } @@ -1771,8 +2022,11 @@ struct ProductSmokeSummary { #[serde(rename_all = "camelCase")] struct ProductSmokeChecks { local_accounts_funded: bool, + bridge_credit_applied: bool, + native_transfer_executed: bool, token_launched: bool, initial_supply_assigned: bool, + token_transfer_executed: bool, pool_created: bool, liquidity_added: bool, swap_executed: bool, @@ -1834,12 +2088,15 @@ impl ProductSmokeSummary { deterministic_replay, checks: ProductSmokeChecks { local_accounts_funded: alice_funded && bob_funded, + bridge_credit_applied: !demo.state.bridge_credit_receipts.is_empty(), + native_transfer_executed: !demo.state.balance_transfers.is_empty(), token_launched: demo.state.token_definitions.contains_key(&token_id), initial_supply_assigned: demo .state .token_balances .get(&token_balance_id) .is_some_and(|balance| balance.units > 0), + token_transfer_executed: !demo.state.token_transfer_receipts.is_empty(), pool_created, liquidity_added, swap_executed: demo @@ -1853,8 +2110,12 @@ impl ProductSmokeSummary { .get(&bob_token_balance_id) .is_some_and(|balance| balance.units > 0), liquidity_removed, - product_receipts_queryable: !demo.state.token_mint_receipts.is_empty() + product_receipts_queryable: !demo.state.bridge_credit_receipts.is_empty() + && !demo.state.balance_transfers.is_empty() + && !demo.state.token_mint_receipts.is_empty() + && !demo.state.token_transfer_receipts.is_empty() && !demo.state.liquidity_receipts.is_empty() + && !demo.state.execution_receipts.is_empty() && !demo.state.swap_receipts.is_empty(), no_value_boundary: demo.state.config.no_value && demo @@ -1870,6 +2131,84 @@ impl ProductSmokeSummary { } } +#[derive(Debug, Serialize)] +#[serde(rename_all = "camelCase")] +struct ExecutionE2eSummary { + schema: String, + report_path: PathBuf, + state_root: String, + success_receipts: usize, + failed_receipts: usize, +} + +#[derive(Debug, Serialize)] +#[serde(rename_all = "camelCase")] +struct ExecutionE2eReport { + schema: String, + product_block_hash: String, + failure_block_hash: String, + anchor_block_hash: String, + product_tx_ids: Vec, + negative_tx_ids: Vec, + receipt_ids: Vec, + account_balances: Value, + account_nonces: Value, + token_balances: Value, + pool_reserves: Value, + lp_positions: Value, + bridge_credits: Value, + swap_result: Value, + state_root: String, + map_roots: crate::model::StateMapRoots, + failed_transaction_evidence: Value, + queryable_ids: Value, +} + +impl ExecutionE2eReport { + fn from_run(run: &ExecutionE2eRun) -> Self { + let state = &run.state; + let receipt_ids = state.execution_receipts.keys().cloned().collect::>(); + let failed = state + .execution_receipts + .values() + .filter(|receipt| !receipt.success) + .collect::>(); + let token_id = crate::model::deterministic_token_id("FLOWT"); + let pool_id = + crate::model::deterministic_pool_id(crate::model::LOCAL_TEST_UNIT_ASSET_ID, &token_id); + Self { + schema: "flowmemory.local_devnet.execution_e2e_report.v0".to_string(), + product_block_hash: run.product_block_hash.clone(), + failure_block_hash: run.failure_block_hash.clone(), + anchor_block_hash: run.anchor_block_hash.clone(), + product_tx_ids: run.product_tx_ids.clone(), + negative_tx_ids: run.negative_tx_ids.clone(), + receipt_ids, + account_balances: serde_json::json!(&state.local_test_unit_balances), + account_nonces: serde_json::json!(&state.account_nonces), + token_balances: serde_json::json!(&state.token_balances), + pool_reserves: serde_json::json!(&state.dex_pools), + lp_positions: serde_json::json!(&state.lp_positions), + bridge_credits: serde_json::json!(&state.bridge_credit_receipts), + swap_result: serde_json::json!(&state.swap_receipts), + state_root: state_root(state), + map_roots: state_map_roots(state), + failed_transaction_evidence: serde_json::json!(failed), + queryable_ids: serde_json::json!({ + "tokenId": token_id, + "poolId": pool_id, + "bridgeCreditIds": state.bridge_credit_receipts.keys().cloned().collect::>(), + "nativeTransferIds": state.balance_transfers.keys().cloned().collect::>(), + "tokenTransferIds": state.token_transfer_receipts.keys().cloned().collect::>(), + "liquidityReceiptIds": state.liquidity_receipts.keys().cloned().collect::>(), + "swapReceiptIds": state.swap_receipts.keys().cloned().collect::>(), + "executionReceiptIds": state.execution_receipts.keys().cloned().collect::>(), + "executionEventIds": state.execution_events.keys().cloned().collect::>() + }), + } + } +} + fn handoff_files() -> Vec { vec![ "dashboard-state.json".to_string(), diff --git a/crates/flowmemory-devnet/src/lib.rs b/crates/flowmemory-devnet/src/lib.rs index e2833206..3a809e2e 100644 --- a/crates/flowmemory-devnet/src/lib.rs +++ b/crates/flowmemory-devnet/src/lib.rs @@ -6,15 +6,19 @@ pub mod storage; pub use cli::run_cli; pub use hash::{canonical_json, keccak_hex}; pub use model::{ - AgentAccount, ArtifactAvailabilityProof, BalanceTransfer, BaseAnchorPlaceholder, Block, - BlockReceipt, ChainState, Challenge, DevnetConfig, DevnetError, DexPool, FaucetRecord, - FinalityReceipt, ImportedFlowPulseObservation, ImportedVerifierReport, - LOCAL_TEST_UNIT_ASSET_ID, LiquidityReceipt, LocalAuthorization, LocalTestToken, - LocalTestTokenBalance, LocalTestTokenMintReceipt, LocalTestUnitBalance, LpPosition, MemoryCell, - ModelPassport, OperatorKeyReference, StateMapRoots, SwapReceipt, Transaction, TxEnvelope, - VerifierModule, apply_transaction, build_block, default_config, - default_operator_key_references, deterministic_liquidity_id, deterministic_lp_position_id, + AccountNonce, AgentAccount, ArtifactAvailabilityProof, BalanceTransfer, BaseAnchorPlaceholder, + Block, BlockReceipt, BridgeCreditReceipt, ChainState, Challenge, DevnetConfig, DevnetError, + DexPool, EXECUTION_COST_CHARGE_NATIVE, EXECUTION_COST_CHARGE_RECORD_ONLY, ExecutionEvent, + ExecutionReceipt, FaucetRecord, FinalityReceipt, ImportedFlowPulseObservation, + ImportedVerifierReport, LOCAL_TEST_UNIT_ASSET_ID, LiquidityReceipt, LocalAuthorization, + LocalTestToken, LocalTestTokenBalance, LocalTestTokenMintReceipt, + LocalTestTokenTransferReceipt, LocalTestUnitBalance, LpPosition, MemoryCell, ModelPassport, + OperatorKeyReference, StateMapRoots, SwapReceipt, Transaction, TxEnvelope, VerifierModule, + apply_transaction, build_block, default_config, default_operator_key_references, + deterministic_bridge_credit_id, deterministic_execution_event_id, + deterministic_execution_receipt_id, deterministic_liquidity_id, deterministic_lp_position_id, deterministic_pool_id, deterministic_swap_id, deterministic_token_balance_id, - deterministic_token_id, deterministic_token_mint_id, genesis_state, product_demo_transactions, + deterministic_token_id, deterministic_token_mint_id, deterministic_token_transfer_id, + execution_cost_units, execution_error_code, genesis_state, product_demo_transactions, queue_authorized_transaction, state_map_roots, state_root, }; diff --git a/crates/flowmemory-devnet/src/model.rs b/crates/flowmemory-devnet/src/model.rs index 86162690..aaae0b55 100644 --- a/crates/flowmemory-devnet/src/model.rs +++ b/crates/flowmemory-devnet/src/model.rs @@ -13,6 +13,8 @@ pub const ZERO_HASH: &str = "0x0000000000000000000000000000000000000000000000000 pub const FLOWPULSE_TOPIC0: &str = "0x5d07190b9ae441b4d7b16259a48424acd451492b12f5f99a29f5bfd992c13e43"; pub const LOCAL_TEST_UNIT_ASSET_ID: &str = "asset:flowchain-local-test-unit"; +pub const EXECUTION_COST_CHARGE_RECORD_ONLY: &str = "record-only"; +pub const EXECUTION_COST_CHARGE_NATIVE: &str = "charge-native"; #[derive(Debug, Error, PartialEq, Eq)] pub enum DevnetError { @@ -36,6 +38,26 @@ pub enum DevnetError { FaucetAmountMustBePositive(String), #[error("balance transfer already exists: {0}")] BalanceTransferAlreadyExists(String), + #[error("bridge credit already applied: {0}")] + BridgeCreditAlreadyApplied(String), + #[error("bridge credit replay key already applied: {0}")] + BridgeCreditReplayAlreadyApplied(String), + #[error("account nonce is duplicate for {account_id}: {nonce}")] + AccountNonceDuplicate { account_id: String, nonce: u64 }, + #[error("account nonce is stale for {account_id}: expected {expected}, got {actual}")] + AccountNonceStale { + account_id: String, + expected: u64, + actual: u64, + }, + #[error( + "insufficient execution balance for {account_id}: required {required}, available {available}" + )] + ExecutionBalanceInsufficient { + account_id: String, + required: u64, + available: u64, + }, #[error("deterministic {kind} id mismatch: expected {expected}, got {actual}")] DeterministicIdMismatch { kind: String, @@ -46,6 +68,12 @@ pub enum DevnetError { TokenAlreadyExists(String), #[error("token symbol already exists: {0}")] TokenSymbolAlreadyExists(String), + #[error("invalid token symbol: {0}")] + TokenInvalidSymbol(String), + #[error("invalid token name: {0}")] + TokenInvalidName(String), + #[error("invalid token decimals: {0}")] + TokenInvalidDecimals(u8), #[error("token does not exist: {0}")] TokenMissing(String), #[error("token amount must be greater than zero: {0}")] @@ -56,6 +84,8 @@ pub enum DevnetError { TokenBalanceInsufficient(String), #[error("token mint already exists: {0}")] TokenMintAlreadyExists(String), + #[error("token transfer already exists: {0}")] + TokenTransferAlreadyExists(String), #[error("pool already exists: {0}")] PoolAlreadyExists(String), #[error("pool does not exist: {0}")] @@ -159,16 +189,22 @@ pub struct ChainState { #[serde(default)] pub local_test_unit_balances: BTreeMap, #[serde(default)] + pub account_nonces: BTreeMap, + #[serde(default)] pub faucet_records: BTreeMap, #[serde(default)] pub balance_transfers: BTreeMap, #[serde(default)] + pub bridge_credit_receipts: BTreeMap, + #[serde(default)] pub token_definitions: BTreeMap, #[serde(default)] pub token_balances: BTreeMap, #[serde(default)] pub token_mint_receipts: BTreeMap, #[serde(default)] + pub token_transfer_receipts: BTreeMap, + #[serde(default)] pub dex_pools: BTreeMap, #[serde(default)] pub lp_positions: BTreeMap, @@ -194,6 +230,10 @@ pub struct ChainState { pub imported_observations: BTreeMap, pub imported_verifier_reports: BTreeMap, pub base_anchors: BTreeMap, + #[serde(default)] + pub execution_receipts: BTreeMap, + #[serde(default)] + pub execution_events: BTreeMap, pub blocks: Vec, pub pending_txs: Vec, } @@ -211,6 +251,10 @@ pub struct DevnetConfig { pub no_value: bool, pub consensus: String, pub crypto_schema_refs: Vec, + #[serde(default = "default_execution_costs_enabled")] + pub execution_costs_enabled: bool, + #[serde(default = "default_execution_cost_charge_mode")] + pub execution_cost_charge_mode: String, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] @@ -259,11 +303,27 @@ pub struct LocalTestUnitBalance { pub owner: String, pub units: u64, pub total_faucet_units: u64, + #[serde(default)] + pub bridge_credited_units: u64, + #[serde(default)] + pub reserved_units: u64, pub last_faucet_record_id: Option, + #[serde(default)] + pub last_bridge_credit_id: Option, pub updated_at_block: u64, pub no_value: bool, } +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct AccountNonce { + pub account_id: String, + pub next_nonce: u64, + pub last_nonce: u64, + pub last_tx_id: Option, + pub updated_at_block: u64, +} + #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct FaucetRecord { @@ -288,6 +348,21 @@ pub struct BalanceTransfer { pub no_value: bool, } +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct BridgeCreditReceipt { + pub credit_id: String, + pub deposit_id: String, + pub replay_key: String, + pub account_id: String, + pub asset_id: String, + pub amount_units: u64, + pub acknowledged_at_block_number: u64, + pub applied_at_block: u64, + pub local_only: bool, + pub production_ready: bool, +} + #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct LocalTestToken { @@ -324,6 +399,18 @@ pub struct LocalTestTokenMintReceipt { pub no_value: bool, } +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct LocalTestTokenTransferReceipt { + pub transfer_id: String, + pub token_id: String, + pub from_account_id: String, + pub to_account_id: String, + pub amount_units: u64, + pub transferred_at_block: u64, + pub no_value: bool, +} + #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct DexPool { @@ -392,6 +479,39 @@ pub struct SwapReceipt { pub no_value: bool, } +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ExecutionReceipt { + pub receipt_id: String, + pub tx_id: String, + pub tx_type: String, + pub status: String, + pub success: bool, + pub error_code: Option, + pub error_message: Option, + pub execution_cost_units: u64, + pub execution_cost_charged: bool, + pub payer_account_id: Option, + pub event_ids: Vec, + pub block_number: u64, + pub no_value: bool, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ExecutionEvent { + pub event_id: String, + pub receipt_id: String, + pub tx_id: String, + pub event_type: String, + pub object_id: Option, + pub account_id: Option, + pub asset_id: Option, + pub amount_units: Option, + pub block_number: u64, + pub status: String, +} + #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct ModelPassport { @@ -548,16 +668,22 @@ pub struct BaseAnchorPlaceholder { #[serde(default)] pub local_test_unit_balance_root: String, #[serde(default)] + pub account_nonce_root: String, + #[serde(default)] pub faucet_record_root: String, #[serde(default)] pub balance_transfer_root: String, #[serde(default)] + pub bridge_credit_receipt_root: String, + #[serde(default)] pub token_definition_root: String, #[serde(default)] pub token_balance_root: String, #[serde(default)] pub token_mint_receipt_root: String, #[serde(default)] + pub token_transfer_receipt_root: String, + #[serde(default)] pub dex_pool_root: String, #[serde(default)] pub lp_position_root: String, @@ -577,6 +703,10 @@ pub struct BaseAnchorPlaceholder { pub artifact_availability_proof_root: String, #[serde(default)] pub verifier_module_root: String, + #[serde(default)] + pub execution_receipt_root: String, + #[serde(default)] + pub execution_event_root: String, pub previous_anchor_id: String, pub finality_status: String, } @@ -616,8 +746,19 @@ pub enum Transaction { from_account_id: String, to_account_id: String, amount_units: u64, + account_nonce: u64, memo: String, }, + ApplyBridgeCredit { + credit_id: String, + deposit_id: String, + replay_key: String, + account_id: String, + asset_id: String, + amount_units: u64, + acknowledged_at_block_number: u64, + account_nonce: u64, + }, LaunchToken { token_id: String, symbol: String, @@ -625,19 +766,30 @@ pub enum Transaction { decimals: u8, initial_owner_account_id: String, initial_supply_units: u64, + account_nonce: u64, }, MintLocalTestToken { mint_id: String, token_id: String, to_account_id: String, amount_units: u64, + account_nonce: u64, reason: String, }, + TransferToken { + transfer_id: String, + token_id: String, + from_account_id: String, + to_account_id: String, + amount_units: u64, + account_nonce: u64, + }, CreatePool { pool_id: String, base_asset_id: String, quote_asset_id: String, created_by_account_id: String, + account_nonce: u64, }, AddLiquidity { liquidity_id: String, @@ -646,6 +798,7 @@ pub enum Transaction { base_amount_units: u64, quote_amount_units: u64, min_lp_units: u64, + account_nonce: u64, }, RemoveLiquidity { liquidity_id: String, @@ -654,6 +807,7 @@ pub enum Transaction { lp_units: u64, min_base_amount_units: u64, min_quote_amount_units: u64, + account_nonce: u64, }, SwapExactIn { swap_id: String, @@ -662,6 +816,7 @@ pub enum Transaction { asset_in_id: String, amount_in_units: u64, min_amount_out_units: u64, + account_nonce: u64, }, RegisterModelPassport { model_passport_id: String, @@ -782,9 +937,15 @@ pub struct Block { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct BlockReceipt { + pub receipt_id: String, pub tx_id: String, pub status: String, + pub success: bool, + pub execution_cost_units: u64, + pub execution_cost_charged: bool, + pub error_code: Option, pub error: Option, + pub event_ids: Vec, #[serde(default, skip_serializing_if = "Option::is_none")] pub authorization: Option, } @@ -800,11 +961,14 @@ struct StateCommitmentView<'a> { rootfields: &'a BTreeMap, agent_accounts: &'a BTreeMap, local_test_unit_balances: &'a BTreeMap, + account_nonces: &'a BTreeMap, faucet_records: &'a BTreeMap, balance_transfers: &'a BTreeMap, + bridge_credit_receipts: &'a BTreeMap, token_definitions: &'a BTreeMap, token_balances: &'a BTreeMap, token_mint_receipts: &'a BTreeMap, + token_transfer_receipts: &'a BTreeMap, dex_pools: &'a BTreeMap, lp_positions: &'a BTreeMap, liquidity_receipts: &'a BTreeMap, @@ -821,6 +985,8 @@ struct StateCommitmentView<'a> { imported_observations: &'a BTreeMap, imported_verifier_reports: &'a BTreeMap, base_anchors: &'a BTreeMap, + execution_receipts: &'a BTreeMap, + execution_events: &'a BTreeMap, } #[derive(Debug, Serialize)] @@ -837,11 +1003,14 @@ pub struct StateMapRoots { pub rootfield_state_root: String, pub agent_account_root: String, pub local_test_unit_balance_root: String, + pub account_nonce_root: String, pub faucet_record_root: String, pub balance_transfer_root: String, + pub bridge_credit_receipt_root: String, pub token_definition_root: String, pub token_balance_root: String, pub token_mint_receipt_root: String, + pub token_transfer_receipt_root: String, pub dex_pool_root: String, pub lp_position_root: String, pub liquidity_receipt_root: String, @@ -858,6 +1027,16 @@ pub struct StateMapRoots { pub imported_observation_root: String, pub imported_verifier_report_root: String, pub base_anchor_root: String, + pub execution_receipt_root: String, + pub execution_event_root: String, +} + +fn default_execution_costs_enabled() -> bool { + true +} + +fn default_execution_cost_charge_mode() -> String { + EXECUTION_COST_CHARGE_RECORD_ONLY.to_string() } pub fn default_config() -> DevnetConfig { @@ -875,6 +1054,8 @@ pub fn default_config() -> DevnetConfig { "crypto/FLOWMEMORY_CRYPTO_SPEC.md#domain-separation".to_string(), "crypto/ATTESTATIONS.md#local-signature-helpers".to_string(), ], + execution_costs_enabled: default_execution_costs_enabled(), + execution_cost_charge_mode: default_execution_cost_charge_mode(), } } @@ -913,11 +1094,14 @@ pub fn genesis_state() -> ChainState { rootfields: BTreeMap::new(), agent_accounts: BTreeMap::new(), local_test_unit_balances: BTreeMap::new(), + account_nonces: BTreeMap::new(), faucet_records: BTreeMap::new(), balance_transfers: BTreeMap::new(), + bridge_credit_receipts: BTreeMap::new(), token_definitions: BTreeMap::new(), token_balances: BTreeMap::new(), token_mint_receipts: BTreeMap::new(), + token_transfer_receipts: BTreeMap::new(), dex_pools: BTreeMap::new(), lp_positions: BTreeMap::new(), liquidity_receipts: BTreeMap::new(), @@ -934,6 +1118,8 @@ pub fn genesis_state() -> ChainState { imported_observations: BTreeMap::new(), imported_verifier_reports: BTreeMap::new(), base_anchors: BTreeMap::new(), + execution_receipts: BTreeMap::new(), + execution_events: BTreeMap::new(), blocks: Vec::new(), pending_txs: Vec::new(), } @@ -1011,6 +1197,42 @@ pub fn deterministic_token_mint_id( ) } +pub fn deterministic_token_transfer_id( + token_id: &str, + from_account_id: &str, + to_account_id: &str, + amount_units: u64, + account_nonce: u64, +) -> String { + hash_json( + "flowmemory.local_devnet.token_transfer_id.v0", + &serde_json::json!({ + "tokenId": token_id, + "fromAccountId": from_account_id, + "toAccountId": to_account_id, + "amountUnits": amount_units, + "accountNonce": account_nonce + }), + ) +} + +pub fn deterministic_bridge_credit_id( + deposit_id: &str, + account_id: &str, + asset_id: &str, + amount_units: u64, +) -> String { + hash_json( + "flowmemory.local_devnet.bridge_credit_id.v0", + &serde_json::json!({ + "depositId": deposit_id, + "accountId": account_id, + "assetId": asset_id, + "amountUnits": amount_units + }), + ) +} + pub fn deterministic_pool_id(base_asset_id: &str, quote_asset_id: &str) -> String { hash_json( "flowmemory.local_devnet.dex_pool_id.v0", @@ -1077,11 +1299,14 @@ pub fn state_root(state: &ChainState) -> String { rootfields: &state.rootfields, agent_accounts: &state.agent_accounts, local_test_unit_balances: &state.local_test_unit_balances, + account_nonces: &state.account_nonces, faucet_records: &state.faucet_records, balance_transfers: &state.balance_transfers, + bridge_credit_receipts: &state.bridge_credit_receipts, token_definitions: &state.token_definitions, token_balances: &state.token_balances, token_mint_receipts: &state.token_mint_receipts, + token_transfer_receipts: &state.token_transfer_receipts, dex_pools: &state.dex_pools, lp_positions: &state.lp_positions, liquidity_receipts: &state.liquidity_receipts, @@ -1098,6 +1323,8 @@ pub fn state_root(state: &ChainState) -> String { imported_observations: &state.imported_observations, imported_verifier_reports: &state.imported_verifier_reports, base_anchors: &state.base_anchors, + execution_receipts: &state.execution_receipts, + execution_events: &state.execution_events, }; hash_json("flowmemory.local_devnet.state_root.v0", &view) } @@ -1124,6 +1351,10 @@ pub fn state_map_roots(state: &ChainState) -> StateMapRoots { "flowmemory.local_devnet.local_test_unit_balances.v0", &state.local_test_unit_balances, ), + account_nonce_root: map_root( + "flowmemory.local_devnet.account_nonces.v0", + &state.account_nonces, + ), faucet_record_root: map_root( "flowmemory.local_devnet.faucet_records.v0", &state.faucet_records, @@ -1132,6 +1363,10 @@ pub fn state_map_roots(state: &ChainState) -> StateMapRoots { "flowmemory.local_devnet.balance_transfers.v0", &state.balance_transfers, ), + bridge_credit_receipt_root: map_root( + "flowmemory.local_devnet.bridge_credit_receipts.v0", + &state.bridge_credit_receipts, + ), token_definition_root: map_root( "flowmemory.local_devnet.token_definitions.v0", &state.token_definitions, @@ -1144,6 +1379,10 @@ pub fn state_map_roots(state: &ChainState) -> StateMapRoots { "flowmemory.local_devnet.token_mint_receipts.v0", &state.token_mint_receipts, ), + token_transfer_receipt_root: map_root( + "flowmemory.local_devnet.token_transfer_receipts.v0", + &state.token_transfer_receipts, + ), dex_pool_root: map_root("flowmemory.local_devnet.dex_pools.v0", &state.dex_pools), lp_position_root: map_root( "flowmemory.local_devnet.lp_positions.v0", @@ -1202,6 +1441,401 @@ pub fn state_map_roots(state: &ChainState) -> StateMapRoots { "flowmemory.local_devnet.base_anchors.v0", &state.base_anchors, ), + execution_receipt_root: map_root( + "flowmemory.local_devnet.execution_receipts.v0", + &state.execution_receipts, + ), + execution_event_root: map_root( + "flowmemory.local_devnet.execution_events.v0", + &state.execution_events, + ), + } +} + +pub fn deterministic_execution_receipt_id(block_number: u64, tx_id: &str) -> String { + hash_json( + "flowmemory.local_devnet.execution_receipt_id.v0", + &serde_json::json!({ + "blockNumber": block_number, + "txId": tx_id + }), + ) +} + +pub fn deterministic_execution_event_id(receipt_id: &str, tx_id: &str, event_type: &str) -> String { + hash_json( + "flowmemory.local_devnet.execution_event_id.v0", + &serde_json::json!({ + "receiptId": receipt_id, + "txId": tx_id, + "eventType": event_type + }), + ) +} + +pub fn transaction_type_name(tx: &Transaction) -> &'static str { + match tx { + Transaction::RegisterRootfield { .. } => "RegisterRootfield", + Transaction::RegisterAgent { .. } => "RegisterAgent", + Transaction::CreateLocalTestUnitBalance { .. } => "CreateLocalTestUnitBalance", + Transaction::FaucetLocalTestUnits { .. } => "FaucetLocalTestUnits", + Transaction::TransferLocalTestUnits { .. } => "TransferLocalTestUnits", + Transaction::ApplyBridgeCredit { .. } => "ApplyBridgeCredit", + Transaction::LaunchToken { .. } => "LaunchToken", + Transaction::MintLocalTestToken { .. } => "MintLocalTestToken", + Transaction::TransferToken { .. } => "TransferToken", + Transaction::CreatePool { .. } => "CreatePool", + Transaction::AddLiquidity { .. } => "AddLiquidity", + Transaction::RemoveLiquidity { .. } => "RemoveLiquidity", + Transaction::SwapExactIn { .. } => "SwapExactIn", + Transaction::RegisterModelPassport { .. } => "RegisterModelPassport", + Transaction::CommitRoot { .. } => "CommitRoot", + Transaction::SubmitArtifactCommitment { .. } => "SubmitArtifactCommitment", + Transaction::MarkArtifactAvailability { .. } => "MarkArtifactAvailability", + Transaction::SubmitWorkReceipt { .. } => "SubmitWorkReceipt", + Transaction::SubmitVerifierReport { .. } => "SubmitVerifierReport", + Transaction::RegisterVerifierModule { .. } => "RegisterVerifierModule", + Transaction::UpdateMemoryCell { .. } => "UpdateMemoryCell", + Transaction::OpenChallenge { .. } => "OpenChallenge", + Transaction::ResolveChallenge { .. } => "ResolveChallenge", + Transaction::FinalizeWorkReceipt { .. } => "FinalizeWorkReceipt", + Transaction::AnchorBatchToBasePlaceholder { .. } => "AnchorBatchToBasePlaceholder", + Transaction::ImportFlowPulseObservation(_) => "ImportFlowPulseObservation", + Transaction::ImportVerifierReport(_) => "ImportVerifierReport", + } +} + +pub fn execution_cost_units(tx: &Transaction) -> u64 { + match tx { + Transaction::RegisterRootfield { .. } => 2, + Transaction::RegisterAgent { .. } => 1, + Transaction::CreateLocalTestUnitBalance { .. } => 0, + Transaction::FaucetLocalTestUnits { .. } => 0, + Transaction::TransferLocalTestUnits { .. } => 1, + Transaction::ApplyBridgeCredit { .. } => 1, + Transaction::LaunchToken { .. } => 8, + Transaction::MintLocalTestToken { .. } => 3, + Transaction::TransferToken { .. } => 2, + Transaction::CreatePool { .. } => 10, + Transaction::AddLiquidity { .. } => 5, + Transaction::RemoveLiquidity { .. } => 5, + Transaction::SwapExactIn { .. } => 4, + Transaction::RegisterModelPassport { .. } => 2, + Transaction::CommitRoot { .. } => 1, + Transaction::SubmitArtifactCommitment { .. } => 1, + Transaction::MarkArtifactAvailability { .. } => 1, + Transaction::SubmitWorkReceipt { .. } => 2, + Transaction::SubmitVerifierReport { .. } => 2, + Transaction::RegisterVerifierModule { .. } => 1, + Transaction::UpdateMemoryCell { .. } => 2, + Transaction::OpenChallenge { .. } => 1, + Transaction::ResolveChallenge { .. } => 1, + Transaction::FinalizeWorkReceipt { .. } => 1, + Transaction::AnchorBatchToBasePlaceholder { .. } => 1, + Transaction::ImportFlowPulseObservation(_) => 1, + Transaction::ImportVerifierReport(_) => 1, + } +} + +pub fn execution_error_code(error: &DevnetError) -> String { + execution_error_code_for_transaction( + &Transaction::AnchorBatchToBasePlaceholder { + appchain_chain_id: String::new(), + finality_status: String::new(), + }, + error, + ) +} + +pub fn execution_error_code_for_transaction(tx: &Transaction, error: &DevnetError) -> String { + if matches!( + tx, + Transaction::AddLiquidity { .. } | Transaction::RemoveLiquidity { .. } + ) && matches!(error, DevnetError::TokenAmountMustBePositive(_)) + { + return "invalid-liquidity".to_string(); + } + if matches!(tx, Transaction::SwapExactIn { .. }) + && matches!(error, DevnetError::TokenAmountMustBePositive(_)) + { + return "invalid-swap-amount".to_string(); + } + match error { + DevnetError::LocalTestUnitBalanceInsufficient(_) => "insufficient-native-balance", + DevnetError::ExecutionBalanceInsufficient { .. } => "insufficient-execution-balance", + DevnetError::TokenBalanceInsufficient(_) => "insufficient-token-balance", + DevnetError::AccountNonceDuplicate { .. } => "duplicate-nonce", + DevnetError::AccountNonceStale { .. } => "stale-nonce", + DevnetError::BridgeCreditAlreadyApplied(_) + | DevnetError::BridgeCreditReplayAlreadyApplied(_) => "duplicate-bridge-credit", + DevnetError::BalanceTransferAlreadyExists(_) + | DevnetError::FaucetRecordAlreadyExists(_) + | DevnetError::TokenMintAlreadyExists(_) + | DevnetError::TokenTransferAlreadyExists(_) + | DevnetError::LiquidityReceiptAlreadyExists(_) + | DevnetError::SwapReceiptAlreadyExists(_) => "duplicate-transaction", + DevnetError::TokenAlreadyExists(_) | DevnetError::TokenSymbolAlreadyExists(_) => { + "duplicate-token" + } + DevnetError::PoolAlreadyExists(_) => "duplicate-pool", + DevnetError::TokenInvalidSymbol(_) + | DevnetError::TokenInvalidName(_) + | DevnetError::TokenInvalidDecimals(_) + | DevnetError::TokenMissing(_) + | DevnetError::TokenAmountMustBePositive(_) => "invalid-token", + DevnetError::PoolMissing(_) => "invalid-pool", + DevnetError::PoolInvalidAsset(_) => "invalid-pool-pair", + DevnetError::LiquidityBelowMinimum(_) + | DevnetError::LpPositionInsufficient(_) + | DevnetError::LpPositionMissing(_) => "invalid-liquidity", + DevnetError::SwapSlippageExceeded(_) => "min-output-not-met", + DevnetError::PoolReserveInsufficient(_) => "insufficient-liquidity", + DevnetError::DeterministicIdMismatch { .. } => "deterministic-id-mismatch", + _ => "execution-error", + } + .to_string() +} + +fn execution_payer_account_id(tx: &Transaction) -> Option<&str> { + match tx { + Transaction::TransferLocalTestUnits { + from_account_id, .. + } => Some(from_account_id), + Transaction::ApplyBridgeCredit { account_id, .. } => Some(account_id), + Transaction::LaunchToken { + initial_owner_account_id, + .. + } => Some(initial_owner_account_id), + Transaction::MintLocalTestToken { to_account_id, .. } => Some(to_account_id), + Transaction::TransferToken { + from_account_id, .. + } => Some(from_account_id), + Transaction::CreatePool { + created_by_account_id, + .. + } => Some(created_by_account_id), + Transaction::AddLiquidity { + provider_account_id, + .. + } => Some(provider_account_id), + Transaction::RemoveLiquidity { + provider_account_id, + .. + } => Some(provider_account_id), + Transaction::SwapExactIn { + trader_account_id, .. + } => Some(trader_account_id), + _ => None, + } +} + +fn apply_transaction_atomically( + state: &mut ChainState, + tx: &Transaction, + _tx_id: &str, + execution_cost_units: u64, +) -> Result { + let mut candidate = state.clone(); + apply_transaction(&mut candidate, tx)?; + let execution_cost_charged = + charge_execution_cost_if_enabled(&mut candidate, tx, execution_cost_units)?; + *state = candidate; + Ok(execution_cost_charged) +} + +fn charge_execution_cost_if_enabled( + state: &mut ChainState, + tx: &Transaction, + execution_cost_units: u64, +) -> Result { + if !state.config.execution_costs_enabled + || execution_cost_units == 0 + || state.config.execution_cost_charge_mode == EXECUTION_COST_CHARGE_RECORD_ONLY + { + return Ok(false); + } + if state.config.execution_cost_charge_mode != EXECUTION_COST_CHARGE_NATIVE { + return Ok(false); + } + let Some(account_id) = execution_payer_account_id(tx) else { + return Ok(false); + }; + let available = available_local_test_units(state, account_id)?; + if available < execution_cost_units { + return Err(DevnetError::ExecutionBalanceInsufficient { + account_id: account_id.to_string(), + required: execution_cost_units, + available, + }); + } + debit_asset_units( + state, + account_id, + LOCAL_TEST_UNIT_ASSET_ID, + execution_cost_units, + )?; + Ok(true) +} + +fn execution_events_for_transaction( + receipt_id: &str, + tx_id: &str, + tx: &Transaction, + success: bool, + block_number: u64, +) -> Vec { + let (event_type, object_id, account_id, asset_id, amount_units) = if success { + success_event_descriptor(tx) + } else { + ( + "execution_failed".to_string(), + Some(tx_id.to_string()), + execution_payer_account_id(tx).map(ToOwned::to_owned), + None, + None, + ) + }; + let event_id = deterministic_execution_event_id(receipt_id, tx_id, &event_type); + vec![ExecutionEvent { + event_id, + receipt_id: receipt_id.to_string(), + tx_id: tx_id.to_string(), + event_type, + object_id, + account_id, + asset_id, + amount_units, + block_number, + status: if success { "applied" } else { "failed" }.to_string(), + }] +} + +fn success_event_descriptor( + tx: &Transaction, +) -> ( + String, + Option, + Option, + Option, + Option, +) { + match tx { + Transaction::TransferLocalTestUnits { + transfer_id, + from_account_id, + amount_units, + .. + } => ( + "native_transfer".to_string(), + Some(transfer_id.clone()), + Some(from_account_id.clone()), + Some(LOCAL_TEST_UNIT_ASSET_ID.to_string()), + Some(*amount_units), + ), + Transaction::ApplyBridgeCredit { + credit_id, + account_id, + asset_id, + amount_units, + .. + } => ( + "bridge_credit_applied".to_string(), + Some(credit_id.clone()), + Some(account_id.clone()), + Some(asset_id.clone()), + Some(*amount_units), + ), + Transaction::LaunchToken { + token_id, + initial_owner_account_id, + initial_supply_units, + .. + } => ( + "token_launched".to_string(), + Some(token_id.clone()), + Some(initial_owner_account_id.clone()), + Some(token_id.clone()), + Some(*initial_supply_units), + ), + Transaction::MintLocalTestToken { + mint_id, + token_id, + to_account_id, + amount_units, + .. + } => ( + "token_minted".to_string(), + Some(mint_id.clone()), + Some(to_account_id.clone()), + Some(token_id.clone()), + Some(*amount_units), + ), + Transaction::TransferToken { + transfer_id, + token_id, + from_account_id, + amount_units, + .. + } => ( + "token_transfer".to_string(), + Some(transfer_id.clone()), + Some(from_account_id.clone()), + Some(token_id.clone()), + Some(*amount_units), + ), + Transaction::CreatePool { + pool_id, + created_by_account_id, + .. + } => ( + "pool_created".to_string(), + Some(pool_id.clone()), + Some(created_by_account_id.clone()), + None, + None, + ), + Transaction::AddLiquidity { + liquidity_id, + provider_account_id, + .. + } => ( + "liquidity_added".to_string(), + Some(liquidity_id.clone()), + Some(provider_account_id.clone()), + None, + None, + ), + Transaction::RemoveLiquidity { + liquidity_id, + provider_account_id, + .. + } => ( + "liquidity_removed".to_string(), + Some(liquidity_id.clone()), + Some(provider_account_id.clone()), + None, + None, + ), + Transaction::SwapExactIn { + swap_id, + trader_account_id, + asset_in_id, + amount_in_units, + .. + } => ( + "swap_executed".to_string(), + Some(swap_id.clone()), + Some(trader_account_id.clone()), + Some(asset_in_id.clone()), + Some(*amount_in_units), + ), + _ => ( + "transaction_applied".to_string(), + None, + execution_payer_account_id(tx).map(ToOwned::to_owned), + None, + None, + ), } } @@ -1209,28 +1843,77 @@ pub fn build_block(state: &mut ChainState) -> Block { let txs = std::mem::take(&mut state.pending_txs); let mut receipts = Vec::with_capacity(txs.len()); let mut tx_ids = Vec::with_capacity(txs.len()); + let block_number = state.next_block_number; + let logical_time = state.logical_time; + let parent_hash = state.parent_hash.clone(); for envelope in txs { tx_ids.push(envelope.tx_id.clone()); let authorization = envelope.authorization.clone(); - let result = apply_transaction(state, &envelope.tx); + let tx_type = transaction_type_name(&envelope.tx).to_string(); + let execution_cost_units = execution_cost_units(&envelope.tx); + let payer_account_id = execution_payer_account_id(&envelope.tx).map(ToOwned::to_owned); + let receipt_id = deterministic_execution_receipt_id(block_number, &envelope.tx_id); + let result = apply_transaction_atomically( + state, + &envelope.tx, + &envelope.tx_id, + execution_cost_units, + ); + let success = result.is_ok(); + let execution_cost_charged = result.as_ref().map(|charged| *charged).unwrap_or(false); + let error_code = result + .as_ref() + .err() + .map(|error| execution_error_code_for_transaction(&envelope.tx, error)); + let error_message = result.as_ref().err().map(ToString::to_string); + let event_ids = execution_events_for_transaction( + &receipt_id, + &envelope.tx_id, + &envelope.tx, + success, + block_number, + ); + let event_id_values = event_ids + .iter() + .map(|event| event.event_id.clone()) + .collect::>(); + for event in event_ids { + state.execution_events.insert(event.event_id.clone(), event); + } + state.execution_receipts.insert( + receipt_id.clone(), + ExecutionReceipt { + receipt_id: receipt_id.clone(), + tx_id: envelope.tx_id.clone(), + tx_type, + status: if success { "applied" } else { "rejected" }.to_string(), + success, + error_code: error_code.clone(), + error_message: error_message.clone(), + execution_cost_units, + execution_cost_charged, + payer_account_id, + event_ids: event_id_values.clone(), + block_number, + no_value: true, + }, + ); receipts.push(BlockReceipt { + receipt_id, tx_id: envelope.tx_id, - status: if result.is_ok() { - "applied" - } else { - "rejected" - } - .to_string(), - error: result.err().map(|error| error.to_string()), + status: if success { "applied" } else { "rejected" }.to_string(), + success, + execution_cost_units, + execution_cost_charged, + error_code, + error: error_message, + event_ids: event_id_values, authorization, }); } let root = state_root(state); - let block_number = state.next_block_number; - let logical_time = state.logical_time; - let parent_hash = state.parent_hash.clone(); let mut block = Block { schema: BLOCK_SCHEMA.to_string(), @@ -1316,7 +1999,10 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), owner: owner.clone(), units: 0, total_faucet_units: 0, + bridge_credited_units: 0, + reserved_units: 0, last_faucet_record_id: None, + last_bridge_credit_id: None, updated_at_block: state.next_block_number, no_value: true, }, @@ -1371,8 +2057,10 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), from_account_id, to_account_id, amount_units, + account_nonce, memo, } => { + ensure_account_nonce_can_apply(state, from_account_id, *account_nonce)?; if state.balance_transfers.contains_key(transfer_id) { return Err(DevnetError::BalanceTransferAlreadyExists( transfer_id.clone(), @@ -1382,15 +2070,16 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), return Err(DevnetError::FaucetAmountMustBePositive(transfer_id.clone())); } - let from_balance = state - .local_test_unit_balances - .get(from_account_id) - .ok_or_else(|| DevnetError::LocalTestUnitBalanceMissing(from_account_id.clone()))?; - if from_balance.units < *amount_units { + if available_local_test_units(state, from_account_id)? < *amount_units { return Err(DevnetError::LocalTestUnitBalanceInsufficient( from_account_id.clone(), )); } + if !state.local_test_unit_balances.contains_key(to_account_id) { + return Err(DevnetError::LocalTestUnitBalanceMissing( + to_account_id.clone(), + )); + } { let from_balance = state @@ -1423,6 +2112,87 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), no_value: true, }, ); + commit_account_nonce(state, from_account_id, *account_nonce, transfer_id); + } + Transaction::ApplyBridgeCredit { + credit_id, + deposit_id, + replay_key, + account_id, + asset_id, + amount_units, + acknowledged_at_block_number, + account_nonce, + } => { + ensure_account_nonce_can_apply(state, account_id, *account_nonce)?; + ensure_expected_id( + "bridge credit", + credit_id, + &deterministic_bridge_credit_id(deposit_id, account_id, asset_id, *amount_units), + )?; + if *amount_units == 0 { + return Err(DevnetError::FaucetAmountMustBePositive(credit_id.clone())); + } + if state.bridge_credit_receipts.contains_key(credit_id) { + return Err(DevnetError::BridgeCreditAlreadyApplied(credit_id.clone())); + } + if state + .bridge_credit_receipts + .values() + .any(|receipt| receipt.replay_key == *replay_key) + { + return Err(DevnetError::BridgeCreditReplayAlreadyApplied( + replay_key.clone(), + )); + } + if asset_id == LOCAL_TEST_UNIT_ASSET_ID + && !state.local_test_unit_balances.contains_key(account_id) + { + state.local_test_unit_balances.insert( + account_id.clone(), + LocalTestUnitBalance { + account_id: account_id.clone(), + owner: account_id.clone(), + units: 0, + total_faucet_units: 0, + bridge_credited_units: 0, + reserved_units: 0, + last_faucet_record_id: None, + last_bridge_credit_id: None, + updated_at_block: state.next_block_number, + no_value: true, + }, + ); + } + ensure_asset_exists(state, asset_id)?; + credit_asset_units(state, account_id, asset_id, *amount_units)?; + if asset_id == LOCAL_TEST_UNIT_ASSET_ID { + let balance = state + .local_test_unit_balances + .get_mut(account_id) + .expect("native balance exists after bridge credit"); + balance.bridge_credited_units = balance + .bridge_credited_units + .checked_add(*amount_units) + .ok_or_else(|| DevnetError::LocalTestUnitBalanceOverflow(account_id.clone()))?; + balance.last_bridge_credit_id = Some(credit_id.clone()); + } + state.bridge_credit_receipts.insert( + credit_id.clone(), + BridgeCreditReceipt { + credit_id: credit_id.clone(), + deposit_id: deposit_id.clone(), + replay_key: replay_key.clone(), + account_id: account_id.clone(), + asset_id: asset_id.clone(), + amount_units: *amount_units, + acknowledged_at_block_number: *acknowledged_at_block_number, + applied_at_block: state.next_block_number, + local_only: true, + production_ready: false, + }, + ); + commit_account_nonce(state, account_id, *account_nonce, credit_id); } Transaction::LaunchToken { token_id, @@ -1431,8 +2201,11 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), decimals, initial_owner_account_id, initial_supply_units, + account_nonce, } => { let normalized_symbol = normalize_token_symbol(symbol); + ensure_account_nonce_can_apply(state, initial_owner_account_id, *account_nonce)?; + validate_token_definition(&normalized_symbol, name, *decimals)?; ensure_expected_id( "token", token_id, @@ -1497,14 +2270,17 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), no_value: true, }, ); + commit_account_nonce(state, initial_owner_account_id, *account_nonce, token_id); } Transaction::MintLocalTestToken { mint_id, token_id, to_account_id, amount_units, + account_nonce, reason, } => { + ensure_account_nonce_can_apply(state, to_account_id, *account_nonce)?; ensure_expected_id( "token mint", mint_id, @@ -1546,13 +2322,70 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), no_value: true, }, ); + commit_account_nonce(state, to_account_id, *account_nonce, mint_id); + } + Transaction::TransferToken { + transfer_id, + token_id, + from_account_id, + to_account_id, + amount_units, + account_nonce, + } => { + ensure_account_nonce_can_apply(state, from_account_id, *account_nonce)?; + ensure_expected_id( + "token transfer", + transfer_id, + &deterministic_token_transfer_id( + token_id, + from_account_id, + to_account_id, + *amount_units, + *account_nonce, + ), + )?; + if state.token_transfer_receipts.contains_key(transfer_id) { + return Err(DevnetError::TokenTransferAlreadyExists(transfer_id.clone())); + } + if *amount_units == 0 { + return Err(DevnetError::TokenAmountMustBePositive(transfer_id.clone())); + } + ensure_asset_exists(state, token_id)?; + if !state.local_test_unit_balances.contains_key(from_account_id) { + return Err(DevnetError::LocalTestUnitBalanceMissing( + from_account_id.clone(), + )); + } + if !state.local_test_unit_balances.contains_key(to_account_id) { + return Err(DevnetError::LocalTestUnitBalanceMissing( + to_account_id.clone(), + )); + } + ensure_asset_units_available(state, from_account_id, token_id, *amount_units)?; + debit_asset_units(state, from_account_id, token_id, *amount_units)?; + credit_asset_units(state, to_account_id, token_id, *amount_units)?; + state.token_transfer_receipts.insert( + transfer_id.clone(), + LocalTestTokenTransferReceipt { + transfer_id: transfer_id.clone(), + token_id: token_id.clone(), + from_account_id: from_account_id.clone(), + to_account_id: to_account_id.clone(), + amount_units: *amount_units, + transferred_at_block: state.next_block_number, + no_value: true, + }, + ); + commit_account_nonce(state, from_account_id, *account_nonce, transfer_id); } Transaction::CreatePool { pool_id, base_asset_id, quote_asset_id, created_by_account_id, + account_nonce, } => { + ensure_account_nonce_can_apply(state, created_by_account_id, *account_nonce)?; ensure_expected_id( "pool", pool_id, @@ -1587,6 +2420,7 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), no_value: true, }, ); + commit_account_nonce(state, created_by_account_id, *account_nonce, pool_id); } Transaction::AddLiquidity { liquidity_id, @@ -1595,7 +2429,9 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), base_amount_units, quote_amount_units, min_lp_units, + account_nonce, } => { + ensure_account_nonce_can_apply(state, provider_account_id, *account_nonce)?; ensure_expected_id( "add liquidity", liquidity_id, @@ -1716,6 +2552,7 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), no_value: true, }, ); + commit_account_nonce(state, provider_account_id, *account_nonce, liquidity_id); } Transaction::RemoveLiquidity { liquidity_id, @@ -1724,7 +2561,9 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), lp_units, min_base_amount_units, min_quote_amount_units, + account_nonce, } => { + ensure_account_nonce_can_apply(state, provider_account_id, *account_nonce)?; ensure_expected_id( "remove liquidity", liquidity_id, @@ -1843,6 +2682,7 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), no_value: true, }, ); + commit_account_nonce(state, provider_account_id, *account_nonce, liquidity_id); } Transaction::SwapExactIn { swap_id, @@ -1851,7 +2691,9 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), asset_in_id, amount_in_units, min_amount_out_units, + account_nonce, } => { + ensure_account_nonce_can_apply(state, trader_account_id, *account_nonce)?; ensure_expected_id( "swap", swap_id, @@ -1934,6 +2776,7 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), no_value: true, }, ); + commit_account_nonce(state, trader_account_id, *account_nonce, swap_id); } Transaction::RegisterModelPassport { model_passport_id, @@ -2347,6 +3190,78 @@ fn ensure_asset_exists(state: &ChainState, asset_id: &str) -> Result<(), DevnetE Err(DevnetError::TokenMissing(asset_id.to_string())) } +fn validate_token_definition(symbol: &str, name: &str, decimals: u8) -> Result<(), DevnetError> { + if symbol.len() < 2 + || symbol.len() > 12 + || !symbol + .chars() + .all(|character| character.is_ascii_uppercase() || character.is_ascii_digit()) + { + return Err(DevnetError::TokenInvalidSymbol(symbol.to_string())); + } + if name.trim().is_empty() || name.trim().len() > 64 { + return Err(DevnetError::TokenInvalidName(name.to_string())); + } + if decimals > 18 { + return Err(DevnetError::TokenInvalidDecimals(decimals)); + } + Ok(()) +} + +fn ensure_account_nonce_can_apply( + state: &ChainState, + account_id: &str, + account_nonce: u64, +) -> Result<(), DevnetError> { + let expected = state + .account_nonces + .get(account_id) + .map(|nonce| nonce.next_nonce) + .unwrap_or(1); + if account_nonce == expected { + return Ok(()); + } + if state + .account_nonces + .get(account_id) + .is_some_and(|nonce| nonce.last_nonce == account_nonce) + { + return Err(DevnetError::AccountNonceDuplicate { + account_id: account_id.to_string(), + nonce: account_nonce, + }); + } + Err(DevnetError::AccountNonceStale { + account_id: account_id.to_string(), + expected, + actual: account_nonce, + }) +} + +fn commit_account_nonce(state: &mut ChainState, account_id: &str, account_nonce: u64, tx_id: &str) { + state.account_nonces.insert( + account_id.to_string(), + AccountNonce { + account_id: account_id.to_string(), + next_nonce: account_nonce + 1, + last_nonce: account_nonce, + last_tx_id: Some(tx_id.to_string()), + updated_at_block: state.next_block_number, + }, + ); +} + +fn available_local_test_units(state: &ChainState, account_id: &str) -> Result { + let balance = state + .local_test_unit_balances + .get(account_id) + .ok_or_else(|| DevnetError::LocalTestUnitBalanceMissing(account_id.to_string()))?; + balance + .units + .checked_sub(balance.reserved_units) + .ok_or_else(|| DevnetError::LocalTestUnitBalanceInsufficient(account_id.to_string())) +} + fn ensure_asset_units_available( state: &ChainState, account_id: &str, @@ -2369,11 +3284,7 @@ fn ensure_asset_units_available( fn asset_units(state: &ChainState, account_id: &str, asset_id: &str) -> Result { if asset_id == LOCAL_TEST_UNIT_ASSET_ID { - return state - .local_test_unit_balances - .get(account_id) - .map(|balance| balance.units) - .ok_or_else(|| DevnetError::LocalTestUnitBalanceMissing(account_id.to_string())); + return available_local_test_units(state, account_id); } ensure_asset_exists(state, asset_id)?; let balance_id = deterministic_token_balance_id(asset_id, account_id); @@ -2575,11 +3486,14 @@ pub fn anchor_from_state( operator_key_reference_root: &'a str, agent_account_root: &'a str, local_test_unit_balance_root: &'a str, + account_nonce_root: &'a str, faucet_record_root: &'a str, balance_transfer_root: &'a str, + bridge_credit_receipt_root: &'a str, token_definition_root: &'a str, token_balance_root: &'a str, token_mint_receipt_root: &'a str, + token_transfer_receipt_root: &'a str, dex_pool_root: &'a str, lp_position_root: &'a str, liquidity_receipt_root: &'a str, @@ -2590,6 +3504,8 @@ pub fn anchor_from_state( finality_receipt_root: &'a str, artifact_availability_proof_root: &'a str, verifier_module_root: &'a str, + execution_receipt_root: &'a str, + execution_event_root: &'a str, previous_anchor_id: &'a str, finality_status: &'a str, } @@ -2609,11 +3525,14 @@ pub fn anchor_from_state( operator_key_reference_root: &roots.operator_key_reference_root, agent_account_root: &roots.agent_account_root, local_test_unit_balance_root: &roots.local_test_unit_balance_root, + account_nonce_root: &roots.account_nonce_root, faucet_record_root: &roots.faucet_record_root, balance_transfer_root: &roots.balance_transfer_root, + bridge_credit_receipt_root: &roots.bridge_credit_receipt_root, token_definition_root: &roots.token_definition_root, token_balance_root: &roots.token_balance_root, token_mint_receipt_root: &roots.token_mint_receipt_root, + token_transfer_receipt_root: &roots.token_transfer_receipt_root, dex_pool_root: &roots.dex_pool_root, lp_position_root: &roots.lp_position_root, liquidity_receipt_root: &roots.liquidity_receipt_root, @@ -2624,6 +3543,8 @@ pub fn anchor_from_state( finality_receipt_root: &roots.finality_receipt_root, artifact_availability_proof_root: &roots.artifact_availability_proof_root, verifier_module_root: &roots.verifier_module_root, + execution_receipt_root: &roots.execution_receipt_root, + execution_event_root: &roots.execution_event_root, previous_anchor_id: &previous_anchor_id, finality_status, }, @@ -2642,11 +3563,14 @@ pub fn anchor_from_state( operator_key_reference_root: roots.operator_key_reference_root, agent_account_root: roots.agent_account_root, local_test_unit_balance_root: roots.local_test_unit_balance_root, + account_nonce_root: roots.account_nonce_root, faucet_record_root: roots.faucet_record_root, balance_transfer_root: roots.balance_transfer_root, + bridge_credit_receipt_root: roots.bridge_credit_receipt_root, token_definition_root: roots.token_definition_root, token_balance_root: roots.token_balance_root, token_mint_receipt_root: roots.token_mint_receipt_root, + token_transfer_receipt_root: roots.token_transfer_receipt_root, dex_pool_root: roots.dex_pool_root, lp_position_root: roots.lp_position_root, liquidity_receipt_root: roots.liquidity_receipt_root, @@ -2657,6 +3581,8 @@ pub fn anchor_from_state( finality_receipt_root: roots.finality_receipt_root, artifact_availability_proof_root: roots.artifact_availability_proof_root, verifier_module_root: roots.verifier_module_root, + execution_receipt_root: roots.execution_receipt_root, + execution_event_root: roots.execution_event_root, previous_anchor_id, finality_status: finality_status.to_string(), } @@ -2785,6 +3711,14 @@ pub fn product_demo_transactions() -> Vec { let bob = "local-account:product:bob".to_string(); let token_id = deterministic_token_id("FLOWT"); let pool_id = deterministic_pool_id(LOCAL_TEST_UNIT_ASSET_ID, &token_id); + let bridge_deposit_id = "bridge-deposit:product:alice:001".to_string(); + let bridge_credit_id = deterministic_bridge_credit_id( + &bridge_deposit_id, + &alice, + LOCAL_TEST_UNIT_ASSET_ID, + 10_000, + ); + let token_transfer_id = deterministic_token_transfer_id(&token_id, &alice, &bob, 10_000, 4); let add_liquidity_id = deterministic_liquidity_id( &pool_id, &alice, @@ -2814,19 +3748,23 @@ pub fn product_demo_transactions() -> Vec { account_id: bob.clone(), owner: "operator:product:bob".to_string(), }, - Transaction::FaucetLocalTestUnits { - faucet_record_id: "faucet:product:alice".to_string(), + Transaction::ApplyBridgeCredit { + credit_id: bridge_credit_id, + deposit_id: bridge_deposit_id, + replay_key: "bridge-replay:product:alice:001".to_string(), account_id: alice.clone(), - recipient: "operator:product:alice".to_string(), + asset_id: LOCAL_TEST_UNIT_ASSET_ID.to_string(), amount_units: 10_000, - reason: "product-smoke-no-value-test-units".to_string(), + acknowledged_at_block_number: 8, + account_nonce: 1, }, - Transaction::FaucetLocalTestUnits { - faucet_record_id: "faucet:product:bob".to_string(), - account_id: bob.clone(), - recipient: "operator:product:bob".to_string(), + Transaction::TransferLocalTestUnits { + transfer_id: "transfer:product:alice-to-bob:native:001".to_string(), + from_account_id: alice.clone(), + to_account_id: bob.clone(), amount_units: 1_000, - reason: "product-smoke-no-value-test-units".to_string(), + account_nonce: 2, + memo: "bridge-credit-spend-transfer".to_string(), }, Transaction::LaunchToken { token_id: token_id.clone(), @@ -2835,12 +3773,22 @@ pub fn product_demo_transactions() -> Vec { decimals: 6, initial_owner_account_id: alice.clone(), initial_supply_units: 1_000_000, + account_nonce: 3, + }, + Transaction::TransferToken { + transfer_id: token_transfer_id, + token_id: token_id.clone(), + from_account_id: alice.clone(), + to_account_id: bob.clone(), + amount_units: 10_000, + account_nonce: 4, }, Transaction::CreatePool { pool_id: pool_id.clone(), base_asset_id: LOCAL_TEST_UNIT_ASSET_ID.to_string(), quote_asset_id: token_id.clone(), created_by_account_id: alice.clone(), + account_nonce: 5, }, Transaction::AddLiquidity { liquidity_id: add_liquidity_id, @@ -2849,6 +3797,7 @@ pub fn product_demo_transactions() -> Vec { base_amount_units: 5_000, quote_amount_units: 500_000, min_lp_units: 1, + account_nonce: 6, }, Transaction::SwapExactIn { swap_id, @@ -2857,6 +3806,7 @@ pub fn product_demo_transactions() -> Vec { asset_in_id: LOCAL_TEST_UNIT_ASSET_ID.to_string(), amount_in_units: 100, min_amount_out_units: 9_000, + account_nonce: 1, }, Transaction::RemoveLiquidity { liquidity_id: remove_liquidity_id, @@ -2865,6 +3815,7 @@ pub fn product_demo_transactions() -> Vec { lp_units: 100, min_base_amount_units: 1, min_quote_amount_units: 1, + account_nonce: 7, }, ] } diff --git a/crates/flowmemory-devnet/tests/devnet_tests.rs b/crates/flowmemory-devnet/tests/devnet_tests.rs index 99287194..4978325a 100644 --- a/crates/flowmemory-devnet/tests/devnet_tests.rs +++ b/crates/flowmemory-devnet/tests/devnet_tests.rs @@ -1,8 +1,9 @@ use flowmemory_devnet::model::{ - DevnetError, FLOWPULSE_TOPIC0, LOCAL_TEST_UNIT_ASSET_ID, Transaction, ZERO_HASH, - apply_transaction, build_block, demo_transactions, deterministic_liquidity_id, - deterministic_lp_position_id, deterministic_pool_id, deterministic_swap_id, - deterministic_token_balance_id, deterministic_token_id, genesis_state, + DevnetError, EXECUTION_COST_CHARGE_NATIVE, FLOWPULSE_TOPIC0, LOCAL_TEST_UNIT_ASSET_ID, + Transaction, ZERO_HASH, apply_transaction, build_block, demo_transactions, + deterministic_bridge_credit_id, deterministic_liquidity_id, deterministic_lp_position_id, + deterministic_pool_id, deterministic_swap_id, deterministic_token_balance_id, + deterministic_token_id, deterministic_token_transfer_id, genesis_state, product_demo_transactions, queue_transaction, state_map_roots, state_root, }; use flowmemory_devnet::{canonical_json, keccak_hex}; @@ -90,8 +91,19 @@ fn invalid_tx_is_rejected_without_state_mutation() { .expect("error") .contains("rootfield does not exist") ); - assert_eq!(before, state_root(&state)); + assert_ne!(before, state_root(&state)); assert!(state.rootfields.is_empty()); + assert_eq!(state.execution_receipts.len(), 1); + let execution_receipt = state + .execution_receipts + .values() + .next() + .expect("failed execution receipt"); + assert!(!execution_receipt.success); + assert_eq!( + execution_receipt.error_code.as_deref(), + Some("execution-error") + ); } #[test] @@ -305,6 +317,7 @@ fn local_faucet_and_transfer_update_test_unit_ledger() { from_account_id: "local-account:alice".to_string(), to_account_id: "local-account:bob".to_string(), amount_units: 20, + account_nonce: 1, memo: "unit-test-transfer".to_string(), }, ) @@ -329,6 +342,7 @@ fn local_faucet_and_transfer_update_test_unit_ledger() { from_account_id: "local-account:bob".to_string(), to_account_id: "local-account:alice".to_string(), amount_units: 30, + account_nonce: 1, memo: "too-much".to_string(), }, ), @@ -372,6 +386,7 @@ fn token_launch_pool_liquidity_swap_and_remove_update_product_state() { decimals: 6, initial_owner_account_id: alice.to_string(), initial_supply_units: 1_000_000, + account_nonce: 1, }, ) .unwrap(); @@ -382,6 +397,7 @@ fn token_launch_pool_liquidity_swap_and_remove_update_product_state() { base_asset_id: LOCAL_TEST_UNIT_ASSET_ID.to_string(), quote_asset_id: token_id.clone(), created_by_account_id: alice.to_string(), + account_nonce: 2, }, ) .unwrap(); @@ -394,6 +410,7 @@ fn token_launch_pool_liquidity_swap_and_remove_update_product_state() { base_amount_units: 5_000, quote_amount_units: 500_000, min_lp_units: 1, + account_nonce: 3, }, ) .unwrap(); @@ -406,6 +423,7 @@ fn token_launch_pool_liquidity_swap_and_remove_update_product_state() { asset_in_id: LOCAL_TEST_UNIT_ASSET_ID.to_string(), amount_in_units: 100, min_amount_out_units: 9_000, + account_nonce: 1, }, ) .unwrap(); @@ -418,6 +436,7 @@ fn token_launch_pool_liquidity_swap_and_remove_update_product_state() { lp_units: 100, min_base_amount_units: 1, min_quote_amount_units: 1, + account_nonce: 4, }, ) .unwrap(); @@ -466,6 +485,7 @@ fn token_and_dex_reject_duplicate_zero_insufficient_and_slippage_failures() { decimals: 6, initial_owner_account_id: "local-account:product:alice".to_string(), initial_supply_units: 1_000, + account_nonce: 1, }, ), Err(DevnetError::DeterministicIdMismatch { @@ -484,6 +504,7 @@ fn token_and_dex_reject_duplicate_zero_insufficient_and_slippage_failures() { decimals: 6, initial_owner_account_id: "local-account:product:alice".to_string(), initial_supply_units: 1_000_000, + account_nonce: 1, }, ) .unwrap(); @@ -497,6 +518,7 @@ fn token_and_dex_reject_duplicate_zero_insufficient_and_slippage_failures() { decimals: 6, initial_owner_account_id: "local-account:product:alice".to_string(), initial_supply_units: 1, + account_nonce: 2, }, ), Err(DevnetError::TokenAlreadyExists(token_id.clone())) @@ -510,6 +532,7 @@ fn token_and_dex_reject_duplicate_zero_insufficient_and_slippage_failures() { base_asset_id: LOCAL_TEST_UNIT_ASSET_ID.to_string(), quote_asset_id: token_id.clone(), created_by_account_id: "local-account:product:alice".to_string(), + account_nonce: 2, }, ) .unwrap(); @@ -521,6 +544,7 @@ fn token_and_dex_reject_duplicate_zero_insufficient_and_slippage_failures() { base_asset_id: LOCAL_TEST_UNIT_ASSET_ID.to_string(), quote_asset_id: token_id.clone(), created_by_account_id: "local-account:product:alice".to_string(), + account_nonce: 3, }, ), Err(DevnetError::PoolAlreadyExists(pool_id.clone())) @@ -538,6 +562,7 @@ fn token_and_dex_reject_duplicate_zero_insufficient_and_slippage_failures() { base_amount_units: 0, quote_amount_units: 1, min_lp_units: 1, + account_nonce: 3, }, ), Err(DevnetError::TokenAmountMustBePositive(zero_liquidity_id)) @@ -559,6 +584,7 @@ fn token_and_dex_reject_duplicate_zero_insufficient_and_slippage_failures() { base_amount_units: 2_000, quote_amount_units: 1, min_lp_units: 1, + account_nonce: 1, }, ), Err(DevnetError::LocalTestUnitBalanceInsufficient( @@ -581,6 +607,7 @@ fn token_and_dex_reject_duplicate_zero_insufficient_and_slippage_failures() { base_amount_units: 5_000, quote_amount_units: 500_000, min_lp_units: 1, + account_nonce: 3, }, ) .unwrap(); @@ -602,6 +629,7 @@ fn token_and_dex_reject_duplicate_zero_insufficient_and_slippage_failures() { asset_in_id: LOCAL_TEST_UNIT_ASSET_ID.to_string(), amount_in_units: 100, min_amount_out_units: 50_000, + account_nonce: 1, }, ), Err(DevnetError::SwapSlippageExceeded(slippage_swap_id)) @@ -624,6 +652,7 @@ fn token_and_dex_reject_duplicate_zero_insufficient_and_slippage_failures() { asset_in_id: LOCAL_TEST_UNIT_ASSET_ID.to_string(), amount_in_units: 1, min_amount_out_units: 1, + account_nonce: 1, }, ), Err(DevnetError::PoolMissing("pool:missing".to_string())) @@ -638,7 +667,7 @@ fn product_demo_transactions_apply_in_one_block_with_receipts() { } let block = build_block(&mut state); - assert_eq!(block.receipts.len(), 9); + assert_eq!(block.receipts.len(), 10); assert!( block .receipts @@ -646,11 +675,236 @@ fn product_demo_transactions_apply_in_one_block_with_receipts() { .all(|receipt| receipt.status == "applied") ); assert_eq!(state.token_definitions.len(), 1); + assert_eq!(state.bridge_credit_receipts.len(), 1); + assert_eq!(state.balance_transfers.len(), 1); + assert_eq!(state.token_transfer_receipts.len(), 1); assert_eq!(state.dex_pools.len(), 1); assert_eq!(state.liquidity_receipts.len(), 2); assert_eq!(state.swap_receipts.len(), 1); } +#[test] +fn execution_layer_records_failed_receipts_and_preserves_product_invariants() { + let mut state = genesis_state(); + for tx in product_demo_transactions() { + queue_transaction(&mut state, tx); + } + let product_block = build_block(&mut state); + assert!(product_block.receipts.iter().all(|receipt| receipt.success)); + + let token_id = deterministic_token_id("FLOWT"); + let pool_id = deterministic_pool_id(LOCAL_TEST_UNIT_ASSET_ID, &token_id); + let alice = "local-account:product:alice"; + let bob = "local-account:product:bob"; + let pool_before = state.dex_pools.get(&pool_id).expect("pool").clone(); + let alice_native_before = state.local_test_unit_balances[alice].units; + let bob_native_before = state.local_test_unit_balances[bob].units; + let bridge_credit_before = state.bridge_credit_receipts.len(); + let token_supply = state.token_definitions[&token_id].total_supply_units; + + let duplicate_bridge_deposit_id = "bridge-deposit:product:alice:001"; + let duplicate_bridge_credit_id = deterministic_bridge_credit_id( + duplicate_bridge_deposit_id, + alice, + LOCAL_TEST_UNIT_ASSET_ID, + 10_000, + ); + let negative_txs = vec![ + Transaction::TransferLocalTestUnits { + transfer_id: "transfer:negative:insufficient-native".to_string(), + from_account_id: bob.to_string(), + to_account_id: alice.to_string(), + amount_units: 100_000, + account_nonce: 2, + memo: "negative-insufficient-native".to_string(), + }, + Transaction::TransferLocalTestUnits { + transfer_id: "transfer:negative:duplicate-nonce".to_string(), + from_account_id: alice.to_string(), + to_account_id: bob.to_string(), + amount_units: 1, + account_nonce: 7, + memo: "negative-duplicate-nonce".to_string(), + }, + Transaction::TransferLocalTestUnits { + transfer_id: "transfer:negative:stale-nonce".to_string(), + from_account_id: alice.to_string(), + to_account_id: bob.to_string(), + amount_units: 1, + account_nonce: 1, + memo: "negative-stale-nonce".to_string(), + }, + Transaction::TransferToken { + transfer_id: deterministic_token_transfer_id(&token_id, bob, alice, 1_000_000, 2), + token_id: token_id.clone(), + from_account_id: bob.to_string(), + to_account_id: alice.to_string(), + amount_units: 1_000_000, + account_nonce: 2, + }, + Transaction::TransferToken { + transfer_id: deterministic_token_transfer_id("token:missing", alice, bob, 1, 8), + token_id: "token:missing".to_string(), + from_account_id: alice.to_string(), + to_account_id: bob.to_string(), + amount_units: 1, + account_nonce: 8, + }, + Transaction::AddLiquidity { + liquidity_id: deterministic_liquidity_id(&pool_id, alice, "add", "0:1:1"), + pool_id: pool_id.clone(), + provider_account_id: alice.to_string(), + base_amount_units: 0, + quote_amount_units: 1, + min_lp_units: 1, + account_nonce: 8, + }, + Transaction::SwapExactIn { + swap_id: deterministic_swap_id("pool:missing", bob, LOCAL_TEST_UNIT_ASSET_ID, 1, "1"), + pool_id: "pool:missing".to_string(), + trader_account_id: bob.to_string(), + asset_in_id: LOCAL_TEST_UNIT_ASSET_ID.to_string(), + amount_in_units: 1, + min_amount_out_units: 1, + account_nonce: 2, + }, + Transaction::SwapExactIn { + swap_id: deterministic_swap_id(&pool_id, bob, LOCAL_TEST_UNIT_ASSET_ID, 0, "1"), + pool_id: pool_id.clone(), + trader_account_id: bob.to_string(), + asset_in_id: LOCAL_TEST_UNIT_ASSET_ID.to_string(), + amount_in_units: 0, + min_amount_out_units: 1, + account_nonce: 2, + }, + Transaction::SwapExactIn { + swap_id: deterministic_swap_id(&pool_id, bob, LOCAL_TEST_UNIT_ASSET_ID, 100, "50000"), + pool_id: pool_id.clone(), + trader_account_id: bob.to_string(), + asset_in_id: LOCAL_TEST_UNIT_ASSET_ID.to_string(), + amount_in_units: 100, + min_amount_out_units: 50_000, + account_nonce: 2, + }, + Transaction::ApplyBridgeCredit { + credit_id: duplicate_bridge_credit_id, + deposit_id: duplicate_bridge_deposit_id.to_string(), + replay_key: "bridge-replay:product:alice:001".to_string(), + account_id: alice.to_string(), + asset_id: LOCAL_TEST_UNIT_ASSET_ID.to_string(), + amount_units: 10_000, + acknowledged_at_block_number: 8, + account_nonce: 8, + }, + ]; + for tx in negative_txs { + queue_transaction(&mut state, tx); + } + let failure_block = build_block(&mut state); + assert!( + failure_block + .receipts + .iter() + .all(|receipt| !receipt.success) + ); + let error_codes = failure_block + .receipts + .iter() + .map(|receipt| receipt.error_code.clone().expect("error code")) + .collect::>(); + for expected in [ + "insufficient-native-balance", + "duplicate-nonce", + "stale-nonce", + "insufficient-token-balance", + "invalid-token", + "invalid-liquidity", + "invalid-pool", + "invalid-swap-amount", + "min-output-not-met", + "duplicate-bridge-credit", + ] { + assert!( + error_codes.iter().any(|code| code == expected), + "missing error code {expected}: {error_codes:?}" + ); + } + + assert_eq!(state.dex_pools[&pool_id], pool_before); + assert_eq!( + state.local_test_unit_balances[alice].units, + alice_native_before + ); + assert_eq!(state.local_test_unit_balances[bob].units, bob_native_before); + assert_eq!(state.bridge_credit_receipts.len(), bridge_credit_before); + assert_eq!(state.account_nonces[alice].next_nonce, 8); + assert_eq!(state.account_nonces[bob].next_nonce, 2); + assert_eq!(total_token_units(&state, &token_id), token_supply); + assert_eq!( + state.dex_pools[&pool_id].total_lp_units, + state + .lp_positions + .values() + .filter(|position| position.pool_id == pool_id) + .map(|position| position.lp_units) + .sum::() + ); +} + +#[test] +fn execution_cost_charge_mode_rejects_insufficient_execution_balance_atomically() { + let mut state = genesis_state(); + state.config.execution_cost_charge_mode = EXECUTION_COST_CHARGE_NATIVE.to_string(); + apply_transaction( + &mut state, + &create_balance_tx("local-account:cost:alice", "operator:cost:alice"), + ) + .unwrap(); + apply_transaction( + &mut state, + &create_balance_tx("local-account:cost:bob", "operator:cost:bob"), + ) + .unwrap(); + apply_transaction( + &mut state, + &faucet_tx( + "faucet:cost:alice", + "local-account:cost:alice", + "operator:cost:alice", + 1, + ), + ) + .unwrap(); + queue_transaction( + &mut state, + Transaction::TransferLocalTestUnits { + transfer_id: "transfer:cost:too-expensive".to_string(), + from_account_id: "local-account:cost:alice".to_string(), + to_account_id: "local-account:cost:bob".to_string(), + amount_units: 1, + account_nonce: 1, + memo: "cost-mode".to_string(), + }, + ); + let block = build_block(&mut state); + assert_eq!(block.receipts.len(), 1); + assert!(!block.receipts[0].success); + assert_eq!( + block.receipts[0].error_code.as_deref(), + Some("insufficient-execution-balance") + ); + assert_eq!( + state.local_test_unit_balances["local-account:cost:alice"].units, + 1 + ); + assert_eq!( + state.local_test_unit_balances["local-account:cost:bob"].units, + 0 + ); + assert!(state.balance_transfers.is_empty()); + assert!(state.account_nonces.is_empty()); +} + #[test] fn duplicate_ids_are_rejected_for_new_objects() { let mut state = genesis_state(); @@ -1026,6 +1280,132 @@ fn cli_product_smoke_exports_token_and_dex_handoff() { std::fs::remove_dir_all(&temp).expect("cleanup temp dir"); } +#[test] +fn cli_execution_e2e_writes_report_and_round_trips_state() { + let temp = temp_dir("cli-execution-e2e"); + let state = temp.join("state.json"); + let out_dir = temp.join("execution-e2e"); + let snapshot = temp.join("snapshot.json"); + let imported = temp.join("imported-state.json"); + + let output = Command::new(env!("CARGO_BIN_EXE_flowmemory-devnet")) + .args([ + "--state", + state.to_str().expect("state path"), + "execution-e2e", + "--out-dir", + out_dir.to_str().expect("out path"), + ]) + .output() + .expect("run execution e2e"); + assert!(output.status.success()); + + let summary: serde_json::Value = + serde_json::from_slice(&output.stdout).expect("execution e2e summary json"); + assert_eq!(summary["successReceipts"], 11); + assert_eq!(summary["failedReceipts"], 11); + + let report_path = out_dir.join("execution-e2e-report.json"); + assert!(state.exists()); + assert!(report_path.exists()); + assert!(out_dir.join("dashboard-state.json").exists()); + assert!(out_dir.join("control-plane-handoff.json").exists()); + + let report_body = std::fs::read_to_string(&report_path).expect("execution report body"); + let report: serde_json::Value = + serde_json::from_str(&report_body).expect("execution report json"); + assert_eq!( + report["schema"], + "flowmemory.local_devnet.execution_e2e_report.v0" + ); + assert_eq!( + report["productTxIds"] + .as_array() + .expect("product txs") + .len(), + 10 + ); + assert_eq!( + report["negativeTxIds"] + .as_array() + .expect("negative txs") + .len(), + 11 + ); + assert!( + report["queryableIds"]["bridgeCreditIds"] + .as_array() + .is_some_and(|ids| !ids.is_empty()) + ); + assert!( + report["queryableIds"]["executionReceiptIds"] + .as_array() + .is_some_and(|ids| ids.len() == 22) + ); + assert!( + report["failedTransactionEvidence"] + .as_array() + .expect("failed evidence") + .iter() + .any(|receipt| receipt["errorCode"] == "min-output-not-met") + ); + assert!( + report["failedTransactionEvidence"] + .as_array() + .expect("failed evidence") + .iter() + .any(|receipt| receipt["errorCode"] == "duplicate-transaction") + ); + + let inspect = Command::new(env!("CARGO_BIN_EXE_flowmemory-devnet")) + .args([ + "--state", + state.to_str().expect("state path"), + "inspect-state", + "--summary", + ]) + .output() + .expect("inspect execution e2e state"); + assert!(inspect.status.success()); + let inspect_summary: serde_json::Value = + serde_json::from_slice(&inspect.stdout).expect("inspect summary json"); + assert_eq!(inspect_summary["blocks"], 3); + assert_eq!(inspect_summary["bridgeCreditReceipts"], 1); + assert_eq!(inspect_summary["tokenTransferReceipts"], 1); + assert_eq!(inspect_summary["executionReceipts"], 22); + assert_eq!(inspect_summary["executionEvents"], 22); + + let export_status = Command::new(env!("CARGO_BIN_EXE_flowmemory-devnet")) + .args([ + "--state", + state.to_str().expect("state path"), + "export-state", + "--out", + snapshot.to_str().expect("snapshot path"), + ]) + .status() + .expect("export execution e2e state"); + assert!(export_status.success()); + + let import_status = Command::new(env!("CARGO_BIN_EXE_flowmemory-devnet")) + .args([ + "--state", + imported.to_str().expect("imported path"), + "import-state", + "--from", + snapshot.to_str().expect("snapshot path"), + ]) + .status() + .expect("import execution e2e state"); + assert!(import_status.success()); + + let original_body = std::fs::read_to_string(&state).expect("original state"); + let imported_body = std::fs::read_to_string(&imported).expect("imported state"); + assert_eq!(original_body, imported_body); + + std::fs::remove_dir_all(&temp).expect("cleanup temp dir"); +} + #[test] fn cli_start_runs_10_blocks_and_state_survives_restart() { let temp = temp_dir("start-10-restart"); @@ -1488,6 +1868,30 @@ fn setup_product_test_accounts(state: &mut flowmemory_devnet::model::ChainState) .unwrap(); } +fn total_token_units(state: &flowmemory_devnet::model::ChainState, token_id: &str) -> u64 { + let account_units = state + .token_balances + .values() + .filter(|balance| balance.token_id == token_id) + .map(|balance| balance.units) + .sum::(); + let pool_units = state + .dex_pools + .values() + .map(|pool| { + let mut total = 0; + if pool.base_asset_id == token_id { + total += pool.reserve_base_units; + } + if pool.quote_asset_id == token_id { + total += pool.reserve_quote_units; + } + total + }) + .sum::(); + account_units + pool_units +} + fn register_rootfield_tx(rootfield_id: &str) -> Transaction { Transaction::RegisterRootfield { rootfield_id: rootfield_id.to_string(), diff --git a/docs/FLOWCHAIN_TESTNET_ACCEPTANCE.md b/docs/FLOWCHAIN_TESTNET_ACCEPTANCE.md index e161c455..6045f99f 100644 --- a/docs/FLOWCHAIN_TESTNET_ACCEPTANCE.md +++ b/docs/FLOWCHAIN_TESTNET_ACCEPTANCE.md @@ -22,7 +22,7 @@ This document marks every major feature as one of: | Run devnet tests | Implemented | `cargo test --manifest-path crates/flowmemory-devnet/Cargo.toml`. | | Run service tests | Implemented | `npm test` for merged service packages. | | Run launch candidate gate | Implemented | `npm run launch:candidate`. | -| One-command private testnet aliases | Implemented for merged surfaces | `package.json` now exposes `flowchain:prereq`, `flowchain:init`, `flowchain:start`, `flowchain:stop`, `flowchain:demo`, `flowchain:smoke`, `flowchain:full-smoke`, `flowchain:export`, `flowchain:import`, `control-plane:serve`, and `workbench:dev`. | +| One-command private testnet aliases | Implemented for merged surfaces | `package.json` now exposes `flowchain:prereq`, `flowchain:init`, `flowchain:start`, `flowchain:stop`, `flowchain:demo`, `flowchain:smoke`, `flowchain:full-smoke`, `flowchain:export`, `flowchain:import`, `flowchain:execution:e2e`, `control-plane:serve`, and `workbench:dev`. | | Prerequisite check script | Implemented | `infra/scripts/flowchain-check-prereqs.ps1`. | | Start/stop scripts | Implemented bounded wrappers | `flowchain:start` prepares launch-core fixtures and state summary; `flowchain:stop` records stopped state and can reset ignored local state. Long-running node behavior remains in flight. | | Full smoke script | Implemented for current private/local surfaces | `flowchain:full-smoke` runs the smoke gate, control-plane smoke client, deterministic replay, dashboard build, hardware fixture, unsafe-claim scan, export no-secret scan, and `git diff --check`. | @@ -44,6 +44,24 @@ This document marks every major feature as one of: | State import/snapshot restore | Implemented local wrapper | `flowchain:import` restores current devnet state from an exported bundle; richer subsystem snapshots remain future work. | | Health/status output | Implemented local control-plane path | CLI summary and `control-plane:smoke` exercise local health/status queries. | +## Execution, Balances, Tokens, And DEX + +| Feature | Status | Acceptance condition | +| --- | --- | --- | +| Native local balances | Implemented private/local | `localTestUnitBalances` records units, bridge credited units, reserved units, available balance behavior, and deterministic roots. | +| Bridge credit spend flow | Implemented private/local | `ApplyBridgeCredit` credits `asset:flowchain-local-test-unit`, rejects replay, and the product flow spends credited units in transfer and swap paths. | +| Execution cost table | Implemented private/local | Every execution receipt records deterministic cost units; default mode is record-only, with test coverage for optional native charging failure. | +| Native transfers | Implemented | Wallet A to wallet B transfer updates balances, nonce, transfer receipt, execution receipt, and event state. | +| Account nonces | Implemented | Product/account actions require the next nonce; duplicate and stale nonces fail with receipts. | +| Token launch | Implemented | Local token launch validates id, symbol, name, decimals, supply, duplicate id/symbol, owner account, and records launch/mint state. | +| Token transfer | Implemented | Token transfers update per-account token balances, record token-transfer receipts, and fail on insufficient balance or invalid token. | +| Pool creation | Implemented | Pool ids are deterministic over valid distinct asset pairs and creator account nonce. | +| Add/remove liquidity | Implemented | Liquidity updates reserves, LP supply, LP positions, and liquidity receipts with deterministic rounding. | +| Exact-input swap | Implemented | Swap updates reserves and balances, enforces minimum output, and records swap receipt. | +| Failed receipts | Implemented | Failed transactions commit execution receipts and failed events without partial business mutation. | +| State root coverage | Implemented | Accounts, native balances, bridge credits, token state, pools, LP positions, swaps, execution receipts, and events are included in state roots/map roots. | +| Execution E2E report | Implemented | `npm run flowchain:execution:e2e` writes `devnet/local/execution-e2e/execution-e2e-report.json`. | + ## Native Objects | Object or lifecycle | Status | Acceptance condition | @@ -163,6 +181,38 @@ Required final evidence for the acceptance PR: - Workbench screenshot or test/build evidence. - `git diff --check`. +## Execution E2E Evidence + +Current execution proof command: + +```powershell +npm run flowchain:execution:e2e +``` + +Expected output: + +- `devnet/local/execution-e2e/state.json` +- `devnet/local/execution-e2e/execution-e2e-report.json` +- local dashboard/indexer/verifier/control-plane handoff files + +The report proves bridge credit, native transfer, token launch, token transfer, pool creation, add liquidity, exact-input swap, remove liquidity, queryable receipts, failed receipt evidence, and deterministic state root/map roots. + +Direct product runtime proof: + +```powershell +cargo run --manifest-path crates/flowmemory-devnet/Cargo.toml -- --state devnet/local/product-execution-smoke/state.json product-smoke --out-dir devnet/local/product-execution-smoke +``` + +The root `npm run flowchain:product-e2e` wrapper passes after installing the repository lockfile dependencies. It runs the private/local full smoke prerequisite, executes `product-smoke`, verifies control-plane/dashboard product surfaces, and writes `devnet/local/product-e2e/flowchain-product-e2e-report.json`. + +Runtime-owned real-value pilot proof: + +```powershell +npm run flowchain:real-value-pilot:runtime +``` + +This command aliases to `flowchain:execution:e2e` and proves the local runtime can apply a bridge credit once, spend credited local units in transfer and DEX flow, reject replay, and preserve state across restart/export/import. The broader real-value pilot coordinator still requires contracts and bridge-relayer proof gates outside this runtime change. + ## Review Gate Reject the milestone if any PR claims production mainnet, public validator diff --git a/docs/LOCAL_DEVNET.md b/docs/LOCAL_DEVNET.md index dd5a2424..ce5ce6c5 100644 --- a/docs/LOCAL_DEVNET.md +++ b/docs/LOCAL_DEVNET.md @@ -37,6 +37,7 @@ npm run flowchain:start npm run flowchain:demo npm run flowchain:full-smoke npm run flowchain:export +npm run flowchain:execution:e2e npm run flowchain:stop ``` @@ -115,6 +116,29 @@ cargo run --manifest-path crates/flowmemory-devnet/Cargo.toml -- smoke `smoke` now builds the native object lifecycle, writes state and handoff files, produces 10 deterministic local blocks, and proves deterministic single-node reconciliation by replaying the same flow twice and comparing block hashes, latest parent hash, state root, and map roots. LAN and multi-node networking are not exposed in this crate yet. +Run the local product execution flow: + +```powershell +cargo run --manifest-path crates/flowmemory-devnet/Cargo.toml -- product-smoke +``` + +`product-smoke` starts from deterministic genesis, applies a local bridge credit, transfers local test units between wallets, launches a no-value local test token, transfers that token, creates a local DEX pool, adds liquidity, swaps exact input with a minimum-output guard, removes liquidity, anchors the resulting state, and checks that the product receipts are queryable. + +Run the stricter execution E2E: + +```powershell +npm run flowchain:execution:e2e +``` + +The execution E2E writes: + +```text +devnet/local/execution-e2e/state.json +devnet/local/execution-e2e/execution-e2e-report.json +``` + +The report includes transaction ids, receipt ids, account balances, token balances, pool reserves, LP positions, swap result, state root, map roots, queryable ids, and failed transaction evidence. + Import a FlowPulse observation fixture: ```powershell @@ -185,7 +209,18 @@ The prototype stores: - `rootfields` - `agentAccounts` - `localTestUnitBalances` +- `accountNonces` - `faucetRecords` +- `balanceTransfers` +- `bridgeCreditReceipts` +- `tokenDefinitions` +- `tokenBalances` +- `tokenMintReceipts` +- `tokenTransferReceipts` +- `dexPools` +- `lpPositions` +- `liquidityReceipts` +- `swapReceipts` - `modelPassports` - `memoryCells` - `challenges` @@ -198,10 +233,12 @@ The prototype stores: - `importedObservations` - `importedVerifierReports` - `baseAnchors` +- `executionReceipts` +- `executionEvents` - `blocks` - `pendingTxs` -`localTestUnitBalances` and `faucetRecords` are deterministic, no-value local records for runtime testing only. They are not token balances and there is no gas accounting. +`localTestUnitBalances`, `faucetRecords`, `bridgeCreditReceipts`, token state, DEX state, execution receipts, and execution events are deterministic, no-value local records for runtime testing only. They are not production balances, rewards, staking state, public gas economics, or bridge security claims. ## Transaction Types @@ -211,6 +248,15 @@ Supported local transactions: - `RegisterAgent` - `CreateLocalTestUnitBalance` - `FaucetLocalTestUnits` +- `TransferLocalTestUnits` +- `ApplyBridgeCredit` +- `LaunchToken` +- `MintLocalTestToken` +- `TransferToken` +- `CreatePool` +- `AddLiquidity` +- `RemoveLiquidity` +- `SwapExactIn` - `RegisterModelPassport` - `CommitRoot` - `SubmitArtifactCommitment` @@ -229,8 +275,20 @@ Supported local transactions: ## Local Lifecycle Rules - Agent and model records are identity/provenance records only; they do not hold balances. -- Local test-unit balance records are no-value runtime fixtures only; they do not create a token, monetary claim, fee market, staking role, reward, or bridge asset. +- Local test-unit balance records are no-value runtime fixtures only; they do not create a token, monetary claim, fee market, staking role, reward, or production bridge asset. - Faucet records require an existing local test-unit balance, a unique faucet record id, and a positive amount. +- Native local transfers require existing source and destination balances, a positive amount, available source units, and the next expected account nonce. +- Bridge credits are local pilot credit receipts. A credit has a deterministic credit id plus replay key, must be positive, can fund the local test-unit asset, and cannot be applied twice. +- The pilot bridge-credit spend path uses `asset:flowchain-local-test-unit` as a wrapped local asset. Bridged Base ETH or ERC20 custody is not modeled in this crate. +- Account nonces are deterministic per account. Reusing the last nonce fails as duplicate; lower or skipped nonces fail as stale. +- Local execution costs use a deterministic cost table and are recorded in every execution receipt. The default fee behavior is record-only; `charge-native` mode can be enabled in config for tests that debit local test units. +- Token launch validates deterministic token id, symbol, name, decimals, initial owner balance, duplicate id, duplicate symbol, and positive supply. +- Local test mint is permitted only as explicit local/test transaction state. It records a mint receipt and updates no-value total supply. +- Token transfers require positive amount, existing accounts, existing token, available source token balance, and the next expected account nonce. +- Pool creation requires a deterministic pool id, valid distinct assets, existing creator account, and a unique pool. +- Liquidity add/remove updates reserves, LP supply, LP position accounting, and liquidity receipts with deterministic floor rounding. +- Exact-input swaps update reserves and account balances, produce a swap receipt, and fail if the pool is invalid, liquidity is insufficient, the amount is zero, or minimum output is not met. +- Failed transactions are atomic: the business state is not partially mutated, but a failed execution receipt and `execution_failed` event are recorded. - Work receipts must reference an existing artifact commitment in the same rootfield. - Verifier reports must reference an existing active verifier module and an existing receipt in the same rootfield. - Memory cells can be created or updated only from an existing work receipt with an accepted local verifier report. @@ -249,12 +307,13 @@ Each block has: - Logical time. - Transaction ids. - Receipts. +- Execution receipt id, success flag, execution cost units, charged flag, error code, and event ids for each transaction receipt. - State root. - Block hash. The devnet uses deterministic logical time and canonical JSON with Keccak-256. Tests prove the same inputs produce the same state root and block hash. -`inspect-state --summary`, exported handoff files, and Base anchor placeholders include deterministic roots for the local maps, including operator key references, agent accounts, local test-unit balances, faucet records, model passports, memory cells, challenges, finality receipts, artifact availability proofs, verifier modules, work receipts, and verifier reports. +`inspect-state --summary`, exported handoff files, and Base anchor placeholders include deterministic roots for the local maps, including operator key references, agent accounts, local test-unit balances, account nonces, faucet records, balance transfers, bridge credit receipts, token definitions, token balances, token mint receipts, token transfer receipts, DEX pools, LP positions, liquidity receipts, swap receipts, model passports, memory cells, challenges, finality receipts, artifact availability proofs, verifier modules, work receipts, verifier reports, execution receipts, and execution events. ## Persistence @@ -285,8 +344,10 @@ The control-plane handoff contains the current chain id, latest block, blocks, p Control-plane and dashboard agents should read: - `objects.localTestUnitBalances` and `objects.faucetRecords` from `control-plane-handoff.json`. +- `objects.accountNonces`, `objects.balanceTransfers`, `objects.bridgeCreditReceipts`, `objects.tokenDefinitions`, `objects.tokenBalances`, `objects.tokenTransferReceipts`, `objects.dexPools`, `objects.lpPositions`, `objects.liquidityReceipts`, `objects.swapReceipts`, `objects.executionReceipts`, and `objects.executionEvents` from `control-plane-handoff.json`. - Top-level `localTestUnitBalances` and `faucetRecords` from `dashboard-state.json`. -- `mapRoots.localTestUnitBalanceRoot` and `mapRoots.faucetRecordRoot` anywhere map-root reconciliation is needed. +- Top-level token, DEX, receipt, nonce, and execution maps from `dashboard-state.json`. +- `mapRoots.localTestUnitBalanceRoot`, `mapRoots.accountNonceRoot`, `mapRoots.bridgeCreditReceiptRoot`, `mapRoots.tokenBalanceRoot`, `mapRoots.dexPoolRoot`, `mapRoots.lpPositionRoot`, `mapRoots.executionReceiptRoot`, and `mapRoots.executionEventRoot` anywhere map-root reconciliation is needed. ## Non-Goals diff --git a/docs/agent-runs/production-l1-execution/BALANCE_MODEL.md b/docs/agent-runs/production-l1-execution/BALANCE_MODEL.md new file mode 100644 index 00000000..eebc777e --- /dev/null +++ b/docs/agent-runs/production-l1-execution/BALANCE_MODEL.md @@ -0,0 +1,57 @@ +# Balance Model + +Status: implemented for private/local execution proof. + +## Native Local Unit + +- Native local execution uses `asset:flowchain-local-test-unit`. +- Balances live in `localTestUnitBalances`. +- Fields include `units`, `bridgeCreditedUnits`, `reservedUnits`, `totalFaucetUnits`, `lastBridgeCreditId`, `lastFaucetRecordId`, `updatedAtBlock`, and `noValue`. +- Available balance is `units - reservedUnits`. +- `reservedUnits` is represented in state for pending/reserved accounting, but current product flow does not reserve balances across blocks. + +## Bridge Credit Behavior + +- Bridge credit execution is `ApplyBridgeCredit`. +- The local pilot uses bridge credit into `asset:flowchain-local-test-unit`, effectively a wrapped local asset for spend-flow testing. +- Bridged Base ETH and external ERC20 custody are not modeled by this crate. +- Each credit requires a deterministic `creditId`, `depositId`, `replayKey`, target account, asset id, positive amount, acknowledged block, and account nonce. +- Reusing either the credit id or replay key fails with a failed execution receipt. +- Credit receipts are `localOnly: true` and `productionReady: false`. + +## Fee Behavior + +- Execution costs are deterministic and recorded on every `executionReceipt`. +- Default mode is `record-only`; it records cost units but does not debit balances. +- Optional config mode `charge-native` debits local test units from the payer after business execution in the atomic candidate state. +- If `charge-native` cannot pay the cost, the whole transaction fails and the business mutation is discarded. + +Cost table: + +| Transaction | Cost units | +| --- | ---: | +| `TransferLocalTestUnits` | 1 | +| `ApplyBridgeCredit` | 1 | +| `LaunchToken` | 8 | +| `MintLocalTestToken` | 3 | +| `TransferToken` | 2 | +| `CreatePool` | 10 | +| `AddLiquidity` | 5 | +| `RemoveLiquidity` | 5 | +| `SwapExactIn` | 4 | + +Other existing devnet object transactions have deterministic record-only costs in `execution_cost_units`. + +## Failure Behavior + +- Zero native transfer or bridge credit amount fails. +- Insufficient native balance fails with `insufficient-native-balance`. +- Duplicate nonce fails with `duplicate-nonce`. +- Stale or skipped nonce fails with `stale-nonce`. +- Insufficient execution balance in `charge-native` mode fails with `insufficient-execution-balance`. +- Failed transactions still write execution receipts and failed events, but do not partially mutate business state. + +## Evidence + +- `crates/flowmemory-devnet/tests/devnet_tests.rs` covers insufficient native balance, duplicate nonce, stale nonce, atomic execution-cost failure, bridge replay, and execution E2E restart/export/import. +- `devnet/local/execution-e2e/execution-e2e-report.json` records account balances, bridge credits, nonces, receipts, failed evidence, and roots. diff --git a/docs/agent-runs/production-l1-execution/BRIDGE_CREDIT_SPEND_PROOF.md b/docs/agent-runs/production-l1-execution/BRIDGE_CREDIT_SPEND_PROOF.md new file mode 100644 index 00000000..47669f3b --- /dev/null +++ b/docs/agent-runs/production-l1-execution/BRIDGE_CREDIT_SPEND_PROOF.md @@ -0,0 +1,46 @@ +# Bridge Credit Spend Proof + +Status: implemented for private/local execution proof. + +## Flow + +The runnable bridge-credit spend flow is: + +1. Create Alice and Bob local accounts. +2. Apply a deterministic local bridge credit to Alice. +3. Confirm Alice has credited local units. +4. Transfer part of the credited local units from Alice to Bob. +5. Launch `FLOWT`. +6. Transfer `FLOWT` from Alice to Bob. +7. Create a local-unit/FLOWT pool. +8. Add liquidity from Alice. +9. Swap Bob's credited local units for FLOWT. +10. Remove liquidity from Alice. +11. Query balances, receipts, events, pool state, LP state, and roots. + +## Asset Configuration + +- Pilot bridge credit asset: `asset:flowchain-local-test-unit`. +- This is a local wrapped asset for execution testing. +- Bridged Base ETH and ERC20 custody are not implemented in this devnet crate. +- Credits are marked `localOnly: true` and `productionReady: false`. + +## Replay And Failure + +- `creditId` is deterministic from deposit id, account id, asset id, and amount. +- `replayKey` must be unique. +- Reapplying the same credit or replay key produces a failed execution receipt with `duplicate-bridge-credit`. +- Failed bridge credit does not mint a second balance credit. + +## Evidence + +`npm run flowchain:execution:e2e` writes `devnet/local/execution-e2e/execution-e2e-report.json`. + +Observed execution report fields: + +- `bridgeCredits` includes one applied Alice credit for 10,000 local units. +- `accountBalances.local-account:product:alice.bridgeCreditedUnits` is 10,000. +- `accountBalances.local-account:product:bob.units` reflects Alice's transfer and Bob's swap spend. +- `swapResult` records Bob swapping local units into FLOWT. +- `failedTransactionEvidence` includes duplicate bridge credit evidence. +- `queryableIds` lists bridge credit, native transfer, token transfer, liquidity, swap, execution receipt, and execution event ids. diff --git a/docs/agent-runs/production-l1-execution/CHECKLIST.md b/docs/agent-runs/production-l1-execution/CHECKLIST.md new file mode 100644 index 00000000..48c29a4a --- /dev/null +++ b/docs/agent-runs/production-l1-execution/CHECKLIST.md @@ -0,0 +1,17 @@ +# Private/Local L1 Execution Checklist + +- [x] Read required repo instructions and current-state docs. +- [x] Confirm branch and clean worktree before edits. +- [x] Audit existing transfer, token, DEX, bridge credit, receipt, and root behavior. +- [x] Add account balance and bridge credit state. +- [x] Add deterministic local execution costs. +- [x] Add native transfer execution. +- [x] Add token launch, mint, transfer, and balance state. +- [x] Add pool, liquidity, swap, and LP state. +- [x] Add success and failure receipts/events. +- [x] Include all execution state in deterministic roots. +- [x] Add product E2E and execution E2E report. +- [x] Add required negative and invariant tests. +- [x] Prove restart and export/import persistence. +- [x] Run required commands, with the product wrapper dependency blocker recorded in `EXPERIMENTS.md`. +- [x] Write proof docs and handoff. diff --git a/docs/agent-runs/production-l1-execution/COMPLETION_AUDIT.md b/docs/agent-runs/production-l1-execution/COMPLETION_AUDIT.md new file mode 100644 index 00000000..2e503811 --- /dev/null +++ b/docs/agent-runs/production-l1-execution/COMPLETION_AUDIT.md @@ -0,0 +1,100 @@ +# Private/Local L1 Execution Completion Audit + +Status: complete for the assigned devnet execution scope. + +## Objective + +Implement and harden FlowChain private/local L1 devnet execution for: + +- account balances and bridge credits +- deterministic gas/cost recording +- native transfers +- token launch, local test mint, token transfer, and balance queries +- DEX pool creation, liquidity add/remove, swaps, reserves, and LP positions +- success and failed receipts/events +- deterministic state roots and map roots +- E2E proof, negative/invariant tests, reports, and handoff docs + +## Prompt-To-Artifact Checklist + +| Requirement | Evidence | Status | +| --- | --- | --- | +| Create tracking files first | `PLAN.md`, `CHECKLIST.md`, `EXPERIMENTS.md`, `NOTES.md` in this directory | Done | +| Native local balance ledger | `LocalTestUnitBalance` includes units, bridge credited units, reserved units, faucet fields; transfer and bridge credit transactions mutate balances | Done | +| Bridge credited balance | `ApplyBridgeCredit`, `BridgeCreditReceipt`, bridge credit roots, execution E2E bridge credit report | Done | +| Reserved/pending balance where needed | `reservedUnits` represented; current flow has no cross-block reservation path | Done | +| Insufficient balance failure | Tests cover insufficient native and token balances; failed receipts include error codes | Done | +| Deterministic execution cost table | `execution_cost_units`; every execution receipt records `executionCostUnits` and charged flag | Done | +| Optional native execution charging | `charge-native` config test rejects insufficient execution balance atomically | Done | +| Wallet A to B transfer | Product flow transfers Alice local units to Bob | Done | +| Nonce increments | `accountNonces`; duplicate/stale tests; E2E report includes Alice and Bob nonces | Done | +| Receipt and event generation | `ExecutionReceipt`, `ExecutionEvent`, block receipt fields, event IDs | Done | +| Token launch validation | Token id, symbol, name, decimals, supply, duplicate id/symbol validation | Done | +| Local test mint | `MintLocalTestToken`, mint receipts, local/no-value doc boundary | Done | +| Token transfer and balance query state | `TransferToken`, `tokenBalances`, `tokenTransferReceipts`, product E2E token transfer | Done | +| Pool creation | `CreatePool`, deterministic pool id, product smoke report | Done | +| Add/remove liquidity | `AddLiquidity`, `RemoveLiquidity`, reserve/LP accounting, liquidity receipts | Done | +| Swap exact input | `SwapExactIn`, constant-product floor math, minimum output guard | Done | +| LP positions | `lpPositions`, LP supply and position invariant test | Done | +| Failed swap receipt | Negative E2E includes `min-output-not-met`, `invalid-swap-amount`, and `invalid-pool` failed receipts | Done | +| Failed transaction receipts | Atomic failure path commits failed execution receipt and `execution_failed` event only | Done | +| Execution error codes | E2E failed evidence includes duplicate nonce, stale nonce, insufficient balances, invalid token/pool/liquidity/swap, min-output, duplicate bridge credit, duplicate transaction | Done | +| State root includes execution maps | `state_root`, `state_map_roots`, anchors, reports include account nonce, bridge credit, token, pool, LP, swap, receipt, and event roots | Done | +| E2E flow from bridge credit to DEX | `npm run flowchain:execution:e2e`; report has bridge credit, transfer, token launch, token transfer, pool, add liquidity, swap, remove liquidity | Done | +| Negative tests | `execution_layer_records_failed_receipts_and_preserves_product_invariants` and CLI report test cover required negative cases | Done | +| Invariant tests | Token supply, LP supply/positions, bridge replay, nonce behavior, failed atomicity, export/import | Done | +| State survives restart and export/import | `cli_execution_e2e_writes_report_and_round_trips_state` inspects restarted state and compares exported/imported state JSON | Done | +| Product E2E command | `npm run flowchain:product-e2e` passed; report status `passed`, missing coverage `0` | Done | +| Execution E2E command | `npm run flowchain:execution:e2e` passed; report status summary has 11 success and 11 failed receipts | Done | +| Real-value pilot runtime proof | `npm run flowchain:real-value-pilot:runtime` passed and aliases to execution E2E | Done | +| Broader real-value pilot coordinator | `npm run flowchain:real-value-pilot:e2e -- -AllowIncomplete -SkipBaseline` reports only contracts and bridge-relayer proofs missing in this checkout | Runtime done; external gates pending | +| `git diff --check` | Passed after final docs/code changes | Done | +| Execution report JSON | `devnet/local/execution-e2e/execution-e2e-report.json` generated with tx IDs, receipt IDs, balances, pool reserves, LP positions, swap result, roots, and failed evidence | Done | +| Proof docs | `BALANCE_MODEL.md`, `TOKEN_PROOF.md`, `DEX_PROOF.md`, `BRIDGE_CREDIT_SPEND_PROOF.md`, `INVARIANT_PROOF.md` | Done | +| Handoff docs | `HANDOFF.md` lists transaction types, receipt fields, state output paths, and RPC/dashboard requirements | Done | +| Local devnet docs | `docs/LOCAL_DEVNET.md` documents execution commands, state maps, rules, roots, handoff maps, and non-goals | Done | +| Acceptance docs | `docs/FLOWCHAIN_TESTNET_ACCEPTANCE.md` includes execution acceptance and E2E evidence | Done | +| Unsafe production claims | `node infra/scripts/check-unsafe-claims.mjs` passed | Done | + +## Report Evidence + +Execution E2E report: + +- Path: `devnet/local/execution-e2e/execution-e2e-report.json` +- Schema: `flowmemory.local_devnet.execution_e2e_report.v0` +- State root: `0xb59214e331c7ee9384a9409acbbe4f61049270005a80f4582fa53df3d186dcb3` +- Product transactions: 10 +- Negative transactions: 11 +- Execution receipts: 22 +- Failed transaction evidence entries: 11 +- Bridge credit receipts: 1 +- Swap receipts: 1 + +Product E2E report: + +- Path: `devnet/local/product-e2e/flowchain-product-e2e-report.json` +- Schema: `flowchain.product_testnet_v1.e2e_report.v0` +- Status: `passed` +- Missing coverage: 0 +- Runtime product-smoke token launch, swap, and receipt-query checks: passed +- Wallet product smoke: passed + +## Commands Verified + +```powershell +npm ci +npm ci --prefix apps/dashboard +npm ci --prefix crypto +cargo test --manifest-path crates/flowmemory-devnet/Cargo.toml +cargo run --manifest-path crates/flowmemory-devnet/Cargo.toml -- --state devnet/local/product-execution-smoke/state.json product-smoke --out-dir devnet/local/product-execution-smoke +npm run flowchain:execution:e2e +npm run flowchain:product-e2e +npm run flowchain:real-value-pilot:runtime +npm run flowchain:real-value-pilot:e2e -- -AllowIncomplete -SkipBaseline +node infra/scripts/check-unsafe-claims.mjs +git diff --check +``` + +## Known Integration Note + +This worktree is behind `origin/main` by two real-value-pilot commits. The incoming changes add pilot aliases near the package script area. Merge/rebase should preserve the new `flowchain:execution:e2e` alias. diff --git a/docs/agent-runs/production-l1-execution/DEX_PROOF.md b/docs/agent-runs/production-l1-execution/DEX_PROOF.md new file mode 100644 index 00000000..5c8bc90f --- /dev/null +++ b/docs/agent-runs/production-l1-execution/DEX_PROOF.md @@ -0,0 +1,70 @@ +# DEX Proof + +Status: implemented for private/local execution proof. + +## Lifecycle + +DEX lifecycle transactions: + +- `CreatePool` +- `AddLiquidity` +- `RemoveLiquidity` +- `SwapExactIn` + +Query state: + +- `dexPools` +- `lpPositions` +- `liquidityReceipts` +- `swapReceipts` +- `tokenBalances` +- `localTestUnitBalances` +- `executionReceipts` +- `executionEvents` + +## Pool Rules + +Pool creation requires a deterministic pool id, distinct base and quote assets, existing creator account, valid assets, unique pool, and next expected nonce. The product flow creates a pool for `asset:flowchain-local-test-unit` and `FLOWT`. + +## Liquidity Rules + +Add liquidity requires positive base and quote amounts, available provider balances for both assets, `minLpUnits`, and next expected nonce. + +LP units: + +- Initial liquidity mints `min(baseAmount, quoteAmount)` LP units. +- Later liquidity mints the minimum of base-proportional and quote-proportional LP units using floor division. + +Remove liquidity requires an existing LP position, positive LP amount, enough LP units, and minimum base/quote outputs. Withdrawn amounts are proportional to pool reserves and total LP supply using floor division. + +## Swap Rules + +`SwapExactIn` supports deterministic exact-input swaps in either pool direction. Output uses constant-product math without a fee term: + +```text +amountOut = reserveOut * amountIn / (reserveIn + amountIn) +``` + +The swap fails if: + +- pool id is invalid +- input asset is not one side of the pool +- input amount is zero +- reserves are insufficient +- output is zero +- output is below `minAmountOut` +- trader lacks input balance +- nonce is duplicate or stale + +Successful swaps debit input balance, credit output balance, update reserves, and write a swap receipt. + +## Product Evidence + +The product flow: + +- creates the local-unit/FLOWT pool +- adds 5,000 local units and 500,000 FLOWT +- swaps 100 local units from Bob into FLOWT with minimum output 9,000 +- removes 100 LP units from Alice + +The execution report records final pool reserves, LP position, and swap output. Negative tests cover invalid pool, invalid liquidity amount, invalid swap amount, min-output failure, and atomic failed-swap behavior. diff --git a/docs/agent-runs/production-l1-execution/EXPERIMENTS.md b/docs/agent-runs/production-l1-execution/EXPERIMENTS.md new file mode 100644 index 00000000..86173e32 --- /dev/null +++ b/docs/agent-runs/production-l1-execution/EXPERIMENTS.md @@ -0,0 +1,51 @@ +# Private/Local L1 Execution Experiments + +This file records commands, observations, and evidence from the execution-layer work. + +## Commands + +Completed: +- `npm ci` + - Installed root workspace dependencies from lockfile. +- `npm ci --prefix apps/dashboard` + - Installed dashboard dependencies from lockfile for the required product wrapper. +- `npm ci --prefix crypto` + - Installed crypto package dependencies from lockfile for the required product wrapper. +- `cargo clean --manifest-path crates/flowmemory-devnet/Cargo.toml` +- `cargo test --manifest-path crates/flowmemory-devnet/Cargo.toml` + - Passed after clean rebuild with 30 tests. +- `cargo test --manifest-path crates/flowmemory-devnet/Cargo.toml --test devnet_tests cli_execution_e2e_writes_report_and_round_trips_state` + - Passed after adding CLI report/restart/export-import coverage. +- `cargo run --manifest-path crates/flowmemory-devnet/Cargo.toml -- --state devnet/local/product-execution-smoke/state.json product-smoke --out-dir devnet/local/product-execution-smoke` + - Passed. + - State root: `0x07fd8df4740b407d0d25a5c39a0f652f797eaf2152cfa6475e24aff7a363e67a`. +- `npm run flowchain:execution:e2e` + - Passed. + - Report: `devnet/local/execution-e2e/execution-e2e-report.json`. + - State root: `0xb59214e331c7ee9384a9409acbbe4f61049270005a80f4582fa53df3d186dcb3`. + - Success receipts: 11. + - Failed receipts: 11. +- `npm run flowchain:product-e2e` + - Passed after lockfile dependency install. + - Report: `devnet/local/product-e2e/flowchain-product-e2e-report.json`. + - The product E2E wrapper ran private/local full smoke, runtime `product-smoke`, control-plane/dashboard surface checks, and wallet product fixture validation. +- `npm run flowchain:real-value-pilot:runtime` + - Passed. + - This aliases to `flowchain:execution:e2e` and proves the runtime-owned bridge credit, transfer, DEX spend, failed replay, restart, and export/import path. +- `npm run flowchain:real-value-pilot:e2e -- -AllowIncomplete -SkipBaseline` + - Completed in coordination/report mode. + - Runtime proof is present. + - Remaining missing proofs are owned by contracts and bridge-relayer gates in this checkout. +- `node infra/scripts/check-unsafe-claims.mjs` + - Passed after renaming agent-run headings to explicit private/local wording. +- `git diff --check` + - Passed. + +## Observations + +- Initial branch check: `agent/production-l1-execution` is based on `origin/main` at the start of work. +- The local devnet already had a no-value deterministic Rust runtime with local test-unit balances, faucet records, product token state, and DEX skeletons. It lacked account nonces, bridge credit receipts, token transfer receipts, failed execution receipt state, execution events, deterministic cost receipt fields, and E2E report generation. +- The implemented product flow starts from a bridge credit, transfers credited local units, launches and transfers `FLOWT`, creates a pool, adds liquidity, swaps, removes liquidity, and records queryable receipts. +- A stale Cargo target binary briefly hid the new `execution-e2e` command. Cleaning the external target directory fixed that and ensured checks used edited source. +- The product wrapper generated dashboard public data and service out files while running full smoke; those generated files were restored because they are outside this agent's edit scope. +- The real-value pilot coordinator still reports missing contracts and bridge-relayer proof scripts in this checkout. The runtime proof alias is now present; incoming `origin/main` commits also touch adjacent real-value-pilot aliases. diff --git a/docs/agent-runs/production-l1-execution/HANDOFF.md b/docs/agent-runs/production-l1-execution/HANDOFF.md new file mode 100644 index 00000000..4d76d4e1 --- /dev/null +++ b/docs/agent-runs/production-l1-execution/HANDOFF.md @@ -0,0 +1,172 @@ +# Private/Local L1 Execution Handoff + +Status: PR-ready local execution handoff. + +## Transaction Types + +Execution/product transaction types now supported by the Rust devnet: + +- `CreateLocalTestUnitBalance` +- `FaucetLocalTestUnits` +- `TransferLocalTestUnits` +- `ApplyBridgeCredit` +- `LaunchToken` +- `MintLocalTestToken` +- `TransferToken` +- `CreatePool` +- `AddLiquidity` +- `RemoveLiquidity` +- `SwapExactIn` +- existing Rootflow and Flow Memory object transactions + +Product flow order: + +1. Create Alice and Bob local accounts. +2. Apply Alice bridge credit. +3. Transfer local units Alice to Bob. +4. Launch `FLOWT`. +5. Transfer `FLOWT` Alice to Bob. +6. Create local-unit/FLOWT pool. +7. Add liquidity. +8. Swap exact input. +9. Remove liquidity. +10. Anchor state. + +## Receipt Fields + +Block receipts now include: + +- `txId` +- `receiptId` +- `status` +- `success` +- `error` +- `errorCode` +- `executionCostUnits` +- `executionCostCharged` +- `eventIds` +- `authorization` + +Queryable execution receipts live in `executionReceipts` and include: + +- `receiptId` +- `txId` +- `txType` +- `status` +- `success` +- `errorCode` +- `errorMessage` +- `executionCostUnits` +- `executionCostCharged` +- `payerAccountId` +- `eventIds` +- `blockNumber` +- `noValue` + +Execution events live in `executionEvents` and include: + +- `eventId` +- `receiptId` +- `txId` +- `eventType` +- `objectId` +- `accountId` +- `assetId` +- `amountUnits` +- `blockNumber` +- `status` + +Success event types include `native_transfer`, `bridge_credit_applied`, `token_launched`, `token_minted`, `token_transfer`, `pool_created`, `liquidity_added`, `liquidity_removed`, `swap_executed`, and `transaction_applied`. Failures emit `execution_failed`. + +## State Output Paths + +Execution E2E: + +```text +devnet/local/execution-e2e/state.json +devnet/local/execution-e2e/execution-e2e-report.json +devnet/local/execution-e2e/dashboard-state.json +devnet/local/execution-e2e/indexer-handoff.json +devnet/local/execution-e2e/verifier-handoff.json +devnet/local/execution-e2e/control-plane-handoff.json +devnet/local/execution-e2e/genesis-config.json +devnet/local/execution-e2e/operator-key-references.json +``` + +Product smoke: + +```text +devnet/local/product-execution-smoke/state.json +devnet/local/product-execution-smoke/control-plane-handoff.json +``` + +Generated report schema: + +```text +flowmemory.local_devnet.execution_e2e_report.v0 +``` + +## Maps And Roots + +New execution maps are part of deterministic state roots and map roots: + +- `accountNonces` +- `balanceTransfers` +- `bridgeCreditReceipts` +- `tokenDefinitions` +- `tokenBalances` +- `tokenMintReceipts` +- `tokenTransferReceipts` +- `dexPools` +- `lpPositions` +- `liquidityReceipts` +- `swapReceipts` +- `executionReceipts` +- `executionEvents` + +Dashboard, indexer, verifier, and control-plane handoff files include these maps. + +## RPC And Dashboard Requirements + +Control-plane/RPC surfaces should expose read methods for: + +- account balance by account id +- account nonce by account id +- bridge credit receipt by credit id +- native transfer by transfer id +- token definition by token id +- token balance by token id and account id +- token transfer receipt by transfer id +- DEX pool by pool id +- LP position by pool id and owner account id +- liquidity receipt by id +- swap receipt by id +- execution receipt by receipt id and by tx id +- execution events by receipt id and tx id +- latest state root and map roots +- block by block hash or height + +Dashboard requirements: + +- Show native units, bridge credited units, reserved units, and available units. +- Show account nonce status. +- Show token metadata, supply, and per-account balances. +- Show pool pair, reserves, LP supply, LP position accounting, and swap result. +- Show success and failed receipts with error code, execution cost units, and event ids. +- Keep all copy local/no-value and avoid production bridge, tokenomics, public validator, or mainnet claims. + +## Verification + +Commands run for this handoff: + +```powershell +cargo test --manifest-path crates/flowmemory-devnet/Cargo.toml +cargo run --manifest-path crates/flowmemory-devnet/Cargo.toml -- --state devnet/local/product-execution-smoke/state.json product-smoke --out-dir devnet/local/product-execution-smoke +npm run flowchain:execution:e2e +npm run flowchain:product-e2e +npm run flowchain:real-value-pilot:runtime +``` + +`npm run flowchain:product-e2e` passes after installing root, dashboard, and crypto dependencies from lockfiles. It writes `devnet/local/product-e2e/flowchain-product-e2e-report.json`. + +`npm run flowchain:real-value-pilot:runtime` passes and points to the execution E2E. The broader `flowchain:real-value-pilot:e2e` coordinator still needs the contracts and bridge-relayer proof gates in this checkout. diff --git a/docs/agent-runs/production-l1-execution/INVARIANT_PROOF.md b/docs/agent-runs/production-l1-execution/INVARIANT_PROOF.md new file mode 100644 index 00000000..be16ccd6 --- /dev/null +++ b/docs/agent-runs/production-l1-execution/INVARIANT_PROOF.md @@ -0,0 +1,63 @@ +# Invariant Proof + +Status: implemented for private/local execution proof. + +## Atomic Execution + +Each block transaction runs against a cloned candidate state. On success the candidate becomes canonical. On failure, only an execution receipt and failed event are committed; the business mutation is discarded. + +This protects: + +- native balances from partial failed transfers +- token balances from partial failed token transfers +- pool reserves from partial failed swaps +- bridge credits from duplicate minting +- account nonces from failed transactions + +## Covered Negative Cases + +Tests cover: + +- insufficient native balance +- insufficient token balance +- duplicate transaction id +- duplicate nonce +- stale nonce +- duplicate transfer id +- invalid token id +- invalid pool id +- invalid liquidity amount +- invalid swap amount +- minimum output not met +- duplicate bridge credit +- insufficient execution balance when native charging is enabled + +## Invariants + +Runtime tests assert: + +- total token balances equal token total supply after transfers and failed transactions +- pool reserve changes match deterministic swap math +- pool total LP supply equals LP positions after add/remove +- duplicate bridge credit cannot mint twice +- account nonce state advances only on successful transactions +- failed transactions still produce failed receipts with stable error codes +- deterministic replay covers state roots and map roots +- execution E2E state survives restart inspection and export/import round trip + +## Evidence + +Primary tests: + +- `execution_layer_records_failed_receipts_and_preserves_product_invariants` +- `execution_cost_charge_mode_rejects_insufficient_execution_balance_atomically` +- `cli_execution_e2e_writes_report_and_round_trips_state` +- `product_demo_transactions_apply_in_one_block_with_receipts` +- `token_launch_pool_liquidity_swap_and_remove_update_product_state` + +Primary commands: + +```powershell +cargo test --manifest-path crates/flowmemory-devnet/Cargo.toml +npm run flowchain:execution:e2e +``` diff --git a/docs/agent-runs/production-l1-execution/NOTES.md b/docs/agent-runs/production-l1-execution/NOTES.md new file mode 100644 index 00000000..a4857cf2 --- /dev/null +++ b/docs/agent-runs/production-l1-execution/NOTES.md @@ -0,0 +1,42 @@ +# Private/Local L1 Execution Notes + +## Boundaries + +- Native and bridged balances are private/local testnet accounting records for execution proof only. +- Bridge credits are deterministic local pilot credits from approved fixture/handoff inputs. They are not production bridge security or custody claims. +- Local execution costs are deterministic anti-free-execution accounting for the private/local pilot, not tokenomics or a public fee market. +- DEX mechanics are deterministic local execution mechanics for product flow testing, not economic recommendations or production AMM design. + +## Read-Only Inputs + +- `crypto/fixtures/product-testnet-transactions.json` +- `schemas/flowmemory/product-transaction.schema.json` + +## Implemented State + +- `accountNonces` +- `bridgeCreditReceipts` +- `tokenTransferReceipts` +- `executionReceipts` +- `executionEvents` +- root coverage for account nonces, bridge credits, token transfers, execution receipts, and execution events + +## Product Flow + +The local product flow now proves: + +- bridge credit to Alice +- native local transfer Alice to Bob +- `FLOWT` launch +- `FLOWT` transfer Alice to Bob +- local-unit/FLOWT pool creation +- liquidity add +- Bob exact-input swap from local units to `FLOWT` +- liquidity remove +- queryable receipts/events and deterministic roots + +## Follow-Ups For Other Agents + +- Control-plane/dashboard agents should expose query methods and views listed in `HANDOFF.md`. +- The broader real-value pilot coordinator still needs contracts and bridge-relayer proof gates in this checkout. Runtime proof is available as `npm run flowchain:real-value-pilot:runtime`. +- This worktree is behind `origin/main` by two real-value-pilot commits. Incoming `package.json` changes add real-value-pilot aliases near the execution alias area and should be merged before PR finalization. diff --git a/docs/agent-runs/production-l1-execution/PLAN.md b/docs/agent-runs/production-l1-execution/PLAN.md new file mode 100644 index 00000000..02b64db0 --- /dev/null +++ b/docs/agent-runs/production-l1-execution/PLAN.md @@ -0,0 +1,21 @@ +# Private/Local L1 Execution Plan + +Status: implemented; final verification in progress + +Scope: +- Work only in `crates/flowmemory-devnet/`, `devnet/`, `fixtures/`, `docs/LOCAL_DEVNET.md`, `docs/FLOWCHAIN_TESTNET_ACCEPTANCE.md`, `docs/agent-runs/production-l1-execution/`, and `package.json` for execution smoke aliases. +- Keep this as a private/local testnet execution surface. Do not add production deployment, tokenomics, public validator, audited bridge, or mainnet claims. + +Phases: +1. Audit current product flow support in the Rust devnet and existing fixtures. +2. Implement native and bridged balance execution with deterministic costs and failure receipts. +3. Implement token launch, token transfer, local mint policy, and token balance query state. +4. Implement pool create, liquidity add/remove, exact-input swap, LP accounting, and deterministic rounding. +5. Add success and failed receipts, event IDs, execution error codes, and deterministic state root coverage. +6. Add product E2E, execution E2E report generation, negative tests, invariant tests, restart proof, and export/import proof. +7. Update local devnet docs, proof notes, and final handoff. + +Current result: +- Runtime execution support is implemented in the Rust devnet. +- `execution-e2e` writes a full report under `devnet/local/execution-e2e/`. +- Proof docs and handoff live in this directory. diff --git a/docs/agent-runs/production-l1-execution/TOKEN_PROOF.md b/docs/agent-runs/production-l1-execution/TOKEN_PROOF.md new file mode 100644 index 00000000..fe2e3ddc --- /dev/null +++ b/docs/agent-runs/production-l1-execution/TOKEN_PROOF.md @@ -0,0 +1,61 @@ +# Token Proof + +Status: implemented for private/local execution proof. + +## Lifecycle + +Token lifecycle transactions: + +- `LaunchToken` +- `MintLocalTestToken` +- `TransferToken` + +Token query state: + +- `tokenDefinitions` +- `tokenBalances` +- `tokenMintReceipts` +- `tokenTransferReceipts` +- `executionReceipts` +- `executionEvents` + +## Launch Rules + +`LaunchToken` requires: + +- deterministic token id from normalized symbol +- unique token id +- unique symbol +- symbol length 2 to 12 using uppercase alphanumeric characters +- nonempty name up to 64 characters +- decimals no greater than 18 +- existing initial owner local account +- positive initial supply +- next expected account nonce + +Launch assigns the full initial supply to the owner token balance and records an initial-supply mint receipt. + +## Local Mint Rules + +`MintLocalTestToken` is explicit local/test-mode state only. It requires an existing token, existing target account, positive amount, deterministic mint id, unique mint id, and next expected nonce. It updates total supply and records a mint receipt. + +## Transfer Rules + +`TransferToken` requires an existing token, existing source and destination accounts, positive amount, deterministic transfer id, available source token balance, and next expected source-account nonce. It updates both token balances and records a token transfer receipt. + +## Events And Receipts + +Successful token execution emits: + +- `token_launched` +- `token_minted` +- `token_transfer` + +Failed token transactions emit `execution_failed` and include an error code on the execution receipt. Covered codes include `invalid-token`, `insufficient-token-balance`, `duplicate-nonce`, and `stale-nonce`. + +## Evidence + +- Product flow launches `FLOWT`, transfers 10,000 units from Alice to Bob, then uses the token in a DEX pool. +- Negative tests cover invalid token id, invalid supply/amount, duplicate token identifiers, and insufficient token balance. +- Invariant tests assert total token units across balances match token supply after transfers and failed transactions. +- Execution report path: `devnet/local/execution-e2e/execution-e2e-report.json`. diff --git a/fixtures/dashboard/flowmemory-dashboard-v0.json b/fixtures/dashboard/flowmemory-dashboard-v0.json index b226d982..c3103d26 100644 --- a/fixtures/dashboard/flowmemory-dashboard-v0.json +++ b/fixtures/dashboard/flowmemory-dashboard-v0.json @@ -1993,12 +1993,12 @@ ], "devnetBlocks": [ { - "id": "0x61e9f90b982f13988e85a382fc39da82c9114ecceea9001ab454c744e0801a9b", + "id": "0x842756cdacfd8323d4e5304ac59f818793d3b5155215076a64144cd46fa3b275", "blockNumber": 1, - "blockHash": "0x61e9f90b982f13988e85a382fc39da82c9114ecceea9001ab454c744e0801a9b", + "blockHash": "0x842756cdacfd8323d4e5304ac59f818793d3b5155215076a64144cd46fa3b275", "parentHash": "0x0f23c892cbd2d00c10839d97ddab833698a83f8df8d6df27ceac03cfdd4b7bc9", - "stateRoot": "0x8c7c1e7a078b60a809d17a51c44e275059afb8d7535769430c3fc9e9320c7e23", - "receiptsRoot": "0x2f98caf4b28b2209cdf1f9beb1c23f8732c538657cc7a1d8855878b5400efabd", + "stateRoot": "0x5c79c20d6d991efea359cd0ed6d5225c8d8255808f90ef58e0068ae73b85e544", + "receiptsRoot": "0x104dd190060f51a862251e47222fe928e6f0f97d04941632711b1bb122918236", "timestamp": "2026-05-13T16:00:00.000Z", "observationCount": 8, "reportCount": 8, @@ -2015,12 +2015,12 @@ } }, { - "id": "0x7ddb184c69f798f25f27a254f1f530c6cdc31c9656ac19d1b8c114f7a3a650c6", + "id": "0xa37d982b6d0fd99ff67504db337644bfeeaf1d2c7bde27d18b213a515f7bfc31", "blockNumber": 2, - "blockHash": "0x7ddb184c69f798f25f27a254f1f530c6cdc31c9656ac19d1b8c114f7a3a650c6", - "parentHash": "0x61e9f90b982f13988e85a382fc39da82c9114ecceea9001ab454c744e0801a9b", - "stateRoot": "0x3074ef2e5311d94e8f9a2660a6cc016c7b7f9a08c56ee07f9e841c1489726e68", - "receiptsRoot": "0xa0407b9a8a55106d549e0f19b92fceaa7f7a25697e94ebf8a1fa74af7b9168f4", + "blockHash": "0xa37d982b6d0fd99ff67504db337644bfeeaf1d2c7bde27d18b213a515f7bfc31", + "parentHash": "0x842756cdacfd8323d4e5304ac59f818793d3b5155215076a64144cd46fa3b275", + "stateRoot": "0xc354545e7fa40a6fba67b480c9484abec8b6cd980f21f8646b9840f4d34d72ba", + "receiptsRoot": "0x0fa5ce39af722926d44f7b9c30fe5e82554099603d2c84f03d214975d24b4ee5", "timestamp": "2026-05-13T16:00:01.000Z", "observationCount": 8, "reportCount": 8, diff --git a/fixtures/launch-core/generated/devnet/control-plane-handoff.json b/fixtures/launch-core/generated/devnet/control-plane-handoff.json index 27293cdc..de91b2ed 100644 --- a/fixtures/launch-core/generated/devnet/control-plane-handoff.json +++ b/fixtures/launch-core/generated/devnet/control-plane-handoff.json @@ -1,89 +1,209 @@ { "blocks": [ { - "blockHash": "0x61e9f90b982f13988e85a382fc39da82c9114ecceea9001ab454c744e0801a9b", + "blockHash": "0x842756cdacfd8323d4e5304ac59f818793d3b5155215076a64144cd46fa3b275", "blockNumber": 1, "logicalTime": 1778688000, "parentHash": "0x0f23c892cbd2d00c10839d97ddab833698a83f8df8d6df27ceac03cfdd4b7bc9", "receipts": [ { "error": null, + "errorCode": null, + "eventIds": [ + "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "receiptId": "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4", "status": "applied", + "success": true, "txId": "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "receiptId": "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0", "status": "applied", + "success": true, "txId": "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d", "status": "applied", + "success": true, "txId": "0x6f55c155425b968de01092be7d276f0c24430a2994910881938bc13c72f8892f" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897" + ], + "executionCostCharged": false, + "executionCostUnits": 0, + "receiptId": "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424", "status": "applied", + "success": true, "txId": "0xafd3991af8b9e4eadfa3810f82d74701b7518269ae7ba5d0e3e450844445b03b" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1" + ], + "executionCostCharged": false, + "executionCostUnits": 0, + "receiptId": "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd", "status": "applied", + "success": true, "txId": "0xec7019403fec03ea2ea4b090bc5ee1c63017ed9834bff5fb87ce2fe5d5794919" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22", "status": "applied", + "success": true, "txId": "0x05abb39c720d8ee1cd9253e32efaa595f5d5b2fcef4a908f61ab4a6bfa315359" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2", "status": "applied", + "success": true, "txId": "0xb9f435aceb1bedb86dce821743769b28c02a42002c9cd41f2df1ea0279462ab2" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb", "status": "applied", + "success": true, "txId": "0x27aeba6c55c764222964764cb2bfbb69fb6fa56cb84714d6e98240ceb6e9d01d" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443", "status": "applied", + "success": true, "txId": "0xef6df43993478d8f14d609732c7260fa08861ecc17e74137b83beda8d50931d2" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "receiptId": "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30", "status": "applied", + "success": true, "txId": "0x73b81134901c2ce13e575f161d82a404c6f7cd1ef2e8ee17beb6697062175c46" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "receiptId": "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be", "status": "applied", + "success": true, "txId": "0x3ac0b196a212a0e77d0a0c4b60e2283d2994b09993971b95427996700f5b92aa" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "receiptId": "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9", "status": "applied", + "success": true, "txId": "0xda9d2574a0d4bec158e13623499c6efe6dddb76f838c5f06c3e4dc8457b67d3b" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee", "status": "applied", + "success": true, "txId": "0xa0729982b58cc701aba6af0bc29ca993190db4e8e1489af918dbe293c0c03bad" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b", "status": "applied", + "success": true, "txId": "0xf32e17d973089ae20766e2c6ec07d1511ddecd3f79803f6146a90df971ca814f" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376", "status": "applied", + "success": true, "txId": "0x514f9ef68c09de5a4dc80611d661d07a4ea3a4fae6000a43a25864489f354a81" } ], "schema": "flowmemory.local_devnet.block.v0", - "stateRoot": "0x8c7c1e7a078b60a809d17a51c44e275059afb8d7535769430c3fc9e9320c7e23", + "stateRoot": "0x5c79c20d6d991efea359cd0ed6d5225c8d8255808f90ef58e0068ae73b85e544", "txIds": [ "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189", "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25", @@ -103,19 +223,27 @@ ] }, { - "blockHash": "0x7ddb184c69f798f25f27a254f1f530c6cdc31c9656ac19d1b8c114f7a3a650c6", + "blockHash": "0xa37d982b6d0fd99ff67504db337644bfeeaf1d2c7bde27d18b213a515f7bfc31", "blockNumber": 2, "logicalTime": 1778688001, - "parentHash": "0x61e9f90b982f13988e85a382fc39da82c9114ecceea9001ab454c744e0801a9b", + "parentHash": "0x842756cdacfd8323d4e5304ac59f818793d3b5155215076a64144cd46fa3b275", "receipts": [ { "error": null, + "errorCode": null, + "eventIds": [ + "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18", "status": "applied", + "success": true, "txId": "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7" } ], "schema": "flowmemory.local_devnet.block.v0", - "stateRoot": "0x3074ef2e5311d94e8f9a2660a6cc016c7b7f9a08c56ee07f9e841c1489726e68", + "stateRoot": "0xc354545e7fa40a6fba67b480c9484abec8b6cd980f21f8646b9840f4d34d72ba", "txIds": [ "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7" ] @@ -130,6 +258,8 @@ "crypto/FLOWMEMORY_CRYPTO_SPEC.md#domain-separation", "crypto/ATTESTATIONS.md#local-signature-helpers" ], + "executionCostChargeMode": "record-only", + "executionCostsEnabled": true, "genesisHash": "0x0f23c892cbd2d00c10839d97ddab833698a83f8df8d6df27ceac03cfdd4b7bc9", "genesisLogicalTime": 1778688000, "networkId": "flowmemory-private-local", @@ -138,37 +268,49 @@ "schema": "flowmemory.local_devnet.config.v0" }, "latestBlock": { - "blockHash": "0x7ddb184c69f798f25f27a254f1f530c6cdc31c9656ac19d1b8c114f7a3a650c6", + "blockHash": "0xa37d982b6d0fd99ff67504db337644bfeeaf1d2c7bde27d18b213a515f7bfc31", "blockNumber": 2, "logicalTime": 1778688001, - "parentHash": "0x61e9f90b982f13988e85a382fc39da82c9114ecceea9001ab454c744e0801a9b", + "parentHash": "0x842756cdacfd8323d4e5304ac59f818793d3b5155215076a64144cd46fa3b275", "receipts": [ { "error": null, + "errorCode": null, + "eventIds": [ + "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18", "status": "applied", + "success": true, "txId": "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7" } ], "schema": "flowmemory.local_devnet.block.v0", - "stateRoot": "0x3074ef2e5311d94e8f9a2660a6cc016c7b7f9a08c56ee07f9e841c1489726e68", + "stateRoot": "0xc354545e7fa40a6fba67b480c9484abec8b6cd980f21f8646b9840f4d34d72ba", "txIds": [ "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7" ] }, "mapRoots": { + "accountNonceRoot": "0x91a5e27fe38391bb9f93c1a4543693bffa4b4f6fecf2ac9bc630f09f72d1e9bd", "agentAccountRoot": "0xcf31230bfff347f79e19a55f4d1ff5fa486b0b1ad4754ce22b93de4b259a3ca7", "artifactAvailabilityProofRoot": "0xfb4b693c45014aae0947f35696e9d864e7b26ac6fd39c1df5edb3e0dcf9bd928", "artifactCommitmentRoot": "0xb772a9f7273032fd3ba2da8b6476d4715bbbafbd2a7eed21ecd0d558bde3beab", "balanceTransferRoot": "0x9b6e249f769a93bc9f34a90156e028d1a830badcd8ccdc5b1487d512cdbf0a6d", - "baseAnchorRoot": "0xa10b087464d8e6098696295a2a4b26a4396974c9ed10dd0bba429f22284cd573", + "baseAnchorRoot": "0xe1e9eb52e2384ed9190da906cdffde07692401049d384a66ad8f72688ac6276b", + "bridgeCreditReceiptRoot": "0x0a86ce98161cb40ca4c7719468c0ed8f122677d12641c13305277094b8f3a509", "challengeRoot": "0x16da3d2bf2dcd801bc5deb3987dc01342cb957031ad01408ea77bf5d1583656f", "dexPoolRoot": "0x0e5f034494a2deb6a4f20c04f01e678795c587df4869ad3f189f107fcc447dea", + "executionEventRoot": "0x6cf55db15d19dddb084512871266d4127dc2b3a0682df89ba1d3a0e3927f0674", + "executionReceiptRoot": "0x878dc913e1daae0423b68906a6b6f2411f7866031b9a42830cf591af620d00be", "faucetRecordRoot": "0x2277503a52fab3f9e49b40debfb7d641abee75cf268aa56da403fdcf4fad6cee", - "finalityReceiptRoot": "0xdf352e20fd1ddfd2855202335e03cfec21d87e99bf8717d161fe8648998e16cf", + "finalityReceiptRoot": "0x04a6f56f5df14e6dbfb8c233394c6012c50947f40028e8f95e4e954fec9a29ba", "importedObservationRoot": "0x99cb1b939d5a09f800f72e4c5a2b92988571126e1f6f93549f4893b3f7de7880", "importedVerifierReportRoot": "0x6070b1015f000dd509c7b276d2ad68d8a9d188ef1a961c2f573346eb75ea5ad7", "liquidityReceiptRoot": "0x98bf15cc6859994038744612e125236b1f777895a051c41702c2004134327738", - "localTestUnitBalanceRoot": "0x167041ef195b5dde2d2cade6ecb26c9a0a596e9ed21ff7bfb02d33c9d2be8d15", + "localTestUnitBalanceRoot": "0xbaae802f4a4792e643944f86fa9baba660e5f796599c0b10936182585a2cd877", "lpPositionRoot": "0xe67dd98259afb06ca93620b4a8742b924ec2e8f3e6e72934eef5b8e60829d46f", "memoryCellRoot": "0x1b4e91099dd8d867201bd880437197ae6c031e538341aaa3cd2046e5706a2c25", "modelPassportRoot": "0x326aa6b0b372d29d24d747fe0879adfd7aaea206373b24ae2ab77d56357e9529", @@ -178,11 +320,13 @@ "tokenBalanceRoot": "0xbaf3b150fe41a0f3a2d9fe3dd9a664f9c5934bfef37218d9c3bf1c682be5f8c6", "tokenDefinitionRoot": "0xbbbad9681e8756403940e4333111706a4fcee1f30534ba14deea9ba148056be0", "tokenMintReceiptRoot": "0xaf86773ae2d2c4cbb8404f895fd9ff4132336f382e4e3f12b59df2ed9ba52806", + "tokenTransferReceiptRoot": "0xe6e05832f92dbc9c6a25ed2a39331548748283ed8c2b5bb5c61e0f90fd99edac", "verifierModuleRoot": "0xd6ddd8a2d0f5812d64679656c69983a2e0aecd36bd36199d900245658ae4626c", "verifierReportRoot": "0x4facd21e55423e182eba87355482a35daa93f53190fbd3a8d2969f9d55bc5373", "workReceiptRoot": "0x8b3ef5650c9eea2f608ad9c7cb73df3c289fc0ac72ed04f46e6ae4bce0a1f023" }, "objects": { + "accountNonces": {}, "agentAccounts": { "agent:demo:alpha": { "active": true, @@ -215,38 +359,44 @@ }, "balanceTransfers": {}, "baseAnchors": { - "0xf57ab7d2c1459c03cf01bfddd56b046be685d8eaa4597e6bb54b5015aeaf003f": { + "0xa90d7d5b080801e998f67f54ff81fd7deb2d8d8685657dd03e0dcedfd194ee8a": { + "accountNonceRoot": "0x91a5e27fe38391bb9f93c1a4543693bffa4b4f6fecf2ac9bc630f09f72d1e9bd", "agentAccountRoot": "0xcf31230bfff347f79e19a55f4d1ff5fa486b0b1ad4754ce22b93de4b259a3ca7", - "anchorId": "0xf57ab7d2c1459c03cf01bfddd56b046be685d8eaa4597e6bb54b5015aeaf003f", + "anchorId": "0xa90d7d5b080801e998f67f54ff81fd7deb2d8d8685657dd03e0dcedfd194ee8a", "appchainChainId": "flowmemory-local-devnet-v0", "artifactAvailabilityProofRoot": "0xfb4b693c45014aae0947f35696e9d864e7b26ac6fd39c1df5edb3e0dcf9bd928", "artifactCommitmentRoot": "0xb772a9f7273032fd3ba2da8b6476d4715bbbafbd2a7eed21ecd0d558bde3beab", "balanceTransferRoot": "0x9b6e249f769a93bc9f34a90156e028d1a830badcd8ccdc5b1487d512cdbf0a6d", "blockRangeEnd": 1, "blockRangeStart": 1, + "bridgeCreditReceiptRoot": "0x0a86ce98161cb40ca4c7719468c0ed8f122677d12641c13305277094b8f3a509", "challengeRoot": "0x16da3d2bf2dcd801bc5deb3987dc01342cb957031ad01408ea77bf5d1583656f", "dexPoolRoot": "0x0e5f034494a2deb6a4f20c04f01e678795c587df4869ad3f189f107fcc447dea", + "executionEventRoot": "0xbe16f0eebc55089784564d8de7ceb92c59c81e4674fe2acb9406d224944f0be4", + "executionReceiptRoot": "0x1b766b214c0445c6ec7e1fa52c08c11c01c13059ebf4d31bd94ce9e5ef067ef6", "faucetRecordRoot": "0x2277503a52fab3f9e49b40debfb7d641abee75cf268aa56da403fdcf4fad6cee", - "finalityReceiptRoot": "0xdf352e20fd1ddfd2855202335e03cfec21d87e99bf8717d161fe8648998e16cf", + "finalityReceiptRoot": "0x04a6f56f5df14e6dbfb8c233394c6012c50947f40028e8f95e4e954fec9a29ba", "finalityStatus": "local-placeholder", "liquidityReceiptRoot": "0x98bf15cc6859994038744612e125236b1f777895a051c41702c2004134327738", - "localTestUnitBalanceRoot": "0x167041ef195b5dde2d2cade6ecb26c9a0a596e9ed21ff7bfb02d33c9d2be8d15", + "localTestUnitBalanceRoot": "0xbaae802f4a4792e643944f86fa9baba660e5f796599c0b10936182585a2cd877", "lpPositionRoot": "0xe67dd98259afb06ca93620b4a8742b924ec2e8f3e6e72934eef5b8e60829d46f", "memoryCellRoot": "0x1b4e91099dd8d867201bd880437197ae6c031e538341aaa3cd2046e5706a2c25", "modelPassportRoot": "0x326aa6b0b372d29d24d747fe0879adfd7aaea206373b24ae2ab77d56357e9529", "operatorKeyReferenceRoot": "0x8457aa3ed0f4238834a8f3925f25ccca805828d8427c3ef67590a45659b22a40", "previousAnchorId": "0x0000000000000000000000000000000000000000000000000000000000000000", "rootfieldStateRoot": "0xb72a851dca1103410484e3272945bae5e87fc39b8f32f77d2991959b60d3bfbf", - "stateRoot": "0x8c7c1e7a078b60a809d17a51c44e275059afb8d7535769430c3fc9e9320c7e23", + "stateRoot": "0x5c79c20d6d991efea359cd0ed6d5225c8d8255808f90ef58e0068ae73b85e544", "swapReceiptRoot": "0xc9f3ee93962f36ed10421ec9ad736079a3b13ef6504336495af243b718cefee1", "tokenBalanceRoot": "0xbaf3b150fe41a0f3a2d9fe3dd9a664f9c5934bfef37218d9c3bf1c682be5f8c6", "tokenDefinitionRoot": "0xbbbad9681e8756403940e4333111706a4fcee1f30534ba14deea9ba148056be0", "tokenMintReceiptRoot": "0xaf86773ae2d2c4cbb8404f895fd9ff4132336f382e4e3f12b59df2ed9ba52806", + "tokenTransferReceiptRoot": "0xe6e05832f92dbc9c6a25ed2a39331548748283ed8c2b5bb5c61e0f90fd99edac", "verifierModuleRoot": "0xd6ddd8a2d0f5812d64679656c69983a2e0aecd36bd36199d900245658ae4626c", "verifierReportRoot": "0x4facd21e55423e182eba87355482a35daa93f53190fbd3a8d2969f9d55bc5373", "workReceiptRoot": "0x8b3ef5650c9eea2f608ad9c7cb73df3c289fc0ac72ed04f46e6ae4bce0a1f023" } }, + "bridgeCreditReceipts": {}, "challenges": { "challenge:demo:001": { "challengeId": "challenge:demo:001", @@ -261,6 +411,474 @@ } }, "dexPools": {}, + "executionEvents": { + "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 2, + "eventId": "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18", + "status": "applied", + "txId": "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7" + }, + "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2", + "status": "applied", + "txId": "0xb9f435aceb1bedb86dce821743769b28c02a42002c9cd41f2df1ea0279462ab2" + }, + "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9", + "status": "applied", + "txId": "0xda9d2574a0d4bec158e13623499c6efe6dddb76f838c5f06c3e4dc8457b67d3b" + }, + "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d", + "status": "applied", + "txId": "0x6f55c155425b968de01092be7d276f0c24430a2994910881938bc13c72f8892f" + }, + "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30", + "status": "applied", + "txId": "0x73b81134901c2ce13e575f161d82a404c6f7cd1ef2e8ee17beb6697062175c46" + }, + "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376", + "status": "applied", + "txId": "0x514f9ef68c09de5a4dc80611d661d07a4ea3a4fae6000a43a25864489f354a81" + }, + "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be", + "status": "applied", + "txId": "0x3ac0b196a212a0e77d0a0c4b60e2283d2994b09993971b95427996700f5b92aa" + }, + "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22", + "status": "applied", + "txId": "0x05abb39c720d8ee1cd9253e32efaa595f5d5b2fcef4a908f61ab4a6bfa315359" + }, + "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb", + "status": "applied", + "txId": "0x27aeba6c55c764222964764cb2bfbb69fb6fa56cb84714d6e98240ceb6e9d01d" + }, + "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0", + "status": "applied", + "txId": "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25" + }, + "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b", + "status": "applied", + "txId": "0xf32e17d973089ae20766e2c6ec07d1511ddecd3f79803f6146a90df971ca814f" + }, + "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443", + "status": "applied", + "txId": "0xef6df43993478d8f14d609732c7260fa08861ecc17e74137b83beda8d50931d2" + }, + "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd", + "status": "applied", + "txId": "0xec7019403fec03ea2ea4b090bc5ee1c63017ed9834bff5fb87ce2fe5d5794919" + }, + "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4", + "status": "applied", + "txId": "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189" + }, + "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424", + "status": "applied", + "txId": "0xafd3991af8b9e4eadfa3810f82d74701b7518269ae7ba5d0e3e450844445b03b" + }, + "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee", + "status": "applied", + "txId": "0xa0729982b58cc701aba6af0bc29ca993190db4e8e1489af918dbe293c0c03bad" + } + }, + "executionReceipts": { + "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1" + ], + "executionCostCharged": false, + "executionCostUnits": 0, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd", + "status": "applied", + "success": true, + "txId": "0xec7019403fec03ea2ea4b090bc5ee1c63017ed9834bff5fb87ce2fe5d5794919", + "txType": "FaucetLocalTestUnits" + }, + "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d", + "status": "applied", + "success": true, + "txId": "0x6f55c155425b968de01092be7d276f0c24430a2994910881938bc13c72f8892f", + "txType": "RegisterAgent" + }, + "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18": { + "blockNumber": 2, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18", + "status": "applied", + "success": true, + "txId": "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7", + "txType": "AnchorBatchToBasePlaceholder" + }, + "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4", + "status": "applied", + "success": true, + "txId": "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189", + "txType": "RegisterRootfield" + }, + "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897" + ], + "executionCostCharged": false, + "executionCostUnits": 0, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424", + "status": "applied", + "success": true, + "txId": "0xafd3991af8b9e4eadfa3810f82d74701b7518269ae7ba5d0e3e450844445b03b", + "txType": "CreateLocalTestUnitBalance" + }, + "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee", + "status": "applied", + "success": true, + "txId": "0xa0729982b58cc701aba6af0bc29ca993190db4e8e1489af918dbe293c0c03bad", + "txType": "OpenChallenge" + }, + "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0", + "status": "applied", + "success": true, + "txId": "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25", + "txType": "RegisterModelPassport" + }, + "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443", + "status": "applied", + "success": true, + "txId": "0xef6df43993478d8f14d609732c7260fa08861ecc17e74137b83beda8d50931d2", + "txType": "CommitRoot" + }, + "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9", + "status": "applied", + "success": true, + "txId": "0xda9d2574a0d4bec158e13623499c6efe6dddb76f838c5f06c3e4dc8457b67d3b", + "txType": "UpdateMemoryCell" + }, + "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b", + "status": "applied", + "success": true, + "txId": "0xf32e17d973089ae20766e2c6ec07d1511ddecd3f79803f6146a90df971ca814f", + "txType": "ResolveChallenge" + }, + "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be", + "status": "applied", + "success": true, + "txId": "0x3ac0b196a212a0e77d0a0c4b60e2283d2994b09993971b95427996700f5b92aa", + "txType": "SubmitVerifierReport" + }, + "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb", + "status": "applied", + "success": true, + "txId": "0x27aeba6c55c764222964764cb2bfbb69fb6fa56cb84714d6e98240ceb6e9d01d", + "txType": "MarkArtifactAvailability" + }, + "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30", + "status": "applied", + "success": true, + "txId": "0x73b81134901c2ce13e575f161d82a404c6f7cd1ef2e8ee17beb6697062175c46", + "txType": "SubmitWorkReceipt" + }, + "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2", + "status": "applied", + "success": true, + "txId": "0xb9f435aceb1bedb86dce821743769b28c02a42002c9cd41f2df1ea0279462ab2", + "txType": "SubmitArtifactCommitment" + }, + "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22", + "status": "applied", + "success": true, + "txId": "0x05abb39c720d8ee1cd9253e32efaa595f5d5b2fcef4a908f61ab4a6bfa315359", + "txType": "RegisterVerifierModule" + }, + "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376", + "status": "applied", + "success": true, + "txId": "0x514f9ef68c09de5a4dc80611d661d07a4ea3a4fae6000a43a25864489f354a81", + "txType": "FinalizeWorkReceipt" + } + }, "faucetRecords": { "faucet:demo:001": { "accountId": "local-balance:demo:agent-alpha", @@ -281,16 +899,19 @@ "finalizedBy": "operator:local-demo", "receiptId": "receipt:demo:001", "rootfieldId": "rootfield:demo:alpha", - "stateRoot": "0x4e7ee5e7a8cab9b4ddda183842b9e9c1e1e000afea820b577ecc90fa4d9517e2" + "stateRoot": "0x178cdd7a10e4b27879439acefd010ced736cc456f8873abb6ab7fec8d135e92e" } }, "liquidityReceipts": {}, "localTestUnitBalances": { "local-balance:demo:agent-alpha": { "accountId": "local-balance:demo:agent-alpha", + "bridgeCreditedUnits": 0, + "lastBridgeCreditId": null, "lastFaucetRecordId": "faucet:demo:001", "noValue": true, "owner": "agent:demo:alpha", + "reservedUnits": 0, "totalFaucetUnits": 1000, "units": 1000, "updatedAtBlock": 1 @@ -337,6 +958,7 @@ "tokenBalances": {}, "tokenDefinitions": {}, "tokenMintReceipts": {}, + "tokenTransferReceipts": {}, "verifierModules": { "verifier:local-demo": { "active": true, @@ -389,5 +1011,5 @@ }, "pendingTxs": [], "schema": "flowmemory.control_plane_handoff.local_devnet.v0", - "stateRoot": "0x3074ef2e5311d94e8f9a2660a6cc016c7b7f9a08c56ee07f9e841c1489726e68" + "stateRoot": "0xc354545e7fa40a6fba67b480c9484abec8b6cd980f21f8646b9840f4d34d72ba" } diff --git a/fixtures/launch-core/generated/devnet/dashboard-state.json b/fixtures/launch-core/generated/devnet/dashboard-state.json index 2ecd1722..c079fb8c 100644 --- a/fixtures/launch-core/generated/devnet/dashboard-state.json +++ b/fixtures/launch-core/generated/devnet/dashboard-state.json @@ -1,4 +1,5 @@ { + "accountNonces": {}, "agentAccounts": { "agent:demo:alpha": { "active": true, @@ -31,39 +32,45 @@ }, "balanceTransfers": {}, "baseAnchors": { - "0xf57ab7d2c1459c03cf01bfddd56b046be685d8eaa4597e6bb54b5015aeaf003f": { + "0xa90d7d5b080801e998f67f54ff81fd7deb2d8d8685657dd03e0dcedfd194ee8a": { + "accountNonceRoot": "0x91a5e27fe38391bb9f93c1a4543693bffa4b4f6fecf2ac9bc630f09f72d1e9bd", "agentAccountRoot": "0xcf31230bfff347f79e19a55f4d1ff5fa486b0b1ad4754ce22b93de4b259a3ca7", - "anchorId": "0xf57ab7d2c1459c03cf01bfddd56b046be685d8eaa4597e6bb54b5015aeaf003f", + "anchorId": "0xa90d7d5b080801e998f67f54ff81fd7deb2d8d8685657dd03e0dcedfd194ee8a", "appchainChainId": "flowmemory-local-devnet-v0", "artifactAvailabilityProofRoot": "0xfb4b693c45014aae0947f35696e9d864e7b26ac6fd39c1df5edb3e0dcf9bd928", "artifactCommitmentRoot": "0xb772a9f7273032fd3ba2da8b6476d4715bbbafbd2a7eed21ecd0d558bde3beab", "balanceTransferRoot": "0x9b6e249f769a93bc9f34a90156e028d1a830badcd8ccdc5b1487d512cdbf0a6d", "blockRangeEnd": 1, "blockRangeStart": 1, + "bridgeCreditReceiptRoot": "0x0a86ce98161cb40ca4c7719468c0ed8f122677d12641c13305277094b8f3a509", "challengeRoot": "0x16da3d2bf2dcd801bc5deb3987dc01342cb957031ad01408ea77bf5d1583656f", "dexPoolRoot": "0x0e5f034494a2deb6a4f20c04f01e678795c587df4869ad3f189f107fcc447dea", + "executionEventRoot": "0xbe16f0eebc55089784564d8de7ceb92c59c81e4674fe2acb9406d224944f0be4", + "executionReceiptRoot": "0x1b766b214c0445c6ec7e1fa52c08c11c01c13059ebf4d31bd94ce9e5ef067ef6", "faucetRecordRoot": "0x2277503a52fab3f9e49b40debfb7d641abee75cf268aa56da403fdcf4fad6cee", - "finalityReceiptRoot": "0xdf352e20fd1ddfd2855202335e03cfec21d87e99bf8717d161fe8648998e16cf", + "finalityReceiptRoot": "0x04a6f56f5df14e6dbfb8c233394c6012c50947f40028e8f95e4e954fec9a29ba", "finalityStatus": "local-placeholder", "liquidityReceiptRoot": "0x98bf15cc6859994038744612e125236b1f777895a051c41702c2004134327738", - "localTestUnitBalanceRoot": "0x167041ef195b5dde2d2cade6ecb26c9a0a596e9ed21ff7bfb02d33c9d2be8d15", + "localTestUnitBalanceRoot": "0xbaae802f4a4792e643944f86fa9baba660e5f796599c0b10936182585a2cd877", "lpPositionRoot": "0xe67dd98259afb06ca93620b4a8742b924ec2e8f3e6e72934eef5b8e60829d46f", "memoryCellRoot": "0x1b4e91099dd8d867201bd880437197ae6c031e538341aaa3cd2046e5706a2c25", "modelPassportRoot": "0x326aa6b0b372d29d24d747fe0879adfd7aaea206373b24ae2ab77d56357e9529", "operatorKeyReferenceRoot": "0x8457aa3ed0f4238834a8f3925f25ccca805828d8427c3ef67590a45659b22a40", "previousAnchorId": "0x0000000000000000000000000000000000000000000000000000000000000000", "rootfieldStateRoot": "0xb72a851dca1103410484e3272945bae5e87fc39b8f32f77d2991959b60d3bfbf", - "stateRoot": "0x8c7c1e7a078b60a809d17a51c44e275059afb8d7535769430c3fc9e9320c7e23", + "stateRoot": "0x5c79c20d6d991efea359cd0ed6d5225c8d8255808f90ef58e0068ae73b85e544", "swapReceiptRoot": "0xc9f3ee93962f36ed10421ec9ad736079a3b13ef6504336495af243b718cefee1", "tokenBalanceRoot": "0xbaf3b150fe41a0f3a2d9fe3dd9a664f9c5934bfef37218d9c3bf1c682be5f8c6", "tokenDefinitionRoot": "0xbbbad9681e8756403940e4333111706a4fcee1f30534ba14deea9ba148056be0", "tokenMintReceiptRoot": "0xaf86773ae2d2c4cbb8404f895fd9ff4132336f382e4e3f12b59df2ed9ba52806", + "tokenTransferReceiptRoot": "0xe6e05832f92dbc9c6a25ed2a39331548748283ed8c2b5bb5c61e0f90fd99edac", "verifierModuleRoot": "0xd6ddd8a2d0f5812d64679656c69983a2e0aecd36bd36199d900245658ae4626c", "verifierReportRoot": "0x4facd21e55423e182eba87355482a35daa93f53190fbd3a8d2969f9d55bc5373", "workReceiptRoot": "0x8b3ef5650c9eea2f608ad9c7cb73df3c289fc0ac72ed04f46e6ae4bce0a1f023" } }, "blockHeight": 2, + "bridgeCreditReceipts": {}, "challenges": { "challenge:demo:001": { "challengeId": "challenge:demo:001", @@ -78,6 +85,474 @@ } }, "dexPools": {}, + "executionEvents": { + "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 2, + "eventId": "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18", + "status": "applied", + "txId": "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7" + }, + "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2", + "status": "applied", + "txId": "0xb9f435aceb1bedb86dce821743769b28c02a42002c9cd41f2df1ea0279462ab2" + }, + "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9", + "status": "applied", + "txId": "0xda9d2574a0d4bec158e13623499c6efe6dddb76f838c5f06c3e4dc8457b67d3b" + }, + "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d", + "status": "applied", + "txId": "0x6f55c155425b968de01092be7d276f0c24430a2994910881938bc13c72f8892f" + }, + "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30", + "status": "applied", + "txId": "0x73b81134901c2ce13e575f161d82a404c6f7cd1ef2e8ee17beb6697062175c46" + }, + "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376", + "status": "applied", + "txId": "0x514f9ef68c09de5a4dc80611d661d07a4ea3a4fae6000a43a25864489f354a81" + }, + "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be", + "status": "applied", + "txId": "0x3ac0b196a212a0e77d0a0c4b60e2283d2994b09993971b95427996700f5b92aa" + }, + "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22", + "status": "applied", + "txId": "0x05abb39c720d8ee1cd9253e32efaa595f5d5b2fcef4a908f61ab4a6bfa315359" + }, + "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb", + "status": "applied", + "txId": "0x27aeba6c55c764222964764cb2bfbb69fb6fa56cb84714d6e98240ceb6e9d01d" + }, + "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0", + "status": "applied", + "txId": "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25" + }, + "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b", + "status": "applied", + "txId": "0xf32e17d973089ae20766e2c6ec07d1511ddecd3f79803f6146a90df971ca814f" + }, + "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443", + "status": "applied", + "txId": "0xef6df43993478d8f14d609732c7260fa08861ecc17e74137b83beda8d50931d2" + }, + "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd", + "status": "applied", + "txId": "0xec7019403fec03ea2ea4b090bc5ee1c63017ed9834bff5fb87ce2fe5d5794919" + }, + "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4", + "status": "applied", + "txId": "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189" + }, + "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424", + "status": "applied", + "txId": "0xafd3991af8b9e4eadfa3810f82d74701b7518269ae7ba5d0e3e450844445b03b" + }, + "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee", + "status": "applied", + "txId": "0xa0729982b58cc701aba6af0bc29ca993190db4e8e1489af918dbe293c0c03bad" + } + }, + "executionReceipts": { + "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1" + ], + "executionCostCharged": false, + "executionCostUnits": 0, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd", + "status": "applied", + "success": true, + "txId": "0xec7019403fec03ea2ea4b090bc5ee1c63017ed9834bff5fb87ce2fe5d5794919", + "txType": "FaucetLocalTestUnits" + }, + "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d", + "status": "applied", + "success": true, + "txId": "0x6f55c155425b968de01092be7d276f0c24430a2994910881938bc13c72f8892f", + "txType": "RegisterAgent" + }, + "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18": { + "blockNumber": 2, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18", + "status": "applied", + "success": true, + "txId": "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7", + "txType": "AnchorBatchToBasePlaceholder" + }, + "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4", + "status": "applied", + "success": true, + "txId": "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189", + "txType": "RegisterRootfield" + }, + "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897" + ], + "executionCostCharged": false, + "executionCostUnits": 0, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424", + "status": "applied", + "success": true, + "txId": "0xafd3991af8b9e4eadfa3810f82d74701b7518269ae7ba5d0e3e450844445b03b", + "txType": "CreateLocalTestUnitBalance" + }, + "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee", + "status": "applied", + "success": true, + "txId": "0xa0729982b58cc701aba6af0bc29ca993190db4e8e1489af918dbe293c0c03bad", + "txType": "OpenChallenge" + }, + "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0", + "status": "applied", + "success": true, + "txId": "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25", + "txType": "RegisterModelPassport" + }, + "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443", + "status": "applied", + "success": true, + "txId": "0xef6df43993478d8f14d609732c7260fa08861ecc17e74137b83beda8d50931d2", + "txType": "CommitRoot" + }, + "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9", + "status": "applied", + "success": true, + "txId": "0xda9d2574a0d4bec158e13623499c6efe6dddb76f838c5f06c3e4dc8457b67d3b", + "txType": "UpdateMemoryCell" + }, + "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b", + "status": "applied", + "success": true, + "txId": "0xf32e17d973089ae20766e2c6ec07d1511ddecd3f79803f6146a90df971ca814f", + "txType": "ResolveChallenge" + }, + "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be", + "status": "applied", + "success": true, + "txId": "0x3ac0b196a212a0e77d0a0c4b60e2283d2994b09993971b95427996700f5b92aa", + "txType": "SubmitVerifierReport" + }, + "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb", + "status": "applied", + "success": true, + "txId": "0x27aeba6c55c764222964764cb2bfbb69fb6fa56cb84714d6e98240ceb6e9d01d", + "txType": "MarkArtifactAvailability" + }, + "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30", + "status": "applied", + "success": true, + "txId": "0x73b81134901c2ce13e575f161d82a404c6f7cd1ef2e8ee17beb6697062175c46", + "txType": "SubmitWorkReceipt" + }, + "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2", + "status": "applied", + "success": true, + "txId": "0xb9f435aceb1bedb86dce821743769b28c02a42002c9cd41f2df1ea0279462ab2", + "txType": "SubmitArtifactCommitment" + }, + "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22", + "status": "applied", + "success": true, + "txId": "0x05abb39c720d8ee1cd9253e32efaa595f5d5b2fcef4a908f61ab4a6bfa315359", + "txType": "RegisterVerifierModule" + }, + "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376", + "status": "applied", + "success": true, + "txId": "0x514f9ef68c09de5a4dc80611d661d07a4ea3a4fae6000a43a25864489f354a81", + "txType": "FinalizeWorkReceipt" + } + }, "faucetRecords": { "faucet:demo:001": { "accountId": "local-balance:demo:agent-alpha", @@ -98,7 +573,7 @@ "finalizedBy": "operator:local-demo", "receiptId": "receipt:demo:001", "rootfieldId": "rootfield:demo:alpha", - "stateRoot": "0x4e7ee5e7a8cab9b4ddda183842b9e9c1e1e000afea820b577ecc90fa4d9517e2" + "stateRoot": "0x178cdd7a10e4b27879439acefd010ced736cc456f8873abb6ab7fec8d135e92e" } }, "genesisConfig": { @@ -109,6 +584,8 @@ "crypto/FLOWMEMORY_CRYPTO_SPEC.md#domain-separation", "crypto/ATTESTATIONS.md#local-signature-helpers" ], + "executionCostChargeMode": "record-only", + "executionCostsEnabled": true, "genesisHash": "0x0f23c892cbd2d00c10839d97ddab833698a83f8df8d6df27ceac03cfdd4b7bc9", "genesisLogicalTime": 1778688000, "networkId": "flowmemory-private-local", @@ -120,9 +597,12 @@ "localTestUnitBalances": { "local-balance:demo:agent-alpha": { "accountId": "local-balance:demo:agent-alpha", + "bridgeCreditedUnits": 0, + "lastBridgeCreditId": null, "lastFaucetRecordId": "faucet:demo:001", "noValue": true, "owner": "agent:demo:alpha", + "reservedUnits": 0, "totalFaucetUnits": 1000, "units": 1000, "updatedAtBlock": 1 @@ -130,19 +610,23 @@ }, "lpPositions": {}, "mapRoots": { + "accountNonceRoot": "0x91a5e27fe38391bb9f93c1a4543693bffa4b4f6fecf2ac9bc630f09f72d1e9bd", "agentAccountRoot": "0xcf31230bfff347f79e19a55f4d1ff5fa486b0b1ad4754ce22b93de4b259a3ca7", "artifactAvailabilityProofRoot": "0xfb4b693c45014aae0947f35696e9d864e7b26ac6fd39c1df5edb3e0dcf9bd928", "artifactCommitmentRoot": "0xb772a9f7273032fd3ba2da8b6476d4715bbbafbd2a7eed21ecd0d558bde3beab", "balanceTransferRoot": "0x9b6e249f769a93bc9f34a90156e028d1a830badcd8ccdc5b1487d512cdbf0a6d", - "baseAnchorRoot": "0xa10b087464d8e6098696295a2a4b26a4396974c9ed10dd0bba429f22284cd573", + "baseAnchorRoot": "0xe1e9eb52e2384ed9190da906cdffde07692401049d384a66ad8f72688ac6276b", + "bridgeCreditReceiptRoot": "0x0a86ce98161cb40ca4c7719468c0ed8f122677d12641c13305277094b8f3a509", "challengeRoot": "0x16da3d2bf2dcd801bc5deb3987dc01342cb957031ad01408ea77bf5d1583656f", "dexPoolRoot": "0x0e5f034494a2deb6a4f20c04f01e678795c587df4869ad3f189f107fcc447dea", + "executionEventRoot": "0x6cf55db15d19dddb084512871266d4127dc2b3a0682df89ba1d3a0e3927f0674", + "executionReceiptRoot": "0x878dc913e1daae0423b68906a6b6f2411f7866031b9a42830cf591af620d00be", "faucetRecordRoot": "0x2277503a52fab3f9e49b40debfb7d641abee75cf268aa56da403fdcf4fad6cee", - "finalityReceiptRoot": "0xdf352e20fd1ddfd2855202335e03cfec21d87e99bf8717d161fe8648998e16cf", + "finalityReceiptRoot": "0x04a6f56f5df14e6dbfb8c233394c6012c50947f40028e8f95e4e954fec9a29ba", "importedObservationRoot": "0x99cb1b939d5a09f800f72e4c5a2b92988571126e1f6f93549f4893b3f7de7880", "importedVerifierReportRoot": "0x6070b1015f000dd509c7b276d2ad68d8a9d188ef1a961c2f573346eb75ea5ad7", "liquidityReceiptRoot": "0x98bf15cc6859994038744612e125236b1f777895a051c41702c2004134327738", - "localTestUnitBalanceRoot": "0x167041ef195b5dde2d2cade6ecb26c9a0a596e9ed21ff7bfb02d33c9d2be8d15", + "localTestUnitBalanceRoot": "0xbaae802f4a4792e643944f86fa9baba660e5f796599c0b10936182585a2cd877", "lpPositionRoot": "0xe67dd98259afb06ca93620b4a8742b924ec2e8f3e6e72934eef5b8e60829d46f", "memoryCellRoot": "0x1b4e91099dd8d867201bd880437197ae6c031e538341aaa3cd2046e5706a2c25", "modelPassportRoot": "0x326aa6b0b372d29d24d747fe0879adfd7aaea206373b24ae2ab77d56357e9529", @@ -152,6 +636,7 @@ "tokenBalanceRoot": "0xbaf3b150fe41a0f3a2d9fe3dd9a664f9c5934bfef37218d9c3bf1c682be5f8c6", "tokenDefinitionRoot": "0xbbbad9681e8756403940e4333111706a4fcee1f30534ba14deea9ba148056be0", "tokenMintReceiptRoot": "0xaf86773ae2d2c4cbb8404f895fd9ff4132336f382e4e3f12b59df2ed9ba52806", + "tokenTransferReceiptRoot": "0xe6e05832f92dbc9c6a25ed2a39331548748283ed8c2b5bb5c61e0f90fd99edac", "verifierModuleRoot": "0xd6ddd8a2d0f5812d64679656c69983a2e0aecd36bd36199d900245658ae4626c", "verifierReportRoot": "0x4facd21e55423e182eba87355482a35daa93f53190fbd3a8d2969f9d55bc5373", "workReceiptRoot": "0x8b3ef5650c9eea2f608ad9c7cb73df3c289fc0ac72ed04f46e6ae4bce0a1f023" @@ -210,11 +695,12 @@ } }, "schema": "flowmemory.dashboard_state.local_devnet.v0", - "stateRoot": "0x3074ef2e5311d94e8f9a2660a6cc016c7b7f9a08c56ee07f9e841c1489726e68", + "stateRoot": "0xc354545e7fa40a6fba67b480c9484abec8b6cd980f21f8646b9840f4d34d72ba", "swapReceipts": {}, "tokenBalances": {}, "tokenDefinitions": {}, "tokenMintReceipts": {}, + "tokenTransferReceipts": {}, "verifierModules": { "verifier:local-demo": { "active": true, diff --git a/fixtures/launch-core/generated/devnet/genesis-config.json b/fixtures/launch-core/generated/devnet/genesis-config.json index 8294489c..6d3aae2b 100644 --- a/fixtures/launch-core/generated/devnet/genesis-config.json +++ b/fixtures/launch-core/generated/devnet/genesis-config.json @@ -11,5 +11,7 @@ "cryptoSchemaRefs": [ "crypto/FLOWMEMORY_CRYPTO_SPEC.md#domain-separation", "crypto/ATTESTATIONS.md#local-signature-helpers" - ] + ], + "executionCostsEnabled": true, + "executionCostChargeMode": "record-only" } diff --git a/fixtures/launch-core/generated/devnet/indexer-handoff.json b/fixtures/launch-core/generated/devnet/indexer-handoff.json index de70fef1..52a03ef1 100644 --- a/fixtures/launch-core/generated/devnet/indexer-handoff.json +++ b/fixtures/launch-core/generated/devnet/indexer-handoff.json @@ -1,4 +1,5 @@ { + "accountNonces": {}, "agentAccounts": { "agent:demo:alpha": { "active": true, @@ -24,89 +25,209 @@ "balanceTransfers": {}, "blocks": [ { - "blockHash": "0x61e9f90b982f13988e85a382fc39da82c9114ecceea9001ab454c744e0801a9b", + "blockHash": "0x842756cdacfd8323d4e5304ac59f818793d3b5155215076a64144cd46fa3b275", "blockNumber": 1, "logicalTime": 1778688000, "parentHash": "0x0f23c892cbd2d00c10839d97ddab833698a83f8df8d6df27ceac03cfdd4b7bc9", "receipts": [ { "error": null, + "errorCode": null, + "eventIds": [ + "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "receiptId": "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4", "status": "applied", + "success": true, "txId": "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "receiptId": "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0", "status": "applied", + "success": true, "txId": "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d", "status": "applied", + "success": true, "txId": "0x6f55c155425b968de01092be7d276f0c24430a2994910881938bc13c72f8892f" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897" + ], + "executionCostCharged": false, + "executionCostUnits": 0, + "receiptId": "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424", "status": "applied", + "success": true, "txId": "0xafd3991af8b9e4eadfa3810f82d74701b7518269ae7ba5d0e3e450844445b03b" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1" + ], + "executionCostCharged": false, + "executionCostUnits": 0, + "receiptId": "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd", "status": "applied", + "success": true, "txId": "0xec7019403fec03ea2ea4b090bc5ee1c63017ed9834bff5fb87ce2fe5d5794919" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22", "status": "applied", + "success": true, "txId": "0x05abb39c720d8ee1cd9253e32efaa595f5d5b2fcef4a908f61ab4a6bfa315359" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2", "status": "applied", + "success": true, "txId": "0xb9f435aceb1bedb86dce821743769b28c02a42002c9cd41f2df1ea0279462ab2" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb", "status": "applied", + "success": true, "txId": "0x27aeba6c55c764222964764cb2bfbb69fb6fa56cb84714d6e98240ceb6e9d01d" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443", "status": "applied", + "success": true, "txId": "0xef6df43993478d8f14d609732c7260fa08861ecc17e74137b83beda8d50931d2" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "receiptId": "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30", "status": "applied", + "success": true, "txId": "0x73b81134901c2ce13e575f161d82a404c6f7cd1ef2e8ee17beb6697062175c46" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "receiptId": "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be", "status": "applied", + "success": true, "txId": "0x3ac0b196a212a0e77d0a0c4b60e2283d2994b09993971b95427996700f5b92aa" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "receiptId": "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9", "status": "applied", + "success": true, "txId": "0xda9d2574a0d4bec158e13623499c6efe6dddb76f838c5f06c3e4dc8457b67d3b" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee", "status": "applied", + "success": true, "txId": "0xa0729982b58cc701aba6af0bc29ca993190db4e8e1489af918dbe293c0c03bad" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b", "status": "applied", + "success": true, "txId": "0xf32e17d973089ae20766e2c6ec07d1511ddecd3f79803f6146a90df971ca814f" }, { "error": null, + "errorCode": null, + "eventIds": [ + "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376", "status": "applied", + "success": true, "txId": "0x514f9ef68c09de5a4dc80611d661d07a4ea3a4fae6000a43a25864489f354a81" } ], "schema": "flowmemory.local_devnet.block.v0", - "stateRoot": "0x8c7c1e7a078b60a809d17a51c44e275059afb8d7535769430c3fc9e9320c7e23", + "stateRoot": "0x5c79c20d6d991efea359cd0ed6d5225c8d8255808f90ef58e0068ae73b85e544", "txIds": [ "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189", "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25", @@ -126,24 +247,33 @@ ] }, { - "blockHash": "0x7ddb184c69f798f25f27a254f1f530c6cdc31c9656ac19d1b8c114f7a3a650c6", + "blockHash": "0xa37d982b6d0fd99ff67504db337644bfeeaf1d2c7bde27d18b213a515f7bfc31", "blockNumber": 2, "logicalTime": 1778688001, - "parentHash": "0x61e9f90b982f13988e85a382fc39da82c9114ecceea9001ab454c744e0801a9b", + "parentHash": "0x842756cdacfd8323d4e5304ac59f818793d3b5155215076a64144cd46fa3b275", "receipts": [ { "error": null, + "errorCode": null, + "eventIds": [ + "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "receiptId": "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18", "status": "applied", + "success": true, "txId": "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7" } ], "schema": "flowmemory.local_devnet.block.v0", - "stateRoot": "0x3074ef2e5311d94e8f9a2660a6cc016c7b7f9a08c56ee07f9e841c1489726e68", + "stateRoot": "0xc354545e7fa40a6fba67b480c9484abec8b6cd980f21f8646b9840f4d34d72ba", "txIds": [ "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7" ] } ], + "bridgeCreditReceipts": {}, "challenges": { "challenge:demo:001": { "challengeId": "challenge:demo:001", @@ -158,6 +288,474 @@ } }, "dexPools": {}, + "executionEvents": { + "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 2, + "eventId": "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18", + "status": "applied", + "txId": "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7" + }, + "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2", + "status": "applied", + "txId": "0xb9f435aceb1bedb86dce821743769b28c02a42002c9cd41f2df1ea0279462ab2" + }, + "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9", + "status": "applied", + "txId": "0xda9d2574a0d4bec158e13623499c6efe6dddb76f838c5f06c3e4dc8457b67d3b" + }, + "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d", + "status": "applied", + "txId": "0x6f55c155425b968de01092be7d276f0c24430a2994910881938bc13c72f8892f" + }, + "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30", + "status": "applied", + "txId": "0x73b81134901c2ce13e575f161d82a404c6f7cd1ef2e8ee17beb6697062175c46" + }, + "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376", + "status": "applied", + "txId": "0x514f9ef68c09de5a4dc80611d661d07a4ea3a4fae6000a43a25864489f354a81" + }, + "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be", + "status": "applied", + "txId": "0x3ac0b196a212a0e77d0a0c4b60e2283d2994b09993971b95427996700f5b92aa" + }, + "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22", + "status": "applied", + "txId": "0x05abb39c720d8ee1cd9253e32efaa595f5d5b2fcef4a908f61ab4a6bfa315359" + }, + "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb", + "status": "applied", + "txId": "0x27aeba6c55c764222964764cb2bfbb69fb6fa56cb84714d6e98240ceb6e9d01d" + }, + "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0", + "status": "applied", + "txId": "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25" + }, + "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b", + "status": "applied", + "txId": "0xf32e17d973089ae20766e2c6ec07d1511ddecd3f79803f6146a90df971ca814f" + }, + "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443", + "status": "applied", + "txId": "0xef6df43993478d8f14d609732c7260fa08861ecc17e74137b83beda8d50931d2" + }, + "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd", + "status": "applied", + "txId": "0xec7019403fec03ea2ea4b090bc5ee1c63017ed9834bff5fb87ce2fe5d5794919" + }, + "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4", + "status": "applied", + "txId": "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189" + }, + "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424", + "status": "applied", + "txId": "0xafd3991af8b9e4eadfa3810f82d74701b7518269ae7ba5d0e3e450844445b03b" + }, + "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee", + "status": "applied", + "txId": "0xa0729982b58cc701aba6af0bc29ca993190db4e8e1489af918dbe293c0c03bad" + } + }, + "executionReceipts": { + "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1" + ], + "executionCostCharged": false, + "executionCostUnits": 0, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd", + "status": "applied", + "success": true, + "txId": "0xec7019403fec03ea2ea4b090bc5ee1c63017ed9834bff5fb87ce2fe5d5794919", + "txType": "FaucetLocalTestUnits" + }, + "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d", + "status": "applied", + "success": true, + "txId": "0x6f55c155425b968de01092be7d276f0c24430a2994910881938bc13c72f8892f", + "txType": "RegisterAgent" + }, + "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18": { + "blockNumber": 2, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18", + "status": "applied", + "success": true, + "txId": "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7", + "txType": "AnchorBatchToBasePlaceholder" + }, + "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4", + "status": "applied", + "success": true, + "txId": "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189", + "txType": "RegisterRootfield" + }, + "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897" + ], + "executionCostCharged": false, + "executionCostUnits": 0, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424", + "status": "applied", + "success": true, + "txId": "0xafd3991af8b9e4eadfa3810f82d74701b7518269ae7ba5d0e3e450844445b03b", + "txType": "CreateLocalTestUnitBalance" + }, + "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee", + "status": "applied", + "success": true, + "txId": "0xa0729982b58cc701aba6af0bc29ca993190db4e8e1489af918dbe293c0c03bad", + "txType": "OpenChallenge" + }, + "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0", + "status": "applied", + "success": true, + "txId": "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25", + "txType": "RegisterModelPassport" + }, + "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443", + "status": "applied", + "success": true, + "txId": "0xef6df43993478d8f14d609732c7260fa08861ecc17e74137b83beda8d50931d2", + "txType": "CommitRoot" + }, + "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9", + "status": "applied", + "success": true, + "txId": "0xda9d2574a0d4bec158e13623499c6efe6dddb76f838c5f06c3e4dc8457b67d3b", + "txType": "UpdateMemoryCell" + }, + "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b", + "status": "applied", + "success": true, + "txId": "0xf32e17d973089ae20766e2c6ec07d1511ddecd3f79803f6146a90df971ca814f", + "txType": "ResolveChallenge" + }, + "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be", + "status": "applied", + "success": true, + "txId": "0x3ac0b196a212a0e77d0a0c4b60e2283d2994b09993971b95427996700f5b92aa", + "txType": "SubmitVerifierReport" + }, + "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb", + "status": "applied", + "success": true, + "txId": "0x27aeba6c55c764222964764cb2bfbb69fb6fa56cb84714d6e98240ceb6e9d01d", + "txType": "MarkArtifactAvailability" + }, + "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30", + "status": "applied", + "success": true, + "txId": "0x73b81134901c2ce13e575f161d82a404c6f7cd1ef2e8ee17beb6697062175c46", + "txType": "SubmitWorkReceipt" + }, + "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2", + "status": "applied", + "success": true, + "txId": "0xb9f435aceb1bedb86dce821743769b28c02a42002c9cd41f2df1ea0279462ab2", + "txType": "SubmitArtifactCommitment" + }, + "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22", + "status": "applied", + "success": true, + "txId": "0x05abb39c720d8ee1cd9253e32efaa595f5d5b2fcef4a908f61ab4a6bfa315359", + "txType": "RegisterVerifierModule" + }, + "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376", + "status": "applied", + "success": true, + "txId": "0x514f9ef68c09de5a4dc80611d661d07a4ea3a4fae6000a43a25864489f354a81", + "txType": "FinalizeWorkReceipt" + } + }, "faucetRecords": { "faucet:demo:001": { "accountId": "local-balance:demo:agent-alpha", @@ -178,7 +776,7 @@ "finalizedBy": "operator:local-demo", "receiptId": "receipt:demo:001", "rootfieldId": "rootfield:demo:alpha", - "stateRoot": "0x4e7ee5e7a8cab9b4ddda183842b9e9c1e1e000afea820b577ecc90fa4d9517e2" + "stateRoot": "0x178cdd7a10e4b27879439acefd010ced736cc456f8873abb6ab7fec8d135e92e" } }, "genesisConfig": { @@ -189,6 +787,8 @@ "crypto/FLOWMEMORY_CRYPTO_SPEC.md#domain-separation", "crypto/ATTESTATIONS.md#local-signature-helpers" ], + "executionCostChargeMode": "record-only", + "executionCostsEnabled": true, "genesisHash": "0x0f23c892cbd2d00c10839d97ddab833698a83f8df8d6df27ceac03cfdd4b7bc9", "genesisLogicalTime": 1778688000, "networkId": "flowmemory-private-local", @@ -201,9 +801,12 @@ "localTestUnitBalances": { "local-balance:demo:agent-alpha": { "accountId": "local-balance:demo:agent-alpha", + "bridgeCreditedUnits": 0, + "lastBridgeCreditId": null, "lastFaucetRecordId": "faucet:demo:001", "noValue": true, "owner": "agent:demo:alpha", + "reservedUnits": 0, "totalFaucetUnits": 1000, "units": 1000, "updatedAtBlock": 1 @@ -211,19 +814,23 @@ }, "lpPositions": {}, "mapRoots": { + "accountNonceRoot": "0x91a5e27fe38391bb9f93c1a4543693bffa4b4f6fecf2ac9bc630f09f72d1e9bd", "agentAccountRoot": "0xcf31230bfff347f79e19a55f4d1ff5fa486b0b1ad4754ce22b93de4b259a3ca7", "artifactAvailabilityProofRoot": "0xfb4b693c45014aae0947f35696e9d864e7b26ac6fd39c1df5edb3e0dcf9bd928", "artifactCommitmentRoot": "0xb772a9f7273032fd3ba2da8b6476d4715bbbafbd2a7eed21ecd0d558bde3beab", "balanceTransferRoot": "0x9b6e249f769a93bc9f34a90156e028d1a830badcd8ccdc5b1487d512cdbf0a6d", - "baseAnchorRoot": "0xa10b087464d8e6098696295a2a4b26a4396974c9ed10dd0bba429f22284cd573", + "baseAnchorRoot": "0xe1e9eb52e2384ed9190da906cdffde07692401049d384a66ad8f72688ac6276b", + "bridgeCreditReceiptRoot": "0x0a86ce98161cb40ca4c7719468c0ed8f122677d12641c13305277094b8f3a509", "challengeRoot": "0x16da3d2bf2dcd801bc5deb3987dc01342cb957031ad01408ea77bf5d1583656f", "dexPoolRoot": "0x0e5f034494a2deb6a4f20c04f01e678795c587df4869ad3f189f107fcc447dea", + "executionEventRoot": "0x6cf55db15d19dddb084512871266d4127dc2b3a0682df89ba1d3a0e3927f0674", + "executionReceiptRoot": "0x878dc913e1daae0423b68906a6b6f2411f7866031b9a42830cf591af620d00be", "faucetRecordRoot": "0x2277503a52fab3f9e49b40debfb7d641abee75cf268aa56da403fdcf4fad6cee", - "finalityReceiptRoot": "0xdf352e20fd1ddfd2855202335e03cfec21d87e99bf8717d161fe8648998e16cf", + "finalityReceiptRoot": "0x04a6f56f5df14e6dbfb8c233394c6012c50947f40028e8f95e4e954fec9a29ba", "importedObservationRoot": "0x99cb1b939d5a09f800f72e4c5a2b92988571126e1f6f93549f4893b3f7de7880", "importedVerifierReportRoot": "0x6070b1015f000dd509c7b276d2ad68d8a9d188ef1a961c2f573346eb75ea5ad7", "liquidityReceiptRoot": "0x98bf15cc6859994038744612e125236b1f777895a051c41702c2004134327738", - "localTestUnitBalanceRoot": "0x167041ef195b5dde2d2cade6ecb26c9a0a596e9ed21ff7bfb02d33c9d2be8d15", + "localTestUnitBalanceRoot": "0xbaae802f4a4792e643944f86fa9baba660e5f796599c0b10936182585a2cd877", "lpPositionRoot": "0xe67dd98259afb06ca93620b4a8742b924ec2e8f3e6e72934eef5b8e60829d46f", "memoryCellRoot": "0x1b4e91099dd8d867201bd880437197ae6c031e538341aaa3cd2046e5706a2c25", "modelPassportRoot": "0x326aa6b0b372d29d24d747fe0879adfd7aaea206373b24ae2ab77d56357e9529", @@ -233,6 +840,7 @@ "tokenBalanceRoot": "0xbaf3b150fe41a0f3a2d9fe3dd9a664f9c5934bfef37218d9c3bf1c682be5f8c6", "tokenDefinitionRoot": "0xbbbad9681e8756403940e4333111706a4fcee1f30534ba14deea9ba148056be0", "tokenMintReceiptRoot": "0xaf86773ae2d2c4cbb8404f895fd9ff4132336f382e4e3f12b59df2ed9ba52806", + "tokenTransferReceiptRoot": "0xe6e05832f92dbc9c6a25ed2a39331548748283ed8c2b5bb5c61e0f90fd99edac", "verifierModuleRoot": "0xd6ddd8a2d0f5812d64679656c69983a2e0aecd36bd36199d900245658ae4626c", "verifierReportRoot": "0x4facd21e55423e182eba87355482a35daa93f53190fbd3a8d2969f9d55bc5373", "workReceiptRoot": "0x8b3ef5650c9eea2f608ad9c7cb73df3c289fc0ac72ed04f46e6ae4bce0a1f023" @@ -269,9 +877,10 @@ } }, "schema": "flowmemory.indexer_handoff.local_devnet.v0", - "stateRoot": "0x3074ef2e5311d94e8f9a2660a6cc016c7b7f9a08c56ee07f9e841c1489726e68", + "stateRoot": "0xc354545e7fa40a6fba67b480c9484abec8b6cd980f21f8646b9840f4d34d72ba", "swapReceipts": {}, "tokenBalances": {}, "tokenDefinitions": {}, - "tokenMintReceipts": {} + "tokenMintReceipts": {}, + "tokenTransferReceipts": {} } diff --git a/fixtures/launch-core/generated/devnet/state.json b/fixtures/launch-core/generated/devnet/state.json index 080bdd3f..713228ab 100644 --- a/fixtures/launch-core/generated/devnet/state.json +++ b/fixtures/launch-core/generated/devnet/state.json @@ -13,13 +13,15 @@ "cryptoSchemaRefs": [ "crypto/FLOWMEMORY_CRYPTO_SPEC.md#domain-separation", "crypto/ATTESTATIONS.md#local-signature-helpers" - ] + ], + "executionCostsEnabled": true, + "executionCostChargeMode": "record-only" }, "chainId": "flowmemory-local-devnet-v0", "genesisHash": "0x0f23c892cbd2d00c10839d97ddab833698a83f8df8d6df27ceac03cfdd4b7bc9", "nextBlockNumber": 3, "logicalTime": 1778688002, - "parentHash": "0x7ddb184c69f798f25f27a254f1f530c6cdc31c9656ac19d1b8c114f7a3a650c6", + "parentHash": "0xa37d982b6d0fd99ff67504db337644bfeeaf1d2c7bde27d18b213a515f7bfc31", "operatorKeyReferences": { "operator-key:local-devnet:alpha": { "schema": "flowmemory.local_devnet.operator_key_reference.v0", @@ -65,11 +67,15 @@ "owner": "agent:demo:alpha", "units": 1000, "totalFaucetUnits": 1000, + "bridgeCreditedUnits": 0, + "reservedUnits": 0, "lastFaucetRecordId": "faucet:demo:001", + "lastBridgeCreditId": null, "updatedAtBlock": 1, "noValue": true } }, + "accountNonces": {}, "faucetRecords": { "faucet:demo:001": { "faucetRecordId": "faucet:demo:001", @@ -82,9 +88,11 @@ } }, "balanceTransfers": {}, + "bridgeCreditReceipts": {}, "tokenDefinitions": {}, "tokenBalances": {}, "tokenMintReceipts": {}, + "tokenTransferReceipts": {}, "dexPools": {}, "lpPositions": {}, "liquidityReceipts": {}, @@ -135,7 +143,7 @@ "finalityStatus": "finalized", "challengeCount": 1, "finalizedAtBlock": 1, - "stateRoot": "0x4e7ee5e7a8cab9b4ddda183842b9e9c1e1e000afea820b577ecc90fa4d9517e2" + "stateRoot": "0x178cdd7a10e4b27879439acefd010ced736cc456f8873abb6ab7fec8d135e92e" } }, "artifactCommitments": { @@ -193,24 +201,27 @@ "importedObservations": {}, "importedVerifierReports": {}, "baseAnchors": { - "0xf57ab7d2c1459c03cf01bfddd56b046be685d8eaa4597e6bb54b5015aeaf003f": { - "anchorId": "0xf57ab7d2c1459c03cf01bfddd56b046be685d8eaa4597e6bb54b5015aeaf003f", + "0xa90d7d5b080801e998f67f54ff81fd7deb2d8d8685657dd03e0dcedfd194ee8a": { + "anchorId": "0xa90d7d5b080801e998f67f54ff81fd7deb2d8d8685657dd03e0dcedfd194ee8a", "appchainChainId": "flowmemory-local-devnet-v0", "blockRangeStart": 1, "blockRangeEnd": 1, - "stateRoot": "0x8c7c1e7a078b60a809d17a51c44e275059afb8d7535769430c3fc9e9320c7e23", + "stateRoot": "0x5c79c20d6d991efea359cd0ed6d5225c8d8255808f90ef58e0068ae73b85e544", "workReceiptRoot": "0x8b3ef5650c9eea2f608ad9c7cb73df3c289fc0ac72ed04f46e6ae4bce0a1f023", "verifierReportRoot": "0x4facd21e55423e182eba87355482a35daa93f53190fbd3a8d2969f9d55bc5373", "rootfieldStateRoot": "0xb72a851dca1103410484e3272945bae5e87fc39b8f32f77d2991959b60d3bfbf", "artifactCommitmentRoot": "0xb772a9f7273032fd3ba2da8b6476d4715bbbafbd2a7eed21ecd0d558bde3beab", "operatorKeyReferenceRoot": "0x8457aa3ed0f4238834a8f3925f25ccca805828d8427c3ef67590a45659b22a40", "agentAccountRoot": "0xcf31230bfff347f79e19a55f4d1ff5fa486b0b1ad4754ce22b93de4b259a3ca7", - "localTestUnitBalanceRoot": "0x167041ef195b5dde2d2cade6ecb26c9a0a596e9ed21ff7bfb02d33c9d2be8d15", + "localTestUnitBalanceRoot": "0xbaae802f4a4792e643944f86fa9baba660e5f796599c0b10936182585a2cd877", + "accountNonceRoot": "0x91a5e27fe38391bb9f93c1a4543693bffa4b4f6fecf2ac9bc630f09f72d1e9bd", "faucetRecordRoot": "0x2277503a52fab3f9e49b40debfb7d641abee75cf268aa56da403fdcf4fad6cee", "balanceTransferRoot": "0x9b6e249f769a93bc9f34a90156e028d1a830badcd8ccdc5b1487d512cdbf0a6d", + "bridgeCreditReceiptRoot": "0x0a86ce98161cb40ca4c7719468c0ed8f122677d12641c13305277094b8f3a509", "tokenDefinitionRoot": "0xbbbad9681e8756403940e4333111706a4fcee1f30534ba14deea9ba148056be0", "tokenBalanceRoot": "0xbaf3b150fe41a0f3a2d9fe3dd9a664f9c5934bfef37218d9c3bf1c682be5f8c6", "tokenMintReceiptRoot": "0xaf86773ae2d2c4cbb8404f895fd9ff4132336f382e4e3f12b59df2ed9ba52806", + "tokenTransferReceiptRoot": "0xe6e05832f92dbc9c6a25ed2a39331548748283ed8c2b5bb5c61e0f90fd99edac", "dexPoolRoot": "0x0e5f034494a2deb6a4f20c04f01e678795c587df4869ad3f189f107fcc447dea", "lpPositionRoot": "0xe67dd98259afb06ca93620b4a8742b924ec2e8f3e6e72934eef5b8e60829d46f", "liquidityReceiptRoot": "0x98bf15cc6859994038744612e125236b1f777895a051c41702c2004134327738", @@ -218,13 +229,483 @@ "modelPassportRoot": "0x326aa6b0b372d29d24d747fe0879adfd7aaea206373b24ae2ab77d56357e9529", "memoryCellRoot": "0x1b4e91099dd8d867201bd880437197ae6c031e538341aaa3cd2046e5706a2c25", "challengeRoot": "0x16da3d2bf2dcd801bc5deb3987dc01342cb957031ad01408ea77bf5d1583656f", - "finalityReceiptRoot": "0xdf352e20fd1ddfd2855202335e03cfec21d87e99bf8717d161fe8648998e16cf", + "finalityReceiptRoot": "0x04a6f56f5df14e6dbfb8c233394c6012c50947f40028e8f95e4e954fec9a29ba", "artifactAvailabilityProofRoot": "0xfb4b693c45014aae0947f35696e9d864e7b26ac6fd39c1df5edb3e0dcf9bd928", "verifierModuleRoot": "0xd6ddd8a2d0f5812d64679656c69983a2e0aecd36bd36199d900245658ae4626c", + "executionReceiptRoot": "0x1b766b214c0445c6ec7e1fa52c08c11c01c13059ebf4d31bd94ce9e5ef067ef6", + "executionEventRoot": "0xbe16f0eebc55089784564d8de7ceb92c59c81e4674fe2acb9406d224944f0be4", "previousAnchorId": "0x0000000000000000000000000000000000000000000000000000000000000000", "finalityStatus": "local-placeholder" } }, + "executionReceipts": { + "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd": { + "receiptId": "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd", + "txId": "0xec7019403fec03ea2ea4b090bc5ee1c63017ed9834bff5fb87ce2fe5d5794919", + "txType": "FaucetLocalTestUnits", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 0, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1" + ], + "blockNumber": 1, + "noValue": true + }, + "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d": { + "receiptId": "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d", + "txId": "0x6f55c155425b968de01092be7d276f0c24430a2994910881938bc13c72f8892f", + "txType": "RegisterAgent", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 1, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f" + ], + "blockNumber": 1, + "noValue": true + }, + "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18": { + "receiptId": "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18", + "txId": "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7", + "txType": "AnchorBatchToBasePlaceholder", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 1, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4" + ], + "blockNumber": 2, + "noValue": true + }, + "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4": { + "receiptId": "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4", + "txId": "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189", + "txType": "RegisterRootfield", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 2, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9" + ], + "blockNumber": 1, + "noValue": true + }, + "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424": { + "receiptId": "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424", + "txId": "0xafd3991af8b9e4eadfa3810f82d74701b7518269ae7ba5d0e3e450844445b03b", + "txType": "CreateLocalTestUnitBalance", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 0, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897" + ], + "blockNumber": 1, + "noValue": true + }, + "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee": { + "receiptId": "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee", + "txId": "0xa0729982b58cc701aba6af0bc29ca993190db4e8e1489af918dbe293c0c03bad", + "txType": "OpenChallenge", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 1, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e" + ], + "blockNumber": 1, + "noValue": true + }, + "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0": { + "receiptId": "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0", + "txId": "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25", + "txType": "RegisterModelPassport", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 2, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85" + ], + "blockNumber": 1, + "noValue": true + }, + "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443": { + "receiptId": "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443", + "txId": "0xef6df43993478d8f14d609732c7260fa08861ecc17e74137b83beda8d50931d2", + "txType": "CommitRoot", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 1, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096" + ], + "blockNumber": 1, + "noValue": true + }, + "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9": { + "receiptId": "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9", + "txId": "0xda9d2574a0d4bec158e13623499c6efe6dddb76f838c5f06c3e4dc8457b67d3b", + "txType": "UpdateMemoryCell", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 2, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1" + ], + "blockNumber": 1, + "noValue": true + }, + "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b": { + "receiptId": "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b", + "txId": "0xf32e17d973089ae20766e2c6ec07d1511ddecd3f79803f6146a90df971ca814f", + "txType": "ResolveChallenge", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 1, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88" + ], + "blockNumber": 1, + "noValue": true + }, + "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be": { + "receiptId": "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be", + "txId": "0x3ac0b196a212a0e77d0a0c4b60e2283d2994b09993971b95427996700f5b92aa", + "txType": "SubmitVerifierReport", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 2, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6" + ], + "blockNumber": 1, + "noValue": true + }, + "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb": { + "receiptId": "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb", + "txId": "0x27aeba6c55c764222964764cb2bfbb69fb6fa56cb84714d6e98240ceb6e9d01d", + "txType": "MarkArtifactAvailability", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 1, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e" + ], + "blockNumber": 1, + "noValue": true + }, + "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30": { + "receiptId": "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30", + "txId": "0x73b81134901c2ce13e575f161d82a404c6f7cd1ef2e8ee17beb6697062175c46", + "txType": "SubmitWorkReceipt", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 2, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8" + ], + "blockNumber": 1, + "noValue": true + }, + "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2": { + "receiptId": "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2", + "txId": "0xb9f435aceb1bedb86dce821743769b28c02a42002c9cd41f2df1ea0279462ab2", + "txType": "SubmitArtifactCommitment", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 1, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5" + ], + "blockNumber": 1, + "noValue": true + }, + "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22": { + "receiptId": "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22", + "txId": "0x05abb39c720d8ee1cd9253e32efaa595f5d5b2fcef4a908f61ab4a6bfa315359", + "txType": "RegisterVerifierModule", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 1, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794" + ], + "blockNumber": 1, + "noValue": true + }, + "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376": { + "receiptId": "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376", + "txId": "0x514f9ef68c09de5a4dc80611d661d07a4ea3a4fae6000a43a25864489f354a81", + "txType": "FinalizeWorkReceipt", + "status": "applied", + "success": true, + "errorCode": null, + "errorMessage": null, + "executionCostUnits": 1, + "executionCostCharged": false, + "payerAccountId": null, + "eventIds": [ + "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d" + ], + "blockNumber": 1, + "noValue": true + } + }, + "executionEvents": { + "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4": { + "eventId": "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4", + "receiptId": "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18", + "txId": "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 2, + "status": "applied" + }, + "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5": { + "eventId": "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5", + "receiptId": "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2", + "txId": "0xb9f435aceb1bedb86dce821743769b28c02a42002c9cd41f2df1ea0279462ab2", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + }, + "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1": { + "eventId": "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1", + "receiptId": "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9", + "txId": "0xda9d2574a0d4bec158e13623499c6efe6dddb76f838c5f06c3e4dc8457b67d3b", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + }, + "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f": { + "eventId": "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f", + "receiptId": "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d", + "txId": "0x6f55c155425b968de01092be7d276f0c24430a2994910881938bc13c72f8892f", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + }, + "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8": { + "eventId": "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8", + "receiptId": "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30", + "txId": "0x73b81134901c2ce13e575f161d82a404c6f7cd1ef2e8ee17beb6697062175c46", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + }, + "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d": { + "eventId": "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d", + "receiptId": "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376", + "txId": "0x514f9ef68c09de5a4dc80611d661d07a4ea3a4fae6000a43a25864489f354a81", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + }, + "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6": { + "eventId": "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6", + "receiptId": "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be", + "txId": "0x3ac0b196a212a0e77d0a0c4b60e2283d2994b09993971b95427996700f5b92aa", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + }, + "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794": { + "eventId": "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794", + "receiptId": "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22", + "txId": "0x05abb39c720d8ee1cd9253e32efaa595f5d5b2fcef4a908f61ab4a6bfa315359", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + }, + "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e": { + "eventId": "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e", + "receiptId": "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb", + "txId": "0x27aeba6c55c764222964764cb2bfbb69fb6fa56cb84714d6e98240ceb6e9d01d", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + }, + "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85": { + "eventId": "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85", + "receiptId": "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0", + "txId": "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + }, + "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88": { + "eventId": "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88", + "receiptId": "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b", + "txId": "0xf32e17d973089ae20766e2c6ec07d1511ddecd3f79803f6146a90df971ca814f", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + }, + "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096": { + "eventId": "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096", + "receiptId": "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443", + "txId": "0xef6df43993478d8f14d609732c7260fa08861ecc17e74137b83beda8d50931d2", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + }, + "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1": { + "eventId": "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1", + "receiptId": "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd", + "txId": "0xec7019403fec03ea2ea4b090bc5ee1c63017ed9834bff5fb87ce2fe5d5794919", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + }, + "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9": { + "eventId": "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9", + "receiptId": "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4", + "txId": "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + }, + "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897": { + "eventId": "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897", + "receiptId": "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424", + "txId": "0xafd3991af8b9e4eadfa3810f82d74701b7518269ae7ba5d0e3e450844445b03b", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + }, + "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e": { + "eventId": "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e", + "receiptId": "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee", + "txId": "0xa0729982b58cc701aba6af0bc29ca993190db4e8e1489af918dbe293c0c03bad", + "eventType": "transaction_applied", + "objectId": null, + "accountId": null, + "assetId": null, + "amountUnits": null, + "blockNumber": 1, + "status": "applied" + } + }, "blocks": [ { "schema": "flowmemory.local_devnet.block.v0", @@ -250,101 +731,229 @@ ], "receipts": [ { + "receiptId": "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4", "txId": "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 2, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9" + ] }, { + "receiptId": "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0", "txId": "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 2, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85" + ] }, { + "receiptId": "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d", "txId": "0x6f55c155425b968de01092be7d276f0c24430a2994910881938bc13c72f8892f", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 1, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f" + ] }, { + "receiptId": "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424", "txId": "0xafd3991af8b9e4eadfa3810f82d74701b7518269ae7ba5d0e3e450844445b03b", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 0, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897" + ] }, { + "receiptId": "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd", "txId": "0xec7019403fec03ea2ea4b090bc5ee1c63017ed9834bff5fb87ce2fe5d5794919", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 0, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1" + ] }, { + "receiptId": "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22", "txId": "0x05abb39c720d8ee1cd9253e32efaa595f5d5b2fcef4a908f61ab4a6bfa315359", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 1, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794" + ] }, { + "receiptId": "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2", "txId": "0xb9f435aceb1bedb86dce821743769b28c02a42002c9cd41f2df1ea0279462ab2", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 1, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5" + ] }, { + "receiptId": "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb", "txId": "0x27aeba6c55c764222964764cb2bfbb69fb6fa56cb84714d6e98240ceb6e9d01d", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 1, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e" + ] }, { + "receiptId": "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443", "txId": "0xef6df43993478d8f14d609732c7260fa08861ecc17e74137b83beda8d50931d2", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 1, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096" + ] }, { + "receiptId": "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30", "txId": "0x73b81134901c2ce13e575f161d82a404c6f7cd1ef2e8ee17beb6697062175c46", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 2, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8" + ] }, { + "receiptId": "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be", "txId": "0x3ac0b196a212a0e77d0a0c4b60e2283d2994b09993971b95427996700f5b92aa", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 2, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6" + ] }, { + "receiptId": "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9", "txId": "0xda9d2574a0d4bec158e13623499c6efe6dddb76f838c5f06c3e4dc8457b67d3b", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 2, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1" + ] }, { + "receiptId": "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee", "txId": "0xa0729982b58cc701aba6af0bc29ca993190db4e8e1489af918dbe293c0c03bad", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 1, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e" + ] }, { + "receiptId": "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b", "txId": "0xf32e17d973089ae20766e2c6ec07d1511ddecd3f79803f6146a90df971ca814f", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 1, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88" + ] }, { + "receiptId": "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376", "txId": "0x514f9ef68c09de5a4dc80611d661d07a4ea3a4fae6000a43a25864489f354a81", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 1, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d" + ] } ], - "stateRoot": "0x8c7c1e7a078b60a809d17a51c44e275059afb8d7535769430c3fc9e9320c7e23", - "blockHash": "0x61e9f90b982f13988e85a382fc39da82c9114ecceea9001ab454c744e0801a9b" + "stateRoot": "0x5c79c20d6d991efea359cd0ed6d5225c8d8255808f90ef58e0068ae73b85e544", + "blockHash": "0x842756cdacfd8323d4e5304ac59f818793d3b5155215076a64144cd46fa3b275" }, { "schema": "flowmemory.local_devnet.block.v0", "blockNumber": 2, - "parentHash": "0x61e9f90b982f13988e85a382fc39da82c9114ecceea9001ab454c744e0801a9b", + "parentHash": "0x842756cdacfd8323d4e5304ac59f818793d3b5155215076a64144cd46fa3b275", "logicalTime": 1778688001, "txIds": [ "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7" ], "receipts": [ { + "receiptId": "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18", "txId": "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7", "status": "applied", - "error": null + "success": true, + "executionCostUnits": 1, + "executionCostCharged": false, + "errorCode": null, + "error": null, + "eventIds": [ + "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4" + ] } ], - "stateRoot": "0x3074ef2e5311d94e8f9a2660a6cc016c7b7f9a08c56ee07f9e841c1489726e68", - "blockHash": "0x7ddb184c69f798f25f27a254f1f530c6cdc31c9656ac19d1b8c114f7a3a650c6" + "stateRoot": "0xc354545e7fa40a6fba67b480c9484abec8b6cd980f21f8646b9840f4d34d72ba", + "blockHash": "0xa37d982b6d0fd99ff67504db337644bfeeaf1d2c7bde27d18b213a515f7bfc31" } ], "pendingTxs": [] diff --git a/fixtures/launch-core/generated/devnet/verifier-handoff.json b/fixtures/launch-core/generated/devnet/verifier-handoff.json index 5af7c993..7fdade58 100644 --- a/fixtures/launch-core/generated/devnet/verifier-handoff.json +++ b/fixtures/launch-core/generated/devnet/verifier-handoff.json @@ -1,4 +1,5 @@ { + "accountNonces": {}, "artifactAvailabilityProofs": { "availability:demo:001": { "artifactId": "artifact:demo:001", @@ -12,6 +13,7 @@ } }, "balanceTransfers": {}, + "bridgeCreditReceipts": {}, "challenges": { "challenge:demo:001": { "challengeId": "challenge:demo:001", @@ -26,6 +28,474 @@ } }, "dexPools": {}, + "executionEvents": { + "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 2, + "eventId": "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18", + "status": "applied", + "txId": "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7" + }, + "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2", + "status": "applied", + "txId": "0xb9f435aceb1bedb86dce821743769b28c02a42002c9cd41f2df1ea0279462ab2" + }, + "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9", + "status": "applied", + "txId": "0xda9d2574a0d4bec158e13623499c6efe6dddb76f838c5f06c3e4dc8457b67d3b" + }, + "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d", + "status": "applied", + "txId": "0x6f55c155425b968de01092be7d276f0c24430a2994910881938bc13c72f8892f" + }, + "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30", + "status": "applied", + "txId": "0x73b81134901c2ce13e575f161d82a404c6f7cd1ef2e8ee17beb6697062175c46" + }, + "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376", + "status": "applied", + "txId": "0x514f9ef68c09de5a4dc80611d661d07a4ea3a4fae6000a43a25864489f354a81" + }, + "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be", + "status": "applied", + "txId": "0x3ac0b196a212a0e77d0a0c4b60e2283d2994b09993971b95427996700f5b92aa" + }, + "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22", + "status": "applied", + "txId": "0x05abb39c720d8ee1cd9253e32efaa595f5d5b2fcef4a908f61ab4a6bfa315359" + }, + "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb", + "status": "applied", + "txId": "0x27aeba6c55c764222964764cb2bfbb69fb6fa56cb84714d6e98240ceb6e9d01d" + }, + "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0", + "status": "applied", + "txId": "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25" + }, + "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b", + "status": "applied", + "txId": "0xf32e17d973089ae20766e2c6ec07d1511ddecd3f79803f6146a90df971ca814f" + }, + "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443", + "status": "applied", + "txId": "0xef6df43993478d8f14d609732c7260fa08861ecc17e74137b83beda8d50931d2" + }, + "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd", + "status": "applied", + "txId": "0xec7019403fec03ea2ea4b090bc5ee1c63017ed9834bff5fb87ce2fe5d5794919" + }, + "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4", + "status": "applied", + "txId": "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189" + }, + "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424", + "status": "applied", + "txId": "0xafd3991af8b9e4eadfa3810f82d74701b7518269ae7ba5d0e3e450844445b03b" + }, + "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e": { + "accountId": null, + "amountUnits": null, + "assetId": null, + "blockNumber": 1, + "eventId": "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e", + "eventType": "transaction_applied", + "objectId": null, + "receiptId": "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee", + "status": "applied", + "txId": "0xa0729982b58cc701aba6af0bc29ca993190db4e8e1489af918dbe293c0c03bad" + } + }, + "executionReceipts": { + "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xe597a31c9e32bcfd11d36ea93864c71a13384c1e0b64032863d109ab25c248a1" + ], + "executionCostCharged": false, + "executionCostUnits": 0, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x0a1863f382f8a49039ccd7119bb3ec8818ab0a472d5f8a98fc9dd2220c9e2edd", + "status": "applied", + "success": true, + "txId": "0xec7019403fec03ea2ea4b090bc5ee1c63017ed9834bff5fb87ce2fe5d5794919", + "txType": "FaucetLocalTestUnits" + }, + "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x358a02ea4548c4e0ce1da601fdf98966220c16df91351e432a7f072f14e8271f" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x1a9d3d926d7af126548d8e1c1f64b1ce9dc9032986ae4806e207c8f7a6aaeb4d", + "status": "applied", + "success": true, + "txId": "0x6f55c155425b968de01092be7d276f0c24430a2994910881938bc13c72f8892f", + "txType": "RegisterAgent" + }, + "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18": { + "blockNumber": 2, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x085da711c107c4b6d62fa286999229290b58829e1a2e7325093c509bf7cb53b4" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x210240c9e6967ce25905837b94ac60c8f851a473dd194a04bcdd29f56d904d18", + "status": "applied", + "success": true, + "txId": "0x8f719c880f17b5d4fb6d9efd54ac276d0dd8050d11c2c7870c36a79b66bc49d7", + "txType": "AnchorBatchToBasePlaceholder" + }, + "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xf4d2ae64c6843b6c6c2937295e7b269a64574a9645c173efd3f92ef46fbf70d9" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x2142f067d405bcd45b804bfc44237a943bdd587721a96be9e0004f03a10429e4", + "status": "applied", + "success": true, + "txId": "0x2cffda58c783dc026978b06a681587b19d9536ae4e158a69be855da1200f3189", + "txType": "RegisterRootfield" + }, + "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xf7dfc91c96e7a21f44dbce4bd7078a3b35a1354f4469141a2b87a00572d87897" + ], + "executionCostCharged": false, + "executionCostUnits": 0, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x32e833d1b9aa72ba987d58caf30d5df8857a1f6255b07b20e2b75da6f92da424", + "status": "applied", + "success": true, + "txId": "0xafd3991af8b9e4eadfa3810f82d74701b7518269ae7ba5d0e3e450844445b03b", + "txType": "CreateLocalTestUnitBalance" + }, + "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xfb7845e078da7450ad7d004079c317851eccddd7b655c2b156619f7236d2ec5e" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x34d568b916c5f936aaf58bda2a9fcce1dd7c0efaf0c03e3b12b540967bf198ee", + "status": "applied", + "success": true, + "txId": "0xa0729982b58cc701aba6af0bc29ca993190db4e8e1489af918dbe293c0c03bad", + "txType": "OpenChallenge" + }, + "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xb218d48446a9addb208938599fd5a2e4b23310305f15b64d7f608ccf6afa9d85" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x4c5b73550454a5ce06527b6e9fab2cf104a9f80681dc2cfb891b8e13d5a4bda0", + "status": "applied", + "success": true, + "txId": "0x75e63a0257621b8ef7412c6455a19d848996905e21f5ba79ccb0870d6e82eb25", + "txType": "RegisterModelPassport" + }, + "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xcf34a90d5d03e23e9c9d8c34833858c680e99af1fb0776fda5ea7ba738219096" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x5eb03d645d9763a4d7e0125e7d7508680b7083533b10cb08461491caf33f7443", + "status": "applied", + "success": true, + "txId": "0xef6df43993478d8f14d609732c7260fa08861ecc17e74137b83beda8d50931d2", + "txType": "CommitRoot" + }, + "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x2df675c4fcc2045ff33b5b9882a2dc47ca4f3a963b2aab777a682c617224a3e1" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x7b939d58be6043af7122c2cec2e67c18d2843ff513415cb5a5f3cb633010c5b9", + "status": "applied", + "success": true, + "txId": "0xda9d2574a0d4bec158e13623499c6efe6dddb76f838c5f06c3e4dc8457b67d3b", + "txType": "UpdateMemoryCell" + }, + "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0xc24e920b81b34896a21ca6bde9479d3f4e8a04f287e0e6453cae40e6fa1a7e88" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0x7c7f30dab08090d339468a6727871b834c71b8659e6b45e240cc8b5c8430322b", + "status": "applied", + "success": true, + "txId": "0xf32e17d973089ae20766e2c6ec07d1511ddecd3f79803f6146a90df971ca814f", + "txType": "ResolveChallenge" + }, + "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x8cccb30b7750c3484201753c6342d8d2c8e2a4dfa0299c1da6639e68ce78dcb6" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xa1ab8856d0d5497d5181bbb501da6394662e0d2bcfec0418e423a86a3ef864be", + "status": "applied", + "success": true, + "txId": "0x3ac0b196a212a0e77d0a0c4b60e2283d2994b09993971b95427996700f5b92aa", + "txType": "SubmitVerifierReport" + }, + "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x99710e06c1476c3460f0670e238a1bcfd437ff03c983ea0fda8d2cfdcfae3b4e" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xc9d76a50e330a1541cdf2b9eb4ead342fbffc21e1cdb4d0492a4e5eb553e15fb", + "status": "applied", + "success": true, + "txId": "0x27aeba6c55c764222964764cb2bfbb69fb6fa56cb84714d6e98240ceb6e9d01d", + "txType": "MarkArtifactAvailability" + }, + "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x59fb3d5a273f0b958e2a67537da733bb50f1332f85f658e89596d6ac8b2ef0e8" + ], + "executionCostCharged": false, + "executionCostUnits": 2, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xd4b1bd423c1ea6e3cb5e35f2747b6a32adc8df507a1da92e019f82c09a7ecf30", + "status": "applied", + "success": true, + "txId": "0x73b81134901c2ce13e575f161d82a404c6f7cd1ef2e8ee17beb6697062175c46", + "txType": "SubmitWorkReceipt" + }, + "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x21976b72efed5064f4b21b2e3c55ce61f6bf761441c9d842b2a303f9a1991cd5" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xd7f7209dd9709e9bf21dc604742499589ddd76019a833988374077d802b390b2", + "status": "applied", + "success": true, + "txId": "0xb9f435aceb1bedb86dce821743769b28c02a42002c9cd41f2df1ea0279462ab2", + "txType": "SubmitArtifactCommitment" + }, + "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x97d803063ba218ebd205922efb36c4ab7e80d7df4dc8ac13120fc66e24301794" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xed22a82bb32dfcc2506b38bf5067e64808b01f10b001852bfe958d0b3dfc9b22", + "status": "applied", + "success": true, + "txId": "0x05abb39c720d8ee1cd9253e32efaa595f5d5b2fcef4a908f61ab4a6bfa315359", + "txType": "RegisterVerifierModule" + }, + "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376": { + "blockNumber": 1, + "errorCode": null, + "errorMessage": null, + "eventIds": [ + "0x71ac71abe9bebc6c4214bb7187053d165b1f8cd6d96ef3093df9d107e7ba615d" + ], + "executionCostCharged": false, + "executionCostUnits": 1, + "noValue": true, + "payerAccountId": null, + "receiptId": "0xf9482b4df67ea49a5180143da2fcc8aaf836aafbb288ccc2130daa9657690376", + "status": "applied", + "success": true, + "txId": "0x514f9ef68c09de5a4dc80611d661d07a4ea3a4fae6000a43a25864489f354a81", + "txType": "FinalizeWorkReceipt" + } + }, "faucetRecords": { "faucet:demo:001": { "accountId": "local-balance:demo:agent-alpha", @@ -46,7 +516,7 @@ "finalizedBy": "operator:local-demo", "receiptId": "receipt:demo:001", "rootfieldId": "rootfield:demo:alpha", - "stateRoot": "0x4e7ee5e7a8cab9b4ddda183842b9e9c1e1e000afea820b577ecc90fa4d9517e2" + "stateRoot": "0x178cdd7a10e4b27879439acefd010ced736cc456f8873abb6ab7fec8d135e92e" } }, "genesisConfig": { @@ -57,6 +527,8 @@ "crypto/FLOWMEMORY_CRYPTO_SPEC.md#domain-separation", "crypto/ATTESTATIONS.md#local-signature-helpers" ], + "executionCostChargeMode": "record-only", + "executionCostsEnabled": true, "genesisHash": "0x0f23c892cbd2d00c10839d97ddab833698a83f8df8d6df27ceac03cfdd4b7bc9", "genesisLogicalTime": 1778688000, "networkId": "flowmemory-private-local", @@ -69,9 +541,12 @@ "localTestUnitBalances": { "local-balance:demo:agent-alpha": { "accountId": "local-balance:demo:agent-alpha", + "bridgeCreditedUnits": 0, + "lastBridgeCreditId": null, "lastFaucetRecordId": "faucet:demo:001", "noValue": true, "owner": "agent:demo:alpha", + "reservedUnits": 0, "totalFaucetUnits": 1000, "units": 1000, "updatedAtBlock": 1 @@ -79,19 +554,23 @@ }, "lpPositions": {}, "mapRoots": { + "accountNonceRoot": "0x91a5e27fe38391bb9f93c1a4543693bffa4b4f6fecf2ac9bc630f09f72d1e9bd", "agentAccountRoot": "0xcf31230bfff347f79e19a55f4d1ff5fa486b0b1ad4754ce22b93de4b259a3ca7", "artifactAvailabilityProofRoot": "0xfb4b693c45014aae0947f35696e9d864e7b26ac6fd39c1df5edb3e0dcf9bd928", "artifactCommitmentRoot": "0xb772a9f7273032fd3ba2da8b6476d4715bbbafbd2a7eed21ecd0d558bde3beab", "balanceTransferRoot": "0x9b6e249f769a93bc9f34a90156e028d1a830badcd8ccdc5b1487d512cdbf0a6d", - "baseAnchorRoot": "0xa10b087464d8e6098696295a2a4b26a4396974c9ed10dd0bba429f22284cd573", + "baseAnchorRoot": "0xe1e9eb52e2384ed9190da906cdffde07692401049d384a66ad8f72688ac6276b", + "bridgeCreditReceiptRoot": "0x0a86ce98161cb40ca4c7719468c0ed8f122677d12641c13305277094b8f3a509", "challengeRoot": "0x16da3d2bf2dcd801bc5deb3987dc01342cb957031ad01408ea77bf5d1583656f", "dexPoolRoot": "0x0e5f034494a2deb6a4f20c04f01e678795c587df4869ad3f189f107fcc447dea", + "executionEventRoot": "0x6cf55db15d19dddb084512871266d4127dc2b3a0682df89ba1d3a0e3927f0674", + "executionReceiptRoot": "0x878dc913e1daae0423b68906a6b6f2411f7866031b9a42830cf591af620d00be", "faucetRecordRoot": "0x2277503a52fab3f9e49b40debfb7d641abee75cf268aa56da403fdcf4fad6cee", - "finalityReceiptRoot": "0xdf352e20fd1ddfd2855202335e03cfec21d87e99bf8717d161fe8648998e16cf", + "finalityReceiptRoot": "0x04a6f56f5df14e6dbfb8c233394c6012c50947f40028e8f95e4e954fec9a29ba", "importedObservationRoot": "0x99cb1b939d5a09f800f72e4c5a2b92988571126e1f6f93549f4893b3f7de7880", "importedVerifierReportRoot": "0x6070b1015f000dd509c7b276d2ad68d8a9d188ef1a961c2f573346eb75ea5ad7", "liquidityReceiptRoot": "0x98bf15cc6859994038744612e125236b1f777895a051c41702c2004134327738", - "localTestUnitBalanceRoot": "0x167041ef195b5dde2d2cade6ecb26c9a0a596e9ed21ff7bfb02d33c9d2be8d15", + "localTestUnitBalanceRoot": "0xbaae802f4a4792e643944f86fa9baba660e5f796599c0b10936182585a2cd877", "lpPositionRoot": "0xe67dd98259afb06ca93620b4a8742b924ec2e8f3e6e72934eef5b8e60829d46f", "memoryCellRoot": "0x1b4e91099dd8d867201bd880437197ae6c031e538341aaa3cd2046e5706a2c25", "modelPassportRoot": "0x326aa6b0b372d29d24d747fe0879adfd7aaea206373b24ae2ab77d56357e9529", @@ -101,6 +580,7 @@ "tokenBalanceRoot": "0xbaf3b150fe41a0f3a2d9fe3dd9a664f9c5934bfef37218d9c3bf1c682be5f8c6", "tokenDefinitionRoot": "0xbbbad9681e8756403940e4333111706a4fcee1f30534ba14deea9ba148056be0", "tokenMintReceiptRoot": "0xaf86773ae2d2c4cbb8404f895fd9ff4132336f382e4e3f12b59df2ed9ba52806", + "tokenTransferReceiptRoot": "0xe6e05832f92dbc9c6a25ed2a39331548748283ed8c2b5bb5c61e0f90fd99edac", "verifierModuleRoot": "0xd6ddd8a2d0f5812d64679656c69983a2e0aecd36bd36199d900245658ae4626c", "verifierReportRoot": "0x4facd21e55423e182eba87355482a35daa93f53190fbd3a8d2969f9d55bc5373", "workReceiptRoot": "0x8b3ef5650c9eea2f608ad9c7cb73df3c289fc0ac72ed04f46e6ae4bce0a1f023" @@ -123,11 +603,12 @@ } }, "schema": "flowmemory.verifier_handoff.local_devnet.v0", - "stateRoot": "0x3074ef2e5311d94e8f9a2660a6cc016c7b7f9a08c56ee07f9e841c1489726e68", + "stateRoot": "0xc354545e7fa40a6fba67b480c9484abec8b6cd980f21f8646b9840f4d34d72ba", "swapReceipts": {}, "tokenBalances": {}, "tokenDefinitions": {}, "tokenMintReceipts": {}, + "tokenTransferReceipts": {}, "verifierModules": { "verifier:local-demo": { "active": true, diff --git a/package.json b/package.json index d79d409c..9614a5e8 100644 --- a/package.json +++ b/package.json @@ -48,9 +48,11 @@ "flowchain:smoke": "powershell -NoProfile -ExecutionPolicy Bypass -File infra/scripts/flowchain-smoke.ps1", "flowchain:full-smoke": "powershell -NoProfile -ExecutionPolicy Bypass -File infra/scripts/flowchain-full-smoke.ps1", "flowchain:product-e2e": "powershell -NoProfile -ExecutionPolicy Bypass -File infra/scripts/flowchain-product-e2e.ps1", + "flowchain:execution:e2e": "cargo run --manifest-path crates/flowmemory-devnet/Cargo.toml -- --state devnet/local/execution-e2e/state.json execution-e2e --out-dir devnet/local/execution-e2e", "flowchain:l1-e2e": "powershell -NoProfile -ExecutionPolicy Bypass -File infra/scripts/flowchain-full-smoke.ps1", "flowchain:real-value-pilot:e2e": "powershell -NoProfile -ExecutionPolicy Bypass -File infra/scripts/flowchain-real-value-pilot-e2e.ps1", "flowchain:real-value-pilot": "powershell -NoProfile -ExecutionPolicy Bypass -File infra/scripts/flowchain-real-value-pilot.ps1", + "flowchain:real-value-pilot:runtime": "npm run flowchain:execution:e2e", "flowchain:real-value-pilot:ops": "powershell -NoProfile -ExecutionPolicy Bypass -File infra/scripts/flowchain-real-value-pilot-ops-e2e.ps1", "flowchain:real-value-pilot:emergency-stop": "powershell -NoProfile -ExecutionPolicy Bypass -File infra/scripts/flowchain-real-value-pilot-emergency-stop.ps1", "flowchain:real-value-pilot:export": "powershell -NoProfile -ExecutionPolicy Bypass -File infra/scripts/flowchain-real-value-pilot-export.ps1",