From bc5d352bd31b083a0908abd0488bb196b0fa67bf Mon Sep 17 00:00:00 2001 From: zenground0 Date: Wed, 9 Jul 2025 09:01:15 -0600 Subject: [PATCH 01/39] Remove market actor requirement on notifications --- actors/miner/src/notifications.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/actors/miner/src/notifications.rs b/actors/miner/src/notifications.rs index 354c30482..d6339d5bc 100644 --- a/actors/miner/src/notifications.rs +++ b/actors/miner/src/notifications.rs @@ -58,15 +58,6 @@ pub fn notify_data_consumers( } for (notifee, payloads) in activations_by_notifee { - // Reject notifications to any actor other than the built-in market. - if notifee != STORAGE_MARKET_ACTOR_ADDR { - if require_success { - return Err( - actor_error!(illegal_argument; "disallowed notification receiver: {}", notifee), - ); - } - continue; - } let sectors_changes: Vec = payloads .into_iter() .map(|(sector_number, pieces)| SectorChanges { From e918fb00714c9c128f8ecaf9a261efddd1cb186f Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 05:43:30 +0200 Subject: [PATCH 02/39] claude first pass --- .../tests/contracts/NotificationReceiver.sol | 261 ++++++++++++++++++ actors/miner/src/notifications.rs | 2 +- .../miner/tests/prove_commit_sector_3_test.rs | 152 +++++++++- actors/miner/tests/prove_replica_test.rs | 146 ++++++++++ .../src/tests/evm_notification_test.rs | 238 ++++++++++++++++ integration_tests/src/tests/mod.rs | 2 + 6 files changed, 799 insertions(+), 2 deletions(-) create mode 100644 actors/evm/tests/contracts/NotificationReceiver.sol create mode 100644 integration_tests/src/tests/evm_notification_test.rs diff --git a/actors/evm/tests/contracts/NotificationReceiver.sol b/actors/evm/tests/contracts/NotificationReceiver.sol new file mode 100644 index 000000000..28e5b148d --- /dev/null +++ b/actors/evm/tests/contracts/NotificationReceiver.sol @@ -0,0 +1,261 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import "./FEVM.sol"; + +contract NotificationReceiver { + // Events to track notifications + event SectorContentChanged(uint64 indexed method, bytes params); + event NotificationReceived(uint64 indexed sector, uint64 indexed minimumCommitmentEpoch, bytes32 indexed dataCid); + + // State variables to track received notifications + struct SectorNotification { + uint64 sector; + uint64 minimumCommitmentEpoch; + bytes32 dataCid; + uint256 pieceSize; + bytes payload; + uint256 timestamp; + } + + SectorNotification[] public notifications; + mapping(uint64 => uint256[]) public sectorNotificationIndices; + + // Counter for total notifications received + uint256 public totalNotifications; + + // Flag to test different response behaviors + bool public shouldRejectNotifications = false; + + // Method selector for handle_filecoin_method + bytes4 constant NATIVE_METHOD_SELECTOR = 0x868e10c4; + + // Sector content changed method number + uint64 constant SECTOR_CONTENT_CHANGED = 86399155; + + /** + * @dev Toggle whether to reject notifications (for testing) + */ + function setRejectNotifications(bool _reject) public { + shouldRejectNotifications = _reject; + } + + /** + * @dev Get the count of notifications for a specific sector + */ + function getNotificationCount(uint64 sector) public view returns (uint256) { + return sectorNotificationIndices[sector].length; + } + + /** + * @dev Get all notification indices for a sector + */ + function getSectorNotifications(uint64 sector) public view returns (uint256[] memory) { + return sectorNotificationIndices[sector]; + } + + /** + * @dev Get a specific notification by index + */ + function getNotification(uint256 index) public view returns ( + uint64 sector, + uint64 minimumCommitmentEpoch, + bytes32 dataCid, + uint256 pieceSize, + bytes memory payload, + uint256 timestamp + ) { + require(index < notifications.length, "Invalid notification index"); + SectorNotification memory notif = notifications[index]; + return ( + notif.sector, + notif.minimumCommitmentEpoch, + notif.dataCid, + notif.pieceSize, + notif.payload, + notif.timestamp + ); + } + + /** + * @dev Handle incoming Filecoin method calls + * This is the main entry point for receiving notifications from the miner actor + */ + function handle_filecoin_method(uint64 method, uint64, bytes memory params) public returns (bytes memory) { + emit SectorContentChanged(method, params); + + // Check if this is a sector content changed notification + if (method == SECTOR_CONTENT_CHANGED) { + return processSectorContentChanged(params); + } + + // For other methods, just acknowledge receipt + return abi.encode(true); + } + + /** + * @dev Process sector content changed notification + * Expected params structure (CBOR encoded): + * { + * sectors: [{ + * sector: uint64, + * minimum_commitment_epoch: int64, + * added: [{ + * data: Cid, + * size: uint64, + * payload: bytes + * }] + * }] + * } + */ + function processSectorContentChanged(bytes memory params) internal returns (bytes memory) { + // In a real implementation, we would decode CBOR here + // For testing, we'll process the raw bytes and extract key information + + // Check if we should reject this notification + if (shouldRejectNotifications) { + // Return a rejection response + return encodeRejectionResponse(); + } + + // For this test contract, we'll store a simplified version of the notification + // In production, you would properly decode the CBOR data + + // Extract some basic info from the params (simplified for testing) + uint64 sector = extractSectorNumber(params); + uint64 minimumCommitmentEpoch = extractMinimumCommitmentEpoch(params); + bytes32 dataCid = extractDataCid(params); + uint256 pieceSize = extractPieceSize(params); + bytes memory payload = extractPayload(params); + + // Store the notification + uint256 notificationIndex = notifications.length; + notifications.push(SectorNotification({ + sector: sector, + minimumCommitmentEpoch: minimumCommitmentEpoch, + dataCid: dataCid, + pieceSize: pieceSize, + payload: payload, + timestamp: block.timestamp + })); + + sectorNotificationIndices[sector].push(notificationIndex); + totalNotifications++; + + emit NotificationReceived(sector, minimumCommitmentEpoch, dataCid); + + // Return acceptance response + return encodeAcceptanceResponse(); + } + + /** + * @dev Extract sector number from params (simplified for testing) + */ + function extractSectorNumber(bytes memory params) internal pure returns (uint64) { + // In a real implementation, this would properly decode CBOR + // For testing, return a dummy value or extract from known position + if (params.length >= 8) { + return uint64(uint8(params[7])) | + (uint64(uint8(params[6])) << 8) | + (uint64(uint8(params[5])) << 16) | + (uint64(uint8(params[4])) << 24); + } + return 0; + } + + /** + * @dev Extract minimum commitment epoch from params (simplified) + */ + function extractMinimumCommitmentEpoch(bytes memory params) internal pure returns (uint64) { + // Simplified extraction for testing + if (params.length >= 16) { + return uint64(uint8(params[15])) | + (uint64(uint8(params[14])) << 8) | + (uint64(uint8(params[13])) << 16) | + (uint64(uint8(params[12])) << 24); + } + return 0; + } + + /** + * @dev Extract data CID from params (simplified) + */ + function extractDataCid(bytes memory params) internal pure returns (bytes32) { + // Simplified extraction for testing + if (params.length >= 48) { + bytes32 cid; + assembly { + cid := mload(add(params, 48)) + } + return cid; + } + return bytes32(0); + } + + /** + * @dev Extract piece size from params (simplified) + */ + function extractPieceSize(bytes memory params) internal pure returns (uint256) { + // Simplified extraction for testing + if (params.length >= 24) { + return uint256(uint64(uint8(params[23])) | + (uint64(uint8(params[22])) << 8) | + (uint64(uint8(params[21])) << 16) | + (uint64(uint8(params[20])) << 24)); + } + return 0; + } + + /** + * @dev Extract payload from params (simplified) + */ + function extractPayload(bytes memory params) internal pure returns (bytes memory) { + // For testing, return a portion of the params as payload + if (params.length > 64) { + bytes memory payload = new bytes(params.length - 64); + for (uint i = 0; i < payload.length; i++) { + payload[i] = params[i + 64]; + } + return payload; + } + return ""; + } + + /** + * @dev Encode an acceptance response for the notification + * The response should match SectorContentChangedReturn structure + */ + function encodeAcceptanceResponse() internal pure returns (bytes memory) { + // Return a properly formatted response indicating acceptance + // Structure: { sectors: [{ added: [{ accepted: true }] }] } + // For simplified testing, return a basic acceptance + return abi.encode(true); + } + + /** + * @dev Encode a rejection response for the notification + */ + function encodeRejectionResponse() internal pure returns (bytes memory) { + // Return a properly formatted response indicating rejection + return abi.encode(false); + } + + /** + * @dev Fallback function to handle direct calls + */ + fallback() external payable { + // Check if this is a handle_filecoin_method call + if (msg.data.length >= 4 && bytes4(msg.data[0:4]) == NATIVE_METHOD_SELECTOR) { + // Decode the parameters + (uint64 method, uint64 codec, bytes memory params) = abi.decode(msg.data[4:], (uint64, uint64, bytes)); + bytes memory result = handle_filecoin_method(method, codec, params); + + // Return the result + assembly { + return(add(result, 0x20), mload(result)) + } + } + } + + receive() external payable {} +} \ No newline at end of file diff --git a/actors/miner/src/notifications.rs b/actors/miner/src/notifications.rs index d6339d5bc..1573bd729 100644 --- a/actors/miner/src/notifications.rs +++ b/actors/miner/src/notifications.rs @@ -4,7 +4,7 @@ use crate::{ }; use fil_actors_runtime::runtime::Runtime; use fil_actors_runtime::{ - ActorError, AsActorError, STORAGE_MARKET_ACTOR_ADDR, SendError, actor_error, + ActorError, AsActorError, SendError, }; use fvm_ipld_encoding::ipld_block::IpldBlock; diff --git a/actors/miner/tests/prove_commit_sector_3_test.rs b/actors/miner/tests/prove_commit_sector_3_test.rs index a8963f539..100b6c2c6 100644 --- a/actors/miner/tests/prove_commit_sector_3_test.rs +++ b/actors/miner/tests/prove_commit_sector_3_test.rs @@ -2,11 +2,14 @@ use fvm_ipld_encoding::RawBytes; use fvm_shared::error::ExitCode; use fvm_shared::sector::SectorNumber; use fvm_shared::{ActorID, clock::ChainEpoch}; +use fvm_shared::address::Address; +use fvm_shared::econ::TokenAmount; +use num_traits::Zero; use fil_actor_miner::ext::verifreg::{AllocationClaim, SectorAllocationClaims}; use fil_actor_miner::{ DataActivationNotification, PieceChange, ProveCommitSectors3Return, SectorChanges, - SectorOnChainInfo, SectorPreCommitInfo, + SectorOnChainInfo, SectorPreCommitInfo, SECTOR_CONTENT_CHANGED, }; use fil_actors_runtime::cbor::serialize; use fil_actors_runtime::test_utils::MockRuntime; @@ -757,3 +760,150 @@ fn precommit_sectors_from( fn assert_commit_result(expected: &[ExitCode], result: &ProveCommitSectors3Return) { assert_eq!(BatchReturn::of(expected), result.activation_results); } + +#[test] +fn notify_non_market_actor() { + let (h, mut rt) = setup_basic(); + let piece_size = h.sector_size as u64; + let precommits = precommit_sectors(&mut rt, &h, &[&[piece_size], &[piece_size]]); + let snos: Vec = + precommits.iter().map(|pci: &SectorPreCommitInfo| pci.sector_number).collect(); + + // Create notifications to different actors, not just STORAGE_MARKET_ACTOR + let custom_actor_1 = Address::new_id(5000); + let custom_actor_2 = Address::new_id(6000); + let evm_actor = Address::new_actor(b"evm_test_actor"); + + let mut manifests = vec![ + make_activation_manifest(snos[0], &[(piece_size, CLIENT_ID, 1000, 0)]), + make_activation_manifest(snos[1], &[(piece_size, CLIENT_ID, 1001, 0)]), + ]; + + // Add notifications to custom actors + manifests[0].pieces[0].notify.push(DataActivationNotification { + address: custom_actor_1, + payload: RawBytes::from(vec![1, 2, 3, 4]), + }); + manifests[0].pieces[0].notify.push(DataActivationNotification { + address: evm_actor, + payload: RawBytes::from(vec![5, 6, 7, 8]), + }); + manifests[1].pieces[0].notify.push(DataActivationNotification { + address: custom_actor_2, + payload: RawBytes::from(vec![9, 10, 11, 12]), + }); + + // Expect notifications to be sent to the custom actors + rt.expect_send_simple( + custom_actor_1, + SECTOR_CONTENT_CHANGED, + None, // The actual params will be set by the notification system + TokenAmount::zero(), + None, // Return value + ExitCode::OK, + ); + rt.expect_send_simple( + evm_actor, + SECTOR_CONTENT_CHANGED, + None, // The actual params will be set by the notification system + TokenAmount::zero(), + None, // Return value + ExitCode::OK, + ); + rt.expect_send_simple( + custom_actor_2, + SECTOR_CONTENT_CHANGED, + None, // The actual params will be set by the notification system + TokenAmount::zero(), + None, // Return value + ExitCode::OK, + ); + + let cfg = ProveCommitSectors3Config::default(); + let (result, _, _) = + h.prove_commit_sectors3(&rt, &manifests, false, false, false, cfg).unwrap(); + + // All sectors succeed + assert_commit_result(&[ExitCode::OK; 2], &result); + verify_weights(&rt, &h, snos[0], 0, piece_size); + verify_weights(&rt, &h, snos[1], 0, piece_size); +} + +#[test] +fn notify_multiple_actors_per_piece() { + let (h, mut rt) = setup_basic(); + let piece_size = h.sector_size as u64 / 2; + let precommits = precommit_sectors(&mut rt, &h, &[&[piece_size, piece_size]]); + let snos: Vec = + precommits.iter().map(|pci: &SectorPreCommitInfo| pci.sector_number).collect(); + + let mut manifests = vec![ + make_activation_manifest( + snos[0], + &[(piece_size, CLIENT_ID, 1000, 0), (piece_size, CLIENT_ID, 1001, 0)], + ), + ]; + + // Add notifications to multiple different actors for the same piece + let actor1 = Address::new_id(7000); + let actor2 = Address::new_id(8000); + let actor3 = Address::new_id(9000); + + manifests[0].pieces[0].notify.push(DataActivationNotification { + address: actor1, + payload: RawBytes::from(vec![1, 1, 1, 1]), + }); + manifests[0].pieces[0].notify.push(DataActivationNotification { + address: actor2, + payload: RawBytes::from(vec![2, 2, 2, 2]), + }); + manifests[0].pieces[1].notify.push(DataActivationNotification { + address: actor3, + payload: RawBytes::from(vec![3, 3, 3, 3]), + }); + manifests[0].pieces[1].notify.push(DataActivationNotification { + address: STORAGE_MARKET_ACTOR_ADDR, + payload: RawBytes::from(vec![4, 4, 4, 4]), + }); + + // Expect notifications to be sent to all actors + rt.expect_send_simple( + actor1, + SECTOR_CONTENT_CHANGED, + None, // The actual params will be set by the notification system + TokenAmount::zero(), + None, // Return value + ExitCode::OK, + ); + rt.expect_send_simple( + actor2, + SECTOR_CONTENT_CHANGED, + None, // The actual params will be set by the notification system + TokenAmount::zero(), + None, // Return value + ExitCode::OK, + ); + rt.expect_send_simple( + actor3, + SECTOR_CONTENT_CHANGED, + None, // The actual params will be set by the notification system + TokenAmount::zero(), + None, // Return value + ExitCode::OK, + ); + rt.expect_send_simple( + STORAGE_MARKET_ACTOR_ADDR, + SECTOR_CONTENT_CHANGED, + None, // The actual params will be set by the notification system + TokenAmount::zero(), + None, // Return value + ExitCode::OK, + ); + + let cfg = ProveCommitSectors3Config::default(); + let (result, _, _) = + h.prove_commit_sectors3(&rt, &manifests, false, false, false, cfg).unwrap(); + + assert_commit_result(&[ExitCode::OK], &result); + verify_weights(&rt, &h, snos[0], 0, piece_size * 2); +} diff --git a/actors/miner/tests/prove_replica_test.rs b/actors/miner/tests/prove_replica_test.rs index 5b22be387..d295e5522 100644 --- a/actors/miner/tests/prove_replica_test.rs +++ b/actors/miner/tests/prove_replica_test.rs @@ -4,10 +4,12 @@ use fvm_shared::econ::TokenAmount; use fvm_shared::error::ExitCode; use fvm_shared::sector::SectorNumber; use fvm_shared::{ActorID, clock::ChainEpoch}; +use fvm_shared::address::Address; use fil_actor_miner::ext::verifreg::{AllocationClaim, SectorAllocationClaims}; use fil_actor_miner::{ DataActivationNotification, PieceChange, SectorChanges, State, daily_proof_fee, + SECTOR_CONTENT_CHANGED, }; use fil_actor_miner::{ProveReplicaUpdates3Return, SectorOnChainInfo}; use fil_actors_runtime::cbor::serialize; @@ -707,3 +709,147 @@ fn setup_empty_sectors(count: usize) -> (ActorHarness, MockRuntime, Vec>(); + let st: State = h.get_state(&rt); + let store = rt.store(); + let piece_size = h.sector_size as u64; + + // Create notifications to different actors, not just STORAGE_MARKET_ACTOR + let custom_actor_1 = Address::new_id(5000); + let custom_actor_2 = Address::new_id(6000); + let evm_actor = Address::new_actor(b"evm_test_actor"); + + let mut sector_updates = vec![ + make_update_manifest(&st, store, snos[0], &[(piece_size, CLIENT_ID, 1000, 0)]), + make_update_manifest(&st, store, snos[1], &[(piece_size, CLIENT_ID, 1001, 0)]), + ]; + + // Add notifications to custom actors + sector_updates[0].pieces[0].notify.push(DataActivationNotification { + address: custom_actor_1, + payload: RawBytes::from(vec![1, 2, 3, 4]), + }); + sector_updates[0].pieces[0].notify.push(DataActivationNotification { + address: evm_actor, + payload: RawBytes::from(vec![5, 6, 7, 8]), + }); + sector_updates[1].pieces[0].notify.push(DataActivationNotification { + address: custom_actor_2, + payload: RawBytes::from(vec![9, 10, 11, 12]), + }); + + // Expect notifications to be sent to the custom actors + rt.expect_send_simple( + custom_actor_1, + SECTOR_CONTENT_CHANGED, + None, // The actual params will be set by the notification system + TokenAmount::zero(), + None, // Return value + ExitCode::OK, + ); + rt.expect_send_simple( + evm_actor, + SECTOR_CONTENT_CHANGED, + None, // The actual params will be set by the notification system + TokenAmount::zero(), + None, // Return value + ExitCode::OK, + ); + rt.expect_send_simple( + custom_actor_2, + SECTOR_CONTENT_CHANGED, + None, // The actual params will be set by the notification system + TokenAmount::zero(), + None, // Return value + ExitCode::OK, + ); + + let cfg = ProveReplicaUpdatesConfig::default(); + let (result, _, _) = + h.prove_replica_updates3_batch(&rt, §or_updates, false, false, cfg).unwrap(); + + // All sectors succeed + assert_update_result(&[ExitCode::OK; 2], &result); + verify_weights(&rt, &h, snos[0], 0, piece_size); + verify_weights(&rt, &h, snos[1], 0, piece_size); +} + +#[test] +fn update_multiple_actors_per_piece() { + let (h, rt, sectors) = setup_empty_sectors(1); + let snos = sectors.iter().map(|s| s.sector_number).collect::>(); + let st: State = h.get_state(&rt); + let store = rt.store(); + let piece_size = h.sector_size as u64 / 2; + + let mut sector_updates = vec![ + make_update_manifest(&st, store, snos[0], &[(piece_size, CLIENT_ID, 1000, 0), (piece_size, CLIENT_ID, 1001, 0)]), + ]; + + // Add notifications to multiple different actors for the same piece + let actor1 = Address::new_id(7000); + let actor2 = Address::new_id(8000); + let actor3 = Address::new_id(9000); + + sector_updates[0].pieces[0].notify.push(DataActivationNotification { + address: actor1, + payload: RawBytes::from(vec![1, 1, 1, 1]), + }); + sector_updates[0].pieces[0].notify.push(DataActivationNotification { + address: actor2, + payload: RawBytes::from(vec![2, 2, 2, 2]), + }); + sector_updates[0].pieces[1].notify.push(DataActivationNotification { + address: actor3, + payload: RawBytes::from(vec![3, 3, 3, 3]), + }); + sector_updates[0].pieces[1].notify.push(DataActivationNotification { + address: STORAGE_MARKET_ACTOR_ADDR, + payload: RawBytes::from(vec![4, 4, 4, 4]), + }); + + // Expect notifications to be sent to all actors + rt.expect_send_simple( + actor1, + SECTOR_CONTENT_CHANGED, + None, // The actual params will be set by the notification system + TokenAmount::zero(), + None, // Return value + ExitCode::OK, + ); + rt.expect_send_simple( + actor2, + SECTOR_CONTENT_CHANGED, + None, // The actual params will be set by the notification system + TokenAmount::zero(), + None, // Return value + ExitCode::OK, + ); + rt.expect_send_simple( + actor3, + SECTOR_CONTENT_CHANGED, + None, // The actual params will be set by the notification system + TokenAmount::zero(), + None, // Return value + ExitCode::OK, + ); + rt.expect_send_simple( + STORAGE_MARKET_ACTOR_ADDR, + SECTOR_CONTENT_CHANGED, + None, // The actual params will be set by the notification system + TokenAmount::zero(), + None, // Return value + ExitCode::OK, + ); + + let cfg = ProveReplicaUpdatesConfig::default(); + let (result, _, _) = + h.prove_replica_updates3_batch(&rt, §or_updates, false, false, cfg).unwrap(); + + assert_update_result(&[ExitCode::OK], &result); + verify_weights(&rt, &h, snos[0], 0, piece_size * 2); +} diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs new file mode 100644 index 000000000..8c476ce94 --- /dev/null +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -0,0 +1,238 @@ +use export_macro::vm_test; +use fil_actor_miner::{ + ProveCommitSectors3Params, SectorActivationManifest, PieceActivationManifest, + DataActivationNotification, SECTOR_CONTENT_CHANGED, Method as MinerMethod, +}; +use fil_actors_runtime::{ + EAM_ACTOR_ADDR, STORAGE_POWER_ACTOR_ADDR, STORAGE_MARKET_ACTOR_ADDR, + test_utils::EVM_ACTOR_CODE_ID, EPOCHS_IN_DAY, +}; +use fvm_ipld_encoding::{RawBytes, ipld_block::IpldBlock}; +use fvm_shared::{ + address::Address, econ::TokenAmount, sector::{RegisteredSealProof, SectorNumber}, + piece::PaddedPieceSize, ActorID, METHOD_SEND, +}; +use num_traits::Zero; +use vm_api::VM; +use vm_api::util::apply_ok; + +use crate::util::{ + assert_invariants, create_accounts, create_miner, precommit_sectors_v2, + advance_by_deadline_to_epoch, advance_by_deadline_to_epoch_while_proving, + advance_to_proving_deadline, get_network_stats, get_network_version, + miner_balance, sector_info, +}; +use crate::TEST_FAUCET_ADDR; + +const BATCH_SIZE: usize = 2; + +#[vm_test] +pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { + // Network version check + let nv = get_network_version(v); + + // Create accounts + let addrs = create_accounts(v, 2, &TokenAmount::from_whole(10_000)); + let seal_proof = RegisteredSealProof::StackedDRG32GiBV1P1; + let (owner, worker) = (addrs[0], addrs[1]); + let (miner_id, _) = create_miner( + v, + &owner, + &worker, + seal_proof.registered_window_post_proof().unwrap(), + &TokenAmount::from_whole(10_000), + ); + let miner_addr = Address::new_id(miner_id); + + // Deploy the NotificationReceiver EVM contract + // First, compile the contract bytecode (simplified for testing) + let contract_bytecode = include_bytes!("../../contracts/notification_receiver_bytecode.bin"); + + // Create an EVM actor to receive notifications + let params = IpldBlock::serialize_cbor(&fil_actor_eam::CreateParams { + initcode: contract_bytecode.to_vec().into(), + nonce: 0, + }).unwrap(); + + let create_result = v.execute_message( + &worker, + &EAM_ACTOR_ADDR, + &TokenAmount::from_whole(1), + fil_actor_eam::Method::Create as u64, + params, + ).unwrap(); + + assert!(create_result.code.is_success(), "Failed to create EVM contract: {}", create_result.message); + + let create_return: fil_actor_eam::CreateReturn = + create_result.ret.unwrap().deserialize().expect("Failed to decode create return"); + let evm_actor_addr = Address::new_id(create_return.actor_id); + let evm_robust_addr = create_return.robust_address.unwrap(); + let evm_eth_addr = create_return.eth_address; + + println!("Created EVM contract at ID: {}, Robust: {}, ETH: 0x{}", + evm_actor_addr, evm_robust_addr, hex::encode(&evm_eth_addr)); + + // Precommit sectors + let sector_number: SectorNumber = 100; + let precommits = precommit_sectors_v2( + v, + BATCH_SIZE, + BATCH_SIZE, + &worker, + &miner_addr, + seal_proof, + sector_number, + true, + None, + ); + + // Advance time to prove commit epoch + let prove_time = v.epoch() + 150; + advance_by_deadline_to_epoch(v, &miner_addr, prove_time); + + // Create piece activation manifests with notifications to EVM contract + let piece_size = PaddedPieceSize(32 << 30); // 32 GiB + let manifests: Vec = precommits.iter().enumerate().map(|(i, pc)| { + let piece_cid = make_piece_cid(format!("piece-{}", i).as_bytes()); + let notification_payload = RawBytes::from(vec![i as u8, 1, 2, 3]); // Simple test payload + + SectorActivationManifest { + sector_number: pc.info.sector_number, + pieces: vec![ + PieceActivationManifest { + cid: piece_cid, + size: piece_size, + verified_allocation_key: None, + notify: vec![ + // Send notification to our EVM contract + DataActivationNotification { + address: evm_robust_addr.clone(), + payload: notification_payload.clone(), + }, + // Also send to storage market for compatibility + DataActivationNotification { + address: STORAGE_MARKET_ACTOR_ADDR, + payload: notification_payload, + }, + ], + }, + ], + } + }).collect(); + + // ProveCommitSectors3 with notifications + let prove_params = ProveCommitSectors3Params { + sector_activations: manifests, + sector_proofs: vec![], // Empty proofs for testing + aggregate_proof: RawBytes::default(), + aggregate_proof_type: None, + require_activation_success: false, + require_notification_success: false, + }; + + let prove_result = v.execute_message( + &worker, + &miner_addr, + &TokenAmount::zero(), + MinerMethod::ProveCommitSectors3 as u64, + IpldBlock::serialize_cbor(&prove_params).unwrap(), + ).unwrap(); + + assert!(prove_result.code.is_success(), "ProveCommit failed: {}", prove_result.message); + + println!("Successfully proved sectors with EVM notifications"); + + // Verify that the EVM contract received the notifications + // In a real test, we would call a getter method on the contract to verify state + // For now, we check that the EVM actor exists and has the expected code + let evm_actor = v.actor(&evm_actor_addr).unwrap(); + assert_eq!(evm_actor.code, *EVM_ACTOR_CODE_ID, "EVM actor has wrong code ID"); + + // The contract should have processed the notifications + // In production, we would call contract methods to verify the stored notification data + + // Also test with ProveReplicaUpdates3 + // First, we need existing sectors to update + advance_by_deadline_to_epoch_while_proving( + v, + &miner_addr, + &worker, + sector_number, + sector_number + BATCH_SIZE as u64, + v.epoch() + DEFAULT_SECTOR_EXPIRATION_DAYS * EPOCHS_IN_DAY, + ); + + // Create update manifests with notifications to EVM + let update_manifests: Vec = (0..BATCH_SIZE).map(|i| { + let sector_num = sector_number + i as u64; + let piece_cid = make_piece_cid(format!("update-piece-{}", i).as_bytes()); + let notification_payload = RawBytes::from(vec![100 + i as u8, 4, 5, 6]); + + SectorUpdateManifest { + sector: sector_num, + deadline: 0, // Will be set by the actor + partition: 0, // Will be set by the actor + new_sealed_cid: make_sealed_cid(format!("update-sealed-{}", i).as_bytes()), + pieces: vec![ + PieceActivationManifest { + cid: piece_cid, + size: piece_size, + verified_allocation_key: None, + notify: vec![ + DataActivationNotification { + address: evm_robust_addr.clone(), + payload: notification_payload, + }, + ], + }, + ], + } + }).collect(); + + let update_params = ProveReplicaUpdates3Params { + sector_updates: update_manifests, + sector_proofs: vec![], + aggregate_proof: RawBytes::default(), + update_proofs_type: RegisteredUpdateProof::StackedDRG32GiBV1, + aggregate_proof_type: None, + require_activation_success: false, + require_notification_success: false, + }; + + let update_result = v.execute_message( + &worker, + &miner_addr, + &TokenAmount::zero(), + MinerMethod::ProveReplicaUpdates3 as u64, + IpldBlock::serialize_cbor(&update_params).unwrap(), + ).unwrap(); + + assert!(update_result.code.is_success(), "ProveReplicaUpdates failed: {}", update_result.message); + + println!("Successfully updated sectors with EVM notifications"); + + // Verify the EVM contract is still functioning + let final_evm_actor = v.actor(&evm_actor_addr).unwrap(); + assert_eq!(final_evm_actor.code, *EVM_ACTOR_CODE_ID, "EVM actor code changed unexpectedly"); + + assert_invariants(v, &miner_addr); +} + +// Helper functions to create test CIDs +fn make_piece_cid(data: &[u8]) -> cid::Cid { + use cid::multihash::{Code, MultihashDigest}; + let hash = Code::Blake2b256.digest(data); + cid::Cid::new_v1(0x55, hash) // 0x55 is the multicodec for raw +} + +fn make_sealed_cid(data: &[u8]) -> cid::Cid { + use cid::multihash::{Code, MultihashDigest}; + let hash = Code::Blake2b256.digest(data); + cid::Cid::new_v1(0x55, hash) +} + +// Re-export some constants from other modules +use fil_actor_miner::{ProveReplicaUpdates3Params, SectorUpdateManifest}; +use fil_actor_miner::RegisteredUpdateProof; +const DEFAULT_SECTOR_EXPIRATION_DAYS: i64 = 220; \ No newline at end of file diff --git a/integration_tests/src/tests/mod.rs b/integration_tests/src/tests/mod.rs index 7df8e9f4e..b82e3a94f 100644 --- a/integration_tests/src/tests/mod.rs +++ b/integration_tests/src/tests/mod.rs @@ -14,6 +14,8 @@ mod datacap_tests; pub use datacap_tests::*; mod evm_test; pub use evm_test::*; +mod evm_notification_test; +pub use evm_notification_test::*; mod extend_sectors_test; pub use extend_sectors_test::*; mod market_miner_withdrawal_test; From 754dc0cab1b53c7a809ecdd9254fe586f4ac6c98 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 00:23:36 -0600 Subject: [PATCH 03/39] Integration test fixes --- .../tests/contracts/NotificationReceiver.hex | 1 + .../tests/contracts/NotificationReceiver.sol | 405 +++++++++++------- .../src/tests/evm_notification_test.rs | 126 +----- 3 files changed, 257 insertions(+), 275 deletions(-) create mode 100644 actors/evm/tests/contracts/NotificationReceiver.hex diff --git a/actors/evm/tests/contracts/NotificationReceiver.hex b/actors/evm/tests/contracts/NotificationReceiver.hex new file mode 100644 index 000000000..70bcc178c --- /dev/null +++ b/actors/evm/tests/contracts/NotificationReceiver.hex @@ -0,0 +1 @@ +363038303630343035323566363030333566363130313030306138313534383136306666303231393136393038333135313530323137393035353530333438303135363032373537356638306664356235303631323035363830363130303335356633393566663366653630383036303430353233343830313536313030306635373566383066643562353036303034333631303631303038363537356633353630653031633830363338363865313063343131363130303539353738303633383638653130633431343631303133633537383036333837373764346437313436313031366335373830363363313533653937663134363130313861353738303633656336383065613231343631303162653537363130303836353635623830363333346331663934343134363130303861353738303633343437393466346631343631303062653537383036333463626233363031313436313030656535373830363335323938323539353134363130313063353735623566383066643562363130306134363030343830333630333831303139303631303039663931393036313131646635363562363130316565353635623630343035313631303062353935393439333932393139303631313262373536356236303430353138303931303339306633356236313030643836303034383033363033383130313930363130306433393139303631313334303536356236313033366335363562363034303531363130306535393139303631313337613536356236303430353138303931303339306633356236313030663636313033396435363562363034303531363130313033393139303631313361643536356236303430353138303931303339306633356236313031323636303034383033363033383130313930363130313231393139303631313334303536356236313033616635363562363034303531363130313333393139303631313437643536356236303430353138303931303339306633356236313031353636303034383033363033383130313930363130313531393139303631313563393536356236313034326135363562363034303531363130313633393139303631313633353536356236303430353138303931303339306633356236313031373436313034396435363562363034303531363130313831393139303631313337613536356236303430353138303931303339306633356236313031613436303034383033363033383130313930363130313966393139303631313164663536356236313034613335363562363034303531363130316235393539343933393239313930363131326237353635623630343035313830393130333930663335623631303164383630303438303336303338313031393036313031643339313930363131363535353635623631303665363536356236303430353136313031653539313930363131333761353635623630343035313830393130333930663335623566383138313534383131303631303166633537356638306664356239303566353236303230356632303930363030343032303135663931353039303530383035663031356639303534393036313031303030613930303436376666666666666666666666666666666631363930383035663031363030383930353439303631303130303061393030343630303730623930383036303031303138303534363130323436393036313136633035363562383036303166303136303230383039313034303236303230303136303430353139303831303136303430353238303932393139303831383135323630323030313832383035343631303237323930363131366330353635623830313536313032626435373830363031663130363130323934353736313031303038303833353430343032383335323931363032303031393136313032626435363562383230313931393035663532363032303566323039303562383135343831353239303630303130313930363032303031383038333131363130326130353738323930303336303166313638323031393135623530353035303530353039303830363030323031356639303534393036313031303030613930303436376666666666666666666666666666666631363930383036303033303138303534363130326562393036313136633035363562383036303166303136303230383039313034303236303230303136303430353139303831303136303430353238303932393139303831383135323630323030313832383035343631303331373930363131366330353635623830313536313033363235373830363031663130363130333339353736313031303038303833353430343032383335323931363032303031393136313033363235363562383230313931393035663532363032303566323039303562383135343831353239303630303130313930363032303031383038333131363130333435353738323930303336303166313638323031393135623530353035303530353039303530383535363562356636303031356638333637666666666666666666666666666666663136363766666666666666666666666666666666313638313532363032303031393038313532363032303031356632303830353439303530393035303931393035303536356236303033356639303534393036313031303030613930303436306666313638313536356236303630363030313566383336376666666666666666666666666666666631363637666666666666666666666666666666663136383135323630323030313930383135323630323030313566323038303534383036303230303236303230303136303430353139303831303136303430353238303932393139303831383135323630323030313832383035343830313536313034316535373630323030323832303139313930356635323630323035663230393035623831353438313532363032303031393036303031303139303830383331313631303430613537356235303530353035303530393035303931393035303536356236303630363330353236353862333637666666666666666666666666666666663136383436376666666666666666666666666666666631363033363130343562353736313034353438323631303731313536356239303530363130343936353635623630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313034386439303631313734613536356236303430353138303931303339306664356239333932353035303530353635623630303235343831353635623566383036303630356636303630356638303534393035303836313036313034663035373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313034653739303631313762323536356236303430353138303931303339306664356235663830383738313534383131303631303530343537363130353033363131376430353635623562393035663532363032303566323039303630303430323031363034303531383036306130303136303430353239303831356638323031356639303534393036313031303030613930303436376666666666666666666666666666666631363637666666666666666666666666666666663136363766666666666666666666666666666666313638313532363032303031356638323031363030383930353439303631303130303061393030343630303730623630303730623630303730623831353236303230303136303031383230313830353436313035373739303631313663303536356238303630316630313630323038303931303430323630323030313630343035313930383130313630343035323830393239313930383138313532363032303031383238303534363130356133393036313136633035363562383031353631303565653537383036303166313036313035633535373631303130303830383335343034303238333532393136303230303139313631303565653536356238323031393139303566353236303230356632303930356238313534383135323930363030313031393036303230303138303833313136313035643135373832393030333630316631363832303139313562353035303530353035303831353236303230303136303032383230313566393035343930363130313030306139303034363766666666666666666666666666666666313636376666666666666666666666666666666631363637666666666666666666666666666666663136383135323630323030313630303338323031383035343631303633383930363131366330353635623830363031663031363032303830393130343032363032303031363034303531393038313031363034303532383039323931393038313831353236303230303138323830353436313036363439303631313663303536356238303135363130366166353738303630316631303631303638363537363130313030383038333534303430323833353239313630323030313931363130366166353635623832303139313930356635323630323035663230393035623831353438313532393036303031303139303630323030313830383331313631303639323537383239303033363031663136383230313931356235303530353035303530383135323530353039303530383035663031353138313630323030313531383236303430303135313833363036303031353138343630383030313531393535303935353039353530393535303935353035303931393339353930393239343530353635623630303136303230353238313566353236303430356632303831383135343831313036313036666635373566383066643562393035663532363032303566323030313566393135303931353035303534383135363562363036303566383036313037316638343566363130613366353635623931353039313530356635623832383131303135363130396666353735663631303733383836383436313061336635363562383039343530383139323530353035303630303338313134363130373833353736303430353137663038633337396130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532363030343031363130373761393036313138343735363562363034303531383039313033393066643562356636313037386538373835363130616265353635623830393535303831393235303530353035663631303761313838383636313062336335363562383039363530383139323530353035303566363130376234383938373631306133663536356238303937353038313932353035303530356635623831383131303135363130396564353736313037643038613838363130613366353635623830393835303831393635303530353036303033383531343631303831623537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631303831323930363131386166353635623630343035313830393130333930666435623630363036313038323738623839363130626362353635623830393935303831393235303530353035663631303833613863386136313061626535363562383039613530383139323530353035303630363036313038346538643862363130626362353635623830396235303831393235303530353035663830383035343930353039303530356636303430353138303630613030313630343035323830386136376666666666666666666666666666666631363831353236303230303138393630303730623831353236303230303138363831353236303230303138353637666666666666666666666666666666663136383135323630323030313834383135323530393038303630303138313534303138303832353538303931353035303630303139303033393035663532363032303566323039303630303430323031356639303931393039313930393135303566383230313531383135663031356636313031303030613831353438313637666666666666666666666666666666663032313931363930383336376666666666666666666666666666666631363032313739303535353036303230383230313531383135663031363030383631303130303061383135343831363766666666666666666666666666666666303231393136393038333630303730623637666666666666666666666666666666663136303231373930353535303630343038323031353138313630303130313930383136313039333539313930363131613661353635623530363036303832303135313831363030323031356636313031303030613831353438313637666666666666666666666666666666663032313931363930383336376666666666666666666666666666666631363032313739303535353036303830383230313531383136303033303139303831363130393739393139303631316136613536356235303530353036303031356638393637666666666666666666666666666666663136363766666666666666666666666666666666313638313532363032303031393038313532363032303031356632303831393038303630303138313534303138303832353538303931353035303630303139303033393035663532363032303566323030313566393039313930393139303931353035353630303235663831353438303932393139303631303964373930363131623636353635623931393035303535353035303530353035303830383036303031303139313530353036313037626535363562353035303530353035303830383036303031303139313530353036313037323535363562353036303430353138303630343030313630343035323830363030323831353236303230303137663831663630303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532353039323530353035303931393035303536356235663830356638303631306134643836383636313064636435363562383136376666666666666666666666666666666631363931353038303937353038313933353038323934353035303530353036303034363066663136383236306666313631343631306161663537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306161363930363131626637353635623630343035313830393130333930666435623830383539333530393335303530353039323530393239303530353635623566383035663830363130616363383638363631306463643536356238313637666666666666666666666666666666663136393135303830393735303831393335303832393435303530353035303566363066663136383236306666313631343631306232643537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306232343930363131633835353635623630343035313830393130333930666435623830383539333530393335303530353039323530393239303530353635623566383035663830363130623461383638363631306463643536356238313637666666666666666666666666666666663136393135303830393735303831393335303832393435303530353035303630303136306666313638323630666631363134383036313062376435373530356636306666313638323630666631363134356236313062626335373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313062623339303631316431333536356236303430353138303931303339306664356238303835393335303933353035303530393235303932393035303536356236303630356638303566363130626461383638363631306463643536356238313637666666666666666666666666666666663136393135303830393735303831393335303832393435303530353035303630303636306666313638323630666631363134383036313063306535373530363030323630666631363832363066663136313435623631306334643537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306334343930363131646131353635623630343035313830393130333930666435623630303636306666313638323630666631363033363130636338353736313063363538363836363130646364353635623831363766666666666666666666666666666666313639313530383039373530383139333530383239343530353035303530363030323630666631363832363066663136313436313063633735373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313063626539303631316530393536356236303430353138303931303339306664356235623566383138363631306364353931393036313165323735363562393035303566383236376666666666666666666666666666666638313131313536313063663235373631306366313631313461353536356235623630343035313930383038323532383036303166303136303166313931363630323030313832303136303430353238303135363130643234353738313630323030313630303138323032383033363833333738303832303139313530353039303530356235303930353035663830383839303530356238333831313031353631306461663537383938313831353138313130363130643438353736313064343736313137643035363562356236303230303130313531363066383163363066383162383338333831353138313130363130643636353736313064363536313137643035363562356236303230303130313930376566666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666663139313639303831356631613930353335303831383036313064396639303631316236363536356239323530353038303830363030313031393135303530363130643264353635623530383138343839363130646264393139303631316532373536356239363530393635303530353035303530353039323530393239303530353635623566383035663830363130646462383638363631306665393536356239303530363030313835363130646561393139303631316532373536356239343530356636303035363065303833313636306666313639303163393035303566363031663833313639303530363031633831363066663136313036313065343735373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313065336539303631316563613536356236303430353138303931303339306664356236303138383136306666313631303135363130653661353738313831383838313630666631363931353039353530393535303935353035303530353036313066653235363562363031383831363066663136303336313065663035373566363130653830383938393631306665393536356239303530363030313838363130653866393139303631316532373536356239373530363031383831363066663136313031353631306564383537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306563663930363131663332353635623630343035313830393130333930666435623832383138393831363066663136393135303936353039363530393635303530353035303530363130666532353635623630313938313630666631363033363130663330353735663631306630363839383936313130363335363562393035303630303238383631306631353931393036313165323735363562393735303832383138393831363166666666313639313530393635303936353039363530353035303530353036313066653235363562363031613831363066663136303336313066373235373566363130663436383938393631313063623536356239303530363030343838363130663535393139303631316532373536356239373530383238313839383136336666666666666666313639313530393635303936353039363530353035303530353036313066653235363562363031623831363066663136313436313066623835373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313066616639303631316639613536356236303430353138303931303339306664356235663631306663333839383936313131333335363562393035303630303838383631306664323931393036313165323735363562393735303832383138393936353039363530393635303530353035303530356239323530393235303932353635623566363030313832363130666637393139303631316532373536356238333531313031353631313033613537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631313033313930363132303032353635623630343035313830393130333930666435623832383238313531383131303631313034643537363131303463363131376430353635623562363032303031303135313630663831633630663831623630663831633930353039323931353035303536356235663630303238323631313037313931393036313165323735363562383335313130313536313130623435373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313130616239303631323030323536356236303430353138303931303339306664356235663832363032303031383430313531393035303830363066303163393135303530393239313530353035363562356636303034383236313130643939313930363131653237353635623833353131303135363131313163353736303430353137663038633337396130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532363030343031363131313133393036313230303235363562363034303531383039313033393066643562356638323630323030313834303135313930353038303630653031633931353035303932393135303530353635623566363030383832363131313431393139303631316532373536356238333531313031353631313138343537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631313137623930363132303032353635623630343035313830393130333930666435623566383236303230303138343031353139303530383036306330316339313530353039323931353035303536356235663630343035313930353039303536356235663830666435623566383066643562356638313930353039313930353035363562363131316265383136313131616335363562383131343631313163383537356638306664356235303536356235663831333539303530363131316439383136313131623535363562393239313530353035363562356636303230383238343033313231353631313166343537363131316633363131316134353635623562356636313132303138343832383530313631313163623536356239313530353039323931353035303536356235663637666666666666666666666666666666663832313639303530393139303530353635623631313232363831363131323061353635623832353235303530353635623566383136303037306239303530393139303530353635623631313234313831363131323263353635623832353235303530353635623566383135313930353039313930353035363562356638323832353236303230383230313930353039323931353035303536356238323831383335653566383338333031353235303530353035363562356636303166313936303166383330313136393035303931393035303536356235663631313238393832363131323437353635623631313239333831383536313132353135363562393335303631313261333831383536303230383630313631313236313536356236313132616338313631313236663536356238343031393135303530393239313530353035363562356636306130383230313930353036313132636135663833303138383631313231643536356236313132643736303230383330313837363131323338353635623831383130333630343038333031353236313132653938313836363131323766353635623930353036313132663836303630383330313835363131323164353635623831383130333630383038333031353236313133306138313834363131323766353635623930353039363935353035303530353035303530353635623631313331663831363131323061353635623831313436313133323935373566383066643562353035363562356638313335393035303631313333613831363131333136353635623932393135303530353635623566363032303832383430333132313536313133353535373631313335343631313161343536356235623566363131333632383438323835303136313133326335363562393135303530393239313530353035363562363131333734383136313131616335363562383235323530353035363562356636303230383230313930353036313133386435663833303138343631313336623536356239323931353035303536356235663831313531353930353039313930353035363562363131336137383136313133393335363562383235323530353035363562356636303230383230313930353036313133633035663833303138343631313339653536356239323931353035303536356235663831353139303530393139303530353635623566383238323532363032303832303139303530393239313530353035363562356638313930353036303230383230313930353039313930353035363562363131336638383136313131616335363562383235323530353035363562356636313134303938333833363131336566353635623630323038333031393035303932393135303530353635623566363032303832303139303530393139303530353635623566363131343262383236313133633635363562363131343335383138353631313364303536356239333530363131343430383336313133653035363562383035663562383338313130313536313134373035373831353136313134353738383832363131336665353635623937353036313134363238333631313431353536356239323530353036303031383130313930353036313134343335363562353038353933353035303530353039323931353035303536356235663630323038323031393035303831383130333566383330313532363131343935383138343631313432313536356239303530393239313530353035363562356638306664356235663830666435623766346534383762373130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303566353236303431363030343532363032343566666435623631313464623832363131323666353635623831303138313831313036376666666666666666666666666666666638323131313731353631313466613537363131346639363131346135353635623562383036303430353235303530353035363562356636313135306336313131396235363562393035303631313531383832383236313134643235363562393139303530353635623566363766666666666666666666666666666666383231313135363131353337353736313135333636313134613535363562356236313135343038323631313236663536356239303530363032303831303139303530393139303530353635623832383138333337356638333833303135323530353035303536356235663631313536643631313536383834363131353164353635623631313530333536356239303530383238313532363032303831303138343834383430313131313536313135383935373631313538383631313461313536356235623631313539343834383238353631313534643536356235303933393235303530353035363562356638323630316638333031313236313135623035373631313561663631313439643536356235623831333536313135633038343832363032303836303136313135356235363562393135303530393239313530353035363562356638303566363036303834383630333132313536313135653035373631313564663631313161343536356235623566363131356564383638323837303136313133326335363562393335303530363032303631313566653836383238373031363131333263353635623932353035303630343038343031333536376666666666666666666666666666666638313131313536313136316635373631313631653631313161383536356235623631313632623836383238373031363131353963353635623931353035303932353039323530393235363562356636303230383230313930353038313831303335663833303135323631313634643831383436313132376635363562393035303932393135303530353635623566383036303430383338353033313231353631313636623537363131363661363131316134353635623562356636313136373838353832383630313631313332633536356239323530353036303230363131363839383538323836303136313131636235363562393135303530393235303932393035303536356237663465343837623731303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303035663532363032323630303435323630323435666664356235663630303238323034393035303630303138323136383036313136643735373630376638323136393135303562363032303832313038313033363131366561353736313136653936313136393335363562356235303931393035303536356235663832383235323630323038323031393035303932393135303530353635623766343936653736363136633639363432303664363537343638366636343030303030303030303030303030303030303030303030303030303030303030303030303566383230313532353035363562356636313137333436303065383336313136663035363562393135303631313733663832363131373030353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131373631383136313137323835363562393035303931393035303536356237663439366537363631366336393634323036653666373436393636363936333631373436393666366532303639366536343635373830303030303030303030303035663832303135323530353635623566363131373963363031613833363131366630353635623931353036313137613738323631313736383536356236303230383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631313763393831363131373930353635623930353039313930353035363562376634653438376237313030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030356635323630333236303034353236303234356666643562376634393665373636313663363936343230373036313732363136643733323036663735373436353732303030303030303030303030303030303030303030303030356638323031353235303536356235663631313833313630313438333631313666303536356239313530363131383363383236313137666435363562363032303832303139303530393139303530353635623566363032303832303139303530383138313033356638333031353236313138356538313631313832353536356239303530393139303530353635623766343936653736363136633639363432303730363137323631366437333230363936653665363537323030303030303030303030303030303030303030303030303566383230313532353035363562356636313138393936303134383336313136663035363562393135303631313861343832363131383635353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131386336383136313138386435363562393035303931393035303536356235663831393035303831356635323630323035663230393035303931393035303536356235663630323036303166383330313034393035303931393035303536356235663832383231623930353039323931353035303536356235663630303838333032363131393239376666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666383236313138656535363562363131393333383638333631313865653536356239353530383031393834313639333530383038363136383431373932353035303530393339323530353035303536356235663831393035303931393035303536356235663631313936653631313936393631313936343834363131316163353635623631313934623536356236313131616335363562393035303931393035303536356235663831393035303931393035303536356236313139383738333631313935343536356236313139396236313139393338323631313937353536356238343834353436313138666135363562383235353530353035303530353635623566393035363562363131396166363131396133353635623631313962613831383438343631313937653536356235303530353035363562356238313831313031353631313964643537363131396432356638323631313961373536356236303031383130313930353036313139633035363562353035303536356236303166383231313135363131613232353736313139663338313631313863643536356236313139666338343631313864663536356238313031363032303835313031353631316130623537383139303530356236313161316636313161313738353631313864663536356238333031383236313139626635363562353035303562353035303530353635623566383238323163393035303932393135303530353635623566363131613432356631393834363030383032363131613237353635623139383038333136393135303530393239313530353035363562356636313161356138333833363131613333353635623931353038323630303230323832313739303530393239313530353035363562363131613733383236313132343735363562363766666666666666666666666666666666383131313135363131613863353736313161386236313134613535363562356236313161393638323534363131366330353635623631316161313832383238353631313965313536356235663630323039303530363031663833313136303031383131343631316164323537356638343135363131616330353738323837303135313930353035623631316163613835383236313161346635363562383635353530363131623331353635623630316631393834313636313161653038363631313863643536356235663562383238313130313536313162303735373834383930313531383235353630303138323031393135303630323038353031393435303630323038313031393035303631316165323536356238363833313031353631316232343537383438393031353136313162323036303166383931363832363131613333353635623833353535303562363030313630303238383032303138383535353035303530356235303530353035303530353035363562376634653438376237313030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030356635323630313136303034353236303234356666643562356636313162373038323631313161633536356239313530376666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666383230333631316261323537363131626131363131623339353635623562363030313832303139303530393139303530353635623766363936653736363136633639363432303664363136613230323836353738373036353633373436353634323034643631366134313732373236313739323930303566383230313532353035363562356636313162653136303166383336313136663035363562393135303631316265633832363131626164353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131633065383136313162643535363562393035303931393035303536356237663639366537363631366336393634323036643631366132303238363537383730363536333734363536343230346436313661353536653733363936373665363535663832303135323766363434393665373432393030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303630323038323031353235303536356235663631316336663630323538333631313666303536356239313530363131633761383236313163313535363562363034303832303139303530393139303530353635623566363032303832303139303530383138313033356638333031353236313163396338313631316336333536356239303530393139303530353635623766363936653736363136633639363432303664363136613230323836353738373036353633373436353634323034643631366135333639363736653635363434393566383230313532376636653734323036663732323034643631366135353665373336393637366536353634343936653734323930303030303030303030303030303030303030303030363032303832303135323530353635623566363131636664363033353833363131366630353635623931353036313164303838323631316361333536356236303430383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631316432613831363131636631353635623930353039313930353035363562376636393665373636313663363936343230366436313661323032383635373837303635363337343635363432303464363136613534363136373230366637323230356638323031353237663464363136613432373937343635353337343732363936653637323930303030303030303030303030303030303030303030303030303030303030303030303036303230383230313532353035363562356636313164386236303265383336313136663035363562393135303631316439363832363131643331353635623630343038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131646238383136313164376635363562393035303931393035303536356237663635373837303635363337343635363432303464363136613432373937343635353337343732363936653637303030303030303030303030303030303030303035663832303135323530353635623566363131646633363031363833363131366630353635623931353036313164666538323631316462663536356236303230383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631316532303831363131646537353635623930353039313930353035363562356636313165333138323631313161633536356239313530363131653363383336313131616335363562393235303832383230313930353038303832313131353631316535343537363131653533363131623339353635623562393239313530353035363562376636333631366536653666373432303638363136653634366336353230363836353631363436353732373332303737363937343638323036353738373437323631356638323031353237663230336532303332333730303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303036303230383230313532353035363562356636313165623436303235383336313136663035363562393135303631316562663832363131653561353635623630343038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131656531383136313165613835363562393035303931393035303536356237663639366537363631366336393634323036333632366637323030303030303030303030303030303030303030303030303030303030303030303030303030303035663832303135323530353635623566363131663163363030633833363131366630353635623931353036313166323738323631316565383536356236303230383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631316634393831363131663130353635623930353039313930353035363562376634353738373036353633373436353634346336663737353636313663373536353332333730303030303030303030303030303030303030303030303030303030356638323031353235303536356235663631316638343630313238333631313666303536356239313530363131663866383236313166353035363562363032303832303139303530393139303530353635623566363032303832303139303530383138313033356638333031353236313166623138313631316637383536356239303530393139303530353635623766373336633639363336393665363732303666373537343230366636363230373236313665363736353030303030303030303030303030303030303030303030303566383230313532353035363562356636313166656336303134383336313136663035363562393135303631316666373832363131666238353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363132303139383136313166653035363562393035303931393035303536666561323634363937303636373335383232313232303938363864373435306633633063323032393835393962633531666638326536363565626363393163363134356439363838666361336463326232323364363736343733366636633633343330303038313930303333 diff --git a/actors/evm/tests/contracts/NotificationReceiver.sol b/actors/evm/tests/contracts/NotificationReceiver.sol index 28e5b148d..af09d8f9d 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.sol +++ b/actors/evm/tests/contracts/NotificationReceiver.sol @@ -1,21 +1,15 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity 0.8.25; -import "./FEVM.sol"; contract NotificationReceiver { - // Events to track notifications - event SectorContentChanged(uint64 indexed method, bytes params); - event NotificationReceived(uint64 indexed sector, uint64 indexed minimumCommitmentEpoch, bytes32 indexed dataCid); - // State variables to track received notifications struct SectorNotification { uint64 sector; - uint64 minimumCommitmentEpoch; - bytes32 dataCid; - uint256 pieceSize; + int64 minimumCommitmentEpoch; + bytes dataCid; + uint64 pieceSize; bytes payload; - uint256 timestamp; } SectorNotification[] public notifications; @@ -33,13 +27,6 @@ contract NotificationReceiver { // Sector content changed method number uint64 constant SECTOR_CONTENT_CHANGED = 86399155; - /** - * @dev Toggle whether to reject notifications (for testing) - */ - function setRejectNotifications(bool _reject) public { - shouldRejectNotifications = _reject; - } - /** * @dev Get the count of notifications for a specific sector */ @@ -59,11 +46,10 @@ contract NotificationReceiver { */ function getNotification(uint256 index) public view returns ( uint64 sector, - uint64 minimumCommitmentEpoch, - bytes32 dataCid, - uint256 pieceSize, - bytes memory payload, - uint256 timestamp + int64 minimumCommitmentEpoch, + bytes memory dataCid, + uint64 pieceSize, + bytes memory payload ) { require(index < notifications.length, "Invalid notification index"); SectorNotification memory notif = notifications[index]; @@ -72,8 +58,7 @@ contract NotificationReceiver { notif.minimumCommitmentEpoch, notif.dataCid, notif.pieceSize, - notif.payload, - notif.timestamp + notif.payload ); } @@ -82,15 +67,13 @@ contract NotificationReceiver { * This is the main entry point for receiving notifications from the miner actor */ function handle_filecoin_method(uint64 method, uint64, bytes memory params) public returns (bytes memory) { - emit SectorContentChanged(method, params); - // Check if this is a sector content changed notification if (method == SECTOR_CONTENT_CHANGED) { return processSectorContentChanged(params); } - // For other methods, just acknowledge receipt - return abi.encode(true); + // For other methods, just revert + revert("Invalid method"); } /** @@ -109,153 +92,245 @@ contract NotificationReceiver { * } */ function processSectorContentChanged(bytes memory params) internal returns (bytes memory) { - // In a real implementation, we would decode CBOR here - // For testing, we'll process the raw bytes and extract key information - - // Check if we should reject this notification - if (shouldRejectNotifications) { - // Return a rejection response - return encodeRejectionResponse(); - } - - // For this test contract, we'll store a simplified version of the notification - // In production, you would properly decode the CBOR data - - // Extract some basic info from the params (simplified for testing) - uint64 sector = extractSectorNumber(params); - uint64 minimumCommitmentEpoch = extractMinimumCommitmentEpoch(params); - bytes32 dataCid = extractDataCid(params); - uint256 pieceSize = extractPieceSize(params); - bytes memory payload = extractPayload(params); - - // Store the notification - uint256 notificationIndex = notifications.length; - notifications.push(SectorNotification({ - sector: sector, - minimumCommitmentEpoch: minimumCommitmentEpoch, - dataCid: dataCid, - pieceSize: pieceSize, - payload: payload, - timestamp: block.timestamp - })); - - sectorNotificationIndices[sector].push(notificationIndex); - totalNotifications++; - - emit NotificationReceived(sector, minimumCommitmentEpoch, dataCid); - - // Return acceptance response - return encodeAcceptanceResponse(); - } - - /** - * @dev Extract sector number from params (simplified for testing) - */ - function extractSectorNumber(bytes memory params) internal pure returns (uint64) { - // In a real implementation, this would properly decode CBOR - // For testing, return a dummy value or extract from known position - if (params.length >= 8) { - return uint64(uint8(params[7])) | - (uint64(uint8(params[6])) << 8) | - (uint64(uint8(params[5])) << 16) | - (uint64(uint8(params[4])) << 24); + + (uint nSectors, uint byteIdx) = readFixedArray(params, 0); + for (uint i = 0; i < nSectors; i++) { + + /* We now need to parse a tuple of 3 cbor objects: + (sector, minimum_commitment_epoch, added_pieces) */ + uint checkTupleLen; + (checkTupleLen, byteIdx) = readFixedArray(params, byteIdx); + require(checkTupleLen == 3, "Invalid params outer"); + + uint64 sector; + (sector, byteIdx) = readUInt64(params, byteIdx); + + int64 minimumCommitmentEpoch; + (minimumCommitmentEpoch, byteIdx) = readInt64(params, byteIdx); + + uint256 pieceCnt; + (pieceCnt, byteIdx) = readFixedArray(params, byteIdx); + + for (uint j = 0; j < pieceCnt; j++) { + /* We now need to parse a tuple of 3 cbor objects: + (data, size, payload) + */ + (checkTupleLen, byteIdx) = readFixedArray(params, byteIdx); + require(checkTupleLen == 3, "Invalid params inner"); + + bytes memory dataCid; + (dataCid, byteIdx) = readBytes(params, byteIdx); + + uint64 pieceSize; + (pieceSize, byteIdx) = readUInt64(params, byteIdx); + + bytes memory payload; + (payload, byteIdx) = readBytes(params, byteIdx); + + // Store the notification + uint256 notificationIndex = notifications.length; + notifications.push(SectorNotification({ + sector: sector, + minimumCommitmentEpoch: minimumCommitmentEpoch, + dataCid: dataCid, + pieceSize: pieceSize, + payload: payload + })); + + sectorNotificationIndices[sector].push(notificationIndex); + totalNotifications++; + } } - return 0; + /* Hack: just return CBOR null == `0xF6` + This deserializes to SectorContentChangedReturn [[bool]] but will fail validation. + To call this without failing commitment message must specify require_success == false + */ + return hex"81f6"; + } - - /** - * @dev Extract minimum commitment epoch from params (simplified) - */ - function extractMinimumCommitmentEpoch(bytes memory params) internal pure returns (uint64) { - // Simplified extraction for testing - if (params.length >= 16) { - return uint64(uint8(params[15])) | - (uint64(uint8(params[14])) << 8) | - (uint64(uint8(params[13])) << 16) | - (uint64(uint8(params[12])) << 24); - } - return 0; + + /* *** CBOR parsing *** */ + + uint8 constant MajUnsignedInt = 0; + uint8 constant MajSignedInt = 1; + uint8 constant MajByteString = 2; + uint8 constant MajTextString = 3; + uint8 constant MajArray = 4; + uint8 constant MajMap = 5; + uint8 constant MajTag = 6; + uint8 constant MajOther = 7; + + uint8 constant TagTypeBigNum = 2; + uint8 constant TagTypeNegativeBigNum = 3; + + uint8 constant True_Type = 21; + uint8 constant False_Type = 20; + + /// @notice attempt to read the length of a fixed array + /// @param cborData cbor encoded bytes to parse from + /// @param byteIdx current position to read on the cbor encoded bytes + /// @return length of the fixed array decoded from input bytes and the byte index after moving past the value + function readFixedArray(bytes memory cborData, uint byteIdx) internal pure returns (uint, uint) { + uint8 maj; + uint len; + + (maj, len, byteIdx) = parseCborHeader(cborData, byteIdx); + require(maj == MajArray, "invalid maj (expected MajArray)"); + + return (len, byteIdx); } - - /** - * @dev Extract data CID from params (simplified) - */ - function extractDataCid(bytes memory params) internal pure returns (bytes32) { - // Simplified extraction for testing - if (params.length >= 48) { - bytes32 cid; - assembly { - cid := mload(add(params, 48)) + + /// @notice attempt to read an arbitrary byte string value + /// @param cborData cbor encoded bytes to parse from + /// @param byteIdx current position to read on the cbor encoded bytes + /// @return arbitrary byte string decoded from input bytes and the byte index after moving past the value + function readBytes(bytes memory cborData, uint byteIdx) internal pure returns (bytes memory, uint) { + uint8 maj; + uint len; + + (maj, len, byteIdx) = parseCborHeader(cborData, byteIdx); + require(maj == MajTag || maj == MajByteString, "invalid maj (expected MajTag or MajByteString)"); + + if (maj == MajTag) { + (maj, len, byteIdx) = parseCborHeader(cborData, byteIdx); + if (!(maj == MajByteString)) { + revert("expected MajByteString"); } - return cid; } - return bytes32(0); - } - - /** - * @dev Extract piece size from params (simplified) - */ - function extractPieceSize(bytes memory params) internal pure returns (uint256) { - // Simplified extraction for testing - if (params.length >= 24) { - return uint256(uint64(uint8(params[23])) | - (uint64(uint8(params[22])) << 8) | - (uint64(uint8(params[21])) << 16) | - (uint64(uint8(params[20])) << 24)); + + uint max_len = byteIdx + len; + bytes memory slice = new bytes(len); + uint slice_index = 0; + for (uint256 i = byteIdx; i < max_len; i++) { + slice[slice_index] = cborData[i]; + slice_index++; } - return 0; + + return (slice, byteIdx + len); } - - /** - * @dev Extract payload from params (simplified) - */ - function extractPayload(bytes memory params) internal pure returns (bytes memory) { - // For testing, return a portion of the params as payload - if (params.length > 64) { - bytes memory payload = new bytes(params.length - 64); - for (uint i = 0; i < payload.length; i++) { - payload[i] = params[i + 64]; - } - return payload; + + /// @notice attempt to read a uint64 value + /// @param cborData cbor encoded bytes to parse from + /// @param byteIdx current position to read on the cbor encoded bytes + /// @return an uint64 decoded from input bytes and the byte index after moving past the value + function readUInt64(bytes memory cborData, uint byteIdx) internal pure returns (uint64, uint) { + uint8 maj; + uint value; + + (maj, value, byteIdx) = parseCborHeader(cborData, byteIdx); + require(maj == MajUnsignedInt, "invalid maj (expected MajUnsignedInt)"); + + return (uint64(value), byteIdx); + } + + /// @notice attempt to read a int64 value + /// @param cborData cbor encoded bytes to parse from + /// @param byteIdx current position to read on the cbor encoded bytes + /// @return an int64 decoded from input bytes and the byte index after moving past the value + function readInt64(bytes memory cborData, uint byteIdx) internal pure returns (int64, uint) { + uint8 maj; + uint value; + + (maj, value, byteIdx) = parseCborHeader(cborData, byteIdx); + require(maj == MajSignedInt || maj == MajUnsignedInt, "invalid maj (expected MajSignedInt or MajUnsignedInt)"); + + return (int64(uint64(value)), byteIdx); + } + + /// @notice Parse cbor header for major type and extra info. + /// @param cbor cbor encoded bytes to parse from + /// @param byteIndex current position to read on the cbor encoded bytes + /// @return major type, extra info and the byte index after moving past header bytes + function parseCborHeader(bytes memory cbor, uint byteIndex) internal pure returns (uint8, uint64, uint) { + uint8 first = sliceUInt8(cbor, byteIndex); + byteIndex += 1; + uint8 maj = (first & 0xe0) >> 5; + uint8 low = first & 0x1f; + // We don't handle CBOR headers with extra > 27, i.e. no indefinite lengths + require(low < 28, "cannot handle headers with extra > 27"); + + // extra is lower bits + if (low < 24) { + return (maj, low, byteIndex); + } + + // extra in next byte + if (low == 24) { + uint8 next = sliceUInt8(cbor, byteIndex); + byteIndex += 1; + require(next >= 24, "invalid cbor"); // otherwise this is invalid cbor + return (maj, next, byteIndex); + } + + // extra in next 2 bytes + if (low == 25) { + uint16 extra16 = sliceUInt16(cbor, byteIndex); + byteIndex += 2; + return (maj, extra16, byteIndex); + } + + // extra in next 4 bytes + if (low == 26) { + uint32 extra32 = sliceUInt32(cbor, byteIndex); + byteIndex += 4; + return (maj, extra32, byteIndex); } - return ""; + + // extra in next 8 bytes + if (!(low == 27)) { + revert("ExpectedLowValue27"); + } + uint64 extra64 = sliceUInt64(cbor, byteIndex); + byteIndex += 8; + return (maj, extra64, byteIndex); + } + + /// @notice slice uint8 from bytes starting at a given index + /// @param bs bytes to slice from + /// @param start current position to slice from bytes + /// @return uint8 sliced from bytes + function sliceUInt8(bytes memory bs, uint start) internal pure returns (uint8) { + require(bs.length >= start + 1, "slicing out of range"); + return uint8(bs[start]); } - - /** - * @dev Encode an acceptance response for the notification - * The response should match SectorContentChangedReturn structure - */ - function encodeAcceptanceResponse() internal pure returns (bytes memory) { - // Return a properly formatted response indicating acceptance - // Structure: { sectors: [{ added: [{ accepted: true }] }] } - // For simplified testing, return a basic acceptance - return abi.encode(true); + + /// @notice slice uint16 from bytes starting at a given index + /// @param bs bytes to slice from + /// @param start current position to slice from bytes + /// @return uint16 sliced from bytes + function sliceUInt16(bytes memory bs, uint start) internal pure returns (uint16) { + require(bs.length >= start + 2, "slicing out of range"); + bytes2 x; + assembly { + x := mload(add(bs, add(0x20, start))) + } + return uint16(x); } - - /** - * @dev Encode a rejection response for the notification - */ - function encodeRejectionResponse() internal pure returns (bytes memory) { - // Return a properly formatted response indicating rejection - return abi.encode(false); + + /// @notice slice uint32 from bytes starting at a given index + /// @param bs bytes to slice from + /// @param start current position to slice from bytes + /// @return uint32 sliced from bytes + function sliceUInt32(bytes memory bs, uint start) internal pure returns (uint32) { + require(bs.length >= start + 4, "slicing out of range"); + bytes4 x; + assembly { + x := mload(add(bs, add(0x20, start))) + } + return uint32(x); } - - /** - * @dev Fallback function to handle direct calls - */ - fallback() external payable { - // Check if this is a handle_filecoin_method call - if (msg.data.length >= 4 && bytes4(msg.data[0:4]) == NATIVE_METHOD_SELECTOR) { - // Decode the parameters - (uint64 method, uint64 codec, bytes memory params) = abi.decode(msg.data[4:], (uint64, uint64, bytes)); - bytes memory result = handle_filecoin_method(method, codec, params); - - // Return the result - assembly { - return(add(result, 0x20), mload(result)) - } + + /// @notice slice uint64 from bytes starting at a given index + /// @param bs bytes to slice from + /// @param start current position to slice from bytes + /// @return uint64 sliced from bytes + function sliceUInt64(bytes memory bs, uint start) internal pure returns (uint64) { + require(bs.length >= start + 8, "slicing out of range"); + bytes8 x; + assembly { + x := mload(add(bs, add(0x20, start))) } + return uint64(x); } - - receive() external payable {} -} \ No newline at end of file +} + diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 8c476ce94..4604f52a7 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -1,52 +1,46 @@ use export_macro::vm_test; use fil_actor_miner::{ ProveCommitSectors3Params, SectorActivationManifest, PieceActivationManifest, - DataActivationNotification, SECTOR_CONTENT_CHANGED, Method as MinerMethod, + DataActivationNotification, Method as MinerMethod, }; use fil_actors_runtime::{ - EAM_ACTOR_ADDR, STORAGE_POWER_ACTOR_ADDR, STORAGE_MARKET_ACTOR_ADDR, - test_utils::EVM_ACTOR_CODE_ID, EPOCHS_IN_DAY, + EAM_ACTOR_ADDR, test_utils::EVM_ACTOR_CODE_ID, test_utils::make_piece_cid, }; use fvm_ipld_encoding::{RawBytes, ipld_block::IpldBlock}; use fvm_shared::{ address::Address, econ::TokenAmount, sector::{RegisteredSealProof, SectorNumber}, - piece::PaddedPieceSize, ActorID, METHOD_SEND, + piece::PaddedPieceSize, }; use num_traits::Zero; use vm_api::VM; -use vm_api::util::apply_ok; use crate::util::{ - assert_invariants, create_accounts, create_miner, precommit_sectors_v2, - advance_by_deadline_to_epoch, advance_by_deadline_to_epoch_while_proving, - advance_to_proving_deadline, get_network_stats, get_network_version, - miner_balance, sector_info, + create_accounts, create_miner, precommit_sectors_v2, + advance_by_deadline_to_epoch }; -use crate::TEST_FAUCET_ADDR; -const BATCH_SIZE: usize = 2; #[vm_test] pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { - // Network version check - let nv = get_network_version(v); - + // Create accounts let addrs = create_accounts(v, 2, &TokenAmount::from_whole(10_000)); let seal_proof = RegisteredSealProof::StackedDRG32GiBV1P1; let (owner, worker) = (addrs[0], addrs[1]); - let (miner_id, _) = create_miner( + let (miner_addr, _) = create_miner( v, &owner, &worker, seal_proof.registered_window_post_proof().unwrap(), &TokenAmount::from_whole(10_000), ); - let miner_addr = Address::new_id(miner_id); - + // Deploy the NotificationReceiver EVM contract - // First, compile the contract bytecode (simplified for testing) - let contract_bytecode = include_bytes!("../../contracts/notification_receiver_bytecode.bin"); + // The file is a hex string, so decode it to bytes + let hex_str = std::fs::read_to_string("../../contracts/notification_receiver_bytecode.hex") + .expect("Failed to read contract bytecode hex file"); + let hex_str = hex_str.trim(); + let contract_bytecode = hex::decode(hex_str).expect("Failed to decode contract bytecode hex"); // Create an EVM actor to receive notifications let params = IpldBlock::serialize_cbor(&fil_actor_eam::CreateParams { @@ -77,8 +71,8 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { let sector_number: SectorNumber = 100; let precommits = precommit_sectors_v2( v, - BATCH_SIZE, - BATCH_SIZE, + 1, + vec![], &worker, &miner_addr, seal_proof, @@ -110,11 +104,6 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { address: evm_robust_addr.clone(), payload: notification_payload.clone(), }, - // Also send to storage market for compatibility - DataActivationNotification { - address: STORAGE_MARKET_ACTOR_ADDR, - payload: notification_payload, - }, ], }, ], @@ -152,87 +141,4 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { // The contract should have processed the notifications // In production, we would call contract methods to verify the stored notification data - // Also test with ProveReplicaUpdates3 - // First, we need existing sectors to update - advance_by_deadline_to_epoch_while_proving( - v, - &miner_addr, - &worker, - sector_number, - sector_number + BATCH_SIZE as u64, - v.epoch() + DEFAULT_SECTOR_EXPIRATION_DAYS * EPOCHS_IN_DAY, - ); - - // Create update manifests with notifications to EVM - let update_manifests: Vec = (0..BATCH_SIZE).map(|i| { - let sector_num = sector_number + i as u64; - let piece_cid = make_piece_cid(format!("update-piece-{}", i).as_bytes()); - let notification_payload = RawBytes::from(vec![100 + i as u8, 4, 5, 6]); - - SectorUpdateManifest { - sector: sector_num, - deadline: 0, // Will be set by the actor - partition: 0, // Will be set by the actor - new_sealed_cid: make_sealed_cid(format!("update-sealed-{}", i).as_bytes()), - pieces: vec![ - PieceActivationManifest { - cid: piece_cid, - size: piece_size, - verified_allocation_key: None, - notify: vec![ - DataActivationNotification { - address: evm_robust_addr.clone(), - payload: notification_payload, - }, - ], - }, - ], - } - }).collect(); - - let update_params = ProveReplicaUpdates3Params { - sector_updates: update_manifests, - sector_proofs: vec![], - aggregate_proof: RawBytes::default(), - update_proofs_type: RegisteredUpdateProof::StackedDRG32GiBV1, - aggregate_proof_type: None, - require_activation_success: false, - require_notification_success: false, - }; - - let update_result = v.execute_message( - &worker, - &miner_addr, - &TokenAmount::zero(), - MinerMethod::ProveReplicaUpdates3 as u64, - IpldBlock::serialize_cbor(&update_params).unwrap(), - ).unwrap(); - - assert!(update_result.code.is_success(), "ProveReplicaUpdates failed: {}", update_result.message); - - println!("Successfully updated sectors with EVM notifications"); - - // Verify the EVM contract is still functioning - let final_evm_actor = v.actor(&evm_actor_addr).unwrap(); - assert_eq!(final_evm_actor.code, *EVM_ACTOR_CODE_ID, "EVM actor code changed unexpectedly"); - - assert_invariants(v, &miner_addr); -} - -// Helper functions to create test CIDs -fn make_piece_cid(data: &[u8]) -> cid::Cid { - use cid::multihash::{Code, MultihashDigest}; - let hash = Code::Blake2b256.digest(data); - cid::Cid::new_v1(0x55, hash) // 0x55 is the multicodec for raw -} - -fn make_sealed_cid(data: &[u8]) -> cid::Cid { - use cid::multihash::{Code, MultihashDigest}; - let hash = Code::Blake2b256.digest(data); - cid::Cid::new_v1(0x55, hash) -} - -// Re-export some constants from other modules -use fil_actor_miner::{ProveReplicaUpdates3Params, SectorUpdateManifest}; -use fil_actor_miner::RegisteredUpdateProof; -const DEFAULT_SECTOR_EXPIRATION_DAYS: i64 = 220; \ No newline at end of file +} \ No newline at end of file From 6100f84d49aafb8c23d78deb394b4c036c1b6ab2 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 00:45:43 -0600 Subject: [PATCH 04/39] One contract fix and attempt at wiring integration test --- actors/evm/tests/contracts/NotificationReceiver.hex | 2 +- actors/evm/tests/contracts/NotificationReceiver.sol | 2 +- integration_tests/src/tests/mod.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/actors/evm/tests/contracts/NotificationReceiver.hex b/actors/evm/tests/contracts/NotificationReceiver.hex index 70bcc178c..1eabf1eb5 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.hex +++ b/actors/evm/tests/contracts/NotificationReceiver.hex @@ -1 +1 @@ -363038303630343035323566363030333566363130313030306138313534383136306666303231393136393038333135313530323137393035353530333438303135363032373537356638306664356235303631323035363830363130303335356633393566663366653630383036303430353233343830313536313030306635373566383066643562353036303034333631303631303038363537356633353630653031633830363338363865313063343131363130303539353738303633383638653130633431343631303133633537383036333837373764346437313436313031366335373830363363313533653937663134363130313861353738303633656336383065613231343631303162653537363130303836353635623830363333346331663934343134363130303861353738303633343437393466346631343631303062653537383036333463626233363031313436313030656535373830363335323938323539353134363130313063353735623566383066643562363130306134363030343830333630333831303139303631303039663931393036313131646635363562363130316565353635623630343035313631303062353935393439333932393139303631313262373536356236303430353138303931303339306633356236313030643836303034383033363033383130313930363130306433393139303631313334303536356236313033366335363562363034303531363130306535393139303631313337613536356236303430353138303931303339306633356236313030663636313033396435363562363034303531363130313033393139303631313361643536356236303430353138303931303339306633356236313031323636303034383033363033383130313930363130313231393139303631313334303536356236313033616635363562363034303531363130313333393139303631313437643536356236303430353138303931303339306633356236313031353636303034383033363033383130313930363130313531393139303631313563393536356236313034326135363562363034303531363130313633393139303631313633353536356236303430353138303931303339306633356236313031373436313034396435363562363034303531363130313831393139303631313337613536356236303430353138303931303339306633356236313031613436303034383033363033383130313930363130313966393139303631313164663536356236313034613335363562363034303531363130316235393539343933393239313930363131326237353635623630343035313830393130333930663335623631303164383630303438303336303338313031393036313031643339313930363131363535353635623631303665363536356236303430353136313031653539313930363131333761353635623630343035313830393130333930663335623566383138313534383131303631303166633537356638306664356239303566353236303230356632303930363030343032303135663931353039303530383035663031356639303534393036313031303030613930303436376666666666666666666666666666666631363930383035663031363030383930353439303631303130303061393030343630303730623930383036303031303138303534363130323436393036313136633035363562383036303166303136303230383039313034303236303230303136303430353139303831303136303430353238303932393139303831383135323630323030313832383035343631303237323930363131366330353635623830313536313032626435373830363031663130363130323934353736313031303038303833353430343032383335323931363032303031393136313032626435363562383230313931393035663532363032303566323039303562383135343831353239303630303130313930363032303031383038333131363130326130353738323930303336303166313638323031393135623530353035303530353039303830363030323031356639303534393036313031303030613930303436376666666666666666666666666666666631363930383036303033303138303534363130326562393036313136633035363562383036303166303136303230383039313034303236303230303136303430353139303831303136303430353238303932393139303831383135323630323030313832383035343631303331373930363131366330353635623830313536313033363235373830363031663130363130333339353736313031303038303833353430343032383335323931363032303031393136313033363235363562383230313931393035663532363032303566323039303562383135343831353239303630303130313930363032303031383038333131363130333435353738323930303336303166313638323031393135623530353035303530353039303530383535363562356636303031356638333637666666666666666666666666666666663136363766666666666666666666666666666666313638313532363032303031393038313532363032303031356632303830353439303530393035303931393035303536356236303033356639303534393036313031303030613930303436306666313638313536356236303630363030313566383336376666666666666666666666666666666631363637666666666666666666666666666666663136383135323630323030313930383135323630323030313566323038303534383036303230303236303230303136303430353139303831303136303430353238303932393139303831383135323630323030313832383035343830313536313034316535373630323030323832303139313930356635323630323035663230393035623831353438313532363032303031393036303031303139303830383331313631303430613537356235303530353035303530393035303931393035303536356236303630363330353236353862333637666666666666666666666666666666663136383436376666666666666666666666666666666631363033363130343562353736313034353438323631303731313536356239303530363130343936353635623630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313034386439303631313734613536356236303430353138303931303339306664356239333932353035303530353635623630303235343831353635623566383036303630356636303630356638303534393035303836313036313034663035373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313034653739303631313762323536356236303430353138303931303339306664356235663830383738313534383131303631303530343537363130353033363131376430353635623562393035663532363032303566323039303630303430323031363034303531383036306130303136303430353239303831356638323031356639303534393036313031303030613930303436376666666666666666666666666666666631363637666666666666666666666666666666663136363766666666666666666666666666666666313638313532363032303031356638323031363030383930353439303631303130303061393030343630303730623630303730623630303730623831353236303230303136303031383230313830353436313035373739303631313663303536356238303630316630313630323038303931303430323630323030313630343035313930383130313630343035323830393239313930383138313532363032303031383238303534363130356133393036313136633035363562383031353631303565653537383036303166313036313035633535373631303130303830383335343034303238333532393136303230303139313631303565653536356238323031393139303566353236303230356632303930356238313534383135323930363030313031393036303230303138303833313136313035643135373832393030333630316631363832303139313562353035303530353035303831353236303230303136303032383230313566393035343930363130313030306139303034363766666666666666666666666666666666313636376666666666666666666666666666666631363637666666666666666666666666666666663136383135323630323030313630303338323031383035343631303633383930363131366330353635623830363031663031363032303830393130343032363032303031363034303531393038313031363034303532383039323931393038313831353236303230303138323830353436313036363439303631313663303536356238303135363130366166353738303630316631303631303638363537363130313030383038333534303430323833353239313630323030313931363130366166353635623832303139313930356635323630323035663230393035623831353438313532393036303031303139303630323030313830383331313631303639323537383239303033363031663136383230313931356235303530353035303530383135323530353039303530383035663031353138313630323030313531383236303430303135313833363036303031353138343630383030313531393535303935353039353530393535303935353035303931393339353930393239343530353635623630303136303230353238313566353236303430356632303831383135343831313036313036666635373566383066643562393035663532363032303566323030313566393135303931353035303534383135363562363036303566383036313037316638343566363130613366353635623931353039313530356635623832383131303135363130396666353735663631303733383836383436313061336635363562383039343530383139323530353035303630303338313134363130373833353736303430353137663038633337396130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532363030343031363130373761393036313138343735363562363034303531383039313033393066643562356636313037386538373835363130616265353635623830393535303831393235303530353035663631303761313838383636313062336335363562383039363530383139323530353035303566363130376234383938373631306133663536356238303937353038313932353035303530356635623831383131303135363130396564353736313037643038613838363130613366353635623830393835303831393635303530353036303033383531343631303831623537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631303831323930363131386166353635623630343035313830393130333930666435623630363036313038323738623839363130626362353635623830393935303831393235303530353035663631303833613863386136313061626535363562383039613530383139323530353035303630363036313038346538643862363130626362353635623830396235303831393235303530353035663830383035343930353039303530356636303430353138303630613030313630343035323830386136376666666666666666666666666666666631363831353236303230303138393630303730623831353236303230303138363831353236303230303138353637666666666666666666666666666666663136383135323630323030313834383135323530393038303630303138313534303138303832353538303931353035303630303139303033393035663532363032303566323039303630303430323031356639303931393039313930393135303566383230313531383135663031356636313031303030613831353438313637666666666666666666666666666666663032313931363930383336376666666666666666666666666666666631363032313739303535353036303230383230313531383135663031363030383631303130303061383135343831363766666666666666666666666666666666303231393136393038333630303730623637666666666666666666666666666666663136303231373930353535303630343038323031353138313630303130313930383136313039333539313930363131613661353635623530363036303832303135313831363030323031356636313031303030613831353438313637666666666666666666666666666666663032313931363930383336376666666666666666666666666666666631363032313739303535353036303830383230313531383136303033303139303831363130393739393139303631316136613536356235303530353036303031356638393637666666666666666666666666666666663136363766666666666666666666666666666666313638313532363032303031393038313532363032303031356632303831393038303630303138313534303138303832353538303931353035303630303139303033393035663532363032303566323030313566393039313930393139303931353035353630303235663831353438303932393139303631303964373930363131623636353635623931393035303535353035303530353035303830383036303031303139313530353036313037626535363562353035303530353035303830383036303031303139313530353036313037323535363562353036303430353138303630343030313630343035323830363030323831353236303230303137663831663630303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532353039323530353035303931393035303536356235663830356638303631306134643836383636313064636435363562383136376666666666666666666666666666666631363931353038303937353038313933353038323934353035303530353036303034363066663136383236306666313631343631306161663537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306161363930363131626637353635623630343035313830393130333930666435623830383539333530393335303530353039323530393239303530353635623566383035663830363130616363383638363631306463643536356238313637666666666666666666666666666666663136393135303830393735303831393335303832393435303530353035303566363066663136383236306666313631343631306232643537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306232343930363131633835353635623630343035313830393130333930666435623830383539333530393335303530353039323530393239303530353635623566383035663830363130623461383638363631306463643536356238313637666666666666666666666666666666663136393135303830393735303831393335303832393435303530353035303630303136306666313638323630666631363134383036313062376435373530356636306666313638323630666631363134356236313062626335373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313062623339303631316431333536356236303430353138303931303339306664356238303835393335303933353035303530393235303932393035303536356236303630356638303566363130626461383638363631306463643536356238313637666666666666666666666666666666663136393135303830393735303831393335303832393435303530353035303630303636306666313638323630666631363134383036313063306535373530363030323630666631363832363066663136313435623631306334643537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306334343930363131646131353635623630343035313830393130333930666435623630303636306666313638323630666631363033363130636338353736313063363538363836363130646364353635623831363766666666666666666666666666666666313639313530383039373530383139333530383239343530353035303530363030323630666631363832363066663136313436313063633735373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313063626539303631316530393536356236303430353138303931303339306664356235623566383138363631306364353931393036313165323735363562393035303566383236376666666666666666666666666666666638313131313536313063663235373631306366313631313461353536356235623630343035313930383038323532383036303166303136303166313931363630323030313832303136303430353238303135363130643234353738313630323030313630303138323032383033363833333738303832303139313530353039303530356235303930353035663830383839303530356238333831313031353631306461663537383938313831353138313130363130643438353736313064343736313137643035363562356236303230303130313531363066383163363066383162383338333831353138313130363130643636353736313064363536313137643035363562356236303230303130313930376566666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666663139313639303831356631613930353335303831383036313064396639303631316236363536356239323530353038303830363030313031393135303530363130643264353635623530383138343839363130646264393139303631316532373536356239363530393635303530353035303530353039323530393239303530353635623566383035663830363130646462383638363631306665393536356239303530363030313835363130646561393139303631316532373536356239343530356636303035363065303833313636306666313639303163393035303566363031663833313639303530363031633831363066663136313036313065343735373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313065336539303631316563613536356236303430353138303931303339306664356236303138383136306666313631303135363130653661353738313831383838313630666631363931353039353530393535303935353035303530353036313066653235363562363031383831363066663136303336313065663035373566363130653830383938393631306665393536356239303530363030313838363130653866393139303631316532373536356239373530363031383831363066663136313031353631306564383537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306563663930363131663332353635623630343035313830393130333930666435623832383138393831363066663136393135303936353039363530393635303530353035303530363130666532353635623630313938313630666631363033363130663330353735663631306630363839383936313130363335363562393035303630303238383631306631353931393036313165323735363562393735303832383138393831363166666666313639313530393635303936353039363530353035303530353036313066653235363562363031613831363066663136303336313066373235373566363130663436383938393631313063623536356239303530363030343838363130663535393139303631316532373536356239373530383238313839383136336666666666666666313639313530393635303936353039363530353035303530353036313066653235363562363031623831363066663136313436313066623835373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313066616639303631316639613536356236303430353138303931303339306664356235663631306663333839383936313131333335363562393035303630303838383631306664323931393036313165323735363562393735303832383138393936353039363530393635303530353035303530356239323530393235303932353635623566363030313832363130666637393139303631316532373536356238333531313031353631313033613537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631313033313930363132303032353635623630343035313830393130333930666435623832383238313531383131303631313034643537363131303463363131376430353635623562363032303031303135313630663831633630663831623630663831633930353039323931353035303536356235663630303238323631313037313931393036313165323735363562383335313130313536313130623435373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313130616239303631323030323536356236303430353138303931303339306664356235663832363032303031383430313531393035303830363066303163393135303530393239313530353035363562356636303034383236313130643939313930363131653237353635623833353131303135363131313163353736303430353137663038633337396130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532363030343031363131313133393036313230303235363562363034303531383039313033393066643562356638323630323030313834303135313930353038303630653031633931353035303932393135303530353635623566363030383832363131313431393139303631316532373536356238333531313031353631313138343537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631313137623930363132303032353635623630343035313830393130333930666435623566383236303230303138343031353139303530383036306330316339313530353039323931353035303536356235663630343035313930353039303536356235663830666435623566383066643562356638313930353039313930353035363562363131316265383136313131616335363562383131343631313163383537356638306664356235303536356235663831333539303530363131316439383136313131623535363562393239313530353035363562356636303230383238343033313231353631313166343537363131316633363131316134353635623562356636313132303138343832383530313631313163623536356239313530353039323931353035303536356235663637666666666666666666666666666666663832313639303530393139303530353635623631313232363831363131323061353635623832353235303530353635623566383136303037306239303530393139303530353635623631313234313831363131323263353635623832353235303530353635623566383135313930353039313930353035363562356638323832353236303230383230313930353039323931353035303536356238323831383335653566383338333031353235303530353035363562356636303166313936303166383330313136393035303931393035303536356235663631313238393832363131323437353635623631313239333831383536313132353135363562393335303631313261333831383536303230383630313631313236313536356236313132616338313631313236663536356238343031393135303530393239313530353035363562356636306130383230313930353036313132636135663833303138383631313231643536356236313132643736303230383330313837363131323338353635623831383130333630343038333031353236313132653938313836363131323766353635623930353036313132663836303630383330313835363131323164353635623831383130333630383038333031353236313133306138313834363131323766353635623930353039363935353035303530353035303530353635623631313331663831363131323061353635623831313436313133323935373566383066643562353035363562356638313335393035303631313333613831363131333136353635623932393135303530353635623566363032303832383430333132313536313133353535373631313335343631313161343536356235623566363131333632383438323835303136313133326335363562393135303530393239313530353035363562363131333734383136313131616335363562383235323530353035363562356636303230383230313930353036313133386435663833303138343631313336623536356239323931353035303536356235663831313531353930353039313930353035363562363131336137383136313133393335363562383235323530353035363562356636303230383230313930353036313133633035663833303138343631313339653536356239323931353035303536356235663831353139303530393139303530353635623566383238323532363032303832303139303530393239313530353035363562356638313930353036303230383230313930353039313930353035363562363131336638383136313131616335363562383235323530353035363562356636313134303938333833363131336566353635623630323038333031393035303932393135303530353635623566363032303832303139303530393139303530353635623566363131343262383236313133633635363562363131343335383138353631313364303536356239333530363131343430383336313133653035363562383035663562383338313130313536313134373035373831353136313134353738383832363131336665353635623937353036313134363238333631313431353536356239323530353036303031383130313930353036313134343335363562353038353933353035303530353039323931353035303536356235663630323038323031393035303831383130333566383330313532363131343935383138343631313432313536356239303530393239313530353035363562356638306664356235663830666435623766346534383762373130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303566353236303431363030343532363032343566666435623631313464623832363131323666353635623831303138313831313036376666666666666666666666666666666638323131313731353631313466613537363131346639363131346135353635623562383036303430353235303530353035363562356636313135306336313131396235363562393035303631313531383832383236313134643235363562393139303530353635623566363766666666666666666666666666666666383231313135363131353337353736313135333636313134613535363562356236313135343038323631313236663536356239303530363032303831303139303530393139303530353635623832383138333337356638333833303135323530353035303536356235663631313536643631313536383834363131353164353635623631313530333536356239303530383238313532363032303831303138343834383430313131313536313135383935373631313538383631313461313536356235623631313539343834383238353631313534643536356235303933393235303530353035363562356638323630316638333031313236313135623035373631313561663631313439643536356235623831333536313135633038343832363032303836303136313135356235363562393135303530393239313530353035363562356638303566363036303834383630333132313536313135653035373631313564663631313161343536356235623566363131356564383638323837303136313133326335363562393335303530363032303631313566653836383238373031363131333263353635623932353035303630343038343031333536376666666666666666666666666666666638313131313536313136316635373631313631653631313161383536356235623631313632623836383238373031363131353963353635623931353035303932353039323530393235363562356636303230383230313930353038313831303335663833303135323631313634643831383436313132376635363562393035303932393135303530353635623566383036303430383338353033313231353631313636623537363131363661363131316134353635623562356636313136373838353832383630313631313332633536356239323530353036303230363131363839383538323836303136313131636235363562393135303530393235303932393035303536356237663465343837623731303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303035663532363032323630303435323630323435666664356235663630303238323034393035303630303138323136383036313136643735373630376638323136393135303562363032303832313038313033363131366561353736313136653936313136393335363562356235303931393035303536356235663832383235323630323038323031393035303932393135303530353635623766343936653736363136633639363432303664363537343638366636343030303030303030303030303030303030303030303030303030303030303030303030303566383230313532353035363562356636313137333436303065383336313136663035363562393135303631313733663832363131373030353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131373631383136313137323835363562393035303931393035303536356237663439366537363631366336393634323036653666373436393636363936333631373436393666366532303639366536343635373830303030303030303030303035663832303135323530353635623566363131373963363031613833363131366630353635623931353036313137613738323631313736383536356236303230383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631313763393831363131373930353635623930353039313930353035363562376634653438376237313030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030356635323630333236303034353236303234356666643562376634393665373636313663363936343230373036313732363136643733323036663735373436353732303030303030303030303030303030303030303030303030356638323031353235303536356235663631313833313630313438333631313666303536356239313530363131383363383236313137666435363562363032303832303139303530393139303530353635623566363032303832303139303530383138313033356638333031353236313138356538313631313832353536356239303530393139303530353635623766343936653736363136633639363432303730363137323631366437333230363936653665363537323030303030303030303030303030303030303030303030303566383230313532353035363562356636313138393936303134383336313136663035363562393135303631313861343832363131383635353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131386336383136313138386435363562393035303931393035303536356235663831393035303831356635323630323035663230393035303931393035303536356235663630323036303166383330313034393035303931393035303536356235663832383231623930353039323931353035303536356235663630303838333032363131393239376666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666383236313138656535363562363131393333383638333631313865653536356239353530383031393834313639333530383038363136383431373932353035303530393339323530353035303536356235663831393035303931393035303536356235663631313936653631313936393631313936343834363131316163353635623631313934623536356236313131616335363562393035303931393035303536356235663831393035303931393035303536356236313139383738333631313935343536356236313139396236313139393338323631313937353536356238343834353436313138666135363562383235353530353035303530353635623566393035363562363131396166363131396133353635623631313962613831383438343631313937653536356235303530353035363562356238313831313031353631313964643537363131396432356638323631313961373536356236303031383130313930353036313139633035363562353035303536356236303166383231313135363131613232353736313139663338313631313863643536356236313139666338343631313864663536356238313031363032303835313031353631316130623537383139303530356236313161316636313161313738353631313864663536356238333031383236313139626635363562353035303562353035303530353635623566383238323163393035303932393135303530353635623566363131613432356631393834363030383032363131613237353635623139383038333136393135303530393239313530353035363562356636313161356138333833363131613333353635623931353038323630303230323832313739303530393239313530353035363562363131613733383236313132343735363562363766666666666666666666666666666666383131313135363131613863353736313161386236313134613535363562356236313161393638323534363131366330353635623631316161313832383238353631313965313536356235663630323039303530363031663833313136303031383131343631316164323537356638343135363131616330353738323837303135313930353035623631316163613835383236313161346635363562383635353530363131623331353635623630316631393834313636313161653038363631313863643536356235663562383238313130313536313162303735373834383930313531383235353630303138323031393135303630323038353031393435303630323038313031393035303631316165323536356238363833313031353631316232343537383438393031353136313162323036303166383931363832363131613333353635623833353535303562363030313630303238383032303138383535353035303530356235303530353035303530353035363562376634653438376237313030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030356635323630313136303034353236303234356666643562356636313162373038323631313161633536356239313530376666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666383230333631316261323537363131626131363131623339353635623562363030313832303139303530393139303530353635623766363936653736363136633639363432303664363136613230323836353738373036353633373436353634323034643631366134313732373236313739323930303566383230313532353035363562356636313162653136303166383336313136663035363562393135303631316265633832363131626164353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131633065383136313162643535363562393035303931393035303536356237663639366537363631366336393634323036643631366132303238363537383730363536333734363536343230346436313661353536653733363936373665363535663832303135323766363434393665373432393030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303630323038323031353235303536356235663631316336663630323538333631313666303536356239313530363131633761383236313163313535363562363034303832303139303530393139303530353635623566363032303832303139303530383138313033356638333031353236313163396338313631316336333536356239303530393139303530353635623766363936653736363136633639363432303664363136613230323836353738373036353633373436353634323034643631366135333639363736653635363434393566383230313532376636653734323036663732323034643631366135353665373336393637366536353634343936653734323930303030303030303030303030303030303030303030363032303832303135323530353635623566363131636664363033353833363131366630353635623931353036313164303838323631316361333536356236303430383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631316432613831363131636631353635623930353039313930353035363562376636393665373636313663363936343230366436313661323032383635373837303635363337343635363432303464363136613534363136373230366637323230356638323031353237663464363136613432373937343635353337343732363936653637323930303030303030303030303030303030303030303030303030303030303030303030303036303230383230313532353035363562356636313164386236303265383336313136663035363562393135303631316439363832363131643331353635623630343038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131646238383136313164376635363562393035303931393035303536356237663635373837303635363337343635363432303464363136613432373937343635353337343732363936653637303030303030303030303030303030303030303035663832303135323530353635623566363131646633363031363833363131366630353635623931353036313164666538323631316462663536356236303230383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631316532303831363131646537353635623930353039313930353035363562356636313165333138323631313161633536356239313530363131653363383336313131616335363562393235303832383230313930353038303832313131353631316535343537363131653533363131623339353635623562393239313530353035363562376636333631366536653666373432303638363136653634366336353230363836353631363436353732373332303737363937343638323036353738373437323631356638323031353237663230336532303332333730303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303036303230383230313532353035363562356636313165623436303235383336313136663035363562393135303631316562663832363131653561353635623630343038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131656531383136313165613835363562393035303931393035303536356237663639366537363631366336393634323036333632366637323030303030303030303030303030303030303030303030303030303030303030303030303030303035663832303135323530353635623566363131663163363030633833363131366630353635623931353036313166323738323631316565383536356236303230383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631316634393831363131663130353635623930353039313930353035363562376634353738373036353633373436353634346336663737353636313663373536353332333730303030303030303030303030303030303030303030303030303030356638323031353235303536356235663631316638343630313238333631313666303536356239313530363131663866383236313166353035363562363032303832303139303530393139303530353635623566363032303832303139303530383138313033356638333031353236313166623138313631316637383536356239303530393139303530353635623766373336633639363336393665363732303666373537343230366636363230373236313665363736353030303030303030303030303030303030303030303030303566383230313532353035363562356636313166656336303134383336313136663035363562393135303631316666373832363131666238353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363132303139383136313166653035363562393035303931393035303536666561323634363937303636373335383232313232303938363864373435306633633063323032393835393962633531666638326536363565626363393163363134356439363838666361336463326232323364363736343733366636633633343330303038313930303333 +363038303630343035323566363030333566363130313030306138313534383136306666303231393136393038333135313530323137393035353530333438303135363032373537356638306664356235303631323035363830363130303335356633393566663366653630383036303430353233343830313536313030306635373566383066643562353036303034333631303631303038363537356633353630653031633830363338363865313063343131363130303539353738303633383638653130633431343631303133633537383036333837373764346437313436313031366335373830363363313533653937663134363130313861353738303633656336383065613231343631303162653537363130303836353635623830363333346331663934343134363130303861353738303633343437393466346631343631303062653537383036333463626233363031313436313030656535373830363335323938323539353134363130313063353735623566383066643562363130306134363030343830333630333831303139303631303039663931393036313131646635363562363130316565353635623630343035313631303062353935393439333932393139303631313262373536356236303430353138303931303339306633356236313030643836303034383033363033383130313930363130306433393139303631313334303536356236313033366335363562363034303531363130306535393139303631313337613536356236303430353138303931303339306633356236313030663636313033396435363562363034303531363130313033393139303631313361643536356236303430353138303931303339306633356236313031323636303034383033363033383130313930363130313231393139303631313334303536356236313033616635363562363034303531363130313333393139303631313437643536356236303430353138303931303339306633356236313031353636303034383033363033383130313930363130313531393139303631313563393536356236313034326135363562363034303531363130313633393139303631313633353536356236303430353138303931303339306633356236313031373436313034396435363562363034303531363130313831393139303631313337613536356236303430353138303931303339306633356236313031613436303034383033363033383130313930363130313966393139303631313164663536356236313034613335363562363034303531363130316235393539343933393239313930363131326237353635623630343035313830393130333930663335623631303164383630303438303336303338313031393036313031643339313930363131363535353635623631303665363536356236303430353136313031653539313930363131333761353635623630343035313830393130333930663335623566383138313534383131303631303166633537356638306664356239303566353236303230356632303930363030343032303135663931353039303530383035663031356639303534393036313031303030613930303436376666666666666666666666666666666631363930383035663031363030383930353439303631303130303061393030343630303730623930383036303031303138303534363130323436393036313136633035363562383036303166303136303230383039313034303236303230303136303430353139303831303136303430353238303932393139303831383135323630323030313832383035343631303237323930363131366330353635623830313536313032626435373830363031663130363130323934353736313031303038303833353430343032383335323931363032303031393136313032626435363562383230313931393035663532363032303566323039303562383135343831353239303630303130313930363032303031383038333131363130326130353738323930303336303166313638323031393135623530353035303530353039303830363030323031356639303534393036313031303030613930303436376666666666666666666666666666666631363930383036303033303138303534363130326562393036313136633035363562383036303166303136303230383039313034303236303230303136303430353139303831303136303430353238303932393139303831383135323630323030313832383035343631303331373930363131366330353635623830313536313033363235373830363031663130363130333339353736313031303038303833353430343032383335323931363032303031393136313033363235363562383230313931393035663532363032303566323039303562383135343831353239303630303130313930363032303031383038333131363130333435353738323930303336303166313638323031393135623530353035303530353039303530383535363562356636303031356638333637666666666666666666666666666666663136363766666666666666666666666666666666313638313532363032303031393038313532363032303031356632303830353439303530393035303931393035303536356236303033356639303534393036313031303030613930303436306666313638313536356236303630363030313566383336376666666666666666666666666666666631363637666666666666666666666666666666663136383135323630323030313930383135323630323030313566323038303534383036303230303236303230303136303430353139303831303136303430353238303932393139303831383135323630323030313832383035343830313536313034316535373630323030323832303139313930356635323630323035663230393035623831353438313532363032303031393036303031303139303830383331313631303430613537356235303530353035303530393035303931393035303536356236303630363337393432343630333637666666666666666666666666666666663136383436376666666666666666666666666666666631363033363130343562353736313034353438323631303731313536356239303530363130343936353635623630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313034386439303631313734613536356236303430353138303931303339306664356239333932353035303530353635623630303235343831353635623566383036303630356636303630356638303534393035303836313036313034663035373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313034653739303631313762323536356236303430353138303931303339306664356235663830383738313534383131303631303530343537363130353033363131376430353635623562393035663532363032303566323039303630303430323031363034303531383036306130303136303430353239303831356638323031356639303534393036313031303030613930303436376666666666666666666666666666666631363637666666666666666666666666666666663136363766666666666666666666666666666666313638313532363032303031356638323031363030383930353439303631303130303061393030343630303730623630303730623630303730623831353236303230303136303031383230313830353436313035373739303631313663303536356238303630316630313630323038303931303430323630323030313630343035313930383130313630343035323830393239313930383138313532363032303031383238303534363130356133393036313136633035363562383031353631303565653537383036303166313036313035633535373631303130303830383335343034303238333532393136303230303139313631303565653536356238323031393139303566353236303230356632303930356238313534383135323930363030313031393036303230303138303833313136313035643135373832393030333630316631363832303139313562353035303530353035303831353236303230303136303032383230313566393035343930363130313030306139303034363766666666666666666666666666666666313636376666666666666666666666666666666631363637666666666666666666666666666666663136383135323630323030313630303338323031383035343631303633383930363131366330353635623830363031663031363032303830393130343032363032303031363034303531393038313031363034303532383039323931393038313831353236303230303138323830353436313036363439303631313663303536356238303135363130366166353738303630316631303631303638363537363130313030383038333534303430323833353239313630323030313931363130366166353635623832303139313930356635323630323035663230393035623831353438313532393036303031303139303630323030313830383331313631303639323537383239303033363031663136383230313931356235303530353035303530383135323530353039303530383035663031353138313630323030313531383236303430303135313833363036303031353138343630383030313531393535303935353039353530393535303935353035303931393339353930393239343530353635623630303136303230353238313566353236303430356632303831383135343831313036313036666635373566383066643562393035663532363032303566323030313566393135303931353035303534383135363562363036303566383036313037316638343566363130613366353635623931353039313530356635623832383131303135363130396666353735663631303733383836383436313061336635363562383039343530383139323530353035303630303338313134363130373833353736303430353137663038633337396130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532363030343031363130373761393036313138343735363562363034303531383039313033393066643562356636313037386538373835363130616265353635623830393535303831393235303530353035663631303761313838383636313062336335363562383039363530383139323530353035303566363130376234383938373631306133663536356238303937353038313932353035303530356635623831383131303135363130396564353736313037643038613838363130613366353635623830393835303831393635303530353036303033383531343631303831623537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631303831323930363131386166353635623630343035313830393130333930666435623630363036313038323738623839363130626362353635623830393935303831393235303530353035663631303833613863386136313061626535363562383039613530383139323530353035303630363036313038346538643862363130626362353635623830396235303831393235303530353035663830383035343930353039303530356636303430353138303630613030313630343035323830386136376666666666666666666666666666666631363831353236303230303138393630303730623831353236303230303138363831353236303230303138353637666666666666666666666666666666663136383135323630323030313834383135323530393038303630303138313534303138303832353538303931353035303630303139303033393035663532363032303566323039303630303430323031356639303931393039313930393135303566383230313531383135663031356636313031303030613831353438313637666666666666666666666666666666663032313931363930383336376666666666666666666666666666666631363032313739303535353036303230383230313531383135663031363030383631303130303061383135343831363766666666666666666666666666666666303231393136393038333630303730623637666666666666666666666666666666663136303231373930353535303630343038323031353138313630303130313930383136313039333539313930363131613661353635623530363036303832303135313831363030323031356636313031303030613831353438313637666666666666666666666666666666663032313931363930383336376666666666666666666666666666666631363032313739303535353036303830383230313531383136303033303139303831363130393739393139303631316136613536356235303530353036303031356638393637666666666666666666666666666666663136363766666666666666666666666666666666313638313532363032303031393038313532363032303031356632303831393038303630303138313534303138303832353538303931353035303630303139303033393035663532363032303566323030313566393039313930393139303931353035353630303235663831353438303932393139303631303964373930363131623636353635623931393035303535353035303530353035303830383036303031303139313530353036313037626535363562353035303530353035303830383036303031303139313530353036313037323535363562353036303430353138303630343030313630343035323830363030323831353236303230303137663831663630303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532353039323530353035303931393035303536356235663830356638303631306134643836383636313064636435363562383136376666666666666666666666666666666631363931353038303937353038313933353038323934353035303530353036303034363066663136383236306666313631343631306161663537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306161363930363131626637353635623630343035313830393130333930666435623830383539333530393335303530353039323530393239303530353635623566383035663830363130616363383638363631306463643536356238313637666666666666666666666666666666663136393135303830393735303831393335303832393435303530353035303566363066663136383236306666313631343631306232643537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306232343930363131633835353635623630343035313830393130333930666435623830383539333530393335303530353039323530393239303530353635623566383035663830363130623461383638363631306463643536356238313637666666666666666666666666666666663136393135303830393735303831393335303832393435303530353035303630303136306666313638323630666631363134383036313062376435373530356636306666313638323630666631363134356236313062626335373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313062623339303631316431333536356236303430353138303931303339306664356238303835393335303933353035303530393235303932393035303536356236303630356638303566363130626461383638363631306463643536356238313637666666666666666666666666666666663136393135303830393735303831393335303832393435303530353035303630303636306666313638323630666631363134383036313063306535373530363030323630666631363832363066663136313435623631306334643537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306334343930363131646131353635623630343035313830393130333930666435623630303636306666313638323630666631363033363130636338353736313063363538363836363130646364353635623831363766666666666666666666666666666666313639313530383039373530383139333530383239343530353035303530363030323630666631363832363066663136313436313063633735373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313063626539303631316530393536356236303430353138303931303339306664356235623566383138363631306364353931393036313165323735363562393035303566383236376666666666666666666666666666666638313131313536313063663235373631306366313631313461353536356235623630343035313930383038323532383036303166303136303166313931363630323030313832303136303430353238303135363130643234353738313630323030313630303138323032383033363833333738303832303139313530353039303530356235303930353035663830383839303530356238333831313031353631306461663537383938313831353138313130363130643438353736313064343736313137643035363562356236303230303130313531363066383163363066383162383338333831353138313130363130643636353736313064363536313137643035363562356236303230303130313930376566666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666663139313639303831356631613930353335303831383036313064396639303631316236363536356239323530353038303830363030313031393135303530363130643264353635623530383138343839363130646264393139303631316532373536356239363530393635303530353035303530353039323530393239303530353635623566383035663830363130646462383638363631306665393536356239303530363030313835363130646561393139303631316532373536356239343530356636303035363065303833313636306666313639303163393035303566363031663833313639303530363031633831363066663136313036313065343735373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313065336539303631316563613536356236303430353138303931303339306664356236303138383136306666313631303135363130653661353738313831383838313630666631363931353039353530393535303935353035303530353036313066653235363562363031383831363066663136303336313065663035373566363130653830383938393631306665393536356239303530363030313838363130653866393139303631316532373536356239373530363031383831363066663136313031353631306564383537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306563663930363131663332353635623630343035313830393130333930666435623832383138393831363066663136393135303936353039363530393635303530353035303530363130666532353635623630313938313630666631363033363130663330353735663631306630363839383936313130363335363562393035303630303238383631306631353931393036313165323735363562393735303832383138393831363166666666313639313530393635303936353039363530353035303530353036313066653235363562363031613831363066663136303336313066373235373566363130663436383938393631313063623536356239303530363030343838363130663535393139303631316532373536356239373530383238313839383136336666666666666666313639313530393635303936353039363530353035303530353036313066653235363562363031623831363066663136313436313066623835373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313066616639303631316639613536356236303430353138303931303339306664356235663631306663333839383936313131333335363562393035303630303838383631306664323931393036313165323735363562393735303832383138393936353039363530393635303530353035303530356239323530393235303932353635623566363030313832363130666637393139303631316532373536356238333531313031353631313033613537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631313033313930363132303032353635623630343035313830393130333930666435623832383238313531383131303631313034643537363131303463363131376430353635623562363032303031303135313630663831633630663831623630663831633930353039323931353035303536356235663630303238323631313037313931393036313165323735363562383335313130313536313130623435373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313130616239303631323030323536356236303430353138303931303339306664356235663832363032303031383430313531393035303830363066303163393135303530393239313530353035363562356636303034383236313130643939313930363131653237353635623833353131303135363131313163353736303430353137663038633337396130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532363030343031363131313133393036313230303235363562363034303531383039313033393066643562356638323630323030313834303135313930353038303630653031633931353035303932393135303530353635623566363030383832363131313431393139303631316532373536356238333531313031353631313138343537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631313137623930363132303032353635623630343035313830393130333930666435623566383236303230303138343031353139303530383036306330316339313530353039323931353035303536356235663630343035313930353039303536356235663830666435623566383066643562356638313930353039313930353035363562363131316265383136313131616335363562383131343631313163383537356638306664356235303536356235663831333539303530363131316439383136313131623535363562393239313530353035363562356636303230383238343033313231353631313166343537363131316633363131316134353635623562356636313132303138343832383530313631313163623536356239313530353039323931353035303536356235663637666666666666666666666666666666663832313639303530393139303530353635623631313232363831363131323061353635623832353235303530353635623566383136303037306239303530393139303530353635623631313234313831363131323263353635623832353235303530353635623566383135313930353039313930353035363562356638323832353236303230383230313930353039323931353035303536356238323831383335653566383338333031353235303530353035363562356636303166313936303166383330313136393035303931393035303536356235663631313238393832363131323437353635623631313239333831383536313132353135363562393335303631313261333831383536303230383630313631313236313536356236313132616338313631313236663536356238343031393135303530393239313530353035363562356636306130383230313930353036313132636135663833303138383631313231643536356236313132643736303230383330313837363131323338353635623831383130333630343038333031353236313132653938313836363131323766353635623930353036313132663836303630383330313835363131323164353635623831383130333630383038333031353236313133306138313834363131323766353635623930353039363935353035303530353035303530353635623631313331663831363131323061353635623831313436313133323935373566383066643562353035363562356638313335393035303631313333613831363131333136353635623932393135303530353635623566363032303832383430333132313536313133353535373631313335343631313161343536356235623566363131333632383438323835303136313133326335363562393135303530393239313530353035363562363131333734383136313131616335363562383235323530353035363562356636303230383230313930353036313133386435663833303138343631313336623536356239323931353035303536356235663831313531353930353039313930353035363562363131336137383136313133393335363562383235323530353035363562356636303230383230313930353036313133633035663833303138343631313339653536356239323931353035303536356235663831353139303530393139303530353635623566383238323532363032303832303139303530393239313530353035363562356638313930353036303230383230313930353039313930353035363562363131336638383136313131616335363562383235323530353035363562356636313134303938333833363131336566353635623630323038333031393035303932393135303530353635623566363032303832303139303530393139303530353635623566363131343262383236313133633635363562363131343335383138353631313364303536356239333530363131343430383336313133653035363562383035663562383338313130313536313134373035373831353136313134353738383832363131336665353635623937353036313134363238333631313431353536356239323530353036303031383130313930353036313134343335363562353038353933353035303530353039323931353035303536356235663630323038323031393035303831383130333566383330313532363131343935383138343631313432313536356239303530393239313530353035363562356638306664356235663830666435623766346534383762373130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303566353236303431363030343532363032343566666435623631313464623832363131323666353635623831303138313831313036376666666666666666666666666666666638323131313731353631313466613537363131346639363131346135353635623562383036303430353235303530353035363562356636313135306336313131396235363562393035303631313531383832383236313134643235363562393139303530353635623566363766666666666666666666666666666666383231313135363131353337353736313135333636313134613535363562356236313135343038323631313236663536356239303530363032303831303139303530393139303530353635623832383138333337356638333833303135323530353035303536356235663631313536643631313536383834363131353164353635623631313530333536356239303530383238313532363032303831303138343834383430313131313536313135383935373631313538383631313461313536356235623631313539343834383238353631313534643536356235303933393235303530353035363562356638323630316638333031313236313135623035373631313561663631313439643536356235623831333536313135633038343832363032303836303136313135356235363562393135303530393239313530353035363562356638303566363036303834383630333132313536313135653035373631313564663631313161343536356235623566363131356564383638323837303136313133326335363562393335303530363032303631313566653836383238373031363131333263353635623932353035303630343038343031333536376666666666666666666666666666666638313131313536313136316635373631313631653631313161383536356235623631313632623836383238373031363131353963353635623931353035303932353039323530393235363562356636303230383230313930353038313831303335663833303135323631313634643831383436313132376635363562393035303932393135303530353635623566383036303430383338353033313231353631313636623537363131363661363131316134353635623562356636313136373838353832383630313631313332633536356239323530353036303230363131363839383538323836303136313131636235363562393135303530393235303932393035303536356237663465343837623731303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303035663532363032323630303435323630323435666664356235663630303238323034393035303630303138323136383036313136643735373630376638323136393135303562363032303832313038313033363131366561353736313136653936313136393335363562356235303931393035303536356235663832383235323630323038323031393035303932393135303530353635623766343936653736363136633639363432303664363537343638366636343030303030303030303030303030303030303030303030303030303030303030303030303566383230313532353035363562356636313137333436303065383336313136663035363562393135303631313733663832363131373030353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131373631383136313137323835363562393035303931393035303536356237663439366537363631366336393634323036653666373436393636363936333631373436393666366532303639366536343635373830303030303030303030303035663832303135323530353635623566363131373963363031613833363131366630353635623931353036313137613738323631313736383536356236303230383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631313763393831363131373930353635623930353039313930353035363562376634653438376237313030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030356635323630333236303034353236303234356666643562376634393665373636313663363936343230373036313732363136643733323036663735373436353732303030303030303030303030303030303030303030303030356638323031353235303536356235663631313833313630313438333631313666303536356239313530363131383363383236313137666435363562363032303832303139303530393139303530353635623566363032303832303139303530383138313033356638333031353236313138356538313631313832353536356239303530393139303530353635623766343936653736363136633639363432303730363137323631366437333230363936653665363537323030303030303030303030303030303030303030303030303566383230313532353035363562356636313138393936303134383336313136663035363562393135303631313861343832363131383635353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131386336383136313138386435363562393035303931393035303536356235663831393035303831356635323630323035663230393035303931393035303536356235663630323036303166383330313034393035303931393035303536356235663832383231623930353039323931353035303536356235663630303838333032363131393239376666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666383236313138656535363562363131393333383638333631313865653536356239353530383031393834313639333530383038363136383431373932353035303530393339323530353035303536356235663831393035303931393035303536356235663631313936653631313936393631313936343834363131316163353635623631313934623536356236313131616335363562393035303931393035303536356235663831393035303931393035303536356236313139383738333631313935343536356236313139396236313139393338323631313937353536356238343834353436313138666135363562383235353530353035303530353635623566393035363562363131396166363131396133353635623631313962613831383438343631313937653536356235303530353035363562356238313831313031353631313964643537363131396432356638323631313961373536356236303031383130313930353036313139633035363562353035303536356236303166383231313135363131613232353736313139663338313631313863643536356236313139666338343631313864663536356238313031363032303835313031353631316130623537383139303530356236313161316636313161313738353631313864663536356238333031383236313139626635363562353035303562353035303530353635623566383238323163393035303932393135303530353635623566363131613432356631393834363030383032363131613237353635623139383038333136393135303530393239313530353035363562356636313161356138333833363131613333353635623931353038323630303230323832313739303530393239313530353035363562363131613733383236313132343735363562363766666666666666666666666666666666383131313135363131613863353736313161386236313134613535363562356236313161393638323534363131366330353635623631316161313832383238353631313965313536356235663630323039303530363031663833313136303031383131343631316164323537356638343135363131616330353738323837303135313930353035623631316163613835383236313161346635363562383635353530363131623331353635623630316631393834313636313161653038363631313863643536356235663562383238313130313536313162303735373834383930313531383235353630303138323031393135303630323038353031393435303630323038313031393035303631316165323536356238363833313031353631316232343537383438393031353136313162323036303166383931363832363131613333353635623833353535303562363030313630303238383032303138383535353035303530356235303530353035303530353035363562376634653438376237313030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030356635323630313136303034353236303234356666643562356636313162373038323631313161633536356239313530376666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666383230333631316261323537363131626131363131623339353635623562363030313832303139303530393139303530353635623766363936653736363136633639363432303664363136613230323836353738373036353633373436353634323034643631366134313732373236313739323930303566383230313532353035363562356636313162653136303166383336313136663035363562393135303631316265633832363131626164353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131633065383136313162643535363562393035303931393035303536356237663639366537363631366336393634323036643631366132303238363537383730363536333734363536343230346436313661353536653733363936373665363535663832303135323766363434393665373432393030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303630323038323031353235303536356235663631316336663630323538333631313666303536356239313530363131633761383236313163313535363562363034303832303139303530393139303530353635623566363032303832303139303530383138313033356638333031353236313163396338313631316336333536356239303530393139303530353635623766363936653736363136633639363432303664363136613230323836353738373036353633373436353634323034643631366135333639363736653635363434393566383230313532376636653734323036663732323034643631366135353665373336393637366536353634343936653734323930303030303030303030303030303030303030303030363032303832303135323530353635623566363131636664363033353833363131366630353635623931353036313164303838323631316361333536356236303430383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631316432613831363131636631353635623930353039313930353035363562376636393665373636313663363936343230366436313661323032383635373837303635363337343635363432303464363136613534363136373230366637323230356638323031353237663464363136613432373937343635353337343732363936653637323930303030303030303030303030303030303030303030303030303030303030303030303036303230383230313532353035363562356636313164386236303265383336313136663035363562393135303631316439363832363131643331353635623630343038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131646238383136313164376635363562393035303931393035303536356237663635373837303635363337343635363432303464363136613432373937343635353337343732363936653637303030303030303030303030303030303030303035663832303135323530353635623566363131646633363031363833363131366630353635623931353036313164666538323631316462663536356236303230383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631316532303831363131646537353635623930353039313930353035363562356636313165333138323631313161633536356239313530363131653363383336313131616335363562393235303832383230313930353038303832313131353631316535343537363131653533363131623339353635623562393239313530353035363562376636333631366536653666373432303638363136653634366336353230363836353631363436353732373332303737363937343638323036353738373437323631356638323031353237663230336532303332333730303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303036303230383230313532353035363562356636313165623436303235383336313136663035363562393135303631316562663832363131653561353635623630343038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131656531383136313165613835363562393035303931393035303536356237663639366537363631366336393634323036333632366637323030303030303030303030303030303030303030303030303030303030303030303030303030303035663832303135323530353635623566363131663163363030633833363131366630353635623931353036313166323738323631316565383536356236303230383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631316634393831363131663130353635623930353039313930353035363562376634353738373036353633373436353634346336663737353636313663373536353332333730303030303030303030303030303030303030303030303030303030356638323031353235303536356235663631316638343630313238333631313666303536356239313530363131663866383236313166353035363562363032303832303139303530393139303530353635623566363032303832303139303530383138313033356638333031353236313166623138313631316637383536356239303530393139303530353635623766373336633639363336393665363732303666373537343230366636363230373236313665363736353030303030303030303030303030303030303030303030303566383230313532353035363562356636313166656336303134383336313136663035363562393135303631316666373832363131666238353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363132303139383136313166653035363562393035303931393035303536666561323634363937303636373335383232313232306363663865366636313034353862643463346530316635366261643037663239653838633934643566303733623962643635363539663566643866383930376536343733366636633633343330303038313930303333 diff --git a/actors/evm/tests/contracts/NotificationReceiver.sol b/actors/evm/tests/contracts/NotificationReceiver.sol index af09d8f9d..31f1938cd 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.sol +++ b/actors/evm/tests/contracts/NotificationReceiver.sol @@ -25,7 +25,7 @@ contract NotificationReceiver { bytes4 constant NATIVE_METHOD_SELECTOR = 0x868e10c4; // Sector content changed method number - uint64 constant SECTOR_CONTENT_CHANGED = 86399155; + uint64 constant SECTOR_CONTENT_CHANGED = 2034386435; /** * @dev Get the count of notifications for a specific sector diff --git a/integration_tests/src/tests/mod.rs b/integration_tests/src/tests/mod.rs index b82e3a94f..5a2729f8f 100644 --- a/integration_tests/src/tests/mod.rs +++ b/integration_tests/src/tests/mod.rs @@ -46,3 +46,4 @@ mod prove_commit_niporep_test; pub use prove_commit_niporep_test::*; mod replica_update3_test; pub use replica_update3_test::*; + From eb32b6ecdd9436ab49523d81232c39dfa5407c27 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 00:49:11 -0600 Subject: [PATCH 05/39] Add new test to module --- test_vm/tests/suite/evm_notification_test.rs | 11 +++++++++++ test_vm/tests/suite/mod.rs | 1 + 2 files changed, 12 insertions(+) create mode 100644 test_vm/tests/suite/evm_notification_test.rs diff --git a/test_vm/tests/suite/evm_notification_test.rs b/test_vm/tests/suite/evm_notification_test.rs new file mode 100644 index 000000000..53429e88e --- /dev/null +++ b/test_vm/tests/suite/evm_notification_test.rs @@ -0,0 +1,11 @@ +use fil_actors_integration_tests::tests::{evm_notification_test}; +use fil_actors_runtime::test_blockstores::MemoryBlockstore; +use test_vm::TestVM; + +/* Test out ddo notifications against a real solidity smart contract */ +#[test] +fn evm_notification() { + let store = MemoryBlockstore::new(); + let v = TestVM::new_with_singletons(store); + evm_notification_test(&v); +} \ No newline at end of file diff --git a/test_vm/tests/suite/mod.rs b/test_vm/tests/suite/mod.rs index 729c855b2..320176ffb 100644 --- a/test_vm/tests/suite/mod.rs +++ b/test_vm/tests/suite/mod.rs @@ -6,6 +6,7 @@ mod change_owner_test; mod commit_post_test; mod datacap_tests; mod evm_test; +mod evm_notification_test; mod extend_sectors_test; mod init_test; mod market_miner_withdrawal_test; From 0e6c0e890d88a0d6256dcd808a108344ccb71070 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 00:56:24 -0600 Subject: [PATCH 06/39] correct import --- test_vm/tests/suite/evm_notification_test.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_vm/tests/suite/evm_notification_test.rs b/test_vm/tests/suite/evm_notification_test.rs index 53429e88e..15c5e7c3a 100644 --- a/test_vm/tests/suite/evm_notification_test.rs +++ b/test_vm/tests/suite/evm_notification_test.rs @@ -1,4 +1,4 @@ -use fil_actors_integration_tests::tests::{evm_notification_test}; +use fil_actors_integration_tests::tests::{evm_receives_ddo_notifications_test}; use fil_actors_runtime::test_blockstores::MemoryBlockstore; use test_vm::TestVM; @@ -7,5 +7,5 @@ use test_vm::TestVM; fn evm_notification() { let store = MemoryBlockstore::new(); let v = TestVM::new_with_singletons(store); - evm_notification_test(&v); + evm_receives_ddo_notifications_test(&v); } \ No newline at end of file From 2416bb250eab1a4315a918effa2c7fd7c0dedbcf Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 01:00:56 -0600 Subject: [PATCH 07/39] fix path --- integration_tests/src/tests/evm_notification_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 4604f52a7..72ecb38fb 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -37,7 +37,7 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { // Deploy the NotificationReceiver EVM contract // The file is a hex string, so decode it to bytes - let hex_str = std::fs::read_to_string("../../contracts/notification_receiver_bytecode.hex") + let hex_str = std::fs::read_to_string("../../../actors/evm/tests/contracts/NotificationReceiver.hex") .expect("Failed to read contract bytecode hex file"); let hex_str = hex_str.trim(); let contract_bytecode = hex::decode(hex_str).expect("Failed to decode contract bytecode hex"); From dd8ffbd7fc9dcfd79c01c74a381504319f392bd7 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 01:05:17 -0600 Subject: [PATCH 08/39] Fix --- integration_tests/src/tests/evm_notification_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 72ecb38fb..2d2331bd0 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -37,7 +37,7 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { // Deploy the NotificationReceiver EVM contract // The file is a hex string, so decode it to bytes - let hex_str = std::fs::read_to_string("../../../actors/evm/tests/contracts/NotificationReceiver.hex") + let hex_str = std::fs::read_to_string("../actors/evm/tests/contracts/NotificationReceiver.hex") .expect("Failed to read contract bytecode hex file"); let hex_str = hex_str.trim(); let contract_bytecode = hex::decode(hex_str).expect("Failed to decode contract bytecode hex"); From d9192d59de860ac839f3daa6e805dd6236760a8b Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 01:14:06 -0600 Subject: [PATCH 09/39] trying create external --- integration_tests/src/tests/evm_notification_test.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 2d2331bd0..3d5dfb74d 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -43,16 +43,13 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { let contract_bytecode = hex::decode(hex_str).expect("Failed to decode contract bytecode hex"); // Create an EVM actor to receive notifications - let params = IpldBlock::serialize_cbor(&fil_actor_eam::CreateParams { - initcode: contract_bytecode.to_vec().into(), - nonce: 0, - }).unwrap(); + let params = IpldBlock::serialize_cbor(&fil_actor_eam::CreateExternalParams(contract_bytecode)).unwrap(); let create_result = v.execute_message( &worker, &EAM_ACTOR_ADDR, &TokenAmount::from_whole(1), - fil_actor_eam::Method::Create as u64, + fil_actor_eam::Method::CreateExternal as u64, params, ).unwrap(); From dab507bd75c226bb852909a165fbd3953c996834 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 12:04:48 -0600 Subject: [PATCH 10/39] don't do useless send to non payable constructor --- integration_tests/src/tests/evm_notification_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 3d5dfb74d..7515d856a 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -48,7 +48,7 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { let create_result = v.execute_message( &worker, &EAM_ACTOR_ADDR, - &TokenAmount::from_whole(1), + &TokenAmount::zero(), fil_actor_eam::Method::CreateExternal as u64, params, ).unwrap(); From 9513773d56f26cfe6a87419f0bb8341752a50504 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 20:08:45 +0200 Subject: [PATCH 11/39] Use foundry build of test contract --- actors/evm/tests/contracts/NotificationReceiver.hex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actors/evm/tests/contracts/NotificationReceiver.hex b/actors/evm/tests/contracts/NotificationReceiver.hex index 1eabf1eb5..bfb4ee7d6 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.hex +++ b/actors/evm/tests/contracts/NotificationReceiver.hex @@ -1 +1 @@ -363038303630343035323566363030333566363130313030306138313534383136306666303231393136393038333135313530323137393035353530333438303135363032373537356638306664356235303631323035363830363130303335356633393566663366653630383036303430353233343830313536313030306635373566383066643562353036303034333631303631303038363537356633353630653031633830363338363865313063343131363130303539353738303633383638653130633431343631303133633537383036333837373764346437313436313031366335373830363363313533653937663134363130313861353738303633656336383065613231343631303162653537363130303836353635623830363333346331663934343134363130303861353738303633343437393466346631343631303062653537383036333463626233363031313436313030656535373830363335323938323539353134363130313063353735623566383066643562363130306134363030343830333630333831303139303631303039663931393036313131646635363562363130316565353635623630343035313631303062353935393439333932393139303631313262373536356236303430353138303931303339306633356236313030643836303034383033363033383130313930363130306433393139303631313334303536356236313033366335363562363034303531363130306535393139303631313337613536356236303430353138303931303339306633356236313030663636313033396435363562363034303531363130313033393139303631313361643536356236303430353138303931303339306633356236313031323636303034383033363033383130313930363130313231393139303631313334303536356236313033616635363562363034303531363130313333393139303631313437643536356236303430353138303931303339306633356236313031353636303034383033363033383130313930363130313531393139303631313563393536356236313034326135363562363034303531363130313633393139303631313633353536356236303430353138303931303339306633356236313031373436313034396435363562363034303531363130313831393139303631313337613536356236303430353138303931303339306633356236313031613436303034383033363033383130313930363130313966393139303631313164663536356236313034613335363562363034303531363130316235393539343933393239313930363131326237353635623630343035313830393130333930663335623631303164383630303438303336303338313031393036313031643339313930363131363535353635623631303665363536356236303430353136313031653539313930363131333761353635623630343035313830393130333930663335623566383138313534383131303631303166633537356638306664356239303566353236303230356632303930363030343032303135663931353039303530383035663031356639303534393036313031303030613930303436376666666666666666666666666666666631363930383035663031363030383930353439303631303130303061393030343630303730623930383036303031303138303534363130323436393036313136633035363562383036303166303136303230383039313034303236303230303136303430353139303831303136303430353238303932393139303831383135323630323030313832383035343631303237323930363131366330353635623830313536313032626435373830363031663130363130323934353736313031303038303833353430343032383335323931363032303031393136313032626435363562383230313931393035663532363032303566323039303562383135343831353239303630303130313930363032303031383038333131363130326130353738323930303336303166313638323031393135623530353035303530353039303830363030323031356639303534393036313031303030613930303436376666666666666666666666666666666631363930383036303033303138303534363130326562393036313136633035363562383036303166303136303230383039313034303236303230303136303430353139303831303136303430353238303932393139303831383135323630323030313832383035343631303331373930363131366330353635623830313536313033363235373830363031663130363130333339353736313031303038303833353430343032383335323931363032303031393136313033363235363562383230313931393035663532363032303566323039303562383135343831353239303630303130313930363032303031383038333131363130333435353738323930303336303166313638323031393135623530353035303530353039303530383535363562356636303031356638333637666666666666666666666666666666663136363766666666666666666666666666666666313638313532363032303031393038313532363032303031356632303830353439303530393035303931393035303536356236303033356639303534393036313031303030613930303436306666313638313536356236303630363030313566383336376666666666666666666666666666666631363637666666666666666666666666666666663136383135323630323030313930383135323630323030313566323038303534383036303230303236303230303136303430353139303831303136303430353238303932393139303831383135323630323030313832383035343830313536313034316535373630323030323832303139313930356635323630323035663230393035623831353438313532363032303031393036303031303139303830383331313631303430613537356235303530353035303530393035303931393035303536356236303630363337393432343630333637666666666666666666666666666666663136383436376666666666666666666666666666666631363033363130343562353736313034353438323631303731313536356239303530363130343936353635623630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313034386439303631313734613536356236303430353138303931303339306664356239333932353035303530353635623630303235343831353635623566383036303630356636303630356638303534393035303836313036313034663035373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313034653739303631313762323536356236303430353138303931303339306664356235663830383738313534383131303631303530343537363130353033363131376430353635623562393035663532363032303566323039303630303430323031363034303531383036306130303136303430353239303831356638323031356639303534393036313031303030613930303436376666666666666666666666666666666631363637666666666666666666666666666666663136363766666666666666666666666666666666313638313532363032303031356638323031363030383930353439303631303130303061393030343630303730623630303730623630303730623831353236303230303136303031383230313830353436313035373739303631313663303536356238303630316630313630323038303931303430323630323030313630343035313930383130313630343035323830393239313930383138313532363032303031383238303534363130356133393036313136633035363562383031353631303565653537383036303166313036313035633535373631303130303830383335343034303238333532393136303230303139313631303565653536356238323031393139303566353236303230356632303930356238313534383135323930363030313031393036303230303138303833313136313035643135373832393030333630316631363832303139313562353035303530353035303831353236303230303136303032383230313566393035343930363130313030306139303034363766666666666666666666666666666666313636376666666666666666666666666666666631363637666666666666666666666666666666663136383135323630323030313630303338323031383035343631303633383930363131366330353635623830363031663031363032303830393130343032363032303031363034303531393038313031363034303532383039323931393038313831353236303230303138323830353436313036363439303631313663303536356238303135363130366166353738303630316631303631303638363537363130313030383038333534303430323833353239313630323030313931363130366166353635623832303139313930356635323630323035663230393035623831353438313532393036303031303139303630323030313830383331313631303639323537383239303033363031663136383230313931356235303530353035303530383135323530353039303530383035663031353138313630323030313531383236303430303135313833363036303031353138343630383030313531393535303935353039353530393535303935353035303931393339353930393239343530353635623630303136303230353238313566353236303430356632303831383135343831313036313036666635373566383066643562393035663532363032303566323030313566393135303931353035303534383135363562363036303566383036313037316638343566363130613366353635623931353039313530356635623832383131303135363130396666353735663631303733383836383436313061336635363562383039343530383139323530353035303630303338313134363130373833353736303430353137663038633337396130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532363030343031363130373761393036313138343735363562363034303531383039313033393066643562356636313037386538373835363130616265353635623830393535303831393235303530353035663631303761313838383636313062336335363562383039363530383139323530353035303566363130376234383938373631306133663536356238303937353038313932353035303530356635623831383131303135363130396564353736313037643038613838363130613366353635623830393835303831393635303530353036303033383531343631303831623537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631303831323930363131386166353635623630343035313830393130333930666435623630363036313038323738623839363130626362353635623830393935303831393235303530353035663631303833613863386136313061626535363562383039613530383139323530353035303630363036313038346538643862363130626362353635623830396235303831393235303530353035663830383035343930353039303530356636303430353138303630613030313630343035323830386136376666666666666666666666666666666631363831353236303230303138393630303730623831353236303230303138363831353236303230303138353637666666666666666666666666666666663136383135323630323030313834383135323530393038303630303138313534303138303832353538303931353035303630303139303033393035663532363032303566323039303630303430323031356639303931393039313930393135303566383230313531383135663031356636313031303030613831353438313637666666666666666666666666666666663032313931363930383336376666666666666666666666666666666631363032313739303535353036303230383230313531383135663031363030383631303130303061383135343831363766666666666666666666666666666666303231393136393038333630303730623637666666666666666666666666666666663136303231373930353535303630343038323031353138313630303130313930383136313039333539313930363131613661353635623530363036303832303135313831363030323031356636313031303030613831353438313637666666666666666666666666666666663032313931363930383336376666666666666666666666666666666631363032313739303535353036303830383230313531383136303033303139303831363130393739393139303631316136613536356235303530353036303031356638393637666666666666666666666666666666663136363766666666666666666666666666666666313638313532363032303031393038313532363032303031356632303831393038303630303138313534303138303832353538303931353035303630303139303033393035663532363032303566323030313566393039313930393139303931353035353630303235663831353438303932393139303631303964373930363131623636353635623931393035303535353035303530353035303830383036303031303139313530353036313037626535363562353035303530353035303830383036303031303139313530353036313037323535363562353036303430353138303630343030313630343035323830363030323831353236303230303137663831663630303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532353039323530353035303931393035303536356235663830356638303631306134643836383636313064636435363562383136376666666666666666666666666666666631363931353038303937353038313933353038323934353035303530353036303034363066663136383236306666313631343631306161663537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306161363930363131626637353635623630343035313830393130333930666435623830383539333530393335303530353039323530393239303530353635623566383035663830363130616363383638363631306463643536356238313637666666666666666666666666666666663136393135303830393735303831393335303832393435303530353035303566363066663136383236306666313631343631306232643537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306232343930363131633835353635623630343035313830393130333930666435623830383539333530393335303530353039323530393239303530353635623566383035663830363130623461383638363631306463643536356238313637666666666666666666666666666666663136393135303830393735303831393335303832393435303530353035303630303136306666313638323630666631363134383036313062376435373530356636306666313638323630666631363134356236313062626335373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313062623339303631316431333536356236303430353138303931303339306664356238303835393335303933353035303530393235303932393035303536356236303630356638303566363130626461383638363631306463643536356238313637666666666666666666666666666666663136393135303830393735303831393335303832393435303530353035303630303636306666313638323630666631363134383036313063306535373530363030323630666631363832363066663136313435623631306334643537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306334343930363131646131353635623630343035313830393130333930666435623630303636306666313638323630666631363033363130636338353736313063363538363836363130646364353635623831363766666666666666666666666666666666313639313530383039373530383139333530383239343530353035303530363030323630666631363832363066663136313436313063633735373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313063626539303631316530393536356236303430353138303931303339306664356235623566383138363631306364353931393036313165323735363562393035303566383236376666666666666666666666666666666638313131313536313063663235373631306366313631313461353536356235623630343035313930383038323532383036303166303136303166313931363630323030313832303136303430353238303135363130643234353738313630323030313630303138323032383033363833333738303832303139313530353039303530356235303930353035663830383839303530356238333831313031353631306461663537383938313831353138313130363130643438353736313064343736313137643035363562356236303230303130313531363066383163363066383162383338333831353138313130363130643636353736313064363536313137643035363562356236303230303130313930376566666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666663139313639303831356631613930353335303831383036313064396639303631316236363536356239323530353038303830363030313031393135303530363130643264353635623530383138343839363130646264393139303631316532373536356239363530393635303530353035303530353039323530393239303530353635623566383035663830363130646462383638363631306665393536356239303530363030313835363130646561393139303631316532373536356239343530356636303035363065303833313636306666313639303163393035303566363031663833313639303530363031633831363066663136313036313065343735373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313065336539303631316563613536356236303430353138303931303339306664356236303138383136306666313631303135363130653661353738313831383838313630666631363931353039353530393535303935353035303530353036313066653235363562363031383831363066663136303336313065663035373566363130653830383938393631306665393536356239303530363030313838363130653866393139303631316532373536356239373530363031383831363066663136313031353631306564383537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631306563663930363131663332353635623630343035313830393130333930666435623832383138393831363066663136393135303936353039363530393635303530353035303530363130666532353635623630313938313630666631363033363130663330353735663631306630363839383936313130363335363562393035303630303238383631306631353931393036313165323735363562393735303832383138393831363166666666313639313530393635303936353039363530353035303530353036313066653235363562363031613831363066663136303336313066373235373566363130663436383938393631313063623536356239303530363030343838363130663535393139303631316532373536356239373530383238313839383136336666666666666666313639313530393635303936353039363530353035303530353036313066653235363562363031623831363066663136313436313066623835373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313066616639303631316639613536356236303430353138303931303339306664356235663631306663333839383936313131333335363562393035303630303838383631306664323931393036313165323735363562393735303832383138393936353039363530393635303530353035303530356239323530393235303932353635623566363030313832363130666637393139303631316532373536356238333531313031353631313033613537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631313033313930363132303032353635623630343035313830393130333930666435623832383238313531383131303631313034643537363131303463363131376430353635623562363032303031303135313630663831633630663831623630663831633930353039323931353035303536356235663630303238323631313037313931393036313165323735363562383335313130313536313130623435373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303034303136313130616239303631323030323536356236303430353138303931303339306664356235663832363032303031383430313531393035303830363066303163393135303530393239313530353035363562356636303034383236313130643939313930363131653237353635623833353131303135363131313163353736303430353137663038633337396130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532363030343031363131313133393036313230303235363562363034303531383039313033393066643562356638323630323030313834303135313930353038303630653031633931353035303932393135303530353635623566363030383832363131313431393139303631316532373536356238333531313031353631313138343537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630303430313631313137623930363132303032353635623630343035313830393130333930666435623566383236303230303138343031353139303530383036306330316339313530353039323931353035303536356235663630343035313930353039303536356235663830666435623566383066643562356638313930353039313930353035363562363131316265383136313131616335363562383131343631313163383537356638306664356235303536356235663831333539303530363131316439383136313131623535363562393239313530353035363562356636303230383238343033313231353631313166343537363131316633363131316134353635623562356636313132303138343832383530313631313163623536356239313530353039323931353035303536356235663637666666666666666666666666666666663832313639303530393139303530353635623631313232363831363131323061353635623832353235303530353635623566383136303037306239303530393139303530353635623631313234313831363131323263353635623832353235303530353635623566383135313930353039313930353035363562356638323832353236303230383230313930353039323931353035303536356238323831383335653566383338333031353235303530353035363562356636303166313936303166383330313136393035303931393035303536356235663631313238393832363131323437353635623631313239333831383536313132353135363562393335303631313261333831383536303230383630313631313236313536356236313132616338313631313236663536356238343031393135303530393239313530353035363562356636306130383230313930353036313132636135663833303138383631313231643536356236313132643736303230383330313837363131323338353635623831383130333630343038333031353236313132653938313836363131323766353635623930353036313132663836303630383330313835363131323164353635623831383130333630383038333031353236313133306138313834363131323766353635623930353039363935353035303530353035303530353635623631313331663831363131323061353635623831313436313133323935373566383066643562353035363562356638313335393035303631313333613831363131333136353635623932393135303530353635623566363032303832383430333132313536313133353535373631313335343631313161343536356235623566363131333632383438323835303136313133326335363562393135303530393239313530353035363562363131333734383136313131616335363562383235323530353035363562356636303230383230313930353036313133386435663833303138343631313336623536356239323931353035303536356235663831313531353930353039313930353035363562363131336137383136313133393335363562383235323530353035363562356636303230383230313930353036313133633035663833303138343631313339653536356239323931353035303536356235663831353139303530393139303530353635623566383238323532363032303832303139303530393239313530353035363562356638313930353036303230383230313930353039313930353035363562363131336638383136313131616335363562383235323530353035363562356636313134303938333833363131336566353635623630323038333031393035303932393135303530353635623566363032303832303139303530393139303530353635623566363131343262383236313133633635363562363131343335383138353631313364303536356239333530363131343430383336313133653035363562383035663562383338313130313536313134373035373831353136313134353738383832363131336665353635623937353036313134363238333631313431353536356239323530353036303031383130313930353036313134343335363562353038353933353035303530353039323931353035303536356235663630323038323031393035303831383130333566383330313532363131343935383138343631313432313536356239303530393239313530353035363562356638306664356235663830666435623766346534383762373130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303566353236303431363030343532363032343566666435623631313464623832363131323666353635623831303138313831313036376666666666666666666666666666666638323131313731353631313466613537363131346639363131346135353635623562383036303430353235303530353035363562356636313135306336313131396235363562393035303631313531383832383236313134643235363562393139303530353635623566363766666666666666666666666666666666383231313135363131353337353736313135333636313134613535363562356236313135343038323631313236663536356239303530363032303831303139303530393139303530353635623832383138333337356638333833303135323530353035303536356235663631313536643631313536383834363131353164353635623631313530333536356239303530383238313532363032303831303138343834383430313131313536313135383935373631313538383631313461313536356235623631313539343834383238353631313534643536356235303933393235303530353035363562356638323630316638333031313236313135623035373631313561663631313439643536356235623831333536313135633038343832363032303836303136313135356235363562393135303530393239313530353035363562356638303566363036303834383630333132313536313135653035373631313564663631313161343536356235623566363131356564383638323837303136313133326335363562393335303530363032303631313566653836383238373031363131333263353635623932353035303630343038343031333536376666666666666666666666666666666638313131313536313136316635373631313631653631313161383536356235623631313632623836383238373031363131353963353635623931353035303932353039323530393235363562356636303230383230313930353038313831303335663833303135323631313634643831383436313132376635363562393035303932393135303530353635623566383036303430383338353033313231353631313636623537363131363661363131316134353635623562356636313136373838353832383630313631313332633536356239323530353036303230363131363839383538323836303136313131636235363562393135303530393235303932393035303536356237663465343837623731303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303035663532363032323630303435323630323435666664356235663630303238323034393035303630303138323136383036313136643735373630376638323136393135303562363032303832313038313033363131366561353736313136653936313136393335363562356235303931393035303536356235663832383235323630323038323031393035303932393135303530353635623766343936653736363136633639363432303664363537343638366636343030303030303030303030303030303030303030303030303030303030303030303030303566383230313532353035363562356636313137333436303065383336313136663035363562393135303631313733663832363131373030353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131373631383136313137323835363562393035303931393035303536356237663439366537363631366336393634323036653666373436393636363936333631373436393666366532303639366536343635373830303030303030303030303035663832303135323530353635623566363131373963363031613833363131366630353635623931353036313137613738323631313736383536356236303230383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631313763393831363131373930353635623930353039313930353035363562376634653438376237313030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030356635323630333236303034353236303234356666643562376634393665373636313663363936343230373036313732363136643733323036663735373436353732303030303030303030303030303030303030303030303030356638323031353235303536356235663631313833313630313438333631313666303536356239313530363131383363383236313137666435363562363032303832303139303530393139303530353635623566363032303832303139303530383138313033356638333031353236313138356538313631313832353536356239303530393139303530353635623766343936653736363136633639363432303730363137323631366437333230363936653665363537323030303030303030303030303030303030303030303030303566383230313532353035363562356636313138393936303134383336313136663035363562393135303631313861343832363131383635353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131386336383136313138386435363562393035303931393035303536356235663831393035303831356635323630323035663230393035303931393035303536356235663630323036303166383330313034393035303931393035303536356235663832383231623930353039323931353035303536356235663630303838333032363131393239376666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666383236313138656535363562363131393333383638333631313865653536356239353530383031393834313639333530383038363136383431373932353035303530393339323530353035303536356235663831393035303931393035303536356235663631313936653631313936393631313936343834363131316163353635623631313934623536356236313131616335363562393035303931393035303536356235663831393035303931393035303536356236313139383738333631313935343536356236313139396236313139393338323631313937353536356238343834353436313138666135363562383235353530353035303530353635623566393035363562363131396166363131396133353635623631313962613831383438343631313937653536356235303530353035363562356238313831313031353631313964643537363131396432356638323631313961373536356236303031383130313930353036313139633035363562353035303536356236303166383231313135363131613232353736313139663338313631313863643536356236313139666338343631313864663536356238313031363032303835313031353631316130623537383139303530356236313161316636313161313738353631313864663536356238333031383236313139626635363562353035303562353035303530353635623566383238323163393035303932393135303530353635623566363131613432356631393834363030383032363131613237353635623139383038333136393135303530393239313530353035363562356636313161356138333833363131613333353635623931353038323630303230323832313739303530393239313530353035363562363131613733383236313132343735363562363766666666666666666666666666666666383131313135363131613863353736313161386236313134613535363562356236313161393638323534363131366330353635623631316161313832383238353631313965313536356235663630323039303530363031663833313136303031383131343631316164323537356638343135363131616330353738323837303135313930353035623631316163613835383236313161346635363562383635353530363131623331353635623630316631393834313636313161653038363631313863643536356235663562383238313130313536313162303735373834383930313531383235353630303138323031393135303630323038353031393435303630323038313031393035303631316165323536356238363833313031353631316232343537383438393031353136313162323036303166383931363832363131613333353635623833353535303562363030313630303238383032303138383535353035303530356235303530353035303530353035363562376634653438376237313030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030356635323630313136303034353236303234356666643562356636313162373038323631313161633536356239313530376666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666383230333631316261323537363131626131363131623339353635623562363030313832303139303530393139303530353635623766363936653736363136633639363432303664363136613230323836353738373036353633373436353634323034643631366134313732373236313739323930303566383230313532353035363562356636313162653136303166383336313136663035363562393135303631316265633832363131626164353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131633065383136313162643535363562393035303931393035303536356237663639366537363631366336393634323036643631366132303238363537383730363536333734363536343230346436313661353536653733363936373665363535663832303135323766363434393665373432393030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303630323038323031353235303536356235663631316336663630323538333631313666303536356239313530363131633761383236313163313535363562363034303832303139303530393139303530353635623566363032303832303139303530383138313033356638333031353236313163396338313631316336333536356239303530393139303530353635623766363936653736363136633639363432303664363136613230323836353738373036353633373436353634323034643631366135333639363736653635363434393566383230313532376636653734323036663732323034643631366135353665373336393637366536353634343936653734323930303030303030303030303030303030303030303030363032303832303135323530353635623566363131636664363033353833363131366630353635623931353036313164303838323631316361333536356236303430383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631316432613831363131636631353635623930353039313930353035363562376636393665373636313663363936343230366436313661323032383635373837303635363337343635363432303464363136613534363136373230366637323230356638323031353237663464363136613432373937343635353337343732363936653637323930303030303030303030303030303030303030303030303030303030303030303030303036303230383230313532353035363562356636313164386236303265383336313136663035363562393135303631316439363832363131643331353635623630343038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131646238383136313164376635363562393035303931393035303536356237663635373837303635363337343635363432303464363136613432373937343635353337343732363936653637303030303030303030303030303030303030303035663832303135323530353635623566363131646633363031363833363131366630353635623931353036313164666538323631316462663536356236303230383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631316532303831363131646537353635623930353039313930353035363562356636313165333138323631313161633536356239313530363131653363383336313131616335363562393235303832383230313930353038303832313131353631316535343537363131653533363131623339353635623562393239313530353035363562376636333631366536653666373432303638363136653634366336353230363836353631363436353732373332303737363937343638323036353738373437323631356638323031353237663230336532303332333730303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303036303230383230313532353035363562356636313165623436303235383336313136663035363562393135303631316562663832363131653561353635623630343038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363131656531383136313165613835363562393035303931393035303536356237663639366537363631366336393634323036333632366637323030303030303030303030303030303030303030303030303030303030303030303030303030303035663832303135323530353635623566363131663163363030633833363131366630353635623931353036313166323738323631316565383536356236303230383230313930353039313930353035363562356636303230383230313930353038313831303335663833303135323631316634393831363131663130353635623930353039313930353035363562376634353738373036353633373436353634346336663737353636313663373536353332333730303030303030303030303030303030303030303030303030303030356638323031353235303536356235663631316638343630313238333631313666303536356239313530363131663866383236313166353035363562363032303832303139303530393139303530353635623566363032303832303139303530383138313033356638333031353236313166623138313631316637383536356239303530393139303530353635623766373336633639363336393665363732303666373537343230366636363230373236313665363736353030303030303030303030303030303030303030303030303566383230313532353035363562356636313166656336303134383336313136663035363562393135303631316666373832363131666238353635623630323038323031393035303931393035303536356235663630323038323031393035303831383130333566383330313532363132303139383136313166653035363562393035303931393035303536666561323634363937303636373335383232313232306363663865366636313034353862643463346530316635366261643037663239653838633934643566303733623962643635363539663566643866383930376536343733366636633633343330303038313930303333 +60806040525f60035f6101000a81548160ff0219169083151502179055503480156027575f80fd5b50612056806100355f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063868e10c411610059578063868e10c41461013c5780638777d4d71461016c578063c153e97f1461018a578063ec680ea2146101be57610086565b806334c1f9441461008a57806344794f4f146100be5780634cbb3601146100ee578063529825951461010c575b5f80fd5b6100a4600480360381019061009f91906111df565b6101ee565b6040516100b59594939291906112b7565b60405180910390f35b6100d860048036038101906100d39190611340565b61036c565b6040516100e5919061137a565b60405180910390f35b6100f661039d565b60405161010391906113ad565b60405180910390f35b61012660048036038101906101219190611340565b6103af565b604051610133919061147d565b60405180910390f35b610156600480360381019061015191906115c9565b61042a565b6040516101639190611635565b60405180910390f35b61017461049d565b604051610181919061137a565b60405180910390f35b6101a4600480360381019061019f91906111df565b6104a3565b6040516101b59594939291906112b7565b60405180910390f35b6101d860048036038101906101d39190611655565b6106e6565b6040516101e5919061137a565b60405180910390f35b5f81815481106101fc575f80fd5b905f5260205f2090600402015f91509050805f015f9054906101000a900467ffffffffffffffff1690805f0160089054906101000a900460070b90806001018054610246906116c0565b80601f0160208091040260200160405190810160405280929190818152602001828054610272906116c0565b80156102bd5780601f10610294576101008083540402835291602001916102bd565b820191905f5260205f20905b8154815290600101906020018083116102a057829003601f168201915b505050505090806002015f9054906101000a900467ffffffffffffffff16908060030180546102eb906116c0565b80601f0160208091040260200160405190810160405280929190818152602001828054610317906116c0565b80156103625780601f1061033957610100808354040283529160200191610362565b820191905f5260205f20905b81548152906001019060200180831161034557829003601f168201915b5050505050905085565b5f60015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f20805490509050919050565b60035f9054906101000a900460ff1681565b606060015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561041e57602002820191905f5260205f20905b81548152602001906001019080831161040a575b50505050509050919050565b6060637942460367ffffffffffffffff168467ffffffffffffffff160361045b5761045482610711565b9050610496565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048d9061174a565b60405180910390fd5b9392505050565b60025481565b5f8060605f60605f8054905086106104f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e7906117b2565b60405180910390fd5b5f808781548110610504576105036117d0565b5b905f5260205f2090600402016040518060a00160405290815f82015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020015f820160089054906101000a900460070b60070b60070b8152602001600182018054610577906116c0565b80601f01602080910402602001604051908101604052809291908181526020018280546105a3906116c0565b80156105ee5780601f106105c5576101008083540402835291602001916105ee565b820191905f5260205f20905b8154815290600101906020018083116105d157829003601f168201915b50505050508152602001600282015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152602001600382018054610638906116c0565b80601f0160208091040260200160405190810160405280929190818152602001828054610664906116c0565b80156106af5780601f10610686576101008083540402835291602001916106af565b820191905f5260205f20905b81548152906001019060200180831161069257829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b6001602052815f5260405f2081815481106106ff575f80fd5b905f5260205f20015f91509150505481565b60605f8061071f845f610a3f565b915091505f5b828110156109ff575f6107388684610a3f565b809450819250505060038114610783576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077a90611847565b60405180910390fd5b5f61078e8785610abe565b80955081925050505f6107a18886610b3c565b80965081925050505f6107b48987610a3f565b80975081925050505f5b818110156109ed576107d08a88610a3f565b80985081965050506003851461081b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610812906118af565b60405180910390fd5b60606108278b89610bcb565b80995081925050505f61083a8c8a610abe565b809a508192505050606061084e8d8b610bcb565b809b5081925050505f808054905090505f6040518060a001604052808a67ffffffffffffffff1681526020018960070b81526020018681526020018567ffffffffffffffff16815260200184815250908060018154018082558091505060019003905f5260205f2090600402015f909190919091505f820151815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506020820151815f0160086101000a81548167ffffffffffffffff021916908360070b67ffffffffffffffff16021790555060408201518160010190816109359190611a6a565b506060820151816002015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060808201518160030190816109799190611a6a565b50505060015f8967ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f909190919091505560025f8154809291906109d790611b66565b91905055505050505080806001019150506107be565b50505050508080600101915050610725565b506040518060400160405280600281526020017f81f600000000000000000000000000000000000000000000000000000000000081525092505050919050565b5f805f80610a4d8686610dcd565b8167ffffffffffffffff169150809750819350829450505050600460ff168260ff1614610aaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa690611bf7565b60405180910390fd5b80859350935050509250929050565b5f805f80610acc8686610dcd565b8167ffffffffffffffff1691508097508193508294505050505f60ff168260ff1614610b2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2490611c85565b60405180910390fd5b80859350935050509250929050565b5f805f80610b4a8686610dcd565b8167ffffffffffffffff169150809750819350829450505050600160ff168260ff161480610b7d57505f60ff168260ff16145b610bbc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb390611d13565b60405180910390fd5b80859350935050509250929050565b60605f805f610bda8686610dcd565b8167ffffffffffffffff169150809750819350829450505050600660ff168260ff161480610c0e5750600260ff168260ff16145b610c4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4490611da1565b60405180910390fd5b600660ff168260ff1603610cc857610c658686610dcd565b8167ffffffffffffffff169150809750819350829450505050600260ff168260ff1614610cc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cbe90611e09565b60405180910390fd5b5b5f8186610cd59190611e27565b90505f8267ffffffffffffffff811115610cf257610cf16114a5565b5b6040519080825280601f01601f191660200182016040528015610d245781602001600182028036833780820191505090505b5090505f808890505b83811015610daf57898181518110610d4857610d476117d0565b5b602001015160f81c60f81b838381518110610d6657610d656117d0565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053508180610d9f90611b66565b9250508080600101915050610d2d565b50818489610dbd9190611e27565b9650965050505050509250929050565b5f805f80610ddb8686610fe9565b9050600185610dea9190611e27565b94505f600560e0831660ff16901c90505f601f83169050601c8160ff1610610e47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3e90611eca565b60405180910390fd5b60188160ff161015610e6a578181888160ff169150955095509550505050610fe2565b60188160ff1603610ef0575f610e808989610fe9565b9050600188610e8f9190611e27565b975060188160ff161015610ed8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ecf90611f32565b60405180910390fd5b8281898160ff16915096509650965050505050610fe2565b60198160ff1603610f30575f610f068989611063565b9050600288610f159190611e27565b97508281898161ffff16915096509650965050505050610fe2565b601a8160ff1603610f72575f610f4689896110cb565b9050600488610f559190611e27565b97508281898163ffffffff16915096509650965050505050610fe2565b601b8160ff1614610fb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610faf90611f9a565b60405180910390fd5b5f610fc38989611133565b9050600888610fd29190611e27565b9750828189965096509650505050505b9250925092565b5f600182610ff79190611e27565b8351101561103a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103190612002565b60405180910390fd5b82828151811061104d5761104c6117d0565b5b602001015160f81c60f81b60f81c905092915050565b5f6002826110719190611e27565b835110156110b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ab90612002565b60405180910390fd5b5f8260200184015190508060f01c91505092915050565b5f6004826110d99190611e27565b8351101561111c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111390612002565b60405180910390fd5b5f8260200184015190508060e01c91505092915050565b5f6008826111419190611e27565b83511015611184576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117b90612002565b60405180910390fd5b5f8260200184015190508060c01c91505092915050565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b6111be816111ac565b81146111c8575f80fd5b50565b5f813590506111d9816111b5565b92915050565b5f602082840312156111f4576111f36111a4565b5b5f611201848285016111cb565b91505092915050565b5f67ffffffffffffffff82169050919050565b6112268161120a565b82525050565b5f8160070b9050919050565b6112418161122c565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61128982611247565b6112938185611251565b93506112a3818560208601611261565b6112ac8161126f565b840191505092915050565b5f60a0820190506112ca5f83018861121d565b6112d76020830187611238565b81810360408301526112e9818661127f565b90506112f8606083018561121d565b818103608083015261130a818461127f565b90509695505050505050565b61131f8161120a565b8114611329575f80fd5b50565b5f8135905061133a81611316565b92915050565b5f60208284031215611355576113546111a4565b5b5f6113628482850161132c565b91505092915050565b611374816111ac565b82525050565b5f60208201905061138d5f83018461136b565b92915050565b5f8115159050919050565b6113a781611393565b82525050565b5f6020820190506113c05f83018461139e565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6113f8816111ac565b82525050565b5f61140983836113ef565b60208301905092915050565b5f602082019050919050565b5f61142b826113c6565b61143581856113d0565b9350611440836113e0565b805f5b8381101561147057815161145788826113fe565b975061146283611415565b925050600181019050611443565b5085935050505092915050565b5f6020820190508181035f8301526114958184611421565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6114db8261126f565b810181811067ffffffffffffffff821117156114fa576114f96114a5565b5b80604052505050565b5f61150c61119b565b905061151882826114d2565b919050565b5f67ffffffffffffffff821115611537576115366114a5565b5b6115408261126f565b9050602081019050919050565b828183375f83830152505050565b5f61156d6115688461151d565b611503565b905082815260208101848484011115611589576115886114a1565b5b61159484828561154d565b509392505050565b5f82601f8301126115b0576115af61149d565b5b81356115c084826020860161155b565b91505092915050565b5f805f606084860312156115e0576115df6111a4565b5b5f6115ed8682870161132c565b93505060206115fe8682870161132c565b925050604084013567ffffffffffffffff81111561161f5761161e6111a8565b5b61162b8682870161159c565b9150509250925092565b5f6020820190508181035f83015261164d818461127f565b905092915050565b5f806040838503121561166b5761166a6111a4565b5b5f6116788582860161132c565b9250506020611689858286016111cb565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806116d757607f821691505b6020821081036116ea576116e9611693565b5b50919050565b5f82825260208201905092915050565b7f496e76616c6964206d6574686f640000000000000000000000000000000000005f82015250565b5f611734600e836116f0565b915061173f82611700565b602082019050919050565b5f6020820190508181035f83015261176181611728565b9050919050565b7f496e76616c6964206e6f74696669636174696f6e20696e6465780000000000005f82015250565b5f61179c601a836116f0565b91506117a782611768565b602082019050919050565b5f6020820190508181035f8301526117c981611790565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f496e76616c696420706172616d73206f757465720000000000000000000000005f82015250565b5f6118316014836116f0565b915061183c826117fd565b602082019050919050565b5f6020820190508181035f83015261185e81611825565b9050919050565b7f496e76616c696420706172616d7320696e6e65720000000000000000000000005f82015250565b5f6118996014836116f0565b91506118a482611865565b602082019050919050565b5f6020820190508181035f8301526118c68161188d565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026119297fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826118ee565b61193386836118ee565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61196e611969611964846111ac565b61194b565b6111ac565b9050919050565b5f819050919050565b61198783611954565b61199b61199382611975565b8484546118fa565b825550505050565b5f90565b6119af6119a3565b6119ba81848461197e565b505050565b5b818110156119dd576119d25f826119a7565b6001810190506119c0565b5050565b601f821115611a22576119f3816118cd565b6119fc846118df565b81016020851015611a0b578190505b611a1f611a17856118df565b8301826119bf565b50505b505050565b5f82821c905092915050565b5f611a425f1984600802611a27565b1980831691505092915050565b5f611a5a8383611a33565b9150826002028217905092915050565b611a7382611247565b67ffffffffffffffff811115611a8c57611a8b6114a5565b5b611a9682546116c0565b611aa18282856119e1565b5f60209050601f831160018114611ad2575f8415611ac0578287015190505b611aca8582611a4f565b865550611b31565b601f198416611ae0866118cd565b5f5b82811015611b0757848901518255600182019150602085019450602081019050611ae2565b86831015611b245784890151611b20601f891682611a33565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611b70826111ac565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611ba257611ba1611b39565b5b600182019050919050565b7f696e76616c6964206d616a20286578706563746564204d616a417272617929005f82015250565b5f611be1601f836116f0565b9150611bec82611bad565b602082019050919050565b5f6020820190508181035f830152611c0e81611bd5565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a556e7369676e655f8201527f64496e7429000000000000000000000000000000000000000000000000000000602082015250565b5f611c6f6025836116f0565b9150611c7a82611c15565b604082019050919050565b5f6020820190508181035f830152611c9c81611c63565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a5369676e6564495f8201527f6e74206f72204d616a556e7369676e6564496e74290000000000000000000000602082015250565b5f611cfd6035836116f0565b9150611d0882611ca3565b604082019050919050565b5f6020820190508181035f830152611d2a81611cf1565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a546167206f72205f8201527f4d616a42797465537472696e6729000000000000000000000000000000000000602082015250565b5f611d8b602e836116f0565b9150611d9682611d31565b604082019050919050565b5f6020820190508181035f830152611db881611d7f565b9050919050565b7f6578706563746564204d616a42797465537472696e67000000000000000000005f82015250565b5f611df36016836116f0565b9150611dfe82611dbf565b602082019050919050565b5f6020820190508181035f830152611e2081611de7565b9050919050565b5f611e31826111ac565b9150611e3c836111ac565b9250828201905080821115611e5457611e53611b39565b5b92915050565b7f63616e6e6f742068616e646c65206865616465727320776974682065787472615f8201527f203e203237000000000000000000000000000000000000000000000000000000602082015250565b5f611eb46025836116f0565b9150611ebf82611e5a565b604082019050919050565b5f6020820190508181035f830152611ee181611ea8565b9050919050565b7f696e76616c69642063626f7200000000000000000000000000000000000000005f82015250565b5f611f1c600c836116f0565b9150611f2782611ee8565b602082019050919050565b5f6020820190508181035f830152611f4981611f10565b9050919050565b7f45787065637465644c6f7756616c7565323700000000000000000000000000005f82015250565b5f611f846012836116f0565b9150611f8f82611f50565b602082019050919050565b5f6020820190508181035f830152611fb181611f78565b9050919050565b7f736c6963696e67206f7574206f662072616e67650000000000000000000000005f82015250565b5f611fec6014836116f0565b9150611ff782611fb8565b602082019050919050565b5f6020820190508181035f83015261201981611fe0565b905091905056fea26469706673582212208596e5825c662e7035d31363c8b5b4966642088b53a77113adaa1aec0a7ed8f264736f6c63430008190033 From 303eab662cb884ce4a6401ebc022d97aeed3f39f Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 17:26:05 -0600 Subject: [PATCH 12/39] Contract fixes --- .../tests/contracts/NotificationReceiver.sol | 209 +++++++++++++++++- .../src/tests/evm_notification_test.rs | 73 +++--- 2 files changed, 241 insertions(+), 41 deletions(-) diff --git a/actors/evm/tests/contracts/NotificationReceiver.sol b/actors/evm/tests/contracts/NotificationReceiver.sol index 31f1938cd..b7a2f04a2 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.sol +++ b/actors/evm/tests/contracts/NotificationReceiver.sol @@ -66,10 +66,14 @@ contract NotificationReceiver { * @dev Handle incoming Filecoin method calls * This is the main entry point for receiving notifications from the miner actor */ - function handle_filecoin_method(uint64 method, uint64, bytes memory params) public returns (bytes memory) { + function handle_filecoin_method(uint64 method, uint64 inCodec, bytes memory params) public returns (uint64, uint64,bytes memory) { + // 0x51 is IPLD CBOR codec + require(inCodec == 0x51, "Invalid codec"); // Check if this is a sector content changed notification if (method == SECTOR_CONTENT_CHANGED) { - return processSectorContentChanged(params); + bytes memory ret = processSectorContentChanged(params); + uint64 codec = 0x51; + return (0, codec, ret); } // For other methods, just revert @@ -90,17 +94,35 @@ contract NotificationReceiver { * }] * }] * } + * + * All notifications are accepted so CBOR true returned for every piece of every notified sector */ function processSectorContentChanged(bytes memory params) internal returns (bytes memory) { - (uint nSectors, uint byteIdx) = readFixedArray(params, 0); + /* We begin by parsing a single tuple: (sectors) + */ + (uint checkTupleLen, uint byteIdx) = readFixedArray(params, 0); + require(checkTupleLen == 1, "Invalid params outer tuple"); + + uint nSectors; + (nSectors, byteIdx) = readFixedArray(params, 0); + require(nSectors > 0, "Invalid non positive sectors field"); + + CBORBuffer memory ret_acc; + { + // Setup return value ret_acc + // ret_acc accumulates return cbor array + ret_acc = createCBOR(64); + startFixedArray(ret_acc, 1); // SectorContentChangedReturn + startFixedArray(ret_acc, uint64(nSectors)); // sectors: Vec + } for (uint i = 0; i < nSectors; i++) { /* We now need to parse a tuple of 3 cbor objects: (sector, minimum_commitment_epoch, added_pieces) */ - uint checkTupleLen; (checkTupleLen, byteIdx) = readFixedArray(params, byteIdx); - require(checkTupleLen == 3, "Invalid params outer"); + require(checkTupleLen == 3, "Invalid SectorChanges tuple"); + uint64 sector; (sector, byteIdx) = readUInt64(params, byteIdx); @@ -111,6 +133,11 @@ contract NotificationReceiver { uint256 pieceCnt; (pieceCnt, byteIdx) = readFixedArray(params, byteIdx); + { + startFixedArray(ret_acc, 1); // SectorReturn + startFixedArray(ret_acc, uint64(pieceCnt)); // added: Vec + } + for (uint j = 0; j < pieceCnt; j++) { /* We now need to parse a tuple of 3 cbor objects: (data, size, payload) @@ -139,14 +166,14 @@ contract NotificationReceiver { sectorNotificationIndices[sector].push(notificationIndex); totalNotifications++; + { + startFixedArray(ret_acc, 1); // PieceReturn + writeBool(ret_acc, true); // accepted (set all to true) + } } } - /* Hack: just return CBOR null == `0xF6` - This deserializes to SectorContentChangedReturn [[bool]] but will fail validation. - To call this without failing commitment message must specify require_success == false - */ - return hex"81f6"; - + + return getCBORData(ret_acc); } /* *** CBOR parsing *** */ @@ -332,5 +359,165 @@ contract NotificationReceiver { } return uint64(x); } + + /* *** CBOR writing *** */ + // === MINIMAL CBOR ENCODING FOR SectorContentChangedReturn === + + // Buffer struct + struct Buffer { + bytes buf; + uint capacity; + } + + struct CBORBuffer { + Buffer buf; + } + + /** + * @dev Create a new CBOR buffer with given capacity + */ + function createCBOR(uint256 capacity) internal pure returns(CBORBuffer memory cbor) { + initBuffer(cbor.buf, capacity); + return cbor; + } + + /** + * @dev Get the encoded bytes from the buffer + */ + function getCBORData(CBORBuffer memory buf) internal pure returns(bytes memory) { + return buf.buf.buf; + } + + /** + * @dev Start a fixed-length array + */ + function startFixedArray(CBORBuffer memory buf, uint64 length) internal pure { + writeFixedNumeric(buf, MajArray, length); + } + + /** + * @dev Write a boolean value + */ + function writeBool(CBORBuffer memory buf, bool val) internal pure { + appendUint8(buf.buf, uint8((MajOther << 5) | (val ? True_Type : False_Type))); + } + + // === INTERNAL HELPER FUNCTIONS === + + function initBuffer(Buffer memory buf, uint capacity) private pure { + if (capacity % 32 != 0) { + capacity += 32 - (capacity % 32); + } + buf.capacity = capacity; + assembly { + let ptr := mload(0x40) + mstore(buf, ptr) + mstore(ptr, 0) + let fpm := add(32, add(ptr, capacity)) + if lt(fpm, ptr) { + revert(0, 0) + } + mstore(0x40, fpm) + } + } + + function writeFixedNumeric(CBORBuffer memory buf, uint8 major, uint64 val) private pure { + if (val <= 23) { + appendUint8(buf.buf, uint8((major << 5) | val)); + } else if (val <= 0xFF) { + appendUint8(buf.buf, uint8((major << 5) | 24)); + appendInt(buf.buf, val, 1); + } else if (val <= 0xFFFF) { + appendUint8(buf.buf, uint8((major << 5) | 25)); + appendInt(buf.buf, val, 2); + } else if (val <= 0xFFFFFFFF) { + appendUint8(buf.buf, uint8((major << 5) | 26)); + appendInt(buf.buf, val, 4); + } else { + appendUint8(buf.buf, uint8((major << 5) | 27)); + appendInt(buf.buf, val, 8); + } + } + + function appendUint8(Buffer memory buf, uint8 val) private pure { + uint off = buf.buf.length; + uint offPlusOne = off + 1; + if (off >= buf.capacity) { + resizeBuffer(buf, offPlusOne * 2); + } + + assembly { + let bufptr := mload(buf) + let dest := add(add(bufptr, off), 32) + mstore8(dest, val) + if gt(offPlusOne, mload(bufptr)) { + mstore(bufptr, offPlusOne) + } + } + } + + function appendInt(Buffer memory buf, uint val, uint len) private pure { + uint off = buf.buf.length; + uint newCapacity = len + off; + if (newCapacity > buf.capacity) { + resizeBuffer(buf, newCapacity * 2); + } + + uint mask = (256 ** len) - 1; + assembly { + let bufptr := mload(buf) + let dest := add(bufptr, newCapacity) + mstore(dest, or(and(mload(dest), not(mask)), val)) + if gt(newCapacity, mload(bufptr)) { + mstore(bufptr, newCapacity) + } + } + } + + function resizeBuffer(Buffer memory buf, uint capacity) private pure { + bytes memory oldbuf = buf.buf; + initBuffer(buf, capacity); + appendBytes(buf, oldbuf); + } + + function appendBytes(Buffer memory buf, bytes memory val) private pure { + uint len = val.length; + uint off = buf.buf.length; + uint newCapacity = off + len; + if (newCapacity > buf.capacity) { + resizeBuffer(buf, newCapacity * 2); + } + + uint dest; + uint src; + assembly { + let bufptr := mload(buf) + let buflen := mload(bufptr) + dest := add(add(bufptr, 32), off) + if gt(newCapacity, buflen) { + mstore(bufptr, newCapacity) + } + src := add(val, 32) + } + + // Copy word-length chunks + for (; len >= 32; len -= 32) { + assembly { + mstore(dest, mload(src)) + } + dest += 32; + src += 32; + } + + // Copy remaining bytes + if (len > 0) { + uint mask = (256 ** (32 - len)) - 1; + assembly { + let srcpart := and(mload(src), not(mask)) + let destpart := and(mload(dest), mask) + mstore(dest, or(destpart, srcpart)) + } + } + } } diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 7515d856a..8fdcde258 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -1,7 +1,7 @@ use export_macro::vm_test; use fil_actor_miner::{ ProveCommitSectors3Params, SectorActivationManifest, PieceActivationManifest, - DataActivationNotification, Method as MinerMethod, + DataActivationNotification, Method as MinerMethod, CompactCommD, }; use fil_actors_runtime::{ EAM_ACTOR_ADDR, test_utils::EVM_ACTOR_CODE_ID, test_utils::make_piece_cid, @@ -9,14 +9,14 @@ use fil_actors_runtime::{ use fvm_ipld_encoding::{RawBytes, ipld_block::IpldBlock}; use fvm_shared::{ address::Address, econ::TokenAmount, sector::{RegisteredSealProof, SectorNumber}, - piece::PaddedPieceSize, + piece::PaddedPieceSize, piece::PieceInfo, }; use num_traits::Zero; use vm_api::VM; use crate::util::{ create_accounts, create_miner, precommit_sectors_v2, - advance_by_deadline_to_epoch + advance_by_deadline_to_epoch, PrecommitMetadata, }; @@ -36,7 +36,6 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { ); // Deploy the NotificationReceiver EVM contract - // The file is a hex string, so decode it to bytes let hex_str = std::fs::read_to_string("../actors/evm/tests/contracts/NotificationReceiver.hex") .expect("Failed to read contract bytecode hex file"); let hex_str = hex_str.trim(); @@ -63,37 +62,23 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { println!("Created EVM contract at ID: {}, Robust: {}, ETH: 0x{}", evm_actor_addr, evm_robust_addr, hex::encode(&evm_eth_addr)); + // Precommit sectors let sector_number: SectorNumber = 100; - let precommits = precommit_sectors_v2( - v, - 1, - vec![], - &worker, - &miner_addr, - seal_proof, - sector_number, - true, - None, - ); - - // Advance time to prove commit epoch - let prove_time = v.epoch() + 150; - advance_by_deadline_to_epoch(v, &miner_addr, prove_time); // Create piece activation manifests with notifications to EVM contract - let piece_size = PaddedPieceSize(32 << 30); // 32 GiB - let manifests: Vec = precommits.iter().enumerate().map(|(i, pc)| { - let piece_cid = make_piece_cid(format!("piece-{}", i).as_bytes()); - let notification_payload = RawBytes::from(vec![i as u8, 1, 2, 3]); // Simple test payload - + let piece_size0 = PaddedPieceSize(32 << 30); // 32 GiB + let piece_cid0 = make_piece_cid(format!("piece-{}", 0).as_bytes()); + let notification_payload = RawBytes::from(hex::decode("cafe").unwrap()); + + let manifests: Vec = vec![ SectorActivationManifest { - sector_number: pc.info.sector_number, + sector_number: sector_number, pieces: vec![ PieceActivationManifest { - cid: piece_cid, - size: piece_size, + cid: piece_cid0, + size: piece_size0, verified_allocation_key: None, notify: vec![ // Send notification to our EVM contract @@ -105,16 +90,44 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { }, ], } - }).collect(); + ]; + + + let meta: Vec = manifests + .iter() + .map(|sector| { + let pis: Vec = + sector.pieces.iter().map(|p| PieceInfo { size: p.size, cid: p.cid }).collect(); + let commd = v.primitives().compute_unsealed_sector_cid(seal_proof, &pis).unwrap(); + PrecommitMetadata { deals: vec![], commd: CompactCommD::of(commd) } + }) + .collect(); + + precommit_sectors_v2( + v, + 1, + meta, + &worker, + &miner_addr, + seal_proof, + sector_number, + true, + None, + ); + + // Advance time to prove commit epoch + let prove_time = v.epoch() + 151; + advance_by_deadline_to_epoch(v, &miner_addr, prove_time); // ProveCommitSectors3 with notifications + let proofs = vec![RawBytes::new(vec![8, 8, 8, 8]); manifests.len()]; // dummy value for faked proof syscalls in test vm let prove_params = ProveCommitSectors3Params { sector_activations: manifests, - sector_proofs: vec![], // Empty proofs for testing + sector_proofs: proofs, // Empty proofs for testing aggregate_proof: RawBytes::default(), aggregate_proof_type: None, require_activation_success: false, - require_notification_success: false, + require_notification_success: true, }; let prove_result = v.execute_message( From 310c591f37e1904c7acadc1c8030cb7d362f31c9 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Fri, 29 Aug 2025 01:38:45 +0200 Subject: [PATCH 13/39] build new hex from updated source --- actors/evm/tests/contracts/NotificationReceiver.hex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actors/evm/tests/contracts/NotificationReceiver.hex b/actors/evm/tests/contracts/NotificationReceiver.hex index bfb4ee7d6..ae311ab8a 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.hex +++ b/actors/evm/tests/contracts/NotificationReceiver.hex @@ -1 +1 @@ -60806040525f60035f6101000a81548160ff0219169083151502179055503480156027575f80fd5b50612056806100355f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063868e10c411610059578063868e10c41461013c5780638777d4d71461016c578063c153e97f1461018a578063ec680ea2146101be57610086565b806334c1f9441461008a57806344794f4f146100be5780634cbb3601146100ee578063529825951461010c575b5f80fd5b6100a4600480360381019061009f91906111df565b6101ee565b6040516100b59594939291906112b7565b60405180910390f35b6100d860048036038101906100d39190611340565b61036c565b6040516100e5919061137a565b60405180910390f35b6100f661039d565b60405161010391906113ad565b60405180910390f35b61012660048036038101906101219190611340565b6103af565b604051610133919061147d565b60405180910390f35b610156600480360381019061015191906115c9565b61042a565b6040516101639190611635565b60405180910390f35b61017461049d565b604051610181919061137a565b60405180910390f35b6101a4600480360381019061019f91906111df565b6104a3565b6040516101b59594939291906112b7565b60405180910390f35b6101d860048036038101906101d39190611655565b6106e6565b6040516101e5919061137a565b60405180910390f35b5f81815481106101fc575f80fd5b905f5260205f2090600402015f91509050805f015f9054906101000a900467ffffffffffffffff1690805f0160089054906101000a900460070b90806001018054610246906116c0565b80601f0160208091040260200160405190810160405280929190818152602001828054610272906116c0565b80156102bd5780601f10610294576101008083540402835291602001916102bd565b820191905f5260205f20905b8154815290600101906020018083116102a057829003601f168201915b505050505090806002015f9054906101000a900467ffffffffffffffff16908060030180546102eb906116c0565b80601f0160208091040260200160405190810160405280929190818152602001828054610317906116c0565b80156103625780601f1061033957610100808354040283529160200191610362565b820191905f5260205f20905b81548152906001019060200180831161034557829003601f168201915b5050505050905085565b5f60015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f20805490509050919050565b60035f9054906101000a900460ff1681565b606060015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561041e57602002820191905f5260205f20905b81548152602001906001019080831161040a575b50505050509050919050565b6060637942460367ffffffffffffffff168467ffffffffffffffff160361045b5761045482610711565b9050610496565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048d9061174a565b60405180910390fd5b9392505050565b60025481565b5f8060605f60605f8054905086106104f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e7906117b2565b60405180910390fd5b5f808781548110610504576105036117d0565b5b905f5260205f2090600402016040518060a00160405290815f82015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020015f820160089054906101000a900460070b60070b60070b8152602001600182018054610577906116c0565b80601f01602080910402602001604051908101604052809291908181526020018280546105a3906116c0565b80156105ee5780601f106105c5576101008083540402835291602001916105ee565b820191905f5260205f20905b8154815290600101906020018083116105d157829003601f168201915b50505050508152602001600282015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152602001600382018054610638906116c0565b80601f0160208091040260200160405190810160405280929190818152602001828054610664906116c0565b80156106af5780601f10610686576101008083540402835291602001916106af565b820191905f5260205f20905b81548152906001019060200180831161069257829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b6001602052815f5260405f2081815481106106ff575f80fd5b905f5260205f20015f91509150505481565b60605f8061071f845f610a3f565b915091505f5b828110156109ff575f6107388684610a3f565b809450819250505060038114610783576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077a90611847565b60405180910390fd5b5f61078e8785610abe565b80955081925050505f6107a18886610b3c565b80965081925050505f6107b48987610a3f565b80975081925050505f5b818110156109ed576107d08a88610a3f565b80985081965050506003851461081b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610812906118af565b60405180910390fd5b60606108278b89610bcb565b80995081925050505f61083a8c8a610abe565b809a508192505050606061084e8d8b610bcb565b809b5081925050505f808054905090505f6040518060a001604052808a67ffffffffffffffff1681526020018960070b81526020018681526020018567ffffffffffffffff16815260200184815250908060018154018082558091505060019003905f5260205f2090600402015f909190919091505f820151815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506020820151815f0160086101000a81548167ffffffffffffffff021916908360070b67ffffffffffffffff16021790555060408201518160010190816109359190611a6a565b506060820151816002015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060808201518160030190816109799190611a6a565b50505060015f8967ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f909190919091505560025f8154809291906109d790611b66565b91905055505050505080806001019150506107be565b50505050508080600101915050610725565b506040518060400160405280600281526020017f81f600000000000000000000000000000000000000000000000000000000000081525092505050919050565b5f805f80610a4d8686610dcd565b8167ffffffffffffffff169150809750819350829450505050600460ff168260ff1614610aaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa690611bf7565b60405180910390fd5b80859350935050509250929050565b5f805f80610acc8686610dcd565b8167ffffffffffffffff1691508097508193508294505050505f60ff168260ff1614610b2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2490611c85565b60405180910390fd5b80859350935050509250929050565b5f805f80610b4a8686610dcd565b8167ffffffffffffffff169150809750819350829450505050600160ff168260ff161480610b7d57505f60ff168260ff16145b610bbc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb390611d13565b60405180910390fd5b80859350935050509250929050565b60605f805f610bda8686610dcd565b8167ffffffffffffffff169150809750819350829450505050600660ff168260ff161480610c0e5750600260ff168260ff16145b610c4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4490611da1565b60405180910390fd5b600660ff168260ff1603610cc857610c658686610dcd565b8167ffffffffffffffff169150809750819350829450505050600260ff168260ff1614610cc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cbe90611e09565b60405180910390fd5b5b5f8186610cd59190611e27565b90505f8267ffffffffffffffff811115610cf257610cf16114a5565b5b6040519080825280601f01601f191660200182016040528015610d245781602001600182028036833780820191505090505b5090505f808890505b83811015610daf57898181518110610d4857610d476117d0565b5b602001015160f81c60f81b838381518110610d6657610d656117d0565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053508180610d9f90611b66565b9250508080600101915050610d2d565b50818489610dbd9190611e27565b9650965050505050509250929050565b5f805f80610ddb8686610fe9565b9050600185610dea9190611e27565b94505f600560e0831660ff16901c90505f601f83169050601c8160ff1610610e47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3e90611eca565b60405180910390fd5b60188160ff161015610e6a578181888160ff169150955095509550505050610fe2565b60188160ff1603610ef0575f610e808989610fe9565b9050600188610e8f9190611e27565b975060188160ff161015610ed8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ecf90611f32565b60405180910390fd5b8281898160ff16915096509650965050505050610fe2565b60198160ff1603610f30575f610f068989611063565b9050600288610f159190611e27565b97508281898161ffff16915096509650965050505050610fe2565b601a8160ff1603610f72575f610f4689896110cb565b9050600488610f559190611e27565b97508281898163ffffffff16915096509650965050505050610fe2565b601b8160ff1614610fb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610faf90611f9a565b60405180910390fd5b5f610fc38989611133565b9050600888610fd29190611e27565b9750828189965096509650505050505b9250925092565b5f600182610ff79190611e27565b8351101561103a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103190612002565b60405180910390fd5b82828151811061104d5761104c6117d0565b5b602001015160f81c60f81b60f81c905092915050565b5f6002826110719190611e27565b835110156110b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ab90612002565b60405180910390fd5b5f8260200184015190508060f01c91505092915050565b5f6004826110d99190611e27565b8351101561111c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111390612002565b60405180910390fd5b5f8260200184015190508060e01c91505092915050565b5f6008826111419190611e27565b83511015611184576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117b90612002565b60405180910390fd5b5f8260200184015190508060c01c91505092915050565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b6111be816111ac565b81146111c8575f80fd5b50565b5f813590506111d9816111b5565b92915050565b5f602082840312156111f4576111f36111a4565b5b5f611201848285016111cb565b91505092915050565b5f67ffffffffffffffff82169050919050565b6112268161120a565b82525050565b5f8160070b9050919050565b6112418161122c565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61128982611247565b6112938185611251565b93506112a3818560208601611261565b6112ac8161126f565b840191505092915050565b5f60a0820190506112ca5f83018861121d565b6112d76020830187611238565b81810360408301526112e9818661127f565b90506112f8606083018561121d565b818103608083015261130a818461127f565b90509695505050505050565b61131f8161120a565b8114611329575f80fd5b50565b5f8135905061133a81611316565b92915050565b5f60208284031215611355576113546111a4565b5b5f6113628482850161132c565b91505092915050565b611374816111ac565b82525050565b5f60208201905061138d5f83018461136b565b92915050565b5f8115159050919050565b6113a781611393565b82525050565b5f6020820190506113c05f83018461139e565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6113f8816111ac565b82525050565b5f61140983836113ef565b60208301905092915050565b5f602082019050919050565b5f61142b826113c6565b61143581856113d0565b9350611440836113e0565b805f5b8381101561147057815161145788826113fe565b975061146283611415565b925050600181019050611443565b5085935050505092915050565b5f6020820190508181035f8301526114958184611421565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6114db8261126f565b810181811067ffffffffffffffff821117156114fa576114f96114a5565b5b80604052505050565b5f61150c61119b565b905061151882826114d2565b919050565b5f67ffffffffffffffff821115611537576115366114a5565b5b6115408261126f565b9050602081019050919050565b828183375f83830152505050565b5f61156d6115688461151d565b611503565b905082815260208101848484011115611589576115886114a1565b5b61159484828561154d565b509392505050565b5f82601f8301126115b0576115af61149d565b5b81356115c084826020860161155b565b91505092915050565b5f805f606084860312156115e0576115df6111a4565b5b5f6115ed8682870161132c565b93505060206115fe8682870161132c565b925050604084013567ffffffffffffffff81111561161f5761161e6111a8565b5b61162b8682870161159c565b9150509250925092565b5f6020820190508181035f83015261164d818461127f565b905092915050565b5f806040838503121561166b5761166a6111a4565b5b5f6116788582860161132c565b9250506020611689858286016111cb565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806116d757607f821691505b6020821081036116ea576116e9611693565b5b50919050565b5f82825260208201905092915050565b7f496e76616c6964206d6574686f640000000000000000000000000000000000005f82015250565b5f611734600e836116f0565b915061173f82611700565b602082019050919050565b5f6020820190508181035f83015261176181611728565b9050919050565b7f496e76616c6964206e6f74696669636174696f6e20696e6465780000000000005f82015250565b5f61179c601a836116f0565b91506117a782611768565b602082019050919050565b5f6020820190508181035f8301526117c981611790565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f496e76616c696420706172616d73206f757465720000000000000000000000005f82015250565b5f6118316014836116f0565b915061183c826117fd565b602082019050919050565b5f6020820190508181035f83015261185e81611825565b9050919050565b7f496e76616c696420706172616d7320696e6e65720000000000000000000000005f82015250565b5f6118996014836116f0565b91506118a482611865565b602082019050919050565b5f6020820190508181035f8301526118c68161188d565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026119297fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826118ee565b61193386836118ee565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61196e611969611964846111ac565b61194b565b6111ac565b9050919050565b5f819050919050565b61198783611954565b61199b61199382611975565b8484546118fa565b825550505050565b5f90565b6119af6119a3565b6119ba81848461197e565b505050565b5b818110156119dd576119d25f826119a7565b6001810190506119c0565b5050565b601f821115611a22576119f3816118cd565b6119fc846118df565b81016020851015611a0b578190505b611a1f611a17856118df565b8301826119bf565b50505b505050565b5f82821c905092915050565b5f611a425f1984600802611a27565b1980831691505092915050565b5f611a5a8383611a33565b9150826002028217905092915050565b611a7382611247565b67ffffffffffffffff811115611a8c57611a8b6114a5565b5b611a9682546116c0565b611aa18282856119e1565b5f60209050601f831160018114611ad2575f8415611ac0578287015190505b611aca8582611a4f565b865550611b31565b601f198416611ae0866118cd565b5f5b82811015611b0757848901518255600182019150602085019450602081019050611ae2565b86831015611b245784890151611b20601f891682611a33565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611b70826111ac565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611ba257611ba1611b39565b5b600182019050919050565b7f696e76616c6964206d616a20286578706563746564204d616a417272617929005f82015250565b5f611be1601f836116f0565b9150611bec82611bad565b602082019050919050565b5f6020820190508181035f830152611c0e81611bd5565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a556e7369676e655f8201527f64496e7429000000000000000000000000000000000000000000000000000000602082015250565b5f611c6f6025836116f0565b9150611c7a82611c15565b604082019050919050565b5f6020820190508181035f830152611c9c81611c63565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a5369676e6564495f8201527f6e74206f72204d616a556e7369676e6564496e74290000000000000000000000602082015250565b5f611cfd6035836116f0565b9150611d0882611ca3565b604082019050919050565b5f6020820190508181035f830152611d2a81611cf1565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a546167206f72205f8201527f4d616a42797465537472696e6729000000000000000000000000000000000000602082015250565b5f611d8b602e836116f0565b9150611d9682611d31565b604082019050919050565b5f6020820190508181035f830152611db881611d7f565b9050919050565b7f6578706563746564204d616a42797465537472696e67000000000000000000005f82015250565b5f611df36016836116f0565b9150611dfe82611dbf565b602082019050919050565b5f6020820190508181035f830152611e2081611de7565b9050919050565b5f611e31826111ac565b9150611e3c836111ac565b9250828201905080821115611e5457611e53611b39565b5b92915050565b7f63616e6e6f742068616e646c65206865616465727320776974682065787472615f8201527f203e203237000000000000000000000000000000000000000000000000000000602082015250565b5f611eb46025836116f0565b9150611ebf82611e5a565b604082019050919050565b5f6020820190508181035f830152611ee181611ea8565b9050919050565b7f696e76616c69642063626f7200000000000000000000000000000000000000005f82015250565b5f611f1c600c836116f0565b9150611f2782611ee8565b602082019050919050565b5f6020820190508181035f830152611f4981611f10565b9050919050565b7f45787065637465644c6f7756616c7565323700000000000000000000000000005f82015250565b5f611f846012836116f0565b9150611f8f82611f50565b602082019050919050565b5f6020820190508181035f830152611fb181611f78565b9050919050565b7f736c6963696e67206f7574206f662072616e67650000000000000000000000005f82015250565b5f611fec6014836116f0565b9150611ff782611fb8565b602082019050919050565b5f6020820190508181035f83015261201981611fe0565b905091905056fea26469706673582212208596e5825c662e7035d31363c8b5b4966642088b53a77113adaa1aec0a7ed8f264736f6c63430008190033 +0x608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063868e10c411610059578063868e10c41461013c5780638777d4d71461016e578063c153e97f1461018c578063ec680ea2146101c057610086565b806334c1f9441461008a57806344794f4f146100be5780634cbb3601146100ee578063529825951461010c575b5f80fd5b6100a4600480360381019061009f9190611724565b6101f0565b6040516100b59594939291906117fc565b60405180910390f35b6100d860048036038101906100d39190611885565b61036e565b6040516100e591906118bf565b60405180910390f35b6100f661039f565b60405161010391906118f2565b60405180910390f35b61012660048036038101906101219190611885565b6103b1565b60405161013391906119c2565b60405180910390f35b61015660048036038101906101519190611b0e565b61042c565b60405161016593929190611b7a565b60405180910390f35b610176610501565b60405161018391906118bf565b60405180910390f35b6101a660048036038101906101a19190611724565b610507565b6040516101b79594939291906117fc565b60405180910390f35b6101da60048036038101906101d59190611bb6565b61074a565b6040516101e791906118bf565b60405180910390f35b5f81815481106101fe575f80fd5b905f5260205f2090600402015f91509050805f015f9054906101000a900467ffffffffffffffff1690805f0160089054906101000a900460070b9080600101805461024890611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461027490611c21565b80156102bf5780601f10610296576101008083540402835291602001916102bf565b820191905f5260205f20905b8154815290600101906020018083116102a257829003601f168201915b505050505090806002015f9054906101000a900467ffffffffffffffff16908060030180546102ed90611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461031990611c21565b80156103645780601f1061033b57610100808354040283529160200191610364565b820191905f5260205f20905b81548152906001019060200180831161034757829003601f168201915b5050505050905085565b5f60015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f20805490509050919050565b60035f9054906101000a900460ff1681565b606060015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561042057602002820191905f5260205f20905b81548152602001906001019080831161040c575b50505050509050919050565b5f80606060518567ffffffffffffffff161461047d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047490611cab565b60405180910390fd5b637942460367ffffffffffffffff168667ffffffffffffffff16036104bd575f6104a685610775565b90505f605190505f818394509450945050506104f8565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ef90611d13565b60405180910390fd5b93509350939050565b60025481565b5f8060605f60605f805490508610610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b90611d7b565b60405180910390fd5b5f80878154811061056857610567611d99565b5b905f5260205f2090600402016040518060a00160405290815f82015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020015f820160089054906101000a900460070b60070b60070b81526020016001820180546105db90611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461060790611c21565b80156106525780601f1061062957610100808354040283529160200191610652565b820191905f5260205f20905b81548152906001019060200180831161063557829003601f168201915b50505050508152602001600282015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160038201805461069c90611c21565b80601f01602080910402602001604051908101604052809291908181526020018280546106c890611c21565b80156107135780601f106106ea57610100808354040283529160200191610713565b820191905f5260205f20905b8154815290600101906020018083116106f657829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b6001602052815f5260405f208181548110610763575f80fd5b905f5260205f20015f91509150505481565b60605f80610783845f610b62565b91509150600182146107ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c190611e10565b60405180910390fd5b5f6107d5855f610b62565b80935081925050505f811161081f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081690611e9e565b60405180910390fd5b6108276116ae565b6108316040610be1565b905061083e816001610bfb565b6108488183610bfb565b5f5b82811015610b4d5761085c8785610b62565b8095508196505050600385146108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089e90611f06565b60405180910390fd5b5f6108b28886610c0b565b80965081925050505f6108c58987610c89565b80975081925050505f6108d88a88610b62565b80985081925050506108eb856001610bfb565b6108f58582610bfb565b5f5b81811015610b3c576109098b89610b62565b809950819a50505060038914610954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094b90611f6e565b60405180910390fd5b60606109608c8a610d18565b809a5081925050505f6109738d8b610c0b565b809b50819250505060606109878e8c610d18565b809c5081925050505f808054905090505f6040518060a001604052808a67ffffffffffffffff1681526020018960070b81526020018681526020018567ffffffffffffffff16815260200184815250908060018154018082558091505060019003905f5260205f2090600402015f909190919091505f820151815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506020820151815f0160086101000a81548167ffffffffffffffff021916908360070b67ffffffffffffffff1602179055506040820151816001019081610a6e9190612129565b506060820151816002015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506080820151816003019081610ab29190612129565b50505060015f8967ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f909190919091505560025f815480929190610b1090612225565b9190505550610b208a6001610bfb565b610b2b8a6001610f1a565b5050505080806001019150506108f7565b50505050808060010191505061084a565b50610b5781610f43565b945050505050919050565b5f805f80610b708686610f53565b8167ffffffffffffffff169150809750819350829450505050600460ff168260ff1614610bd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc9906122b6565b60405180910390fd5b80859350935050509250929050565b610be96116ae565b610bf6815f01518361116f565b919050565b610c07826004836111d8565b5050565b5f805f80610c198686610f53565b8167ffffffffffffffff1691508097508193508294505050505f60ff168260ff1614610c7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7190612344565b60405180910390fd5b80859350935050509250929050565b5f805f80610c978686610f53565b8167ffffffffffffffff169150809750819350829450505050600160ff168260ff161480610cca57505f60ff168260ff16145b610d09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d00906123d2565b60405180910390fd5b80859350935050509250929050565b60605f805f610d278686610f53565b8167ffffffffffffffff169150809750819350829450505050600660ff168260ff161480610d5b5750600260ff168260ff16145b610d9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9190612460565b60405180910390fd5b600660ff168260ff1603610e1557610db28686610f53565b8167ffffffffffffffff169150809750819350829450505050600260ff168260ff1614610e14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0b906124c8565b60405180910390fd5b5b5f8186610e2291906124e6565b90505f8267ffffffffffffffff811115610e3f57610e3e6119ea565b5b6040519080825280601f01601f191660200182016040528015610e715781602001600182028036833780820191505090505b5090505f808890505b83811015610efc57898181518110610e9557610e94611d99565b5b602001015160f81c60f81b838381518110610eb357610eb2611d99565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053508180610eec90612225565b9250508080600101915050610e7a565b50818489610f0a91906124e6565b9650965050505050509250929050565b610f3f825f015182610f2d576014610f30565b60155b6005600760ff16901b1761131a565b5050565b6060815f01515f01519050919050565b5f805f80610f618686611374565b9050600185610f7091906124e6565b94505f600560e0831660ff16901c90505f601f83169050601c8160ff1610610fcd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc490612589565b60405180910390fd5b60188160ff161015610ff0578181888160ff169150955095509550505050611168565b60188160ff1603611076575f6110068989611374565b905060018861101591906124e6565b975060188160ff16101561105e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611055906125f1565b60405180910390fd5b8281898160ff16915096509650965050505050611168565b60198160ff16036110b6575f61108c89896113ee565b905060028861109b91906124e6565b97508281898161ffff16915096509650965050505050611168565b601a8160ff16036110f8575f6110cc8989611456565b90506004886110db91906124e6565b97508281898163ffffffff16915096509650965050505050611168565b601b8160ff161461113e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113590612659565b60405180910390fd5b5f61114989896114be565b905060088861115891906124e6565b9750828189965096509650505050505b9250925092565b5f60208261117d91906126a4565b146111a95760208161118f91906126a4565b602061119b91906126d4565b816111a691906124e6565b90505b808260200181815250506040518083525f8152818101602001818110156111ce575f80fd5b8060405250505050565b60178167ffffffffffffffff161161120857611203835f01518260058560ff16901b60ff161761131a565b611315565b60ff8167ffffffffffffffff161161124f57611231835f0151601860058560ff16901b1761131a565b61124a835f01518267ffffffffffffffff166001611526565b611314565b61ffff8167ffffffffffffffff161161129757611279835f0151601960058560ff16901b1761131a565b611292835f01518267ffffffffffffffff166002611526565b611313565b63ffffffff8167ffffffffffffffff16116112e1576112c3835f0151601a60058560ff16901b1761131a565b6112dc835f01518267ffffffffffffffff166004611526565b611312565b6112f8835f0151601b60058560ff16901b1761131a565b611311835f01518267ffffffffffffffff166008611526565b5b5b5b5b505050565b5f825f01515190505f60018261133091906124e6565b905083602001518210611354576113538460028361134e9190612707565b6115a2565b5b8351602083820101848153815183111561136c578282525b505050505050565b5f60018261138291906124e6565b835110156113c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bc90612792565b60405180910390fd5b8282815181106113d8576113d7611d99565b5b602001015160f81c60f81b60f81c905092915050565b5f6002826113fc91906124e6565b8351101561143f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143690612792565b60405180910390fd5b5f8260200184015190508060f01c91505092915050565b5f60048261146491906124e6565b835110156114a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149e90612792565b60405180910390fd5b5f8260200184015190508060e01c91505092915050565b5f6008826114cc91906124e6565b8351101561150f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150690612792565b60405180910390fd5b5f8260200184015190508060c01c91505092915050565b5f835f01515190505f818361153b91906124e6565b905084602001518111156115605761155f8560028361155a9190612707565b6115a2565b5b5f60018461010061157191906128df565b61157b91906126d4565b905085518281018683198251161781528151841115611598578382525b5050505050505050565b5f825f015190506115b3838361116f565b6115bd83826115c2565b505050565b5f815190505f835f01515190505f82826115dc91906124e6565b9050846020015181111561160157611600856002836115fb9190612707565b6115a2565b5b5f808651805185602083010193508085111561161b578482525b60208801925050505b60208510611662578051825260208261163d91906124e6565b915060208161164c91906124e6565b905060208561165b91906126d4565b9450611624565b5f8511156116a5575f600186602061167a91906126d4565b61010061168791906128df565b61169191906126d4565b905080198251168184511681811785525050505b50505050505050565b60405180602001604052806116c16116c7565b81525090565b6040518060400160405280606081526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b611703816116f1565b811461170d575f80fd5b50565b5f8135905061171e816116fa565b92915050565b5f60208284031215611739576117386116e9565b5b5f61174684828501611710565b91505092915050565b5f67ffffffffffffffff82169050919050565b61176b8161174f565b82525050565b5f8160070b9050919050565b61178681611771565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6117ce8261178c565b6117d88185611796565b93506117e88185602086016117a6565b6117f1816117b4565b840191505092915050565b5f60a08201905061180f5f830188611762565b61181c602083018761177d565b818103604083015261182e81866117c4565b905061183d6060830185611762565b818103608083015261184f81846117c4565b90509695505050505050565b6118648161174f565b811461186e575f80fd5b50565b5f8135905061187f8161185b565b92915050565b5f6020828403121561189a576118996116e9565b5b5f6118a784828501611871565b91505092915050565b6118b9816116f1565b82525050565b5f6020820190506118d25f8301846118b0565b92915050565b5f8115159050919050565b6118ec816118d8565b82525050565b5f6020820190506119055f8301846118e3565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61193d816116f1565b82525050565b5f61194e8383611934565b60208301905092915050565b5f602082019050919050565b5f6119708261190b565b61197a8185611915565b935061198583611925565b805f5b838110156119b557815161199c8882611943565b97506119a78361195a565b925050600181019050611988565b5085935050505092915050565b5f6020820190508181035f8301526119da8184611966565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611a20826117b4565b810181811067ffffffffffffffff82111715611a3f57611a3e6119ea565b5b80604052505050565b5f611a516116e0565b9050611a5d8282611a17565b919050565b5f67ffffffffffffffff821115611a7c57611a7b6119ea565b5b611a85826117b4565b9050602081019050919050565b828183375f83830152505050565b5f611ab2611aad84611a62565b611a48565b905082815260208101848484011115611ace57611acd6119e6565b5b611ad9848285611a92565b509392505050565b5f82601f830112611af557611af46119e2565b5b8135611b05848260208601611aa0565b91505092915050565b5f805f60608486031215611b2557611b246116e9565b5b5f611b3286828701611871565b9350506020611b4386828701611871565b925050604084013567ffffffffffffffff811115611b6457611b636116ed565b5b611b7086828701611ae1565b9150509250925092565b5f606082019050611b8d5f830186611762565b611b9a6020830185611762565b8181036040830152611bac81846117c4565b9050949350505050565b5f8060408385031215611bcc57611bcb6116e9565b5b5f611bd985828601611871565b9250506020611bea85828601611710565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611c3857607f821691505b602082108103611c4b57611c4a611bf4565b5b50919050565b5f82825260208201905092915050565b7f496e76616c696420636f646563000000000000000000000000000000000000005f82015250565b5f611c95600d83611c51565b9150611ca082611c61565b602082019050919050565b5f6020820190508181035f830152611cc281611c89565b9050919050565b7f496e76616c6964206d6574686f640000000000000000000000000000000000005f82015250565b5f611cfd600e83611c51565b9150611d0882611cc9565b602082019050919050565b5f6020820190508181035f830152611d2a81611cf1565b9050919050565b7f496e76616c6964206e6f74696669636174696f6e20696e6465780000000000005f82015250565b5f611d65601a83611c51565b9150611d7082611d31565b602082019050919050565b5f6020820190508181035f830152611d9281611d59565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f496e76616c696420706172616d73206f75746572207475706c650000000000005f82015250565b5f611dfa601a83611c51565b9150611e0582611dc6565b602082019050919050565b5f6020820190508181035f830152611e2781611dee565b9050919050565b7f496e76616c6964206e6f6e20706f73697469766520736563746f7273206669655f8201527f6c64000000000000000000000000000000000000000000000000000000000000602082015250565b5f611e88602283611c51565b9150611e9382611e2e565b604082019050919050565b5f6020820190508181035f830152611eb581611e7c565b9050919050565b7f496e76616c696420536563746f724368616e676573207475706c6500000000005f82015250565b5f611ef0601b83611c51565b9150611efb82611ebc565b602082019050919050565b5f6020820190508181035f830152611f1d81611ee4565b9050919050565b7f496e76616c696420706172616d7320696e6e65720000000000000000000000005f82015250565b5f611f58601483611c51565b9150611f6382611f24565b602082019050919050565b5f6020820190508181035f830152611f8581611f4c565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611fe87fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611fad565b611ff28683611fad565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61202d612028612023846116f1565b61200a565b6116f1565b9050919050565b5f819050919050565b61204683612013565b61205a61205282612034565b848454611fb9565b825550505050565b5f90565b61206e612062565b61207981848461203d565b505050565b5b8181101561209c576120915f82612066565b60018101905061207f565b5050565b601f8211156120e1576120b281611f8c565b6120bb84611f9e565b810160208510156120ca578190505b6120de6120d685611f9e565b83018261207e565b50505b505050565b5f82821c905092915050565b5f6121015f19846008026120e6565b1980831691505092915050565b5f61211983836120f2565b9150826002028217905092915050565b6121328261178c565b67ffffffffffffffff81111561214b5761214a6119ea565b5b6121558254611c21565b6121608282856120a0565b5f60209050601f831160018114612191575f841561217f578287015190505b612189858261210e565b8655506121f0565b601f19841661219f86611f8c565b5f5b828110156121c6578489015182556001820191506020850194506020810190506121a1565b868310156121e357848901516121df601f8916826120f2565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61222f826116f1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612261576122606121f8565b5b600182019050919050565b7f696e76616c6964206d616a20286578706563746564204d616a417272617929005f82015250565b5f6122a0601f83611c51565b91506122ab8261226c565b602082019050919050565b5f6020820190508181035f8301526122cd81612294565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a556e7369676e655f8201527f64496e7429000000000000000000000000000000000000000000000000000000602082015250565b5f61232e602583611c51565b9150612339826122d4565b604082019050919050565b5f6020820190508181035f83015261235b81612322565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a5369676e6564495f8201527f6e74206f72204d616a556e7369676e6564496e74290000000000000000000000602082015250565b5f6123bc603583611c51565b91506123c782612362565b604082019050919050565b5f6020820190508181035f8301526123e9816123b0565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a546167206f72205f8201527f4d616a42797465537472696e6729000000000000000000000000000000000000602082015250565b5f61244a602e83611c51565b9150612455826123f0565b604082019050919050565b5f6020820190508181035f8301526124778161243e565b9050919050565b7f6578706563746564204d616a42797465537472696e67000000000000000000005f82015250565b5f6124b2601683611c51565b91506124bd8261247e565b602082019050919050565b5f6020820190508181035f8301526124df816124a6565b9050919050565b5f6124f0826116f1565b91506124fb836116f1565b9250828201905080821115612513576125126121f8565b5b92915050565b7f63616e6e6f742068616e646c65206865616465727320776974682065787472615f8201527f203e203237000000000000000000000000000000000000000000000000000000602082015250565b5f612573602583611c51565b915061257e82612519565b604082019050919050565b5f6020820190508181035f8301526125a081612567565b9050919050565b7f696e76616c69642063626f7200000000000000000000000000000000000000005f82015250565b5f6125db600c83611c51565b91506125e6826125a7565b602082019050919050565b5f6020820190508181035f830152612608816125cf565b9050919050565b7f45787065637465644c6f7756616c7565323700000000000000000000000000005f82015250565b5f612643601283611c51565b915061264e8261260f565b602082019050919050565b5f6020820190508181035f83015261267081612637565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6126ae826116f1565b91506126b9836116f1565b9250826126c9576126c8612677565b5b828206905092915050565b5f6126de826116f1565b91506126e9836116f1565b9250828203905081811115612701576127006121f8565b5b92915050565b5f612711826116f1565b915061271c836116f1565b925082820261272a816116f1565b91508282048414831517612741576127406121f8565b5b5092915050565b7f736c6963696e67206f7574206f662072616e67650000000000000000000000005f82015250565b5f61277c601483611c51565b915061278782612748565b602082019050919050565b5f6020820190508181035f8301526127a981612770565b9050919050565b5f8160011c9050919050565b5f808291508390505b6001851115612805578086048111156127e1576127e06121f8565b5b60018516156127f05780820291505b80810290506127fe856127b0565b94506127c5565b94509492505050565b5f8261281d57600190506128d8565b8161282a575f90506128d8565b8160018114612840576002811461284a57612879565b60019150506128d8565b60ff84111561285c5761285b6121f8565b5b8360020a915084821115612873576128726121f8565b5b506128d8565b5060208310610133831016604e8410600b84101617156128ae5782820a9050838111156128a9576128a86121f8565b5b6128d8565b6128bb84848460016127bc565b925090508184048111156128d2576128d16121f8565b5b81810290505b9392505050565b5f6128e9826116f1565b91506128f4836116f1565b92506129217fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461280e565b90509291505056fea2646970667358221220e56cfef66393cb55b61bd51865f516a291563c49c685a0493ac98f2a6243181064736f6c63430008190033 From 9d985c017fffdd218229ff5cd1fa23e00677d27e Mon Sep 17 00:00:00 2001 From: zenground0 Date: Fri, 29 Aug 2025 01:40:28 +0200 Subject: [PATCH 14/39] remove 0x --- actors/evm/tests/contracts/NotificationReceiver.hex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actors/evm/tests/contracts/NotificationReceiver.hex b/actors/evm/tests/contracts/NotificationReceiver.hex index ae311ab8a..2fa475a46 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.hex +++ b/actors/evm/tests/contracts/NotificationReceiver.hex @@ -1 +1 @@ -0x608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063868e10c411610059578063868e10c41461013c5780638777d4d71461016e578063c153e97f1461018c578063ec680ea2146101c057610086565b806334c1f9441461008a57806344794f4f146100be5780634cbb3601146100ee578063529825951461010c575b5f80fd5b6100a4600480360381019061009f9190611724565b6101f0565b6040516100b59594939291906117fc565b60405180910390f35b6100d860048036038101906100d39190611885565b61036e565b6040516100e591906118bf565b60405180910390f35b6100f661039f565b60405161010391906118f2565b60405180910390f35b61012660048036038101906101219190611885565b6103b1565b60405161013391906119c2565b60405180910390f35b61015660048036038101906101519190611b0e565b61042c565b60405161016593929190611b7a565b60405180910390f35b610176610501565b60405161018391906118bf565b60405180910390f35b6101a660048036038101906101a19190611724565b610507565b6040516101b79594939291906117fc565b60405180910390f35b6101da60048036038101906101d59190611bb6565b61074a565b6040516101e791906118bf565b60405180910390f35b5f81815481106101fe575f80fd5b905f5260205f2090600402015f91509050805f015f9054906101000a900467ffffffffffffffff1690805f0160089054906101000a900460070b9080600101805461024890611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461027490611c21565b80156102bf5780601f10610296576101008083540402835291602001916102bf565b820191905f5260205f20905b8154815290600101906020018083116102a257829003601f168201915b505050505090806002015f9054906101000a900467ffffffffffffffff16908060030180546102ed90611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461031990611c21565b80156103645780601f1061033b57610100808354040283529160200191610364565b820191905f5260205f20905b81548152906001019060200180831161034757829003601f168201915b5050505050905085565b5f60015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f20805490509050919050565b60035f9054906101000a900460ff1681565b606060015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561042057602002820191905f5260205f20905b81548152602001906001019080831161040c575b50505050509050919050565b5f80606060518567ffffffffffffffff161461047d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047490611cab565b60405180910390fd5b637942460367ffffffffffffffff168667ffffffffffffffff16036104bd575f6104a685610775565b90505f605190505f818394509450945050506104f8565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ef90611d13565b60405180910390fd5b93509350939050565b60025481565b5f8060605f60605f805490508610610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b90611d7b565b60405180910390fd5b5f80878154811061056857610567611d99565b5b905f5260205f2090600402016040518060a00160405290815f82015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020015f820160089054906101000a900460070b60070b60070b81526020016001820180546105db90611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461060790611c21565b80156106525780601f1061062957610100808354040283529160200191610652565b820191905f5260205f20905b81548152906001019060200180831161063557829003601f168201915b50505050508152602001600282015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160038201805461069c90611c21565b80601f01602080910402602001604051908101604052809291908181526020018280546106c890611c21565b80156107135780601f106106ea57610100808354040283529160200191610713565b820191905f5260205f20905b8154815290600101906020018083116106f657829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b6001602052815f5260405f208181548110610763575f80fd5b905f5260205f20015f91509150505481565b60605f80610783845f610b62565b91509150600182146107ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c190611e10565b60405180910390fd5b5f6107d5855f610b62565b80935081925050505f811161081f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081690611e9e565b60405180910390fd5b6108276116ae565b6108316040610be1565b905061083e816001610bfb565b6108488183610bfb565b5f5b82811015610b4d5761085c8785610b62565b8095508196505050600385146108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089e90611f06565b60405180910390fd5b5f6108b28886610c0b565b80965081925050505f6108c58987610c89565b80975081925050505f6108d88a88610b62565b80985081925050506108eb856001610bfb565b6108f58582610bfb565b5f5b81811015610b3c576109098b89610b62565b809950819a50505060038914610954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094b90611f6e565b60405180910390fd5b60606109608c8a610d18565b809a5081925050505f6109738d8b610c0b565b809b50819250505060606109878e8c610d18565b809c5081925050505f808054905090505f6040518060a001604052808a67ffffffffffffffff1681526020018960070b81526020018681526020018567ffffffffffffffff16815260200184815250908060018154018082558091505060019003905f5260205f2090600402015f909190919091505f820151815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506020820151815f0160086101000a81548167ffffffffffffffff021916908360070b67ffffffffffffffff1602179055506040820151816001019081610a6e9190612129565b506060820151816002015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506080820151816003019081610ab29190612129565b50505060015f8967ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f909190919091505560025f815480929190610b1090612225565b9190505550610b208a6001610bfb565b610b2b8a6001610f1a565b5050505080806001019150506108f7565b50505050808060010191505061084a565b50610b5781610f43565b945050505050919050565b5f805f80610b708686610f53565b8167ffffffffffffffff169150809750819350829450505050600460ff168260ff1614610bd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc9906122b6565b60405180910390fd5b80859350935050509250929050565b610be96116ae565b610bf6815f01518361116f565b919050565b610c07826004836111d8565b5050565b5f805f80610c198686610f53565b8167ffffffffffffffff1691508097508193508294505050505f60ff168260ff1614610c7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7190612344565b60405180910390fd5b80859350935050509250929050565b5f805f80610c978686610f53565b8167ffffffffffffffff169150809750819350829450505050600160ff168260ff161480610cca57505f60ff168260ff16145b610d09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d00906123d2565b60405180910390fd5b80859350935050509250929050565b60605f805f610d278686610f53565b8167ffffffffffffffff169150809750819350829450505050600660ff168260ff161480610d5b5750600260ff168260ff16145b610d9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9190612460565b60405180910390fd5b600660ff168260ff1603610e1557610db28686610f53565b8167ffffffffffffffff169150809750819350829450505050600260ff168260ff1614610e14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0b906124c8565b60405180910390fd5b5b5f8186610e2291906124e6565b90505f8267ffffffffffffffff811115610e3f57610e3e6119ea565b5b6040519080825280601f01601f191660200182016040528015610e715781602001600182028036833780820191505090505b5090505f808890505b83811015610efc57898181518110610e9557610e94611d99565b5b602001015160f81c60f81b838381518110610eb357610eb2611d99565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053508180610eec90612225565b9250508080600101915050610e7a565b50818489610f0a91906124e6565b9650965050505050509250929050565b610f3f825f015182610f2d576014610f30565b60155b6005600760ff16901b1761131a565b5050565b6060815f01515f01519050919050565b5f805f80610f618686611374565b9050600185610f7091906124e6565b94505f600560e0831660ff16901c90505f601f83169050601c8160ff1610610fcd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc490612589565b60405180910390fd5b60188160ff161015610ff0578181888160ff169150955095509550505050611168565b60188160ff1603611076575f6110068989611374565b905060018861101591906124e6565b975060188160ff16101561105e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611055906125f1565b60405180910390fd5b8281898160ff16915096509650965050505050611168565b60198160ff16036110b6575f61108c89896113ee565b905060028861109b91906124e6565b97508281898161ffff16915096509650965050505050611168565b601a8160ff16036110f8575f6110cc8989611456565b90506004886110db91906124e6565b97508281898163ffffffff16915096509650965050505050611168565b601b8160ff161461113e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113590612659565b60405180910390fd5b5f61114989896114be565b905060088861115891906124e6565b9750828189965096509650505050505b9250925092565b5f60208261117d91906126a4565b146111a95760208161118f91906126a4565b602061119b91906126d4565b816111a691906124e6565b90505b808260200181815250506040518083525f8152818101602001818110156111ce575f80fd5b8060405250505050565b60178167ffffffffffffffff161161120857611203835f01518260058560ff16901b60ff161761131a565b611315565b60ff8167ffffffffffffffff161161124f57611231835f0151601860058560ff16901b1761131a565b61124a835f01518267ffffffffffffffff166001611526565b611314565b61ffff8167ffffffffffffffff161161129757611279835f0151601960058560ff16901b1761131a565b611292835f01518267ffffffffffffffff166002611526565b611313565b63ffffffff8167ffffffffffffffff16116112e1576112c3835f0151601a60058560ff16901b1761131a565b6112dc835f01518267ffffffffffffffff166004611526565b611312565b6112f8835f0151601b60058560ff16901b1761131a565b611311835f01518267ffffffffffffffff166008611526565b5b5b5b5b505050565b5f825f01515190505f60018261133091906124e6565b905083602001518210611354576113538460028361134e9190612707565b6115a2565b5b8351602083820101848153815183111561136c578282525b505050505050565b5f60018261138291906124e6565b835110156113c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bc90612792565b60405180910390fd5b8282815181106113d8576113d7611d99565b5b602001015160f81c60f81b60f81c905092915050565b5f6002826113fc91906124e6565b8351101561143f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143690612792565b60405180910390fd5b5f8260200184015190508060f01c91505092915050565b5f60048261146491906124e6565b835110156114a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149e90612792565b60405180910390fd5b5f8260200184015190508060e01c91505092915050565b5f6008826114cc91906124e6565b8351101561150f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150690612792565b60405180910390fd5b5f8260200184015190508060c01c91505092915050565b5f835f01515190505f818361153b91906124e6565b905084602001518111156115605761155f8560028361155a9190612707565b6115a2565b5b5f60018461010061157191906128df565b61157b91906126d4565b905085518281018683198251161781528151841115611598578382525b5050505050505050565b5f825f015190506115b3838361116f565b6115bd83826115c2565b505050565b5f815190505f835f01515190505f82826115dc91906124e6565b9050846020015181111561160157611600856002836115fb9190612707565b6115a2565b5b5f808651805185602083010193508085111561161b578482525b60208801925050505b60208510611662578051825260208261163d91906124e6565b915060208161164c91906124e6565b905060208561165b91906126d4565b9450611624565b5f8511156116a5575f600186602061167a91906126d4565b61010061168791906128df565b61169191906126d4565b905080198251168184511681811785525050505b50505050505050565b60405180602001604052806116c16116c7565b81525090565b6040518060400160405280606081526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b611703816116f1565b811461170d575f80fd5b50565b5f8135905061171e816116fa565b92915050565b5f60208284031215611739576117386116e9565b5b5f61174684828501611710565b91505092915050565b5f67ffffffffffffffff82169050919050565b61176b8161174f565b82525050565b5f8160070b9050919050565b61178681611771565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6117ce8261178c565b6117d88185611796565b93506117e88185602086016117a6565b6117f1816117b4565b840191505092915050565b5f60a08201905061180f5f830188611762565b61181c602083018761177d565b818103604083015261182e81866117c4565b905061183d6060830185611762565b818103608083015261184f81846117c4565b90509695505050505050565b6118648161174f565b811461186e575f80fd5b50565b5f8135905061187f8161185b565b92915050565b5f6020828403121561189a576118996116e9565b5b5f6118a784828501611871565b91505092915050565b6118b9816116f1565b82525050565b5f6020820190506118d25f8301846118b0565b92915050565b5f8115159050919050565b6118ec816118d8565b82525050565b5f6020820190506119055f8301846118e3565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61193d816116f1565b82525050565b5f61194e8383611934565b60208301905092915050565b5f602082019050919050565b5f6119708261190b565b61197a8185611915565b935061198583611925565b805f5b838110156119b557815161199c8882611943565b97506119a78361195a565b925050600181019050611988565b5085935050505092915050565b5f6020820190508181035f8301526119da8184611966565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611a20826117b4565b810181811067ffffffffffffffff82111715611a3f57611a3e6119ea565b5b80604052505050565b5f611a516116e0565b9050611a5d8282611a17565b919050565b5f67ffffffffffffffff821115611a7c57611a7b6119ea565b5b611a85826117b4565b9050602081019050919050565b828183375f83830152505050565b5f611ab2611aad84611a62565b611a48565b905082815260208101848484011115611ace57611acd6119e6565b5b611ad9848285611a92565b509392505050565b5f82601f830112611af557611af46119e2565b5b8135611b05848260208601611aa0565b91505092915050565b5f805f60608486031215611b2557611b246116e9565b5b5f611b3286828701611871565b9350506020611b4386828701611871565b925050604084013567ffffffffffffffff811115611b6457611b636116ed565b5b611b7086828701611ae1565b9150509250925092565b5f606082019050611b8d5f830186611762565b611b9a6020830185611762565b8181036040830152611bac81846117c4565b9050949350505050565b5f8060408385031215611bcc57611bcb6116e9565b5b5f611bd985828601611871565b9250506020611bea85828601611710565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611c3857607f821691505b602082108103611c4b57611c4a611bf4565b5b50919050565b5f82825260208201905092915050565b7f496e76616c696420636f646563000000000000000000000000000000000000005f82015250565b5f611c95600d83611c51565b9150611ca082611c61565b602082019050919050565b5f6020820190508181035f830152611cc281611c89565b9050919050565b7f496e76616c6964206d6574686f640000000000000000000000000000000000005f82015250565b5f611cfd600e83611c51565b9150611d0882611cc9565b602082019050919050565b5f6020820190508181035f830152611d2a81611cf1565b9050919050565b7f496e76616c6964206e6f74696669636174696f6e20696e6465780000000000005f82015250565b5f611d65601a83611c51565b9150611d7082611d31565b602082019050919050565b5f6020820190508181035f830152611d9281611d59565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f496e76616c696420706172616d73206f75746572207475706c650000000000005f82015250565b5f611dfa601a83611c51565b9150611e0582611dc6565b602082019050919050565b5f6020820190508181035f830152611e2781611dee565b9050919050565b7f496e76616c6964206e6f6e20706f73697469766520736563746f7273206669655f8201527f6c64000000000000000000000000000000000000000000000000000000000000602082015250565b5f611e88602283611c51565b9150611e9382611e2e565b604082019050919050565b5f6020820190508181035f830152611eb581611e7c565b9050919050565b7f496e76616c696420536563746f724368616e676573207475706c6500000000005f82015250565b5f611ef0601b83611c51565b9150611efb82611ebc565b602082019050919050565b5f6020820190508181035f830152611f1d81611ee4565b9050919050565b7f496e76616c696420706172616d7320696e6e65720000000000000000000000005f82015250565b5f611f58601483611c51565b9150611f6382611f24565b602082019050919050565b5f6020820190508181035f830152611f8581611f4c565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611fe87fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611fad565b611ff28683611fad565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61202d612028612023846116f1565b61200a565b6116f1565b9050919050565b5f819050919050565b61204683612013565b61205a61205282612034565b848454611fb9565b825550505050565b5f90565b61206e612062565b61207981848461203d565b505050565b5b8181101561209c576120915f82612066565b60018101905061207f565b5050565b601f8211156120e1576120b281611f8c565b6120bb84611f9e565b810160208510156120ca578190505b6120de6120d685611f9e565b83018261207e565b50505b505050565b5f82821c905092915050565b5f6121015f19846008026120e6565b1980831691505092915050565b5f61211983836120f2565b9150826002028217905092915050565b6121328261178c565b67ffffffffffffffff81111561214b5761214a6119ea565b5b6121558254611c21565b6121608282856120a0565b5f60209050601f831160018114612191575f841561217f578287015190505b612189858261210e565b8655506121f0565b601f19841661219f86611f8c565b5f5b828110156121c6578489015182556001820191506020850194506020810190506121a1565b868310156121e357848901516121df601f8916826120f2565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61222f826116f1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612261576122606121f8565b5b600182019050919050565b7f696e76616c6964206d616a20286578706563746564204d616a417272617929005f82015250565b5f6122a0601f83611c51565b91506122ab8261226c565b602082019050919050565b5f6020820190508181035f8301526122cd81612294565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a556e7369676e655f8201527f64496e7429000000000000000000000000000000000000000000000000000000602082015250565b5f61232e602583611c51565b9150612339826122d4565b604082019050919050565b5f6020820190508181035f83015261235b81612322565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a5369676e6564495f8201527f6e74206f72204d616a556e7369676e6564496e74290000000000000000000000602082015250565b5f6123bc603583611c51565b91506123c782612362565b604082019050919050565b5f6020820190508181035f8301526123e9816123b0565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a546167206f72205f8201527f4d616a42797465537472696e6729000000000000000000000000000000000000602082015250565b5f61244a602e83611c51565b9150612455826123f0565b604082019050919050565b5f6020820190508181035f8301526124778161243e565b9050919050565b7f6578706563746564204d616a42797465537472696e67000000000000000000005f82015250565b5f6124b2601683611c51565b91506124bd8261247e565b602082019050919050565b5f6020820190508181035f8301526124df816124a6565b9050919050565b5f6124f0826116f1565b91506124fb836116f1565b9250828201905080821115612513576125126121f8565b5b92915050565b7f63616e6e6f742068616e646c65206865616465727320776974682065787472615f8201527f203e203237000000000000000000000000000000000000000000000000000000602082015250565b5f612573602583611c51565b915061257e82612519565b604082019050919050565b5f6020820190508181035f8301526125a081612567565b9050919050565b7f696e76616c69642063626f7200000000000000000000000000000000000000005f82015250565b5f6125db600c83611c51565b91506125e6826125a7565b602082019050919050565b5f6020820190508181035f830152612608816125cf565b9050919050565b7f45787065637465644c6f7756616c7565323700000000000000000000000000005f82015250565b5f612643601283611c51565b915061264e8261260f565b602082019050919050565b5f6020820190508181035f83015261267081612637565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6126ae826116f1565b91506126b9836116f1565b9250826126c9576126c8612677565b5b828206905092915050565b5f6126de826116f1565b91506126e9836116f1565b9250828203905081811115612701576127006121f8565b5b92915050565b5f612711826116f1565b915061271c836116f1565b925082820261272a816116f1565b91508282048414831517612741576127406121f8565b5b5092915050565b7f736c6963696e67206f7574206f662072616e67650000000000000000000000005f82015250565b5f61277c601483611c51565b915061278782612748565b602082019050919050565b5f6020820190508181035f8301526127a981612770565b9050919050565b5f8160011c9050919050565b5f808291508390505b6001851115612805578086048111156127e1576127e06121f8565b5b60018516156127f05780820291505b80810290506127fe856127b0565b94506127c5565b94509492505050565b5f8261281d57600190506128d8565b8161282a575f90506128d8565b8160018114612840576002811461284a57612879565b60019150506128d8565b60ff84111561285c5761285b6121f8565b5b8360020a915084821115612873576128726121f8565b5b506128d8565b5060208310610133831016604e8410600b84101617156128ae5782820a9050838111156128a9576128a86121f8565b5b6128d8565b6128bb84848460016127bc565b925090508184048111156128d2576128d16121f8565b5b81810290505b9392505050565b5f6128e9826116f1565b91506128f4836116f1565b92506129217fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461280e565b90509291505056fea2646970667358221220e56cfef66393cb55b61bd51865f516a291563c49c685a0493ac98f2a6243181064736f6c63430008190033 +608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063868e10c411610059578063868e10c41461013c5780638777d4d71461016e578063c153e97f1461018c578063ec680ea2146101c057610086565b806334c1f9441461008a57806344794f4f146100be5780634cbb3601146100ee578063529825951461010c575b5f80fd5b6100a4600480360381019061009f9190611724565b6101f0565b6040516100b59594939291906117fc565b60405180910390f35b6100d860048036038101906100d39190611885565b61036e565b6040516100e591906118bf565b60405180910390f35b6100f661039f565b60405161010391906118f2565b60405180910390f35b61012660048036038101906101219190611885565b6103b1565b60405161013391906119c2565b60405180910390f35b61015660048036038101906101519190611b0e565b61042c565b60405161016593929190611b7a565b60405180910390f35b610176610501565b60405161018391906118bf565b60405180910390f35b6101a660048036038101906101a19190611724565b610507565b6040516101b79594939291906117fc565b60405180910390f35b6101da60048036038101906101d59190611bb6565b61074a565b6040516101e791906118bf565b60405180910390f35b5f81815481106101fe575f80fd5b905f5260205f2090600402015f91509050805f015f9054906101000a900467ffffffffffffffff1690805f0160089054906101000a900460070b9080600101805461024890611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461027490611c21565b80156102bf5780601f10610296576101008083540402835291602001916102bf565b820191905f5260205f20905b8154815290600101906020018083116102a257829003601f168201915b505050505090806002015f9054906101000a900467ffffffffffffffff16908060030180546102ed90611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461031990611c21565b80156103645780601f1061033b57610100808354040283529160200191610364565b820191905f5260205f20905b81548152906001019060200180831161034757829003601f168201915b5050505050905085565b5f60015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f20805490509050919050565b60035f9054906101000a900460ff1681565b606060015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561042057602002820191905f5260205f20905b81548152602001906001019080831161040c575b50505050509050919050565b5f80606060518567ffffffffffffffff161461047d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047490611cab565b60405180910390fd5b637942460367ffffffffffffffff168667ffffffffffffffff16036104bd575f6104a685610775565b90505f605190505f818394509450945050506104f8565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ef90611d13565b60405180910390fd5b93509350939050565b60025481565b5f8060605f60605f805490508610610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b90611d7b565b60405180910390fd5b5f80878154811061056857610567611d99565b5b905f5260205f2090600402016040518060a00160405290815f82015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020015f820160089054906101000a900460070b60070b60070b81526020016001820180546105db90611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461060790611c21565b80156106525780601f1061062957610100808354040283529160200191610652565b820191905f5260205f20905b81548152906001019060200180831161063557829003601f168201915b50505050508152602001600282015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160038201805461069c90611c21565b80601f01602080910402602001604051908101604052809291908181526020018280546106c890611c21565b80156107135780601f106106ea57610100808354040283529160200191610713565b820191905f5260205f20905b8154815290600101906020018083116106f657829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b6001602052815f5260405f208181548110610763575f80fd5b905f5260205f20015f91509150505481565b60605f80610783845f610b62565b91509150600182146107ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c190611e10565b60405180910390fd5b5f6107d5855f610b62565b80935081925050505f811161081f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081690611e9e565b60405180910390fd5b6108276116ae565b6108316040610be1565b905061083e816001610bfb565b6108488183610bfb565b5f5b82811015610b4d5761085c8785610b62565b8095508196505050600385146108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089e90611f06565b60405180910390fd5b5f6108b28886610c0b565b80965081925050505f6108c58987610c89565b80975081925050505f6108d88a88610b62565b80985081925050506108eb856001610bfb565b6108f58582610bfb565b5f5b81811015610b3c576109098b89610b62565b809950819a50505060038914610954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094b90611f6e565b60405180910390fd5b60606109608c8a610d18565b809a5081925050505f6109738d8b610c0b565b809b50819250505060606109878e8c610d18565b809c5081925050505f808054905090505f6040518060a001604052808a67ffffffffffffffff1681526020018960070b81526020018681526020018567ffffffffffffffff16815260200184815250908060018154018082558091505060019003905f5260205f2090600402015f909190919091505f820151815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506020820151815f0160086101000a81548167ffffffffffffffff021916908360070b67ffffffffffffffff1602179055506040820151816001019081610a6e9190612129565b506060820151816002015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506080820151816003019081610ab29190612129565b50505060015f8967ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f909190919091505560025f815480929190610b1090612225565b9190505550610b208a6001610bfb565b610b2b8a6001610f1a565b5050505080806001019150506108f7565b50505050808060010191505061084a565b50610b5781610f43565b945050505050919050565b5f805f80610b708686610f53565b8167ffffffffffffffff169150809750819350829450505050600460ff168260ff1614610bd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc9906122b6565b60405180910390fd5b80859350935050509250929050565b610be96116ae565b610bf6815f01518361116f565b919050565b610c07826004836111d8565b5050565b5f805f80610c198686610f53565b8167ffffffffffffffff1691508097508193508294505050505f60ff168260ff1614610c7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7190612344565b60405180910390fd5b80859350935050509250929050565b5f805f80610c978686610f53565b8167ffffffffffffffff169150809750819350829450505050600160ff168260ff161480610cca57505f60ff168260ff16145b610d09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d00906123d2565b60405180910390fd5b80859350935050509250929050565b60605f805f610d278686610f53565b8167ffffffffffffffff169150809750819350829450505050600660ff168260ff161480610d5b5750600260ff168260ff16145b610d9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9190612460565b60405180910390fd5b600660ff168260ff1603610e1557610db28686610f53565b8167ffffffffffffffff169150809750819350829450505050600260ff168260ff1614610e14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0b906124c8565b60405180910390fd5b5b5f8186610e2291906124e6565b90505f8267ffffffffffffffff811115610e3f57610e3e6119ea565b5b6040519080825280601f01601f191660200182016040528015610e715781602001600182028036833780820191505090505b5090505f808890505b83811015610efc57898181518110610e9557610e94611d99565b5b602001015160f81c60f81b838381518110610eb357610eb2611d99565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053508180610eec90612225565b9250508080600101915050610e7a565b50818489610f0a91906124e6565b9650965050505050509250929050565b610f3f825f015182610f2d576014610f30565b60155b6005600760ff16901b1761131a565b5050565b6060815f01515f01519050919050565b5f805f80610f618686611374565b9050600185610f7091906124e6565b94505f600560e0831660ff16901c90505f601f83169050601c8160ff1610610fcd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc490612589565b60405180910390fd5b60188160ff161015610ff0578181888160ff169150955095509550505050611168565b60188160ff1603611076575f6110068989611374565b905060018861101591906124e6565b975060188160ff16101561105e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611055906125f1565b60405180910390fd5b8281898160ff16915096509650965050505050611168565b60198160ff16036110b6575f61108c89896113ee565b905060028861109b91906124e6565b97508281898161ffff16915096509650965050505050611168565b601a8160ff16036110f8575f6110cc8989611456565b90506004886110db91906124e6565b97508281898163ffffffff16915096509650965050505050611168565b601b8160ff161461113e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113590612659565b60405180910390fd5b5f61114989896114be565b905060088861115891906124e6565b9750828189965096509650505050505b9250925092565b5f60208261117d91906126a4565b146111a95760208161118f91906126a4565b602061119b91906126d4565b816111a691906124e6565b90505b808260200181815250506040518083525f8152818101602001818110156111ce575f80fd5b8060405250505050565b60178167ffffffffffffffff161161120857611203835f01518260058560ff16901b60ff161761131a565b611315565b60ff8167ffffffffffffffff161161124f57611231835f0151601860058560ff16901b1761131a565b61124a835f01518267ffffffffffffffff166001611526565b611314565b61ffff8167ffffffffffffffff161161129757611279835f0151601960058560ff16901b1761131a565b611292835f01518267ffffffffffffffff166002611526565b611313565b63ffffffff8167ffffffffffffffff16116112e1576112c3835f0151601a60058560ff16901b1761131a565b6112dc835f01518267ffffffffffffffff166004611526565b611312565b6112f8835f0151601b60058560ff16901b1761131a565b611311835f01518267ffffffffffffffff166008611526565b5b5b5b5b505050565b5f825f01515190505f60018261133091906124e6565b905083602001518210611354576113538460028361134e9190612707565b6115a2565b5b8351602083820101848153815183111561136c578282525b505050505050565b5f60018261138291906124e6565b835110156113c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bc90612792565b60405180910390fd5b8282815181106113d8576113d7611d99565b5b602001015160f81c60f81b60f81c905092915050565b5f6002826113fc91906124e6565b8351101561143f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143690612792565b60405180910390fd5b5f8260200184015190508060f01c91505092915050565b5f60048261146491906124e6565b835110156114a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149e90612792565b60405180910390fd5b5f8260200184015190508060e01c91505092915050565b5f6008826114cc91906124e6565b8351101561150f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150690612792565b60405180910390fd5b5f8260200184015190508060c01c91505092915050565b5f835f01515190505f818361153b91906124e6565b905084602001518111156115605761155f8560028361155a9190612707565b6115a2565b5b5f60018461010061157191906128df565b61157b91906126d4565b905085518281018683198251161781528151841115611598578382525b5050505050505050565b5f825f015190506115b3838361116f565b6115bd83826115c2565b505050565b5f815190505f835f01515190505f82826115dc91906124e6565b9050846020015181111561160157611600856002836115fb9190612707565b6115a2565b5b5f808651805185602083010193508085111561161b578482525b60208801925050505b60208510611662578051825260208261163d91906124e6565b915060208161164c91906124e6565b905060208561165b91906126d4565b9450611624565b5f8511156116a5575f600186602061167a91906126d4565b61010061168791906128df565b61169191906126d4565b905080198251168184511681811785525050505b50505050505050565b60405180602001604052806116c16116c7565b81525090565b6040518060400160405280606081526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b611703816116f1565b811461170d575f80fd5b50565b5f8135905061171e816116fa565b92915050565b5f60208284031215611739576117386116e9565b5b5f61174684828501611710565b91505092915050565b5f67ffffffffffffffff82169050919050565b61176b8161174f565b82525050565b5f8160070b9050919050565b61178681611771565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6117ce8261178c565b6117d88185611796565b93506117e88185602086016117a6565b6117f1816117b4565b840191505092915050565b5f60a08201905061180f5f830188611762565b61181c602083018761177d565b818103604083015261182e81866117c4565b905061183d6060830185611762565b818103608083015261184f81846117c4565b90509695505050505050565b6118648161174f565b811461186e575f80fd5b50565b5f8135905061187f8161185b565b92915050565b5f6020828403121561189a576118996116e9565b5b5f6118a784828501611871565b91505092915050565b6118b9816116f1565b82525050565b5f6020820190506118d25f8301846118b0565b92915050565b5f8115159050919050565b6118ec816118d8565b82525050565b5f6020820190506119055f8301846118e3565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61193d816116f1565b82525050565b5f61194e8383611934565b60208301905092915050565b5f602082019050919050565b5f6119708261190b565b61197a8185611915565b935061198583611925565b805f5b838110156119b557815161199c8882611943565b97506119a78361195a565b925050600181019050611988565b5085935050505092915050565b5f6020820190508181035f8301526119da8184611966565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611a20826117b4565b810181811067ffffffffffffffff82111715611a3f57611a3e6119ea565b5b80604052505050565b5f611a516116e0565b9050611a5d8282611a17565b919050565b5f67ffffffffffffffff821115611a7c57611a7b6119ea565b5b611a85826117b4565b9050602081019050919050565b828183375f83830152505050565b5f611ab2611aad84611a62565b611a48565b905082815260208101848484011115611ace57611acd6119e6565b5b611ad9848285611a92565b509392505050565b5f82601f830112611af557611af46119e2565b5b8135611b05848260208601611aa0565b91505092915050565b5f805f60608486031215611b2557611b246116e9565b5b5f611b3286828701611871565b9350506020611b4386828701611871565b925050604084013567ffffffffffffffff811115611b6457611b636116ed565b5b611b7086828701611ae1565b9150509250925092565b5f606082019050611b8d5f830186611762565b611b9a6020830185611762565b8181036040830152611bac81846117c4565b9050949350505050565b5f8060408385031215611bcc57611bcb6116e9565b5b5f611bd985828601611871565b9250506020611bea85828601611710565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611c3857607f821691505b602082108103611c4b57611c4a611bf4565b5b50919050565b5f82825260208201905092915050565b7f496e76616c696420636f646563000000000000000000000000000000000000005f82015250565b5f611c95600d83611c51565b9150611ca082611c61565b602082019050919050565b5f6020820190508181035f830152611cc281611c89565b9050919050565b7f496e76616c6964206d6574686f640000000000000000000000000000000000005f82015250565b5f611cfd600e83611c51565b9150611d0882611cc9565b602082019050919050565b5f6020820190508181035f830152611d2a81611cf1565b9050919050565b7f496e76616c6964206e6f74696669636174696f6e20696e6465780000000000005f82015250565b5f611d65601a83611c51565b9150611d7082611d31565b602082019050919050565b5f6020820190508181035f830152611d9281611d59565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f496e76616c696420706172616d73206f75746572207475706c650000000000005f82015250565b5f611dfa601a83611c51565b9150611e0582611dc6565b602082019050919050565b5f6020820190508181035f830152611e2781611dee565b9050919050565b7f496e76616c6964206e6f6e20706f73697469766520736563746f7273206669655f8201527f6c64000000000000000000000000000000000000000000000000000000000000602082015250565b5f611e88602283611c51565b9150611e9382611e2e565b604082019050919050565b5f6020820190508181035f830152611eb581611e7c565b9050919050565b7f496e76616c696420536563746f724368616e676573207475706c6500000000005f82015250565b5f611ef0601b83611c51565b9150611efb82611ebc565b602082019050919050565b5f6020820190508181035f830152611f1d81611ee4565b9050919050565b7f496e76616c696420706172616d7320696e6e65720000000000000000000000005f82015250565b5f611f58601483611c51565b9150611f6382611f24565b602082019050919050565b5f6020820190508181035f830152611f8581611f4c565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611fe87fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611fad565b611ff28683611fad565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61202d612028612023846116f1565b61200a565b6116f1565b9050919050565b5f819050919050565b61204683612013565b61205a61205282612034565b848454611fb9565b825550505050565b5f90565b61206e612062565b61207981848461203d565b505050565b5b8181101561209c576120915f82612066565b60018101905061207f565b5050565b601f8211156120e1576120b281611f8c565b6120bb84611f9e565b810160208510156120ca578190505b6120de6120d685611f9e565b83018261207e565b50505b505050565b5f82821c905092915050565b5f6121015f19846008026120e6565b1980831691505092915050565b5f61211983836120f2565b9150826002028217905092915050565b6121328261178c565b67ffffffffffffffff81111561214b5761214a6119ea565b5b6121558254611c21565b6121608282856120a0565b5f60209050601f831160018114612191575f841561217f578287015190505b612189858261210e565b8655506121f0565b601f19841661219f86611f8c565b5f5b828110156121c6578489015182556001820191506020850194506020810190506121a1565b868310156121e357848901516121df601f8916826120f2565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61222f826116f1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612261576122606121f8565b5b600182019050919050565b7f696e76616c6964206d616a20286578706563746564204d616a417272617929005f82015250565b5f6122a0601f83611c51565b91506122ab8261226c565b602082019050919050565b5f6020820190508181035f8301526122cd81612294565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a556e7369676e655f8201527f64496e7429000000000000000000000000000000000000000000000000000000602082015250565b5f61232e602583611c51565b9150612339826122d4565b604082019050919050565b5f6020820190508181035f83015261235b81612322565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a5369676e6564495f8201527f6e74206f72204d616a556e7369676e6564496e74290000000000000000000000602082015250565b5f6123bc603583611c51565b91506123c782612362565b604082019050919050565b5f6020820190508181035f8301526123e9816123b0565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a546167206f72205f8201527f4d616a42797465537472696e6729000000000000000000000000000000000000602082015250565b5f61244a602e83611c51565b9150612455826123f0565b604082019050919050565b5f6020820190508181035f8301526124778161243e565b9050919050565b7f6578706563746564204d616a42797465537472696e67000000000000000000005f82015250565b5f6124b2601683611c51565b91506124bd8261247e565b602082019050919050565b5f6020820190508181035f8301526124df816124a6565b9050919050565b5f6124f0826116f1565b91506124fb836116f1565b9250828201905080821115612513576125126121f8565b5b92915050565b7f63616e6e6f742068616e646c65206865616465727320776974682065787472615f8201527f203e203237000000000000000000000000000000000000000000000000000000602082015250565b5f612573602583611c51565b915061257e82612519565b604082019050919050565b5f6020820190508181035f8301526125a081612567565b9050919050565b7f696e76616c69642063626f7200000000000000000000000000000000000000005f82015250565b5f6125db600c83611c51565b91506125e6826125a7565b602082019050919050565b5f6020820190508181035f830152612608816125cf565b9050919050565b7f45787065637465644c6f7756616c7565323700000000000000000000000000005f82015250565b5f612643601283611c51565b915061264e8261260f565b602082019050919050565b5f6020820190508181035f83015261267081612637565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6126ae826116f1565b91506126b9836116f1565b9250826126c9576126c8612677565b5b828206905092915050565b5f6126de826116f1565b91506126e9836116f1565b9250828203905081811115612701576127006121f8565b5b92915050565b5f612711826116f1565b915061271c836116f1565b925082820261272a816116f1565b91508282048414831517612741576127406121f8565b5b5092915050565b7f736c6963696e67206f7574206f662072616e67650000000000000000000000005f82015250565b5f61277c601483611c51565b915061278782612748565b602082019050919050565b5f6020820190508181035f8301526127a981612770565b9050919050565b5f8160011c9050919050565b5f808291508390505b6001851115612805578086048111156127e1576127e06121f8565b5b60018516156127f05780820291505b80810290506127fe856127b0565b94506127c5565b94509492505050565b5f8261281d57600190506128d8565b8161282a575f90506128d8565b8160018114612840576002811461284a57612879565b60019150506128d8565b60ff84111561285c5761285b6121f8565b5b8360020a915084821115612873576128726121f8565b5b506128d8565b5060208310610133831016604e8410600b84101617156128ae5782820a9050838111156128a9576128a86121f8565b5b6128d8565b6128bb84848460016127bc565b925090508184048111156128d2576128d16121f8565b5b81810290505b9392505050565b5f6128e9826116f1565b91506128f4836116f1565b92506129217fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461280e565b90509291505056fea2646970667358221220e56cfef66393cb55b61bd51865f516a291563c49c685a0493ac98f2a6243181064736f6c63430008190033 From b89566206bb48dc0e3ad7e9bc3b4d6887fb50250 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Fri, 29 Aug 2025 02:06:23 +0200 Subject: [PATCH 15/39] Use bytecode.object not deployedBytecode --- actors/evm/tests/contracts/NotificationReceiver.hex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actors/evm/tests/contracts/NotificationReceiver.hex b/actors/evm/tests/contracts/NotificationReceiver.hex index 2fa475a46..b03c07a8a 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.hex +++ b/actors/evm/tests/contracts/NotificationReceiver.hex @@ -1 +1 @@ -608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063868e10c411610059578063868e10c41461013c5780638777d4d71461016e578063c153e97f1461018c578063ec680ea2146101c057610086565b806334c1f9441461008a57806344794f4f146100be5780634cbb3601146100ee578063529825951461010c575b5f80fd5b6100a4600480360381019061009f9190611724565b6101f0565b6040516100b59594939291906117fc565b60405180910390f35b6100d860048036038101906100d39190611885565b61036e565b6040516100e591906118bf565b60405180910390f35b6100f661039f565b60405161010391906118f2565b60405180910390f35b61012660048036038101906101219190611885565b6103b1565b60405161013391906119c2565b60405180910390f35b61015660048036038101906101519190611b0e565b61042c565b60405161016593929190611b7a565b60405180910390f35b610176610501565b60405161018391906118bf565b60405180910390f35b6101a660048036038101906101a19190611724565b610507565b6040516101b79594939291906117fc565b60405180910390f35b6101da60048036038101906101d59190611bb6565b61074a565b6040516101e791906118bf565b60405180910390f35b5f81815481106101fe575f80fd5b905f5260205f2090600402015f91509050805f015f9054906101000a900467ffffffffffffffff1690805f0160089054906101000a900460070b9080600101805461024890611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461027490611c21565b80156102bf5780601f10610296576101008083540402835291602001916102bf565b820191905f5260205f20905b8154815290600101906020018083116102a257829003601f168201915b505050505090806002015f9054906101000a900467ffffffffffffffff16908060030180546102ed90611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461031990611c21565b80156103645780601f1061033b57610100808354040283529160200191610364565b820191905f5260205f20905b81548152906001019060200180831161034757829003601f168201915b5050505050905085565b5f60015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f20805490509050919050565b60035f9054906101000a900460ff1681565b606060015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561042057602002820191905f5260205f20905b81548152602001906001019080831161040c575b50505050509050919050565b5f80606060518567ffffffffffffffff161461047d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047490611cab565b60405180910390fd5b637942460367ffffffffffffffff168667ffffffffffffffff16036104bd575f6104a685610775565b90505f605190505f818394509450945050506104f8565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ef90611d13565b60405180910390fd5b93509350939050565b60025481565b5f8060605f60605f805490508610610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b90611d7b565b60405180910390fd5b5f80878154811061056857610567611d99565b5b905f5260205f2090600402016040518060a00160405290815f82015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020015f820160089054906101000a900460070b60070b60070b81526020016001820180546105db90611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461060790611c21565b80156106525780601f1061062957610100808354040283529160200191610652565b820191905f5260205f20905b81548152906001019060200180831161063557829003601f168201915b50505050508152602001600282015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160038201805461069c90611c21565b80601f01602080910402602001604051908101604052809291908181526020018280546106c890611c21565b80156107135780601f106106ea57610100808354040283529160200191610713565b820191905f5260205f20905b8154815290600101906020018083116106f657829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b6001602052815f5260405f208181548110610763575f80fd5b905f5260205f20015f91509150505481565b60605f80610783845f610b62565b91509150600182146107ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c190611e10565b60405180910390fd5b5f6107d5855f610b62565b80935081925050505f811161081f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081690611e9e565b60405180910390fd5b6108276116ae565b6108316040610be1565b905061083e816001610bfb565b6108488183610bfb565b5f5b82811015610b4d5761085c8785610b62565b8095508196505050600385146108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089e90611f06565b60405180910390fd5b5f6108b28886610c0b565b80965081925050505f6108c58987610c89565b80975081925050505f6108d88a88610b62565b80985081925050506108eb856001610bfb565b6108f58582610bfb565b5f5b81811015610b3c576109098b89610b62565b809950819a50505060038914610954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094b90611f6e565b60405180910390fd5b60606109608c8a610d18565b809a5081925050505f6109738d8b610c0b565b809b50819250505060606109878e8c610d18565b809c5081925050505f808054905090505f6040518060a001604052808a67ffffffffffffffff1681526020018960070b81526020018681526020018567ffffffffffffffff16815260200184815250908060018154018082558091505060019003905f5260205f2090600402015f909190919091505f820151815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506020820151815f0160086101000a81548167ffffffffffffffff021916908360070b67ffffffffffffffff1602179055506040820151816001019081610a6e9190612129565b506060820151816002015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506080820151816003019081610ab29190612129565b50505060015f8967ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f909190919091505560025f815480929190610b1090612225565b9190505550610b208a6001610bfb565b610b2b8a6001610f1a565b5050505080806001019150506108f7565b50505050808060010191505061084a565b50610b5781610f43565b945050505050919050565b5f805f80610b708686610f53565b8167ffffffffffffffff169150809750819350829450505050600460ff168260ff1614610bd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc9906122b6565b60405180910390fd5b80859350935050509250929050565b610be96116ae565b610bf6815f01518361116f565b919050565b610c07826004836111d8565b5050565b5f805f80610c198686610f53565b8167ffffffffffffffff1691508097508193508294505050505f60ff168260ff1614610c7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7190612344565b60405180910390fd5b80859350935050509250929050565b5f805f80610c978686610f53565b8167ffffffffffffffff169150809750819350829450505050600160ff168260ff161480610cca57505f60ff168260ff16145b610d09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d00906123d2565b60405180910390fd5b80859350935050509250929050565b60605f805f610d278686610f53565b8167ffffffffffffffff169150809750819350829450505050600660ff168260ff161480610d5b5750600260ff168260ff16145b610d9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9190612460565b60405180910390fd5b600660ff168260ff1603610e1557610db28686610f53565b8167ffffffffffffffff169150809750819350829450505050600260ff168260ff1614610e14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0b906124c8565b60405180910390fd5b5b5f8186610e2291906124e6565b90505f8267ffffffffffffffff811115610e3f57610e3e6119ea565b5b6040519080825280601f01601f191660200182016040528015610e715781602001600182028036833780820191505090505b5090505f808890505b83811015610efc57898181518110610e9557610e94611d99565b5b602001015160f81c60f81b838381518110610eb357610eb2611d99565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053508180610eec90612225565b9250508080600101915050610e7a565b50818489610f0a91906124e6565b9650965050505050509250929050565b610f3f825f015182610f2d576014610f30565b60155b6005600760ff16901b1761131a565b5050565b6060815f01515f01519050919050565b5f805f80610f618686611374565b9050600185610f7091906124e6565b94505f600560e0831660ff16901c90505f601f83169050601c8160ff1610610fcd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc490612589565b60405180910390fd5b60188160ff161015610ff0578181888160ff169150955095509550505050611168565b60188160ff1603611076575f6110068989611374565b905060018861101591906124e6565b975060188160ff16101561105e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611055906125f1565b60405180910390fd5b8281898160ff16915096509650965050505050611168565b60198160ff16036110b6575f61108c89896113ee565b905060028861109b91906124e6565b97508281898161ffff16915096509650965050505050611168565b601a8160ff16036110f8575f6110cc8989611456565b90506004886110db91906124e6565b97508281898163ffffffff16915096509650965050505050611168565b601b8160ff161461113e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113590612659565b60405180910390fd5b5f61114989896114be565b905060088861115891906124e6565b9750828189965096509650505050505b9250925092565b5f60208261117d91906126a4565b146111a95760208161118f91906126a4565b602061119b91906126d4565b816111a691906124e6565b90505b808260200181815250506040518083525f8152818101602001818110156111ce575f80fd5b8060405250505050565b60178167ffffffffffffffff161161120857611203835f01518260058560ff16901b60ff161761131a565b611315565b60ff8167ffffffffffffffff161161124f57611231835f0151601860058560ff16901b1761131a565b61124a835f01518267ffffffffffffffff166001611526565b611314565b61ffff8167ffffffffffffffff161161129757611279835f0151601960058560ff16901b1761131a565b611292835f01518267ffffffffffffffff166002611526565b611313565b63ffffffff8167ffffffffffffffff16116112e1576112c3835f0151601a60058560ff16901b1761131a565b6112dc835f01518267ffffffffffffffff166004611526565b611312565b6112f8835f0151601b60058560ff16901b1761131a565b611311835f01518267ffffffffffffffff166008611526565b5b5b5b5b505050565b5f825f01515190505f60018261133091906124e6565b905083602001518210611354576113538460028361134e9190612707565b6115a2565b5b8351602083820101848153815183111561136c578282525b505050505050565b5f60018261138291906124e6565b835110156113c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bc90612792565b60405180910390fd5b8282815181106113d8576113d7611d99565b5b602001015160f81c60f81b60f81c905092915050565b5f6002826113fc91906124e6565b8351101561143f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143690612792565b60405180910390fd5b5f8260200184015190508060f01c91505092915050565b5f60048261146491906124e6565b835110156114a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149e90612792565b60405180910390fd5b5f8260200184015190508060e01c91505092915050565b5f6008826114cc91906124e6565b8351101561150f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150690612792565b60405180910390fd5b5f8260200184015190508060c01c91505092915050565b5f835f01515190505f818361153b91906124e6565b905084602001518111156115605761155f8560028361155a9190612707565b6115a2565b5b5f60018461010061157191906128df565b61157b91906126d4565b905085518281018683198251161781528151841115611598578382525b5050505050505050565b5f825f015190506115b3838361116f565b6115bd83826115c2565b505050565b5f815190505f835f01515190505f82826115dc91906124e6565b9050846020015181111561160157611600856002836115fb9190612707565b6115a2565b5b5f808651805185602083010193508085111561161b578482525b60208801925050505b60208510611662578051825260208261163d91906124e6565b915060208161164c91906124e6565b905060208561165b91906126d4565b9450611624565b5f8511156116a5575f600186602061167a91906126d4565b61010061168791906128df565b61169191906126d4565b905080198251168184511681811785525050505b50505050505050565b60405180602001604052806116c16116c7565b81525090565b6040518060400160405280606081526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b611703816116f1565b811461170d575f80fd5b50565b5f8135905061171e816116fa565b92915050565b5f60208284031215611739576117386116e9565b5b5f61174684828501611710565b91505092915050565b5f67ffffffffffffffff82169050919050565b61176b8161174f565b82525050565b5f8160070b9050919050565b61178681611771565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6117ce8261178c565b6117d88185611796565b93506117e88185602086016117a6565b6117f1816117b4565b840191505092915050565b5f60a08201905061180f5f830188611762565b61181c602083018761177d565b818103604083015261182e81866117c4565b905061183d6060830185611762565b818103608083015261184f81846117c4565b90509695505050505050565b6118648161174f565b811461186e575f80fd5b50565b5f8135905061187f8161185b565b92915050565b5f6020828403121561189a576118996116e9565b5b5f6118a784828501611871565b91505092915050565b6118b9816116f1565b82525050565b5f6020820190506118d25f8301846118b0565b92915050565b5f8115159050919050565b6118ec816118d8565b82525050565b5f6020820190506119055f8301846118e3565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61193d816116f1565b82525050565b5f61194e8383611934565b60208301905092915050565b5f602082019050919050565b5f6119708261190b565b61197a8185611915565b935061198583611925565b805f5b838110156119b557815161199c8882611943565b97506119a78361195a565b925050600181019050611988565b5085935050505092915050565b5f6020820190508181035f8301526119da8184611966565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611a20826117b4565b810181811067ffffffffffffffff82111715611a3f57611a3e6119ea565b5b80604052505050565b5f611a516116e0565b9050611a5d8282611a17565b919050565b5f67ffffffffffffffff821115611a7c57611a7b6119ea565b5b611a85826117b4565b9050602081019050919050565b828183375f83830152505050565b5f611ab2611aad84611a62565b611a48565b905082815260208101848484011115611ace57611acd6119e6565b5b611ad9848285611a92565b509392505050565b5f82601f830112611af557611af46119e2565b5b8135611b05848260208601611aa0565b91505092915050565b5f805f60608486031215611b2557611b246116e9565b5b5f611b3286828701611871565b9350506020611b4386828701611871565b925050604084013567ffffffffffffffff811115611b6457611b636116ed565b5b611b7086828701611ae1565b9150509250925092565b5f606082019050611b8d5f830186611762565b611b9a6020830185611762565b8181036040830152611bac81846117c4565b9050949350505050565b5f8060408385031215611bcc57611bcb6116e9565b5b5f611bd985828601611871565b9250506020611bea85828601611710565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611c3857607f821691505b602082108103611c4b57611c4a611bf4565b5b50919050565b5f82825260208201905092915050565b7f496e76616c696420636f646563000000000000000000000000000000000000005f82015250565b5f611c95600d83611c51565b9150611ca082611c61565b602082019050919050565b5f6020820190508181035f830152611cc281611c89565b9050919050565b7f496e76616c6964206d6574686f640000000000000000000000000000000000005f82015250565b5f611cfd600e83611c51565b9150611d0882611cc9565b602082019050919050565b5f6020820190508181035f830152611d2a81611cf1565b9050919050565b7f496e76616c6964206e6f74696669636174696f6e20696e6465780000000000005f82015250565b5f611d65601a83611c51565b9150611d7082611d31565b602082019050919050565b5f6020820190508181035f830152611d9281611d59565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f496e76616c696420706172616d73206f75746572207475706c650000000000005f82015250565b5f611dfa601a83611c51565b9150611e0582611dc6565b602082019050919050565b5f6020820190508181035f830152611e2781611dee565b9050919050565b7f496e76616c6964206e6f6e20706f73697469766520736563746f7273206669655f8201527f6c64000000000000000000000000000000000000000000000000000000000000602082015250565b5f611e88602283611c51565b9150611e9382611e2e565b604082019050919050565b5f6020820190508181035f830152611eb581611e7c565b9050919050565b7f496e76616c696420536563746f724368616e676573207475706c6500000000005f82015250565b5f611ef0601b83611c51565b9150611efb82611ebc565b602082019050919050565b5f6020820190508181035f830152611f1d81611ee4565b9050919050565b7f496e76616c696420706172616d7320696e6e65720000000000000000000000005f82015250565b5f611f58601483611c51565b9150611f6382611f24565b602082019050919050565b5f6020820190508181035f830152611f8581611f4c565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611fe87fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611fad565b611ff28683611fad565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61202d612028612023846116f1565b61200a565b6116f1565b9050919050565b5f819050919050565b61204683612013565b61205a61205282612034565b848454611fb9565b825550505050565b5f90565b61206e612062565b61207981848461203d565b505050565b5b8181101561209c576120915f82612066565b60018101905061207f565b5050565b601f8211156120e1576120b281611f8c565b6120bb84611f9e565b810160208510156120ca578190505b6120de6120d685611f9e565b83018261207e565b50505b505050565b5f82821c905092915050565b5f6121015f19846008026120e6565b1980831691505092915050565b5f61211983836120f2565b9150826002028217905092915050565b6121328261178c565b67ffffffffffffffff81111561214b5761214a6119ea565b5b6121558254611c21565b6121608282856120a0565b5f60209050601f831160018114612191575f841561217f578287015190505b612189858261210e565b8655506121f0565b601f19841661219f86611f8c565b5f5b828110156121c6578489015182556001820191506020850194506020810190506121a1565b868310156121e357848901516121df601f8916826120f2565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61222f826116f1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612261576122606121f8565b5b600182019050919050565b7f696e76616c6964206d616a20286578706563746564204d616a417272617929005f82015250565b5f6122a0601f83611c51565b91506122ab8261226c565b602082019050919050565b5f6020820190508181035f8301526122cd81612294565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a556e7369676e655f8201527f64496e7429000000000000000000000000000000000000000000000000000000602082015250565b5f61232e602583611c51565b9150612339826122d4565b604082019050919050565b5f6020820190508181035f83015261235b81612322565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a5369676e6564495f8201527f6e74206f72204d616a556e7369676e6564496e74290000000000000000000000602082015250565b5f6123bc603583611c51565b91506123c782612362565b604082019050919050565b5f6020820190508181035f8301526123e9816123b0565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a546167206f72205f8201527f4d616a42797465537472696e6729000000000000000000000000000000000000602082015250565b5f61244a602e83611c51565b9150612455826123f0565b604082019050919050565b5f6020820190508181035f8301526124778161243e565b9050919050565b7f6578706563746564204d616a42797465537472696e67000000000000000000005f82015250565b5f6124b2601683611c51565b91506124bd8261247e565b602082019050919050565b5f6020820190508181035f8301526124df816124a6565b9050919050565b5f6124f0826116f1565b91506124fb836116f1565b9250828201905080821115612513576125126121f8565b5b92915050565b7f63616e6e6f742068616e646c65206865616465727320776974682065787472615f8201527f203e203237000000000000000000000000000000000000000000000000000000602082015250565b5f612573602583611c51565b915061257e82612519565b604082019050919050565b5f6020820190508181035f8301526125a081612567565b9050919050565b7f696e76616c69642063626f7200000000000000000000000000000000000000005f82015250565b5f6125db600c83611c51565b91506125e6826125a7565b602082019050919050565b5f6020820190508181035f830152612608816125cf565b9050919050565b7f45787065637465644c6f7756616c7565323700000000000000000000000000005f82015250565b5f612643601283611c51565b915061264e8261260f565b602082019050919050565b5f6020820190508181035f83015261267081612637565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6126ae826116f1565b91506126b9836116f1565b9250826126c9576126c8612677565b5b828206905092915050565b5f6126de826116f1565b91506126e9836116f1565b9250828203905081811115612701576127006121f8565b5b92915050565b5f612711826116f1565b915061271c836116f1565b925082820261272a816116f1565b91508282048414831517612741576127406121f8565b5b5092915050565b7f736c6963696e67206f7574206f662072616e67650000000000000000000000005f82015250565b5f61277c601483611c51565b915061278782612748565b602082019050919050565b5f6020820190508181035f8301526127a981612770565b9050919050565b5f8160011c9050919050565b5f808291508390505b6001851115612805578086048111156127e1576127e06121f8565b5b60018516156127f05780820291505b80810290506127fe856127b0565b94506127c5565b94509492505050565b5f8261281d57600190506128d8565b8161282a575f90506128d8565b8160018114612840576002811461284a57612879565b60019150506128d8565b60ff84111561285c5761285b6121f8565b5b8360020a915084821115612873576128726121f8565b5b506128d8565b5060208310610133831016604e8410600b84101617156128ae5782820a9050838111156128a9576128a86121f8565b5b6128d8565b6128bb84848460016127bc565b925090508184048111156128d2576128d16121f8565b5b81810290505b9392505050565b5f6128e9826116f1565b91506128f4836116f1565b92506129217fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461280e565b90509291505056fea2646970667358221220e56cfef66393cb55b61bd51865f516a291563c49c685a0493ac98f2a6243181064736f6c63430008190033 +60806040525f60035f6101000a81548160ff0219169083151502179055503480156027575f80fd5b5061295f806100355f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063868e10c411610059578063868e10c41461013c5780638777d4d71461016e578063c153e97f1461018c578063ec680ea2146101c057610086565b806334c1f9441461008a57806344794f4f146100be5780634cbb3601146100ee578063529825951461010c575b5f80fd5b6100a4600480360381019061009f9190611724565b6101f0565b6040516100b59594939291906117fc565b60405180910390f35b6100d860048036038101906100d39190611885565b61036e565b6040516100e591906118bf565b60405180910390f35b6100f661039f565b60405161010391906118f2565b60405180910390f35b61012660048036038101906101219190611885565b6103b1565b60405161013391906119c2565b60405180910390f35b61015660048036038101906101519190611b0e565b61042c565b60405161016593929190611b7a565b60405180910390f35b610176610501565b60405161018391906118bf565b60405180910390f35b6101a660048036038101906101a19190611724565b610507565b6040516101b79594939291906117fc565b60405180910390f35b6101da60048036038101906101d59190611bb6565b61074a565b6040516101e791906118bf565b60405180910390f35b5f81815481106101fe575f80fd5b905f5260205f2090600402015f91509050805f015f9054906101000a900467ffffffffffffffff1690805f0160089054906101000a900460070b9080600101805461024890611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461027490611c21565b80156102bf5780601f10610296576101008083540402835291602001916102bf565b820191905f5260205f20905b8154815290600101906020018083116102a257829003601f168201915b505050505090806002015f9054906101000a900467ffffffffffffffff16908060030180546102ed90611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461031990611c21565b80156103645780601f1061033b57610100808354040283529160200191610364565b820191905f5260205f20905b81548152906001019060200180831161034757829003601f168201915b5050505050905085565b5f60015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f20805490509050919050565b60035f9054906101000a900460ff1681565b606060015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561042057602002820191905f5260205f20905b81548152602001906001019080831161040c575b50505050509050919050565b5f80606060518567ffffffffffffffff161461047d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047490611cab565b60405180910390fd5b637942460367ffffffffffffffff168667ffffffffffffffff16036104bd575f6104a685610775565b90505f605190505f818394509450945050506104f8565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ef90611d13565b60405180910390fd5b93509350939050565b60025481565b5f8060605f60605f805490508610610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b90611d7b565b60405180910390fd5b5f80878154811061056857610567611d99565b5b905f5260205f2090600402016040518060a00160405290815f82015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020015f820160089054906101000a900460070b60070b60070b81526020016001820180546105db90611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461060790611c21565b80156106525780601f1061062957610100808354040283529160200191610652565b820191905f5260205f20905b81548152906001019060200180831161063557829003601f168201915b50505050508152602001600282015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160038201805461069c90611c21565b80601f01602080910402602001604051908101604052809291908181526020018280546106c890611c21565b80156107135780601f106106ea57610100808354040283529160200191610713565b820191905f5260205f20905b8154815290600101906020018083116106f657829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b6001602052815f5260405f208181548110610763575f80fd5b905f5260205f20015f91509150505481565b60605f80610783845f610b62565b91509150600182146107ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c190611e10565b60405180910390fd5b5f6107d5855f610b62565b80935081925050505f811161081f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081690611e9e565b60405180910390fd5b6108276116ae565b6108316040610be1565b905061083e816001610bfb565b6108488183610bfb565b5f5b82811015610b4d5761085c8785610b62565b8095508196505050600385146108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089e90611f06565b60405180910390fd5b5f6108b28886610c0b565b80965081925050505f6108c58987610c89565b80975081925050505f6108d88a88610b62565b80985081925050506108eb856001610bfb565b6108f58582610bfb565b5f5b81811015610b3c576109098b89610b62565b809950819a50505060038914610954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094b90611f6e565b60405180910390fd5b60606109608c8a610d18565b809a5081925050505f6109738d8b610c0b565b809b50819250505060606109878e8c610d18565b809c5081925050505f808054905090505f6040518060a001604052808a67ffffffffffffffff1681526020018960070b81526020018681526020018567ffffffffffffffff16815260200184815250908060018154018082558091505060019003905f5260205f2090600402015f909190919091505f820151815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506020820151815f0160086101000a81548167ffffffffffffffff021916908360070b67ffffffffffffffff1602179055506040820151816001019081610a6e9190612129565b506060820151816002015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506080820151816003019081610ab29190612129565b50505060015f8967ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f909190919091505560025f815480929190610b1090612225565b9190505550610b208a6001610bfb565b610b2b8a6001610f1a565b5050505080806001019150506108f7565b50505050808060010191505061084a565b50610b5781610f43565b945050505050919050565b5f805f80610b708686610f53565b8167ffffffffffffffff169150809750819350829450505050600460ff168260ff1614610bd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc9906122b6565b60405180910390fd5b80859350935050509250929050565b610be96116ae565b610bf6815f01518361116f565b919050565b610c07826004836111d8565b5050565b5f805f80610c198686610f53565b8167ffffffffffffffff1691508097508193508294505050505f60ff168260ff1614610c7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7190612344565b60405180910390fd5b80859350935050509250929050565b5f805f80610c978686610f53565b8167ffffffffffffffff169150809750819350829450505050600160ff168260ff161480610cca57505f60ff168260ff16145b610d09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d00906123d2565b60405180910390fd5b80859350935050509250929050565b60605f805f610d278686610f53565b8167ffffffffffffffff169150809750819350829450505050600660ff168260ff161480610d5b5750600260ff168260ff16145b610d9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9190612460565b60405180910390fd5b600660ff168260ff1603610e1557610db28686610f53565b8167ffffffffffffffff169150809750819350829450505050600260ff168260ff1614610e14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0b906124c8565b60405180910390fd5b5b5f8186610e2291906124e6565b90505f8267ffffffffffffffff811115610e3f57610e3e6119ea565b5b6040519080825280601f01601f191660200182016040528015610e715781602001600182028036833780820191505090505b5090505f808890505b83811015610efc57898181518110610e9557610e94611d99565b5b602001015160f81c60f81b838381518110610eb357610eb2611d99565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053508180610eec90612225565b9250508080600101915050610e7a565b50818489610f0a91906124e6565b9650965050505050509250929050565b610f3f825f015182610f2d576014610f30565b60155b6005600760ff16901b1761131a565b5050565b6060815f01515f01519050919050565b5f805f80610f618686611374565b9050600185610f7091906124e6565b94505f600560e0831660ff16901c90505f601f83169050601c8160ff1610610fcd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc490612589565b60405180910390fd5b60188160ff161015610ff0578181888160ff169150955095509550505050611168565b60188160ff1603611076575f6110068989611374565b905060018861101591906124e6565b975060188160ff16101561105e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611055906125f1565b60405180910390fd5b8281898160ff16915096509650965050505050611168565b60198160ff16036110b6575f61108c89896113ee565b905060028861109b91906124e6565b97508281898161ffff16915096509650965050505050611168565b601a8160ff16036110f8575f6110cc8989611456565b90506004886110db91906124e6565b97508281898163ffffffff16915096509650965050505050611168565b601b8160ff161461113e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113590612659565b60405180910390fd5b5f61114989896114be565b905060088861115891906124e6565b9750828189965096509650505050505b9250925092565b5f60208261117d91906126a4565b146111a95760208161118f91906126a4565b602061119b91906126d4565b816111a691906124e6565b90505b808260200181815250506040518083525f8152818101602001818110156111ce575f80fd5b8060405250505050565b60178167ffffffffffffffff161161120857611203835f01518260058560ff16901b60ff161761131a565b611315565b60ff8167ffffffffffffffff161161124f57611231835f0151601860058560ff16901b1761131a565b61124a835f01518267ffffffffffffffff166001611526565b611314565b61ffff8167ffffffffffffffff161161129757611279835f0151601960058560ff16901b1761131a565b611292835f01518267ffffffffffffffff166002611526565b611313565b63ffffffff8167ffffffffffffffff16116112e1576112c3835f0151601a60058560ff16901b1761131a565b6112dc835f01518267ffffffffffffffff166004611526565b611312565b6112f8835f0151601b60058560ff16901b1761131a565b611311835f01518267ffffffffffffffff166008611526565b5b5b5b5b505050565b5f825f01515190505f60018261133091906124e6565b905083602001518210611354576113538460028361134e9190612707565b6115a2565b5b8351602083820101848153815183111561136c578282525b505050505050565b5f60018261138291906124e6565b835110156113c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bc90612792565b60405180910390fd5b8282815181106113d8576113d7611d99565b5b602001015160f81c60f81b60f81c905092915050565b5f6002826113fc91906124e6565b8351101561143f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143690612792565b60405180910390fd5b5f8260200184015190508060f01c91505092915050565b5f60048261146491906124e6565b835110156114a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149e90612792565b60405180910390fd5b5f8260200184015190508060e01c91505092915050565b5f6008826114cc91906124e6565b8351101561150f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150690612792565b60405180910390fd5b5f8260200184015190508060c01c91505092915050565b5f835f01515190505f818361153b91906124e6565b905084602001518111156115605761155f8560028361155a9190612707565b6115a2565b5b5f60018461010061157191906128df565b61157b91906126d4565b905085518281018683198251161781528151841115611598578382525b5050505050505050565b5f825f015190506115b3838361116f565b6115bd83826115c2565b505050565b5f815190505f835f01515190505f82826115dc91906124e6565b9050846020015181111561160157611600856002836115fb9190612707565b6115a2565b5b5f808651805185602083010193508085111561161b578482525b60208801925050505b60208510611662578051825260208261163d91906124e6565b915060208161164c91906124e6565b905060208561165b91906126d4565b9450611624565b5f8511156116a5575f600186602061167a91906126d4565b61010061168791906128df565b61169191906126d4565b905080198251168184511681811785525050505b50505050505050565b60405180602001604052806116c16116c7565b81525090565b6040518060400160405280606081526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b611703816116f1565b811461170d575f80fd5b50565b5f8135905061171e816116fa565b92915050565b5f60208284031215611739576117386116e9565b5b5f61174684828501611710565b91505092915050565b5f67ffffffffffffffff82169050919050565b61176b8161174f565b82525050565b5f8160070b9050919050565b61178681611771565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6117ce8261178c565b6117d88185611796565b93506117e88185602086016117a6565b6117f1816117b4565b840191505092915050565b5f60a08201905061180f5f830188611762565b61181c602083018761177d565b818103604083015261182e81866117c4565b905061183d6060830185611762565b818103608083015261184f81846117c4565b90509695505050505050565b6118648161174f565b811461186e575f80fd5b50565b5f8135905061187f8161185b565b92915050565b5f6020828403121561189a576118996116e9565b5b5f6118a784828501611871565b91505092915050565b6118b9816116f1565b82525050565b5f6020820190506118d25f8301846118b0565b92915050565b5f8115159050919050565b6118ec816118d8565b82525050565b5f6020820190506119055f8301846118e3565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61193d816116f1565b82525050565b5f61194e8383611934565b60208301905092915050565b5f602082019050919050565b5f6119708261190b565b61197a8185611915565b935061198583611925565b805f5b838110156119b557815161199c8882611943565b97506119a78361195a565b925050600181019050611988565b5085935050505092915050565b5f6020820190508181035f8301526119da8184611966565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611a20826117b4565b810181811067ffffffffffffffff82111715611a3f57611a3e6119ea565b5b80604052505050565b5f611a516116e0565b9050611a5d8282611a17565b919050565b5f67ffffffffffffffff821115611a7c57611a7b6119ea565b5b611a85826117b4565b9050602081019050919050565b828183375f83830152505050565b5f611ab2611aad84611a62565b611a48565b905082815260208101848484011115611ace57611acd6119e6565b5b611ad9848285611a92565b509392505050565b5f82601f830112611af557611af46119e2565b5b8135611b05848260208601611aa0565b91505092915050565b5f805f60608486031215611b2557611b246116e9565b5b5f611b3286828701611871565b9350506020611b4386828701611871565b925050604084013567ffffffffffffffff811115611b6457611b636116ed565b5b611b7086828701611ae1565b9150509250925092565b5f606082019050611b8d5f830186611762565b611b9a6020830185611762565b8181036040830152611bac81846117c4565b9050949350505050565b5f8060408385031215611bcc57611bcb6116e9565b5b5f611bd985828601611871565b9250506020611bea85828601611710565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611c3857607f821691505b602082108103611c4b57611c4a611bf4565b5b50919050565b5f82825260208201905092915050565b7f496e76616c696420636f646563000000000000000000000000000000000000005f82015250565b5f611c95600d83611c51565b9150611ca082611c61565b602082019050919050565b5f6020820190508181035f830152611cc281611c89565b9050919050565b7f496e76616c6964206d6574686f640000000000000000000000000000000000005f82015250565b5f611cfd600e83611c51565b9150611d0882611cc9565b602082019050919050565b5f6020820190508181035f830152611d2a81611cf1565b9050919050565b7f496e76616c6964206e6f74696669636174696f6e20696e6465780000000000005f82015250565b5f611d65601a83611c51565b9150611d7082611d31565b602082019050919050565b5f6020820190508181035f830152611d9281611d59565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f496e76616c696420706172616d73206f75746572207475706c650000000000005f82015250565b5f611dfa601a83611c51565b9150611e0582611dc6565b602082019050919050565b5f6020820190508181035f830152611e2781611dee565b9050919050565b7f496e76616c6964206e6f6e20706f73697469766520736563746f7273206669655f8201527f6c64000000000000000000000000000000000000000000000000000000000000602082015250565b5f611e88602283611c51565b9150611e9382611e2e565b604082019050919050565b5f6020820190508181035f830152611eb581611e7c565b9050919050565b7f496e76616c696420536563746f724368616e676573207475706c6500000000005f82015250565b5f611ef0601b83611c51565b9150611efb82611ebc565b602082019050919050565b5f6020820190508181035f830152611f1d81611ee4565b9050919050565b7f496e76616c696420706172616d7320696e6e65720000000000000000000000005f82015250565b5f611f58601483611c51565b9150611f6382611f24565b602082019050919050565b5f6020820190508181035f830152611f8581611f4c565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611fe87fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611fad565b611ff28683611fad565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61202d612028612023846116f1565b61200a565b6116f1565b9050919050565b5f819050919050565b61204683612013565b61205a61205282612034565b848454611fb9565b825550505050565b5f90565b61206e612062565b61207981848461203d565b505050565b5b8181101561209c576120915f82612066565b60018101905061207f565b5050565b601f8211156120e1576120b281611f8c565b6120bb84611f9e565b810160208510156120ca578190505b6120de6120d685611f9e565b83018261207e565b50505b505050565b5f82821c905092915050565b5f6121015f19846008026120e6565b1980831691505092915050565b5f61211983836120f2565b9150826002028217905092915050565b6121328261178c565b67ffffffffffffffff81111561214b5761214a6119ea565b5b6121558254611c21565b6121608282856120a0565b5f60209050601f831160018114612191575f841561217f578287015190505b612189858261210e565b8655506121f0565b601f19841661219f86611f8c565b5f5b828110156121c6578489015182556001820191506020850194506020810190506121a1565b868310156121e357848901516121df601f8916826120f2565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61222f826116f1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612261576122606121f8565b5b600182019050919050565b7f696e76616c6964206d616a20286578706563746564204d616a417272617929005f82015250565b5f6122a0601f83611c51565b91506122ab8261226c565b602082019050919050565b5f6020820190508181035f8301526122cd81612294565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a556e7369676e655f8201527f64496e7429000000000000000000000000000000000000000000000000000000602082015250565b5f61232e602583611c51565b9150612339826122d4565b604082019050919050565b5f6020820190508181035f83015261235b81612322565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a5369676e6564495f8201527f6e74206f72204d616a556e7369676e6564496e74290000000000000000000000602082015250565b5f6123bc603583611c51565b91506123c782612362565b604082019050919050565b5f6020820190508181035f8301526123e9816123b0565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a546167206f72205f8201527f4d616a42797465537472696e6729000000000000000000000000000000000000602082015250565b5f61244a602e83611c51565b9150612455826123f0565b604082019050919050565b5f6020820190508181035f8301526124778161243e565b9050919050565b7f6578706563746564204d616a42797465537472696e67000000000000000000005f82015250565b5f6124b2601683611c51565b91506124bd8261247e565b602082019050919050565b5f6020820190508181035f8301526124df816124a6565b9050919050565b5f6124f0826116f1565b91506124fb836116f1565b9250828201905080821115612513576125126121f8565b5b92915050565b7f63616e6e6f742068616e646c65206865616465727320776974682065787472615f8201527f203e203237000000000000000000000000000000000000000000000000000000602082015250565b5f612573602583611c51565b915061257e82612519565b604082019050919050565b5f6020820190508181035f8301526125a081612567565b9050919050565b7f696e76616c69642063626f7200000000000000000000000000000000000000005f82015250565b5f6125db600c83611c51565b91506125e6826125a7565b602082019050919050565b5f6020820190508181035f830152612608816125cf565b9050919050565b7f45787065637465644c6f7756616c7565323700000000000000000000000000005f82015250565b5f612643601283611c51565b915061264e8261260f565b602082019050919050565b5f6020820190508181035f83015261267081612637565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6126ae826116f1565b91506126b9836116f1565b9250826126c9576126c8612677565b5b828206905092915050565b5f6126de826116f1565b91506126e9836116f1565b9250828203905081811115612701576127006121f8565b5b92915050565b5f612711826116f1565b915061271c836116f1565b925082820261272a816116f1565b91508282048414831517612741576127406121f8565b5b5092915050565b7f736c6963696e67206f7574206f662072616e67650000000000000000000000005f82015250565b5f61277c601483611c51565b915061278782612748565b602082019050919050565b5f6020820190508181035f8301526127a981612770565b9050919050565b5f8160011c9050919050565b5f808291508390505b6001851115612805578086048111156127e1576127e06121f8565b5b60018516156127f05780820291505b80810290506127fe856127b0565b94506127c5565b94509492505050565b5f8261281d57600190506128d8565b8161282a575f90506128d8565b8160018114612840576002811461284a57612879565b60019150506128d8565b60ff84111561285c5761285b6121f8565b5b8360020a915084821115612873576128726121f8565b5b506128d8565b5060208310610133831016604e8410600b84101617156128ae5782820a9050838111156128a9576128a86121f8565b5b6128d8565b6128bb84848460016127bc565b925090508184048111156128d2576128d16121f8565b5b81810290505b9392505050565b5f6128e9826116f1565b91506128f4836116f1565b92506129217fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461280e565b90509291505056fea2646970667358221220e56cfef66393cb55b61bd51865f516a291563c49c685a0493ac98f2a6243181064736f6c63430008190033 \ No newline at end of file From 641d19cebb768d728bfc638a65ea60090cc8ef79 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 18:32:18 -0600 Subject: [PATCH 16/39] Deal with serde transparent --- .../evm/tests/contracts/NotificationReceiver.sol | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/actors/evm/tests/contracts/NotificationReceiver.sol b/actors/evm/tests/contracts/NotificationReceiver.sol index b7a2f04a2..884af6981 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.sol +++ b/actors/evm/tests/contracts/NotificationReceiver.sol @@ -99,13 +99,13 @@ contract NotificationReceiver { */ function processSectorContentChanged(bytes memory params) internal returns (bytes memory) { - /* We begin by parsing a single tuple: (sectors) - */ - (uint checkTupleLen, uint byteIdx) = readFixedArray(params, 0); - require(checkTupleLen == 1, "Invalid params outer tuple"); + uint checkTupleLen; + uint byteIdx = 0; + // We don't need to parse the SectorContentChangedParams as a tuple because + // the type is encoded as serde transparent. So just parse the sectors array directly uint nSectors; - (nSectors, byteIdx) = readFixedArray(params, 0); + (nSectors, byteIdx) = readFixedArray(params, byteIdx); require(nSectors > 0, "Invalid non positive sectors field"); CBORBuffer memory ret_acc; @@ -113,7 +113,7 @@ contract NotificationReceiver { // Setup return value ret_acc // ret_acc accumulates return cbor array ret_acc = createCBOR(64); - startFixedArray(ret_acc, 1); // SectorContentChangedReturn + // No SectorContentChangedReturn outer tuple as it is serde transparent startFixedArray(ret_acc, uint64(nSectors)); // sectors: Vec } for (uint i = 0; i < nSectors; i++) { @@ -134,7 +134,7 @@ contract NotificationReceiver { (pieceCnt, byteIdx) = readFixedArray(params, byteIdx); { - startFixedArray(ret_acc, 1); // SectorReturn + // No SectorReturn outer tuple as it is serde transparent startFixedArray(ret_acc, uint64(pieceCnt)); // added: Vec } @@ -167,7 +167,7 @@ contract NotificationReceiver { sectorNotificationIndices[sector].push(notificationIndex); totalNotifications++; { - startFixedArray(ret_acc, 1); // PieceReturn + // No PieceReturn outer tuple as it is serde transparent writeBool(ret_acc, true); // accepted (set all to true) } } From ca221cf72cf9bb55e4d06bcb435639167e316ade Mon Sep 17 00:00:00 2001 From: zenground0 Date: Fri, 29 Aug 2025 02:38:23 +0200 Subject: [PATCH 17/39] New hex --- actors/evm/tests/contracts/NotificationReceiver.hex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actors/evm/tests/contracts/NotificationReceiver.hex b/actors/evm/tests/contracts/NotificationReceiver.hex index b03c07a8a..e7d87da62 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.hex +++ b/actors/evm/tests/contracts/NotificationReceiver.hex @@ -1 +1 @@ -60806040525f60035f6101000a81548160ff0219169083151502179055503480156027575f80fd5b5061295f806100355f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063868e10c411610059578063868e10c41461013c5780638777d4d71461016e578063c153e97f1461018c578063ec680ea2146101c057610086565b806334c1f9441461008a57806344794f4f146100be5780634cbb3601146100ee578063529825951461010c575b5f80fd5b6100a4600480360381019061009f9190611724565b6101f0565b6040516100b59594939291906117fc565b60405180910390f35b6100d860048036038101906100d39190611885565b61036e565b6040516100e591906118bf565b60405180910390f35b6100f661039f565b60405161010391906118f2565b60405180910390f35b61012660048036038101906101219190611885565b6103b1565b60405161013391906119c2565b60405180910390f35b61015660048036038101906101519190611b0e565b61042c565b60405161016593929190611b7a565b60405180910390f35b610176610501565b60405161018391906118bf565b60405180910390f35b6101a660048036038101906101a19190611724565b610507565b6040516101b79594939291906117fc565b60405180910390f35b6101da60048036038101906101d59190611bb6565b61074a565b6040516101e791906118bf565b60405180910390f35b5f81815481106101fe575f80fd5b905f5260205f2090600402015f91509050805f015f9054906101000a900467ffffffffffffffff1690805f0160089054906101000a900460070b9080600101805461024890611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461027490611c21565b80156102bf5780601f10610296576101008083540402835291602001916102bf565b820191905f5260205f20905b8154815290600101906020018083116102a257829003601f168201915b505050505090806002015f9054906101000a900467ffffffffffffffff16908060030180546102ed90611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461031990611c21565b80156103645780601f1061033b57610100808354040283529160200191610364565b820191905f5260205f20905b81548152906001019060200180831161034757829003601f168201915b5050505050905085565b5f60015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f20805490509050919050565b60035f9054906101000a900460ff1681565b606060015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561042057602002820191905f5260205f20905b81548152602001906001019080831161040c575b50505050509050919050565b5f80606060518567ffffffffffffffff161461047d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047490611cab565b60405180910390fd5b637942460367ffffffffffffffff168667ffffffffffffffff16036104bd575f6104a685610775565b90505f605190505f818394509450945050506104f8565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ef90611d13565b60405180910390fd5b93509350939050565b60025481565b5f8060605f60605f805490508610610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b90611d7b565b60405180910390fd5b5f80878154811061056857610567611d99565b5b905f5260205f2090600402016040518060a00160405290815f82015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020015f820160089054906101000a900460070b60070b60070b81526020016001820180546105db90611c21565b80601f016020809104026020016040519081016040528092919081815260200182805461060790611c21565b80156106525780601f1061062957610100808354040283529160200191610652565b820191905f5260205f20905b81548152906001019060200180831161063557829003601f168201915b50505050508152602001600282015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160038201805461069c90611c21565b80601f01602080910402602001604051908101604052809291908181526020018280546106c890611c21565b80156107135780601f106106ea57610100808354040283529160200191610713565b820191905f5260205f20905b8154815290600101906020018083116106f657829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b6001602052815f5260405f208181548110610763575f80fd5b905f5260205f20015f91509150505481565b60605f80610783845f610b62565b91509150600182146107ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c190611e10565b60405180910390fd5b5f6107d5855f610b62565b80935081925050505f811161081f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081690611e9e565b60405180910390fd5b6108276116ae565b6108316040610be1565b905061083e816001610bfb565b6108488183610bfb565b5f5b82811015610b4d5761085c8785610b62565b8095508196505050600385146108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089e90611f06565b60405180910390fd5b5f6108b28886610c0b565b80965081925050505f6108c58987610c89565b80975081925050505f6108d88a88610b62565b80985081925050506108eb856001610bfb565b6108f58582610bfb565b5f5b81811015610b3c576109098b89610b62565b809950819a50505060038914610954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094b90611f6e565b60405180910390fd5b60606109608c8a610d18565b809a5081925050505f6109738d8b610c0b565b809b50819250505060606109878e8c610d18565b809c5081925050505f808054905090505f6040518060a001604052808a67ffffffffffffffff1681526020018960070b81526020018681526020018567ffffffffffffffff16815260200184815250908060018154018082558091505060019003905f5260205f2090600402015f909190919091505f820151815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506020820151815f0160086101000a81548167ffffffffffffffff021916908360070b67ffffffffffffffff1602179055506040820151816001019081610a6e9190612129565b506060820151816002015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506080820151816003019081610ab29190612129565b50505060015f8967ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f909190919091505560025f815480929190610b1090612225565b9190505550610b208a6001610bfb565b610b2b8a6001610f1a565b5050505080806001019150506108f7565b50505050808060010191505061084a565b50610b5781610f43565b945050505050919050565b5f805f80610b708686610f53565b8167ffffffffffffffff169150809750819350829450505050600460ff168260ff1614610bd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc9906122b6565b60405180910390fd5b80859350935050509250929050565b610be96116ae565b610bf6815f01518361116f565b919050565b610c07826004836111d8565b5050565b5f805f80610c198686610f53565b8167ffffffffffffffff1691508097508193508294505050505f60ff168260ff1614610c7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7190612344565b60405180910390fd5b80859350935050509250929050565b5f805f80610c978686610f53565b8167ffffffffffffffff169150809750819350829450505050600160ff168260ff161480610cca57505f60ff168260ff16145b610d09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d00906123d2565b60405180910390fd5b80859350935050509250929050565b60605f805f610d278686610f53565b8167ffffffffffffffff169150809750819350829450505050600660ff168260ff161480610d5b5750600260ff168260ff16145b610d9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9190612460565b60405180910390fd5b600660ff168260ff1603610e1557610db28686610f53565b8167ffffffffffffffff169150809750819350829450505050600260ff168260ff1614610e14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0b906124c8565b60405180910390fd5b5b5f8186610e2291906124e6565b90505f8267ffffffffffffffff811115610e3f57610e3e6119ea565b5b6040519080825280601f01601f191660200182016040528015610e715781602001600182028036833780820191505090505b5090505f808890505b83811015610efc57898181518110610e9557610e94611d99565b5b602001015160f81c60f81b838381518110610eb357610eb2611d99565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053508180610eec90612225565b9250508080600101915050610e7a565b50818489610f0a91906124e6565b9650965050505050509250929050565b610f3f825f015182610f2d576014610f30565b60155b6005600760ff16901b1761131a565b5050565b6060815f01515f01519050919050565b5f805f80610f618686611374565b9050600185610f7091906124e6565b94505f600560e0831660ff16901c90505f601f83169050601c8160ff1610610fcd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc490612589565b60405180910390fd5b60188160ff161015610ff0578181888160ff169150955095509550505050611168565b60188160ff1603611076575f6110068989611374565b905060018861101591906124e6565b975060188160ff16101561105e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611055906125f1565b60405180910390fd5b8281898160ff16915096509650965050505050611168565b60198160ff16036110b6575f61108c89896113ee565b905060028861109b91906124e6565b97508281898161ffff16915096509650965050505050611168565b601a8160ff16036110f8575f6110cc8989611456565b90506004886110db91906124e6565b97508281898163ffffffff16915096509650965050505050611168565b601b8160ff161461113e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113590612659565b60405180910390fd5b5f61114989896114be565b905060088861115891906124e6565b9750828189965096509650505050505b9250925092565b5f60208261117d91906126a4565b146111a95760208161118f91906126a4565b602061119b91906126d4565b816111a691906124e6565b90505b808260200181815250506040518083525f8152818101602001818110156111ce575f80fd5b8060405250505050565b60178167ffffffffffffffff161161120857611203835f01518260058560ff16901b60ff161761131a565b611315565b60ff8167ffffffffffffffff161161124f57611231835f0151601860058560ff16901b1761131a565b61124a835f01518267ffffffffffffffff166001611526565b611314565b61ffff8167ffffffffffffffff161161129757611279835f0151601960058560ff16901b1761131a565b611292835f01518267ffffffffffffffff166002611526565b611313565b63ffffffff8167ffffffffffffffff16116112e1576112c3835f0151601a60058560ff16901b1761131a565b6112dc835f01518267ffffffffffffffff166004611526565b611312565b6112f8835f0151601b60058560ff16901b1761131a565b611311835f01518267ffffffffffffffff166008611526565b5b5b5b5b505050565b5f825f01515190505f60018261133091906124e6565b905083602001518210611354576113538460028361134e9190612707565b6115a2565b5b8351602083820101848153815183111561136c578282525b505050505050565b5f60018261138291906124e6565b835110156113c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bc90612792565b60405180910390fd5b8282815181106113d8576113d7611d99565b5b602001015160f81c60f81b60f81c905092915050565b5f6002826113fc91906124e6565b8351101561143f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143690612792565b60405180910390fd5b5f8260200184015190508060f01c91505092915050565b5f60048261146491906124e6565b835110156114a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149e90612792565b60405180910390fd5b5f8260200184015190508060e01c91505092915050565b5f6008826114cc91906124e6565b8351101561150f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150690612792565b60405180910390fd5b5f8260200184015190508060c01c91505092915050565b5f835f01515190505f818361153b91906124e6565b905084602001518111156115605761155f8560028361155a9190612707565b6115a2565b5b5f60018461010061157191906128df565b61157b91906126d4565b905085518281018683198251161781528151841115611598578382525b5050505050505050565b5f825f015190506115b3838361116f565b6115bd83826115c2565b505050565b5f815190505f835f01515190505f82826115dc91906124e6565b9050846020015181111561160157611600856002836115fb9190612707565b6115a2565b5b5f808651805185602083010193508085111561161b578482525b60208801925050505b60208510611662578051825260208261163d91906124e6565b915060208161164c91906124e6565b905060208561165b91906126d4565b9450611624565b5f8511156116a5575f600186602061167a91906126d4565b61010061168791906128df565b61169191906126d4565b905080198251168184511681811785525050505b50505050505050565b60405180602001604052806116c16116c7565b81525090565b6040518060400160405280606081526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b611703816116f1565b811461170d575f80fd5b50565b5f8135905061171e816116fa565b92915050565b5f60208284031215611739576117386116e9565b5b5f61174684828501611710565b91505092915050565b5f67ffffffffffffffff82169050919050565b61176b8161174f565b82525050565b5f8160070b9050919050565b61178681611771565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6117ce8261178c565b6117d88185611796565b93506117e88185602086016117a6565b6117f1816117b4565b840191505092915050565b5f60a08201905061180f5f830188611762565b61181c602083018761177d565b818103604083015261182e81866117c4565b905061183d6060830185611762565b818103608083015261184f81846117c4565b90509695505050505050565b6118648161174f565b811461186e575f80fd5b50565b5f8135905061187f8161185b565b92915050565b5f6020828403121561189a576118996116e9565b5b5f6118a784828501611871565b91505092915050565b6118b9816116f1565b82525050565b5f6020820190506118d25f8301846118b0565b92915050565b5f8115159050919050565b6118ec816118d8565b82525050565b5f6020820190506119055f8301846118e3565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61193d816116f1565b82525050565b5f61194e8383611934565b60208301905092915050565b5f602082019050919050565b5f6119708261190b565b61197a8185611915565b935061198583611925565b805f5b838110156119b557815161199c8882611943565b97506119a78361195a565b925050600181019050611988565b5085935050505092915050565b5f6020820190508181035f8301526119da8184611966565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611a20826117b4565b810181811067ffffffffffffffff82111715611a3f57611a3e6119ea565b5b80604052505050565b5f611a516116e0565b9050611a5d8282611a17565b919050565b5f67ffffffffffffffff821115611a7c57611a7b6119ea565b5b611a85826117b4565b9050602081019050919050565b828183375f83830152505050565b5f611ab2611aad84611a62565b611a48565b905082815260208101848484011115611ace57611acd6119e6565b5b611ad9848285611a92565b509392505050565b5f82601f830112611af557611af46119e2565b5b8135611b05848260208601611aa0565b91505092915050565b5f805f60608486031215611b2557611b246116e9565b5b5f611b3286828701611871565b9350506020611b4386828701611871565b925050604084013567ffffffffffffffff811115611b6457611b636116ed565b5b611b7086828701611ae1565b9150509250925092565b5f606082019050611b8d5f830186611762565b611b9a6020830185611762565b8181036040830152611bac81846117c4565b9050949350505050565b5f8060408385031215611bcc57611bcb6116e9565b5b5f611bd985828601611871565b9250506020611bea85828601611710565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611c3857607f821691505b602082108103611c4b57611c4a611bf4565b5b50919050565b5f82825260208201905092915050565b7f496e76616c696420636f646563000000000000000000000000000000000000005f82015250565b5f611c95600d83611c51565b9150611ca082611c61565b602082019050919050565b5f6020820190508181035f830152611cc281611c89565b9050919050565b7f496e76616c6964206d6574686f640000000000000000000000000000000000005f82015250565b5f611cfd600e83611c51565b9150611d0882611cc9565b602082019050919050565b5f6020820190508181035f830152611d2a81611cf1565b9050919050565b7f496e76616c6964206e6f74696669636174696f6e20696e6465780000000000005f82015250565b5f611d65601a83611c51565b9150611d7082611d31565b602082019050919050565b5f6020820190508181035f830152611d9281611d59565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f496e76616c696420706172616d73206f75746572207475706c650000000000005f82015250565b5f611dfa601a83611c51565b9150611e0582611dc6565b602082019050919050565b5f6020820190508181035f830152611e2781611dee565b9050919050565b7f496e76616c6964206e6f6e20706f73697469766520736563746f7273206669655f8201527f6c64000000000000000000000000000000000000000000000000000000000000602082015250565b5f611e88602283611c51565b9150611e9382611e2e565b604082019050919050565b5f6020820190508181035f830152611eb581611e7c565b9050919050565b7f496e76616c696420536563746f724368616e676573207475706c6500000000005f82015250565b5f611ef0601b83611c51565b9150611efb82611ebc565b602082019050919050565b5f6020820190508181035f830152611f1d81611ee4565b9050919050565b7f496e76616c696420706172616d7320696e6e65720000000000000000000000005f82015250565b5f611f58601483611c51565b9150611f6382611f24565b602082019050919050565b5f6020820190508181035f830152611f8581611f4c565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611fe87fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611fad565b611ff28683611fad565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61202d612028612023846116f1565b61200a565b6116f1565b9050919050565b5f819050919050565b61204683612013565b61205a61205282612034565b848454611fb9565b825550505050565b5f90565b61206e612062565b61207981848461203d565b505050565b5b8181101561209c576120915f82612066565b60018101905061207f565b5050565b601f8211156120e1576120b281611f8c565b6120bb84611f9e565b810160208510156120ca578190505b6120de6120d685611f9e565b83018261207e565b50505b505050565b5f82821c905092915050565b5f6121015f19846008026120e6565b1980831691505092915050565b5f61211983836120f2565b9150826002028217905092915050565b6121328261178c565b67ffffffffffffffff81111561214b5761214a6119ea565b5b6121558254611c21565b6121608282856120a0565b5f60209050601f831160018114612191575f841561217f578287015190505b612189858261210e565b8655506121f0565b601f19841661219f86611f8c565b5f5b828110156121c6578489015182556001820191506020850194506020810190506121a1565b868310156121e357848901516121df601f8916826120f2565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61222f826116f1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612261576122606121f8565b5b600182019050919050565b7f696e76616c6964206d616a20286578706563746564204d616a417272617929005f82015250565b5f6122a0601f83611c51565b91506122ab8261226c565b602082019050919050565b5f6020820190508181035f8301526122cd81612294565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a556e7369676e655f8201527f64496e7429000000000000000000000000000000000000000000000000000000602082015250565b5f61232e602583611c51565b9150612339826122d4565b604082019050919050565b5f6020820190508181035f83015261235b81612322565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a5369676e6564495f8201527f6e74206f72204d616a556e7369676e6564496e74290000000000000000000000602082015250565b5f6123bc603583611c51565b91506123c782612362565b604082019050919050565b5f6020820190508181035f8301526123e9816123b0565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a546167206f72205f8201527f4d616a42797465537472696e6729000000000000000000000000000000000000602082015250565b5f61244a602e83611c51565b9150612455826123f0565b604082019050919050565b5f6020820190508181035f8301526124778161243e565b9050919050565b7f6578706563746564204d616a42797465537472696e67000000000000000000005f82015250565b5f6124b2601683611c51565b91506124bd8261247e565b602082019050919050565b5f6020820190508181035f8301526124df816124a6565b9050919050565b5f6124f0826116f1565b91506124fb836116f1565b9250828201905080821115612513576125126121f8565b5b92915050565b7f63616e6e6f742068616e646c65206865616465727320776974682065787472615f8201527f203e203237000000000000000000000000000000000000000000000000000000602082015250565b5f612573602583611c51565b915061257e82612519565b604082019050919050565b5f6020820190508181035f8301526125a081612567565b9050919050565b7f696e76616c69642063626f7200000000000000000000000000000000000000005f82015250565b5f6125db600c83611c51565b91506125e6826125a7565b602082019050919050565b5f6020820190508181035f830152612608816125cf565b9050919050565b7f45787065637465644c6f7756616c7565323700000000000000000000000000005f82015250565b5f612643601283611c51565b915061264e8261260f565b602082019050919050565b5f6020820190508181035f83015261267081612637565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6126ae826116f1565b91506126b9836116f1565b9250826126c9576126c8612677565b5b828206905092915050565b5f6126de826116f1565b91506126e9836116f1565b9250828203905081811115612701576127006121f8565b5b92915050565b5f612711826116f1565b915061271c836116f1565b925082820261272a816116f1565b91508282048414831517612741576127406121f8565b5b5092915050565b7f736c6963696e67206f7574206f662072616e67650000000000000000000000005f82015250565b5f61277c601483611c51565b915061278782612748565b602082019050919050565b5f6020820190508181035f8301526127a981612770565b9050919050565b5f8160011c9050919050565b5f808291508390505b6001851115612805578086048111156127e1576127e06121f8565b5b60018516156127f05780820291505b80810290506127fe856127b0565b94506127c5565b94509492505050565b5f8261281d57600190506128d8565b8161282a575f90506128d8565b8160018114612840576002811461284a57612879565b60019150506128d8565b60ff84111561285c5761285b6121f8565b5b8360020a915084821115612873576128726121f8565b5b506128d8565b5060208310610133831016604e8410600b84101617156128ae5782820a9050838111156128a9576128a86121f8565b5b6128d8565b6128bb84848460016127bc565b925090508184048111156128d2576128d16121f8565b5b81810290505b9392505050565b5f6128e9826116f1565b91506128f4836116f1565b92506129217fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848461280e565b90509291505056fea2646970667358221220e56cfef66393cb55b61bd51865f516a291563c49c685a0493ac98f2a6243181064736f6c63430008190033 \ No newline at end of file +60806040525f60035f6101000a81548160ff0219169083151502179055503480156027575f80fd5b50612888806100355f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063868e10c411610059578063868e10c41461013c5780638777d4d71461016e578063c153e97f1461018c578063ec680ea2146101c057610086565b806334c1f9441461008a57806344794f4f146100be5780634cbb3601146100ee578063529825951461010c575b5f80fd5b6100a4600480360381019061009f91906116b5565b6101f0565b6040516100b595949392919061178d565b60405180910390f35b6100d860048036038101906100d39190611816565b61036e565b6040516100e59190611850565b60405180910390f35b6100f661039f565b6040516101039190611883565b60405180910390f35b61012660048036038101906101219190611816565b6103b1565b6040516101339190611953565b60405180910390f35b61015660048036038101906101519190611a9f565b61042c565b60405161016593929190611b0b565b60405180910390f35b610176610501565b6040516101839190611850565b60405180910390f35b6101a660048036038101906101a191906116b5565b610507565b6040516101b795949392919061178d565b60405180910390f35b6101da60048036038101906101d59190611b47565b61074a565b6040516101e79190611850565b60405180910390f35b5f81815481106101fe575f80fd5b905f5260205f2090600402015f91509050805f015f9054906101000a900467ffffffffffffffff1690805f0160089054906101000a900460070b9080600101805461024890611bb2565b80601f016020809104026020016040519081016040528092919081815260200182805461027490611bb2565b80156102bf5780601f10610296576101008083540402835291602001916102bf565b820191905f5260205f20905b8154815290600101906020018083116102a257829003601f168201915b505050505090806002015f9054906101000a900467ffffffffffffffff16908060030180546102ed90611bb2565b80601f016020809104026020016040519081016040528092919081815260200182805461031990611bb2565b80156103645780601f1061033b57610100808354040283529160200191610364565b820191905f5260205f20905b81548152906001019060200180831161034757829003601f168201915b5050505050905085565b5f60015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f20805490509050919050565b60035f9054906101000a900460ff1681565b606060015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561042057602002820191905f5260205f20905b81548152602001906001019080831161040c575b50505050509050919050565b5f80606060518567ffffffffffffffff161461047d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047490611c3c565b60405180910390fd5b637942460367ffffffffffffffff168667ffffffffffffffff16036104bd575f6104a685610775565b90505f605190505f818394509450945050506104f8565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ef90611ca4565b60405180910390fd5b93509350939050565b60025481565b5f8060605f60605f805490508610610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b90611d0c565b60405180910390fd5b5f80878154811061056857610567611d2a565b5b905f5260205f2090600402016040518060a00160405290815f82015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020015f820160089054906101000a900460070b60070b60070b81526020016001820180546105db90611bb2565b80601f016020809104026020016040519081016040528092919081815260200182805461060790611bb2565b80156106525780601f1061062957610100808354040283529160200191610652565b820191905f5260205f20905b81548152906001019060200180831161063557829003601f168201915b50505050508152602001600282015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160038201805461069c90611bb2565b80601f01602080910402602001604051908101604052809291908181526020018280546106c890611bb2565b80156107135780601f106106ea57610100808354040283529160200191610713565b820191905f5260205f20905b8154815290600101906020018083116106f657829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b6001602052815f5260405f208181548110610763575f80fd5b905f5260205f20015f91509150505481565b60605f805f90505f6107878583610af3565b80935081925050505f81116107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c890611dc7565b60405180910390fd5b6107d961163f565b6107e36040610b72565b90506107ef8183610b8c565b5f5b82811015610ade576108038785610af3565b80955081965050506003851461084e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084590611e2f565b60405180910390fd5b5f6108598886610b9c565b80965081925050505f61086c8987610c1a565b80975081925050505f61087f8a88610af3565b80985081925050506108918582610b8c565b5f5b81811015610acd576108a58b89610af3565b809950819a505050600389146108f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e790611e97565b60405180910390fd5b60606108fc8c8a610ca9565b809a5081925050505f61090f8d8b610b9c565b809b50819250505060606109238e8c610ca9565b809c5081925050505f808054905090505f6040518060a001604052808a67ffffffffffffffff1681526020018960070b81526020018681526020018567ffffffffffffffff16815260200184815250908060018154018082558091505060019003905f5260205f2090600402015f909190919091505f820151815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506020820151815f0160086101000a81548167ffffffffffffffff021916908360070b67ffffffffffffffff1602179055506040820151816001019081610a0a9190612052565b506060820151816002015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506080820151816003019081610a4e9190612052565b50505060015f8967ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f909190919091505560025f815480929190610aac9061214e565b9190505550610abc8a6001610eab565b505050508080600101915050610893565b5050505080806001019150506107f1565b50610ae881610ed4565b945050505050919050565b5f805f80610b018686610ee4565b8167ffffffffffffffff169150809750819350829450505050600460ff168260ff1614610b63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5a906121df565b60405180910390fd5b80859350935050509250929050565b610b7a61163f565b610b87815f015183611100565b919050565b610b9882600483611169565b5050565b5f805f80610baa8686610ee4565b8167ffffffffffffffff1691508097508193508294505050505f60ff168260ff1614610c0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c029061226d565b60405180910390fd5b80859350935050509250929050565b5f805f80610c288686610ee4565b8167ffffffffffffffff169150809750819350829450505050600160ff168260ff161480610c5b57505f60ff168260ff16145b610c9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c91906122fb565b60405180910390fd5b80859350935050509250929050565b60605f805f610cb88686610ee4565b8167ffffffffffffffff169150809750819350829450505050600660ff168260ff161480610cec5750600260ff168260ff16145b610d2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2290612389565b60405180910390fd5b600660ff168260ff1603610da657610d438686610ee4565b8167ffffffffffffffff169150809750819350829450505050600260ff168260ff1614610da5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9c906123f1565b60405180910390fd5b5b5f8186610db3919061240f565b90505f8267ffffffffffffffff811115610dd057610dcf61197b565b5b6040519080825280601f01601f191660200182016040528015610e025781602001600182028036833780820191505090505b5090505f808890505b83811015610e8d57898181518110610e2657610e25611d2a565b5b602001015160f81c60f81b838381518110610e4457610e43611d2a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053508180610e7d9061214e565b9250508080600101915050610e0b565b50818489610e9b919061240f565b9650965050505050509250929050565b610ed0825f015182610ebe576014610ec1565b60155b6005600760ff16901b176112ab565b5050565b6060815f01515f01519050919050565b5f805f80610ef28686611305565b9050600185610f01919061240f565b94505f600560e0831660ff16901c90505f601f83169050601c8160ff1610610f5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f55906124b2565b60405180910390fd5b60188160ff161015610f81578181888160ff1691509550955095505050506110f9565b60188160ff1603611007575f610f978989611305565b9050600188610fa6919061240f565b975060188160ff161015610fef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe69061251a565b60405180910390fd5b8281898160ff169150965096509650505050506110f9565b60198160ff1603611047575f61101d898961137f565b905060028861102c919061240f565b97508281898161ffff169150965096509650505050506110f9565b601a8160ff1603611089575f61105d89896113e7565b905060048861106c919061240f565b97508281898163ffffffff169150965096509650505050506110f9565b601b8160ff16146110cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c690612582565b60405180910390fd5b5f6110da898961144f565b90506008886110e9919061240f565b9750828189965096509650505050505b9250925092565b5f60208261110e91906125cd565b1461113a5760208161112091906125cd565b602061112c91906125fd565b81611137919061240f565b90505b808260200181815250506040518083525f81528181016020018181101561115f575f80fd5b8060405250505050565b60178167ffffffffffffffff161161119957611194835f01518260058560ff16901b60ff16176112ab565b6112a6565b60ff8167ffffffffffffffff16116111e0576111c2835f0151601860058560ff16901b176112ab565b6111db835f01518267ffffffffffffffff1660016114b7565b6112a5565b61ffff8167ffffffffffffffff16116112285761120a835f0151601960058560ff16901b176112ab565b611223835f01518267ffffffffffffffff1660026114b7565b6112a4565b63ffffffff8167ffffffffffffffff161161127257611254835f0151601a60058560ff16901b176112ab565b61126d835f01518267ffffffffffffffff1660046114b7565b6112a3565b611289835f0151601b60058560ff16901b176112ab565b6112a2835f01518267ffffffffffffffff1660086114b7565b5b5b5b5b505050565b5f825f01515190505f6001826112c1919061240f565b9050836020015182106112e5576112e4846002836112df9190612630565b611533565b5b835160208382010184815381518311156112fd578282525b505050505050565b5f600182611313919061240f565b83511015611356576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134d906126bb565b60405180910390fd5b82828151811061136957611368611d2a565b5b602001015160f81c60f81b60f81c905092915050565b5f60028261138d919061240f565b835110156113d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c7906126bb565b60405180910390fd5b5f8260200184015190508060f01c91505092915050565b5f6004826113f5919061240f565b83511015611438576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142f906126bb565b60405180910390fd5b5f8260200184015190508060e01c91505092915050565b5f60088261145d919061240f565b835110156114a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611497906126bb565b60405180910390fd5b5f8260200184015190508060c01c91505092915050565b5f835f01515190505f81836114cc919061240f565b905084602001518111156114f1576114f0856002836114eb9190612630565b611533565b5b5f6001846101006115029190612808565b61150c91906125fd565b905085518281018683198251161781528151841115611529578382525b5050505050505050565b5f825f015190506115448383611100565b61154e8382611553565b505050565b5f815190505f835f01515190505f828261156d919061240f565b90508460200151811115611592576115918560028361158c9190612630565b611533565b5b5f80865180518560208301019350808511156115ac578482525b60208801925050505b602085106115f357805182526020826115ce919061240f565b91506020816115dd919061240f565b90506020856115ec91906125fd565b94506115b5565b5f851115611636575f600186602061160b91906125fd565b6101006116189190612808565b61162291906125fd565b905080198251168184511681811785525050505b50505050505050565b6040518060200160405280611652611658565b81525090565b6040518060400160405280606081526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b61169481611682565b811461169e575f80fd5b50565b5f813590506116af8161168b565b92915050565b5f602082840312156116ca576116c961167a565b5b5f6116d7848285016116a1565b91505092915050565b5f67ffffffffffffffff82169050919050565b6116fc816116e0565b82525050565b5f8160070b9050919050565b61171781611702565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61175f8261171d565b6117698185611727565b9350611779818560208601611737565b61178281611745565b840191505092915050565b5f60a0820190506117a05f8301886116f3565b6117ad602083018761170e565b81810360408301526117bf8186611755565b90506117ce60608301856116f3565b81810360808301526117e08184611755565b90509695505050505050565b6117f5816116e0565b81146117ff575f80fd5b50565b5f81359050611810816117ec565b92915050565b5f6020828403121561182b5761182a61167a565b5b5f61183884828501611802565b91505092915050565b61184a81611682565b82525050565b5f6020820190506118635f830184611841565b92915050565b5f8115159050919050565b61187d81611869565b82525050565b5f6020820190506118965f830184611874565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6118ce81611682565b82525050565b5f6118df83836118c5565b60208301905092915050565b5f602082019050919050565b5f6119018261189c565b61190b81856118a6565b9350611916836118b6565b805f5b8381101561194657815161192d88826118d4565b9750611938836118eb565b925050600181019050611919565b5085935050505092915050565b5f6020820190508181035f83015261196b81846118f7565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6119b182611745565b810181811067ffffffffffffffff821117156119d0576119cf61197b565b5b80604052505050565b5f6119e2611671565b90506119ee82826119a8565b919050565b5f67ffffffffffffffff821115611a0d57611a0c61197b565b5b611a1682611745565b9050602081019050919050565b828183375f83830152505050565b5f611a43611a3e846119f3565b6119d9565b905082815260208101848484011115611a5f57611a5e611977565b5b611a6a848285611a23565b509392505050565b5f82601f830112611a8657611a85611973565b5b8135611a96848260208601611a31565b91505092915050565b5f805f60608486031215611ab657611ab561167a565b5b5f611ac386828701611802565b9350506020611ad486828701611802565b925050604084013567ffffffffffffffff811115611af557611af461167e565b5b611b0186828701611a72565b9150509250925092565b5f606082019050611b1e5f8301866116f3565b611b2b60208301856116f3565b8181036040830152611b3d8184611755565b9050949350505050565b5f8060408385031215611b5d57611b5c61167a565b5b5f611b6a85828601611802565b9250506020611b7b858286016116a1565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611bc957607f821691505b602082108103611bdc57611bdb611b85565b5b50919050565b5f82825260208201905092915050565b7f496e76616c696420636f646563000000000000000000000000000000000000005f82015250565b5f611c26600d83611be2565b9150611c3182611bf2565b602082019050919050565b5f6020820190508181035f830152611c5381611c1a565b9050919050565b7f496e76616c6964206d6574686f640000000000000000000000000000000000005f82015250565b5f611c8e600e83611be2565b9150611c9982611c5a565b602082019050919050565b5f6020820190508181035f830152611cbb81611c82565b9050919050565b7f496e76616c6964206e6f74696669636174696f6e20696e6465780000000000005f82015250565b5f611cf6601a83611be2565b9150611d0182611cc2565b602082019050919050565b5f6020820190508181035f830152611d2381611cea565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f496e76616c6964206e6f6e20706f73697469766520736563746f7273206669655f8201527f6c64000000000000000000000000000000000000000000000000000000000000602082015250565b5f611db1602283611be2565b9150611dbc82611d57565b604082019050919050565b5f6020820190508181035f830152611dde81611da5565b9050919050565b7f496e76616c696420536563746f724368616e676573207475706c6500000000005f82015250565b5f611e19601b83611be2565b9150611e2482611de5565b602082019050919050565b5f6020820190508181035f830152611e4681611e0d565b9050919050565b7f496e76616c696420706172616d7320696e6e65720000000000000000000000005f82015250565b5f611e81601483611be2565b9150611e8c82611e4d565b602082019050919050565b5f6020820190508181035f830152611eae81611e75565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611f117fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611ed6565b611f1b8683611ed6565b95508019841693508086168417925050509392505050565b5f819050919050565b5f611f56611f51611f4c84611682565b611f33565b611682565b9050919050565b5f819050919050565b611f6f83611f3c565b611f83611f7b82611f5d565b848454611ee2565b825550505050565b5f90565b611f97611f8b565b611fa2818484611f66565b505050565b5b81811015611fc557611fba5f82611f8f565b600181019050611fa8565b5050565b601f82111561200a57611fdb81611eb5565b611fe484611ec7565b81016020851015611ff3578190505b612007611fff85611ec7565b830182611fa7565b50505b505050565b5f82821c905092915050565b5f61202a5f198460080261200f565b1980831691505092915050565b5f612042838361201b565b9150826002028217905092915050565b61205b8261171d565b67ffffffffffffffff8111156120745761207361197b565b5b61207e8254611bb2565b612089828285611fc9565b5f60209050601f8311600181146120ba575f84156120a8578287015190505b6120b28582612037565b865550612119565b601f1984166120c886611eb5565b5f5b828110156120ef578489015182556001820191506020850194506020810190506120ca565b8683101561210c5784890151612108601f89168261201b565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61215882611682565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361218a57612189612121565b5b600182019050919050565b7f696e76616c6964206d616a20286578706563746564204d616a417272617929005f82015250565b5f6121c9601f83611be2565b91506121d482612195565b602082019050919050565b5f6020820190508181035f8301526121f6816121bd565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a556e7369676e655f8201527f64496e7429000000000000000000000000000000000000000000000000000000602082015250565b5f612257602583611be2565b9150612262826121fd565b604082019050919050565b5f6020820190508181035f8301526122848161224b565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a5369676e6564495f8201527f6e74206f72204d616a556e7369676e6564496e74290000000000000000000000602082015250565b5f6122e5603583611be2565b91506122f08261228b565b604082019050919050565b5f6020820190508181035f830152612312816122d9565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a546167206f72205f8201527f4d616a42797465537472696e6729000000000000000000000000000000000000602082015250565b5f612373602e83611be2565b915061237e82612319565b604082019050919050565b5f6020820190508181035f8301526123a081612367565b9050919050565b7f6578706563746564204d616a42797465537472696e67000000000000000000005f82015250565b5f6123db601683611be2565b91506123e6826123a7565b602082019050919050565b5f6020820190508181035f830152612408816123cf565b9050919050565b5f61241982611682565b915061242483611682565b925082820190508082111561243c5761243b612121565b5b92915050565b7f63616e6e6f742068616e646c65206865616465727320776974682065787472615f8201527f203e203237000000000000000000000000000000000000000000000000000000602082015250565b5f61249c602583611be2565b91506124a782612442565b604082019050919050565b5f6020820190508181035f8301526124c981612490565b9050919050565b7f696e76616c69642063626f7200000000000000000000000000000000000000005f82015250565b5f612504600c83611be2565b915061250f826124d0565b602082019050919050565b5f6020820190508181035f830152612531816124f8565b9050919050565b7f45787065637465644c6f7756616c7565323700000000000000000000000000005f82015250565b5f61256c601283611be2565b915061257782612538565b602082019050919050565b5f6020820190508181035f83015261259981612560565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6125d782611682565b91506125e283611682565b9250826125f2576125f16125a0565b5b828206905092915050565b5f61260782611682565b915061261283611682565b925082820390508181111561262a57612629612121565b5b92915050565b5f61263a82611682565b915061264583611682565b925082820261265381611682565b9150828204841483151761266a57612669612121565b5b5092915050565b7f736c6963696e67206f7574206f662072616e67650000000000000000000000005f82015250565b5f6126a5601483611be2565b91506126b082612671565b602082019050919050565b5f6020820190508181035f8301526126d281612699565b9050919050565b5f8160011c9050919050565b5f808291508390505b600185111561272e5780860481111561270a57612709612121565b5b60018516156127195780820291505b8081029050612727856126d9565b94506126ee565b94509492505050565b5f826127465760019050612801565b81612753575f9050612801565b81600181146127695760028114612773576127a2565b6001915050612801565b60ff84111561278557612784612121565b5b8360020a91508482111561279c5761279b612121565b5b50612801565b5060208310610133831016604e8410600b84101617156127d75782820a9050838111156127d2576127d1612121565b5b612801565b6127e484848460016126e5565b925090508184048111156127fb576127fa612121565b5b81810290505b9392505050565b5f61281282611682565b915061281d83611682565b925061284a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484612737565b90509291505056fea2646970667358221220dee34eb57b2677a5a9e17b18d409545321dc23688a1842c6b605c619c085aa4764736f6c63430008190033 From 6a9026758d79ef110783328264d8ab5e3aef3114 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Fri, 29 Aug 2025 03:16:59 +0200 Subject: [PATCH 18/39] Check notifications are received correctly --- .../src/tests/evm_notification_test.rs | 98 ++++++++++++++++--- 1 file changed, 87 insertions(+), 11 deletions(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 8fdcde258..b196874bb 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -1,3 +1,5 @@ +use alloy_core::sol_types::{SolCall, SolValue}; +use alloy_core::{primitives::U256 as AlloyU256, sol}; use export_macro::vm_test; use fil_actor_miner::{ ProveCommitSectors3Params, SectorActivationManifest, PieceActivationManifest, @@ -6,19 +8,25 @@ use fil_actor_miner::{ use fil_actors_runtime::{ EAM_ACTOR_ADDR, test_utils::EVM_ACTOR_CODE_ID, test_utils::make_piece_cid, }; -use fvm_ipld_encoding::{RawBytes, ipld_block::IpldBlock}; +use fvm_ipld_encoding::{RawBytes, ipld_block::IpldBlock, BytesDe}; use fvm_shared::{ address::Address, econ::TokenAmount, sector::{RegisteredSealProof, SectorNumber}, piece::PaddedPieceSize, piece::PieceInfo, }; use num_traits::Zero; use vm_api::VM; +use vm_api::util::serialize_ok; use crate::util::{ create_accounts, create_miner, precommit_sectors_v2, advance_by_deadline_to_epoch, PrecommitMetadata, }; +// Generate a statically typed interface for the NotificationReceiver contract +sol!("../actors/evm/tests/contracts/NotificationReceiver.sol"); + +// Use ContractParams from evm_test module to avoid duplicate definition +use super::evm_test::ContractParams; #[vm_test] pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { @@ -58,10 +66,7 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { create_result.ret.unwrap().deserialize().expect("Failed to decode create return"); let evm_actor_addr = Address::new_id(create_return.actor_id); let evm_robust_addr = create_return.robust_address.unwrap(); - let evm_eth_addr = create_return.eth_address; - - println!("Created EVM contract at ID: {}, Robust: {}, ETH: 0x{}", - evm_actor_addr, evm_robust_addr, hex::encode(&evm_eth_addr)); + let _evm_eth_addr = create_return.eth_address; // Precommit sectors @@ -139,16 +144,87 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { ).unwrap(); assert!(prove_result.code.is_success(), "ProveCommit failed: {}", prove_result.message); - - println!("Successfully proved sectors with EVM notifications"); // Verify that the EVM contract received the notifications - // In a real test, we would call a getter method on the contract to verify state - // For now, we check that the EVM actor exists and has the expected code + // Check that the EVM actor exists with correct code let evm_actor = v.actor(&evm_actor_addr).unwrap(); assert_eq!(evm_actor.code, *EVM_ACTOR_CODE_ID, "EVM actor has wrong code ID"); - // The contract should have processed the notifications - // In production, we would call contract methods to verify the stored notification data + // 1. Call totalNotifications() to verify it equals 1 + { + let call_params = NotificationReceiver::totalNotificationsCall::new(()).abi_encode(); + let call_result = v.execute_message( + &worker, + &evm_robust_addr, + &TokenAmount::zero(), + fil_actor_evm::Method::InvokeContract as u64, + Some(serialize_ok(&ContractParams(call_params.to_vec()))), + ).unwrap(); + + assert!(call_result.code.is_success(), "Failed to call totalNotifications: {}", call_result.message); + + // Decode the return value + let return_data: BytesDe = call_result.ret.unwrap().deserialize().unwrap(); + let total_notifications = AlloyU256::abi_decode(&return_data.0) + .expect("Failed to decode totalNotifications return value"); + assert_eq!(total_notifications, AlloyU256::from(1), "Expected 1 notification, got {}", total_notifications); + } + // 2. Call getNotification(0) to verify the notification contents match exactly what was sent + { + let call_params = NotificationReceiver::getNotificationCall::new((AlloyU256::from(0),)).abi_encode(); + let call_result = v.execute_message( + &worker, + &evm_robust_addr, + &TokenAmount::zero(), + fil_actor_evm::Method::InvokeContract as u64, + Some(serialize_ok(&ContractParams(call_params.to_vec()))), + ).unwrap(); + + assert!(call_result.code.is_success(), "Failed to call getNotification: {}", call_result.message); + + // Decode the return value - it returns a tuple of (uint64, int64, bytes, uint64, bytes) + let return_data: BytesDe = call_result.ret.unwrap().deserialize().unwrap(); + + // Use the generated abi_decode_returns function + let notification_result = NotificationReceiver::getNotificationCall::abi_decode_returns(&return_data.0) + .expect("Failed to decode getNotification return value"); + + let received_sector = notification_result.sector; + let minimum_commitment_epoch = notification_result.minimumCommitmentEpoch; + let data_cid_bytes = notification_result.dataCid; + let received_piece_size = notification_result.pieceSize; + let received_payload = notification_result.payload; + + // Verify the notification fields match EXACTLY what was sent in the manifest + + // Check sector number matches what we set in the manifest + assert_eq!(received_sector, sector_number, + "Sector number mismatch: expected {}, got {}", sector_number, received_sector); + + // Check piece size matches what we set in the manifest + assert_eq!(received_piece_size, piece_size0.0, + "Piece size mismatch: expected {}, got {}", piece_size0.0, received_piece_size); + + // Check payload matches exactly what we set in the manifest (hex "cafe") + let expected_payload_bytes = hex::decode("cafe").unwrap(); + assert_eq!(received_payload.as_ref(), expected_payload_bytes.as_slice(), + "Payload mismatch: expected 0x{}, got 0x{}", + hex::encode(&expected_payload_bytes), hex::encode(&received_payload)); + + // Check the piece CID data is present + // The contract receives the CID with an extra leading byte from the CBOR encoding, + // so we verify it contains the expected CID data after the first byte + let expected_cid_bytes = piece_cid0.to_bytes(); + assert!(!data_cid_bytes.is_empty(), "Data CID should not be empty"); + assert!(data_cid_bytes.len() > expected_cid_bytes.len(), "Data CID seems too short"); + // Verify the CID data matches (skipping the first byte which is CBOR encoding) + assert_eq!(&data_cid_bytes[1..], expected_cid_bytes, + "Piece CID data mismatch: expected 0x{}, got 0x{}", + hex::encode(&expected_cid_bytes), hex::encode(&data_cid_bytes[1..])); + + // Verify minimum_commitment_epoch is set (this is calculated by the system) + assert!(minimum_commitment_epoch > 0, + "Minimum commitment epoch should be positive, got {}", minimum_commitment_epoch); + } } \ No newline at end of file From 9dd5fdbdbce4d76984d62acdc527f6439af7f88b Mon Sep 17 00:00:00 2001 From: zenground0 Date: Fri, 29 Aug 2025 03:23:49 +0200 Subject: [PATCH 19/39] More precise expiration testing --- .../src/tests/evm_notification_test.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index b196874bb..39b3a6c65 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -3,10 +3,11 @@ use alloy_core::{primitives::U256 as AlloyU256, sol}; use export_macro::vm_test; use fil_actor_miner::{ ProveCommitSectors3Params, SectorActivationManifest, PieceActivationManifest, - DataActivationNotification, Method as MinerMethod, CompactCommD, + DataActivationNotification, Method as MinerMethod, CompactCommD, max_prove_commit_duration, }; use fil_actors_runtime::{ EAM_ACTOR_ADDR, test_utils::EVM_ACTOR_CODE_ID, test_utils::make_piece_cid, + runtime::Policy, }; use fvm_ipld_encoding::{RawBytes, ipld_block::IpldBlock, BytesDe}; use fvm_shared::{ @@ -108,6 +109,9 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { }) .collect(); + // Track the precommit epoch for later verification + let precommit_epoch = v.epoch(); + precommit_sectors_v2( v, 1, @@ -223,8 +227,15 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { "Piece CID data mismatch: expected 0x{}, got 0x{}", hex::encode(&expected_cid_bytes), hex::encode(&data_cid_bytes[1..])); - // Verify minimum_commitment_epoch is set (this is calculated by the system) - assert!(minimum_commitment_epoch > 0, - "Minimum commitment epoch should be positive, got {}", minimum_commitment_epoch); + // Verify minimum_commitment_epoch matches the sector expiration + // The sector expiration is set to: precommit_epoch + min_sector_expiration + max_prove_commit_duration + let policy = Policy::default(); + let expected_expiration = precommit_epoch + + policy.min_sector_expiration + + max_prove_commit_duration(&policy, seal_proof).unwrap(); + + assert_eq!(minimum_commitment_epoch, expected_expiration, + "Minimum commitment epoch mismatch: expected {}, got {}", + expected_expiration, minimum_commitment_epoch); } } \ No newline at end of file From b2a252005ea5e65406c03833612e91cd4b9ff78b Mon Sep 17 00:00:00 2001 From: zenground0 Date: Fri, 29 Aug 2025 03:36:26 +0200 Subject: [PATCH 20/39] Remove unfixed ai tests --- .../miner/tests/prove_commit_sector_3_test.rs | 146 ------------------ actors/miner/tests/prove_replica_test.rs | 143 ----------------- 2 files changed, 289 deletions(-) diff --git a/actors/miner/tests/prove_commit_sector_3_test.rs b/actors/miner/tests/prove_commit_sector_3_test.rs index 100b6c2c6..31b255d35 100644 --- a/actors/miner/tests/prove_commit_sector_3_test.rs +++ b/actors/miner/tests/prove_commit_sector_3_test.rs @@ -761,149 +761,3 @@ fn assert_commit_result(expected: &[ExitCode], result: &ProveCommitSectors3Retur assert_eq!(BatchReturn::of(expected), result.activation_results); } -#[test] -fn notify_non_market_actor() { - let (h, mut rt) = setup_basic(); - let piece_size = h.sector_size as u64; - let precommits = precommit_sectors(&mut rt, &h, &[&[piece_size], &[piece_size]]); - let snos: Vec = - precommits.iter().map(|pci: &SectorPreCommitInfo| pci.sector_number).collect(); - - // Create notifications to different actors, not just STORAGE_MARKET_ACTOR - let custom_actor_1 = Address::new_id(5000); - let custom_actor_2 = Address::new_id(6000); - let evm_actor = Address::new_actor(b"evm_test_actor"); - - let mut manifests = vec![ - make_activation_manifest(snos[0], &[(piece_size, CLIENT_ID, 1000, 0)]), - make_activation_manifest(snos[1], &[(piece_size, CLIENT_ID, 1001, 0)]), - ]; - - // Add notifications to custom actors - manifests[0].pieces[0].notify.push(DataActivationNotification { - address: custom_actor_1, - payload: RawBytes::from(vec![1, 2, 3, 4]), - }); - manifests[0].pieces[0].notify.push(DataActivationNotification { - address: evm_actor, - payload: RawBytes::from(vec![5, 6, 7, 8]), - }); - manifests[1].pieces[0].notify.push(DataActivationNotification { - address: custom_actor_2, - payload: RawBytes::from(vec![9, 10, 11, 12]), - }); - - // Expect notifications to be sent to the custom actors - rt.expect_send_simple( - custom_actor_1, - SECTOR_CONTENT_CHANGED, - None, // The actual params will be set by the notification system - TokenAmount::zero(), - None, // Return value - ExitCode::OK, - ); - rt.expect_send_simple( - evm_actor, - SECTOR_CONTENT_CHANGED, - None, // The actual params will be set by the notification system - TokenAmount::zero(), - None, // Return value - ExitCode::OK, - ); - rt.expect_send_simple( - custom_actor_2, - SECTOR_CONTENT_CHANGED, - None, // The actual params will be set by the notification system - TokenAmount::zero(), - None, // Return value - ExitCode::OK, - ); - - let cfg = ProveCommitSectors3Config::default(); - let (result, _, _) = - h.prove_commit_sectors3(&rt, &manifests, false, false, false, cfg).unwrap(); - - // All sectors succeed - assert_commit_result(&[ExitCode::OK; 2], &result); - verify_weights(&rt, &h, snos[0], 0, piece_size); - verify_weights(&rt, &h, snos[1], 0, piece_size); -} - -#[test] -fn notify_multiple_actors_per_piece() { - let (h, mut rt) = setup_basic(); - let piece_size = h.sector_size as u64 / 2; - let precommits = precommit_sectors(&mut rt, &h, &[&[piece_size, piece_size]]); - let snos: Vec = - precommits.iter().map(|pci: &SectorPreCommitInfo| pci.sector_number).collect(); - - let mut manifests = vec![ - make_activation_manifest( - snos[0], - &[(piece_size, CLIENT_ID, 1000, 0), (piece_size, CLIENT_ID, 1001, 0)], - ), - ]; - - // Add notifications to multiple different actors for the same piece - let actor1 = Address::new_id(7000); - let actor2 = Address::new_id(8000); - let actor3 = Address::new_id(9000); - - manifests[0].pieces[0].notify.push(DataActivationNotification { - address: actor1, - payload: RawBytes::from(vec![1, 1, 1, 1]), - }); - manifests[0].pieces[0].notify.push(DataActivationNotification { - address: actor2, - payload: RawBytes::from(vec![2, 2, 2, 2]), - }); - manifests[0].pieces[1].notify.push(DataActivationNotification { - address: actor3, - payload: RawBytes::from(vec![3, 3, 3, 3]), - }); - manifests[0].pieces[1].notify.push(DataActivationNotification { - address: STORAGE_MARKET_ACTOR_ADDR, - payload: RawBytes::from(vec![4, 4, 4, 4]), - }); - - // Expect notifications to be sent to all actors - rt.expect_send_simple( - actor1, - SECTOR_CONTENT_CHANGED, - None, // The actual params will be set by the notification system - TokenAmount::zero(), - None, // Return value - ExitCode::OK, - ); - rt.expect_send_simple( - actor2, - SECTOR_CONTENT_CHANGED, - None, // The actual params will be set by the notification system - TokenAmount::zero(), - None, // Return value - ExitCode::OK, - ); - rt.expect_send_simple( - actor3, - SECTOR_CONTENT_CHANGED, - None, // The actual params will be set by the notification system - TokenAmount::zero(), - None, // Return value - ExitCode::OK, - ); - rt.expect_send_simple( - STORAGE_MARKET_ACTOR_ADDR, - SECTOR_CONTENT_CHANGED, - None, // The actual params will be set by the notification system - TokenAmount::zero(), - None, // Return value - ExitCode::OK, - ); - - let cfg = ProveCommitSectors3Config::default(); - let (result, _, _) = - h.prove_commit_sectors3(&rt, &manifests, false, false, false, cfg).unwrap(); - - assert_commit_result(&[ExitCode::OK], &result); - verify_weights(&rt, &h, snos[0], 0, piece_size * 2); -} diff --git a/actors/miner/tests/prove_replica_test.rs b/actors/miner/tests/prove_replica_test.rs index d295e5522..2a0f97366 100644 --- a/actors/miner/tests/prove_replica_test.rs +++ b/actors/miner/tests/prove_replica_test.rs @@ -710,146 +710,3 @@ fn assert_update_result(expected: &[ExitCode], result: &ProveReplicaUpdates3Retu assert_eq!(BatchReturn::of(expected), result.activation_results); } -#[test] -fn update_with_non_market_actor_notification() { - let (h, rt, sectors) = setup_empty_sectors(2); - let snos = sectors.iter().map(|s| s.sector_number).collect::>(); - let st: State = h.get_state(&rt); - let store = rt.store(); - let piece_size = h.sector_size as u64; - - // Create notifications to different actors, not just STORAGE_MARKET_ACTOR - let custom_actor_1 = Address::new_id(5000); - let custom_actor_2 = Address::new_id(6000); - let evm_actor = Address::new_actor(b"evm_test_actor"); - - let mut sector_updates = vec![ - make_update_manifest(&st, store, snos[0], &[(piece_size, CLIENT_ID, 1000, 0)]), - make_update_manifest(&st, store, snos[1], &[(piece_size, CLIENT_ID, 1001, 0)]), - ]; - - // Add notifications to custom actors - sector_updates[0].pieces[0].notify.push(DataActivationNotification { - address: custom_actor_1, - payload: RawBytes::from(vec![1, 2, 3, 4]), - }); - sector_updates[0].pieces[0].notify.push(DataActivationNotification { - address: evm_actor, - payload: RawBytes::from(vec![5, 6, 7, 8]), - }); - sector_updates[1].pieces[0].notify.push(DataActivationNotification { - address: custom_actor_2, - payload: RawBytes::from(vec![9, 10, 11, 12]), - }); - - // Expect notifications to be sent to the custom actors - rt.expect_send_simple( - custom_actor_1, - SECTOR_CONTENT_CHANGED, - None, // The actual params will be set by the notification system - TokenAmount::zero(), - None, // Return value - ExitCode::OK, - ); - rt.expect_send_simple( - evm_actor, - SECTOR_CONTENT_CHANGED, - None, // The actual params will be set by the notification system - TokenAmount::zero(), - None, // Return value - ExitCode::OK, - ); - rt.expect_send_simple( - custom_actor_2, - SECTOR_CONTENT_CHANGED, - None, // The actual params will be set by the notification system - TokenAmount::zero(), - None, // Return value - ExitCode::OK, - ); - - let cfg = ProveReplicaUpdatesConfig::default(); - let (result, _, _) = - h.prove_replica_updates3_batch(&rt, §or_updates, false, false, cfg).unwrap(); - - // All sectors succeed - assert_update_result(&[ExitCode::OK; 2], &result); - verify_weights(&rt, &h, snos[0], 0, piece_size); - verify_weights(&rt, &h, snos[1], 0, piece_size); -} - -#[test] -fn update_multiple_actors_per_piece() { - let (h, rt, sectors) = setup_empty_sectors(1); - let snos = sectors.iter().map(|s| s.sector_number).collect::>(); - let st: State = h.get_state(&rt); - let store = rt.store(); - let piece_size = h.sector_size as u64 / 2; - - let mut sector_updates = vec![ - make_update_manifest(&st, store, snos[0], &[(piece_size, CLIENT_ID, 1000, 0), (piece_size, CLIENT_ID, 1001, 0)]), - ]; - - // Add notifications to multiple different actors for the same piece - let actor1 = Address::new_id(7000); - let actor2 = Address::new_id(8000); - let actor3 = Address::new_id(9000); - - sector_updates[0].pieces[0].notify.push(DataActivationNotification { - address: actor1, - payload: RawBytes::from(vec![1, 1, 1, 1]), - }); - sector_updates[0].pieces[0].notify.push(DataActivationNotification { - address: actor2, - payload: RawBytes::from(vec![2, 2, 2, 2]), - }); - sector_updates[0].pieces[1].notify.push(DataActivationNotification { - address: actor3, - payload: RawBytes::from(vec![3, 3, 3, 3]), - }); - sector_updates[0].pieces[1].notify.push(DataActivationNotification { - address: STORAGE_MARKET_ACTOR_ADDR, - payload: RawBytes::from(vec![4, 4, 4, 4]), - }); - - // Expect notifications to be sent to all actors - rt.expect_send_simple( - actor1, - SECTOR_CONTENT_CHANGED, - None, // The actual params will be set by the notification system - TokenAmount::zero(), - None, // Return value - ExitCode::OK, - ); - rt.expect_send_simple( - actor2, - SECTOR_CONTENT_CHANGED, - None, // The actual params will be set by the notification system - TokenAmount::zero(), - None, // Return value - ExitCode::OK, - ); - rt.expect_send_simple( - actor3, - SECTOR_CONTENT_CHANGED, - None, // The actual params will be set by the notification system - TokenAmount::zero(), - None, // Return value - ExitCode::OK, - ); - rt.expect_send_simple( - STORAGE_MARKET_ACTOR_ADDR, - SECTOR_CONTENT_CHANGED, - None, // The actual params will be set by the notification system - TokenAmount::zero(), - None, // Return value - ExitCode::OK, - ); - - let cfg = ProveReplicaUpdatesConfig::default(); - let (result, _, _) = - h.prove_replica_updates3_batch(&rt, §or_updates, false, false, cfg).unwrap(); - - assert_update_result(&[ExitCode::OK], &result); - verify_weights(&rt, &h, snos[0], 0, piece_size * 2); -} From 76a5c8fc65fc2a1aa15dad57a0abadf592d3b131 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 19:45:41 -0600 Subject: [PATCH 21/39] fmt + test cleanup --- actors/miner/src/notifications.rs | 4 +- .../miner/tests/prove_commit_sector_3_test.rs | 9 +- actors/miner/tests/prove_replica_test.rs | 7 +- .../src/tests/evm_notification_test.rs | 286 ++++++++++-------- integration_tests/src/tests/mod.rs | 1 - test_vm/tests/suite/evm_notification_test.rs | 4 +- test_vm/tests/suite/mod.rs | 2 +- 7 files changed, 164 insertions(+), 149 deletions(-) diff --git a/actors/miner/src/notifications.rs b/actors/miner/src/notifications.rs index 1573bd729..679f3bf55 100644 --- a/actors/miner/src/notifications.rs +++ b/actors/miner/src/notifications.rs @@ -3,9 +3,7 @@ use crate::{ SectorContentChangedParams, SectorContentChangedReturn, }; use fil_actors_runtime::runtime::Runtime; -use fil_actors_runtime::{ - ActorError, AsActorError, SendError, -}; +use fil_actors_runtime::{ActorError, AsActorError, SendError}; use fvm_ipld_encoding::ipld_block::IpldBlock; use fvm_shared::address::Address; diff --git a/actors/miner/tests/prove_commit_sector_3_test.rs b/actors/miner/tests/prove_commit_sector_3_test.rs index 31b255d35..ecd1cd45d 100644 --- a/actors/miner/tests/prove_commit_sector_3_test.rs +++ b/actors/miner/tests/prove_commit_sector_3_test.rs @@ -1,15 +1,15 @@ use fvm_ipld_encoding::RawBytes; +use fvm_shared::address::Address; +use fvm_shared::econ::TokenAmount; use fvm_shared::error::ExitCode; use fvm_shared::sector::SectorNumber; use fvm_shared::{ActorID, clock::ChainEpoch}; -use fvm_shared::address::Address; -use fvm_shared::econ::TokenAmount; use num_traits::Zero; use fil_actor_miner::ext::verifreg::{AllocationClaim, SectorAllocationClaims}; use fil_actor_miner::{ - DataActivationNotification, PieceChange, ProveCommitSectors3Return, SectorChanges, - SectorOnChainInfo, SectorPreCommitInfo, SECTOR_CONTENT_CHANGED, + DataActivationNotification, PieceChange, ProveCommitSectors3Return, SECTOR_CONTENT_CHANGED, + SectorChanges, SectorOnChainInfo, SectorPreCommitInfo, }; use fil_actors_runtime::cbor::serialize; use fil_actors_runtime::test_utils::MockRuntime; @@ -760,4 +760,3 @@ fn precommit_sectors_from( fn assert_commit_result(expected: &[ExitCode], result: &ProveCommitSectors3Return) { assert_eq!(BatchReturn::of(expected), result.activation_results); } - diff --git a/actors/miner/tests/prove_replica_test.rs b/actors/miner/tests/prove_replica_test.rs index 2a0f97366..726e28c9e 100644 --- a/actors/miner/tests/prove_replica_test.rs +++ b/actors/miner/tests/prove_replica_test.rs @@ -1,15 +1,15 @@ use fvm_ipld_encoding::RawBytes; +use fvm_shared::address::Address; use fvm_shared::bigint::BigInt; use fvm_shared::econ::TokenAmount; use fvm_shared::error::ExitCode; use fvm_shared::sector::SectorNumber; use fvm_shared::{ActorID, clock::ChainEpoch}; -use fvm_shared::address::Address; use fil_actor_miner::ext::verifreg::{AllocationClaim, SectorAllocationClaims}; use fil_actor_miner::{ - DataActivationNotification, PieceChange, SectorChanges, State, daily_proof_fee, - SECTOR_CONTENT_CHANGED, + DataActivationNotification, PieceChange, SECTOR_CONTENT_CHANGED, SectorChanges, State, + daily_proof_fee, }; use fil_actor_miner::{ProveReplicaUpdates3Return, SectorOnChainInfo}; use fil_actors_runtime::cbor::serialize; @@ -709,4 +709,3 @@ fn setup_empty_sectors(count: usize) -> (ActorHarness, MockRuntime, Vec = vec![ - SectorActivationManifest { - sector_number: sector_number, - pieces: vec![ - PieceActivationManifest { - cid: piece_cid0, - size: piece_size0, - verified_allocation_key: None, - notify: vec![ - // Send notification to our EVM contract - DataActivationNotification { - address: evm_robust_addr.clone(), - payload: notification_payload.clone(), - }, - ], + let manifests: Vec = vec![SectorActivationManifest { + sector_number: sector_number, + pieces: vec![PieceActivationManifest { + cid: piece_cid0, + size: piece_size0, + verified_allocation_key: None, + notify: vec![ + // Send notification to our EVM contract + DataActivationNotification { + address: evm_robust_addr.clone(), + payload: notification_payload.clone(), }, ], - } - ]; - + }], + }]; let meta: Vec = manifests - .iter() - .map(|sector| { - let pis: Vec = - sector.pieces.iter().map(|p| PieceInfo { size: p.size, cid: p.cid }).collect(); - let commd = v.primitives().compute_unsealed_sector_cid(seal_proof, &pis).unwrap(); - PrecommitMetadata { deals: vec![], commd: CompactCommD::of(commd) } - }) - .collect(); + .iter() + .map(|sector| { + let pis: Vec = + sector.pieces.iter().map(|p| PieceInfo { size: p.size, cid: p.cid }).collect(); + let commd = v.primitives().compute_unsealed_sector_cid(seal_proof, &pis).unwrap(); + PrecommitMetadata { deals: vec![], commd: CompactCommD::of(commd) } + }) + .collect(); // Track the precommit epoch for later verification let precommit_epoch = v.epoch(); - - precommit_sectors_v2( - v, - 1, - meta, - &worker, - &miner_addr, - seal_proof, - sector_number, - true, - None, - ); + + precommit_sectors_v2(v, 1, meta, &worker, &miner_addr, seal_proof, sector_number, true, None); // Advance time to prove commit epoch let prove_time = v.epoch() + 151; @@ -139,103 +131,131 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { require_notification_success: true, }; - let prove_result = v.execute_message( - &worker, - &miner_addr, - &TokenAmount::zero(), - MinerMethod::ProveCommitSectors3 as u64, - IpldBlock::serialize_cbor(&prove_params).unwrap(), - ).unwrap(); + let prove_result = v + .execute_message( + &worker, + &miner_addr, + &TokenAmount::zero(), + MinerMethod::ProveCommitSectors3 as u64, + IpldBlock::serialize_cbor(&prove_params).unwrap(), + ) + .unwrap(); assert!(prove_result.code.is_success(), "ProveCommit failed: {}", prove_result.message); - // Verify that the EVM contract received the notifications - // Check that the EVM actor exists with correct code - let evm_actor = v.actor(&evm_actor_addr).unwrap(); - assert_eq!(evm_actor.code, *EVM_ACTOR_CODE_ID, "EVM actor has wrong code ID"); - - // 1. Call totalNotifications() to verify it equals 1 + /* ***Verify that the EVM contract received the notifications correctly*** */ + // 1. Call totalNotifications() to verify only one notification witnessed { let call_params = NotificationReceiver::totalNotificationsCall::new(()).abi_encode(); - let call_result = v.execute_message( - &worker, - &evm_robust_addr, - &TokenAmount::zero(), - fil_actor_evm::Method::InvokeContract as u64, - Some(serialize_ok(&ContractParams(call_params.to_vec()))), - ).unwrap(); - - assert!(call_result.code.is_success(), "Failed to call totalNotifications: {}", call_result.message); - + let call_result = v + .execute_message( + &worker, + &evm_robust_addr, + &TokenAmount::zero(), + fil_actor_evm::Method::InvokeContract as u64, + Some(serialize_ok(&ContractParams(call_params.to_vec()))), + ) + .unwrap(); + + assert!( + call_result.code.is_success(), + "Failed to call totalNotifications: {}", + call_result.message + ); + // Decode the return value let return_data: BytesDe = call_result.ret.unwrap().deserialize().unwrap(); let total_notifications = AlloyU256::abi_decode(&return_data.0) .expect("Failed to decode totalNotifications return value"); - assert_eq!(total_notifications, AlloyU256::from(1), "Expected 1 notification, got {}", total_notifications); + assert_eq!( + total_notifications, + AlloyU256::from(1), + "Expected 1 notification, got {}", + total_notifications + ); } - + // 2. Call getNotification(0) to verify the notification contents match exactly what was sent { - let call_params = NotificationReceiver::getNotificationCall::new((AlloyU256::from(0),)).abi_encode(); - let call_result = v.execute_message( - &worker, - &evm_robust_addr, - &TokenAmount::zero(), - fil_actor_evm::Method::InvokeContract as u64, - Some(serialize_ok(&ContractParams(call_params.to_vec()))), - ).unwrap(); - - assert!(call_result.code.is_success(), "Failed to call getNotification: {}", call_result.message); - + let call_params = + NotificationReceiver::getNotificationCall::new((AlloyU256::from(0),)).abi_encode(); + let call_result = v + .execute_message( + &worker, + &evm_robust_addr, + &TokenAmount::zero(), + fil_actor_evm::Method::InvokeContract as u64, + Some(serialize_ok(&ContractParams(call_params.to_vec()))), + ) + .unwrap(); + assert!( + call_result.code.is_success(), + "Failed to call getNotification: {}", + call_result.message + ); + // Decode the return value - it returns a tuple of (uint64, int64, bytes, uint64, bytes) let return_data: BytesDe = call_result.ret.unwrap().deserialize().unwrap(); - + // Use the generated abi_decode_returns function - let notification_result = NotificationReceiver::getNotificationCall::abi_decode_returns(&return_data.0) - .expect("Failed to decode getNotification return value"); - + let notification_result = + NotificationReceiver::getNotificationCall::abi_decode_returns(&return_data.0) + .expect("Failed to decode getNotification return value"); + let received_sector = notification_result.sector; let minimum_commitment_epoch = notification_result.minimumCommitmentEpoch; let data_cid_bytes = notification_result.dataCid; let received_piece_size = notification_result.pieceSize; let received_payload = notification_result.payload; - - // Verify the notification fields match EXACTLY what was sent in the manifest - - // Check sector number matches what we set in the manifest - assert_eq!(received_sector, sector_number, - "Sector number mismatch: expected {}, got {}", sector_number, received_sector); - - // Check piece size matches what we set in the manifest - assert_eq!(received_piece_size, piece_size0.0, - "Piece size mismatch: expected {}, got {}", piece_size0.0, received_piece_size); - + + assert_eq!( + received_sector, sector_number, + "Sector number mismatch: expected {}, got {}", + sector_number, received_sector + ); + + assert_eq!( + received_piece_size, piece_size0.0, + "Piece size mismatch: expected {}, got {}", + piece_size0.0, received_piece_size + ); + // Check payload matches exactly what we set in the manifest (hex "cafe") - let expected_payload_bytes = hex::decode("cafe").unwrap(); - assert_eq!(received_payload.as_ref(), expected_payload_bytes.as_slice(), - "Payload mismatch: expected 0x{}, got 0x{}", - hex::encode(&expected_payload_bytes), hex::encode(&received_payload)); - + let expected_payload_bytes = notification_payload.to_vec(); + assert_eq!( + received_payload.as_ref(), + expected_payload_bytes.as_slice(), + "Payload mismatch: expected 0x{}, got 0x{}", + hex::encode(&expected_payload_bytes), + hex::encode(&received_payload) + ); + // Check the piece CID data is present // The contract receives the CID with an extra leading byte from the CBOR encoding, // so we verify it contains the expected CID data after the first byte let expected_cid_bytes = piece_cid0.to_bytes(); assert!(!data_cid_bytes.is_empty(), "Data CID should not be empty"); - assert!(data_cid_bytes.len() > expected_cid_bytes.len(), "Data CID seems too short"); - // Verify the CID data matches (skipping the first byte which is CBOR encoding) - assert_eq!(&data_cid_bytes[1..], expected_cid_bytes, - "Piece CID data mismatch: expected 0x{}, got 0x{}", - hex::encode(&expected_cid_bytes), hex::encode(&data_cid_bytes[1..])); - + // Verify the CID data matches + assert_eq!(data_cid_bytes[0], 0, "Data CID should start with 0x00 for ipld cbor reasons"); + assert_eq!( + &data_cid_bytes[1..], + expected_cid_bytes, + "Piece CID data mismatch: expected 0x{}, got 0x{}", + hex::encode(&expected_cid_bytes), + hex::encode(&data_cid_bytes[1..]) + ); + // Verify minimum_commitment_epoch matches the sector expiration // The sector expiration is set to: precommit_epoch + min_sector_expiration + max_prove_commit_duration let policy = Policy::default(); - let expected_expiration = precommit_epoch - + policy.min_sector_expiration + let expected_expiration = precommit_epoch + + policy.min_sector_expiration + max_prove_commit_duration(&policy, seal_proof).unwrap(); - - assert_eq!(minimum_commitment_epoch, expected_expiration, - "Minimum commitment epoch mismatch: expected {}, got {}", - expected_expiration, minimum_commitment_epoch); + + assert_eq!( + minimum_commitment_epoch, expected_expiration, + "Minimum commitment epoch mismatch: expected {}, got {}", + expected_expiration, minimum_commitment_epoch + ); } -} \ No newline at end of file +} diff --git a/integration_tests/src/tests/mod.rs b/integration_tests/src/tests/mod.rs index 5a2729f8f..b82e3a94f 100644 --- a/integration_tests/src/tests/mod.rs +++ b/integration_tests/src/tests/mod.rs @@ -46,4 +46,3 @@ mod prove_commit_niporep_test; pub use prove_commit_niporep_test::*; mod replica_update3_test; pub use replica_update3_test::*; - diff --git a/test_vm/tests/suite/evm_notification_test.rs b/test_vm/tests/suite/evm_notification_test.rs index 15c5e7c3a..77e72e0c9 100644 --- a/test_vm/tests/suite/evm_notification_test.rs +++ b/test_vm/tests/suite/evm_notification_test.rs @@ -1,4 +1,4 @@ -use fil_actors_integration_tests::tests::{evm_receives_ddo_notifications_test}; +use fil_actors_integration_tests::tests::evm_receives_ddo_notifications_test; use fil_actors_runtime::test_blockstores::MemoryBlockstore; use test_vm::TestVM; @@ -8,4 +8,4 @@ fn evm_notification() { let store = MemoryBlockstore::new(); let v = TestVM::new_with_singletons(store); evm_receives_ddo_notifications_test(&v); -} \ No newline at end of file +} diff --git a/test_vm/tests/suite/mod.rs b/test_vm/tests/suite/mod.rs index 320176ffb..aaca31a93 100644 --- a/test_vm/tests/suite/mod.rs +++ b/test_vm/tests/suite/mod.rs @@ -5,8 +5,8 @@ mod change_beneficiary_test; mod change_owner_test; mod commit_post_test; mod datacap_tests; -mod evm_test; mod evm_notification_test; +mod evm_test; mod extend_sectors_test; mod init_test; mod market_miner_withdrawal_test; From d6067fe6b44e1f03bcefe60d9bb527cdf1a120b7 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 20:48:46 -0600 Subject: [PATCH 22/39] clippy --- integration_tests/src/tests/evm_notification_test.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 8ff2be277..94b8cb409 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -5,9 +5,7 @@ use fil_actor_miner::{ CompactCommD, DataActivationNotification, Method as MinerMethod, PieceActivationManifest, ProveCommitSectors3Params, SectorActivationManifest, max_prove_commit_duration, }; -use fil_actors_runtime::{ - EAM_ACTOR_ADDR, runtime::Policy, test_utils::EVM_ACTOR_CODE_ID, test_utils::make_piece_cid, -}; +use fil_actors_runtime::{EAM_ACTOR_ADDR, runtime::Policy, test_utils::make_piece_cid}; use fvm_ipld_encoding::{BytesDe, RawBytes, ipld_block::IpldBlock}; use fvm_shared::{ address::Address, @@ -73,7 +71,6 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { let create_return: fil_actor_eam::CreateReturn = create_result.ret.unwrap().deserialize().expect("Failed to decode create return"); - let evm_actor_addr = Address::new_id(create_return.actor_id); let evm_robust_addr = create_return.robust_address.unwrap(); let _evm_eth_addr = create_return.eth_address; From cf114b0fc4e96fdec19a967d2f20969ab56e0adc Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 21:13:26 -0600 Subject: [PATCH 23/39] more clippy --- integration_tests/src/tests/evm_notification_test.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 94b8cb409..f3e4fa671 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -8,7 +8,6 @@ use fil_actor_miner::{ use fil_actors_runtime::{EAM_ACTOR_ADDR, runtime::Policy, test_utils::make_piece_cid}; use fvm_ipld_encoding::{BytesDe, RawBytes, ipld_block::IpldBlock}; use fvm_shared::{ - address::Address, econ::TokenAmount, piece::PaddedPieceSize, piece::PieceInfo, @@ -83,7 +82,7 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { let notification_payload = RawBytes::from(hex::decode("cafe").unwrap()); let manifests: Vec = vec![SectorActivationManifest { - sector_number: sector_number, + sector_number, pieces: vec![PieceActivationManifest { cid: piece_cid0, size: piece_size0, @@ -91,7 +90,7 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { notify: vec![ // Send notification to our EVM contract DataActivationNotification { - address: evm_robust_addr.clone(), + address: evm_robust_addr, payload: notification_payload.clone(), }, ], From a94a0fc246ef1ebcfd7f2d190de371b1229c73d9 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 21:17:47 -0600 Subject: [PATCH 24/39] more clippy --- actors/miner/tests/prove_commit_sector_3_test.rs | 5 +---- actors/miner/tests/prove_replica_test.rs | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/actors/miner/tests/prove_commit_sector_3_test.rs b/actors/miner/tests/prove_commit_sector_3_test.rs index ecd1cd45d..0f380b522 100644 --- a/actors/miner/tests/prove_commit_sector_3_test.rs +++ b/actors/miner/tests/prove_commit_sector_3_test.rs @@ -1,14 +1,11 @@ use fvm_ipld_encoding::RawBytes; -use fvm_shared::address::Address; -use fvm_shared::econ::TokenAmount; use fvm_shared::error::ExitCode; use fvm_shared::sector::SectorNumber; use fvm_shared::{ActorID, clock::ChainEpoch}; -use num_traits::Zero; use fil_actor_miner::ext::verifreg::{AllocationClaim, SectorAllocationClaims}; use fil_actor_miner::{ - DataActivationNotification, PieceChange, ProveCommitSectors3Return, SECTOR_CONTENT_CHANGED, + DataActivationNotification, PieceChange, ProveCommitSectors3Return, SectorChanges, SectorOnChainInfo, SectorPreCommitInfo, }; use fil_actors_runtime::cbor::serialize; diff --git a/actors/miner/tests/prove_replica_test.rs b/actors/miner/tests/prove_replica_test.rs index 726e28c9e..0a7c12a67 100644 --- a/actors/miner/tests/prove_replica_test.rs +++ b/actors/miner/tests/prove_replica_test.rs @@ -1,5 +1,4 @@ use fvm_ipld_encoding::RawBytes; -use fvm_shared::address::Address; use fvm_shared::bigint::BigInt; use fvm_shared::econ::TokenAmount; use fvm_shared::error::ExitCode; @@ -8,7 +7,7 @@ use fvm_shared::{ActorID, clock::ChainEpoch}; use fil_actor_miner::ext::verifreg::{AllocationClaim, SectorAllocationClaims}; use fil_actor_miner::{ - DataActivationNotification, PieceChange, SECTOR_CONTENT_CHANGED, SectorChanges, State, + DataActivationNotification, PieceChange, SectorChanges, State, daily_proof_fee, }; use fil_actor_miner::{ProveReplicaUpdates3Return, SectorOnChainInfo}; From 3db6a7e5fae79adf4c91cc9dd0d733f9d6707b82 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Thu, 28 Aug 2025 21:23:13 -0600 Subject: [PATCH 25/39] fmt --- actors/miner/tests/prove_commit_sector_3_test.rs | 4 ++-- actors/miner/tests/prove_replica_test.rs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/actors/miner/tests/prove_commit_sector_3_test.rs b/actors/miner/tests/prove_commit_sector_3_test.rs index 0f380b522..a8963f539 100644 --- a/actors/miner/tests/prove_commit_sector_3_test.rs +++ b/actors/miner/tests/prove_commit_sector_3_test.rs @@ -5,8 +5,8 @@ use fvm_shared::{ActorID, clock::ChainEpoch}; use fil_actor_miner::ext::verifreg::{AllocationClaim, SectorAllocationClaims}; use fil_actor_miner::{ - DataActivationNotification, PieceChange, ProveCommitSectors3Return, - SectorChanges, SectorOnChainInfo, SectorPreCommitInfo, + DataActivationNotification, PieceChange, ProveCommitSectors3Return, SectorChanges, + SectorOnChainInfo, SectorPreCommitInfo, }; use fil_actors_runtime::cbor::serialize; use fil_actors_runtime::test_utils::MockRuntime; diff --git a/actors/miner/tests/prove_replica_test.rs b/actors/miner/tests/prove_replica_test.rs index 0a7c12a67..5b22be387 100644 --- a/actors/miner/tests/prove_replica_test.rs +++ b/actors/miner/tests/prove_replica_test.rs @@ -7,8 +7,7 @@ use fvm_shared::{ActorID, clock::ChainEpoch}; use fil_actor_miner::ext::verifreg::{AllocationClaim, SectorAllocationClaims}; use fil_actor_miner::{ - DataActivationNotification, PieceChange, SectorChanges, State, - daily_proof_fee, + DataActivationNotification, PieceChange, SectorChanges, State, daily_proof_fee, }; use fil_actor_miner::{ProveReplicaUpdates3Return, SectorOnChainInfo}; use fil_actors_runtime::cbor::serialize; From 02d418daf5ba80bfcaaeebe2335f109660043b4d Mon Sep 17 00:00:00 2001 From: zenground0 Date: Tue, 2 Sep 2025 15:01:43 -0600 Subject: [PATCH 26/39] Review Response: check before and afte --- .../src/tests/evm_notification_test.rs | 250 ++++++++++-------- 1 file changed, 136 insertions(+), 114 deletions(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index f3e4fa671..baf748885 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -13,9 +13,11 @@ use fvm_shared::{ piece::PieceInfo, sector::{RegisteredSealProof, SectorNumber}, }; +use fvm_shared::address::Address; use num_traits::Zero; use vm_api::VM; use vm_api::util::serialize_ok; +use cid::Cid; use crate::util::{ PrecommitMetadata, advance_by_deadline_to_epoch, create_accounts, create_miner, @@ -112,6 +114,9 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { precommit_sectors_v2(v, 1, meta, &worker, &miner_addr, seal_proof, sector_number, true, None); + // Before prove commit no notifications have been received + check_receiver_notification_count(v, &worker, &evm_robust_addr, 0); + // Advance time to prove commit epoch let prove_time = v.epoch() + 151; advance_by_deadline_to_epoch(v, &miner_addr, prove_time); @@ -140,118 +145,135 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { assert!(prove_result.code.is_success(), "ProveCommit failed: {}", prove_result.message); /* ***Verify that the EVM contract received the notifications correctly*** */ - // 1. Call totalNotifications() to verify only one notification witnessed - { - let call_params = NotificationReceiver::totalNotificationsCall::new(()).abi_encode(); - let call_result = v - .execute_message( - &worker, - &evm_robust_addr, - &TokenAmount::zero(), - fil_actor_evm::Method::InvokeContract as u64, - Some(serialize_ok(&ContractParams(call_params.to_vec()))), - ) - .unwrap(); - - assert!( - call_result.code.is_success(), - "Failed to call totalNotifications: {}", - call_result.message - ); - - // Decode the return value - let return_data: BytesDe = call_result.ret.unwrap().deserialize().unwrap(); - let total_notifications = AlloyU256::abi_decode(&return_data.0) - .expect("Failed to decode totalNotifications return value"); - assert_eq!( - total_notifications, - AlloyU256::from(1), - "Expected 1 notification, got {}", - total_notifications - ); - } - - // 2. Call getNotification(0) to verify the notification contents match exactly what was sent - { - let call_params = - NotificationReceiver::getNotificationCall::new((AlloyU256::from(0),)).abi_encode(); - let call_result = v - .execute_message( - &worker, - &evm_robust_addr, - &TokenAmount::zero(), - fil_actor_evm::Method::InvokeContract as u64, - Some(serialize_ok(&ContractParams(call_params.to_vec()))), - ) - .unwrap(); - assert!( - call_result.code.is_success(), - "Failed to call getNotification: {}", - call_result.message - ); - - // Decode the return value - it returns a tuple of (uint64, int64, bytes, uint64, bytes) - let return_data: BytesDe = call_result.ret.unwrap().deserialize().unwrap(); - - // Use the generated abi_decode_returns function - let notification_result = - NotificationReceiver::getNotificationCall::abi_decode_returns(&return_data.0) - .expect("Failed to decode getNotification return value"); - - let received_sector = notification_result.sector; - let minimum_commitment_epoch = notification_result.minimumCommitmentEpoch; - let data_cid_bytes = notification_result.dataCid; - let received_piece_size = notification_result.pieceSize; - let received_payload = notification_result.payload; - - assert_eq!( - received_sector, sector_number, - "Sector number mismatch: expected {}, got {}", - sector_number, received_sector - ); - - assert_eq!( - received_piece_size, piece_size0.0, - "Piece size mismatch: expected {}, got {}", - piece_size0.0, received_piece_size - ); - - // Check payload matches exactly what we set in the manifest (hex "cafe") - let expected_payload_bytes = notification_payload.to_vec(); - assert_eq!( - received_payload.as_ref(), - expected_payload_bytes.as_slice(), - "Payload mismatch: expected 0x{}, got 0x{}", - hex::encode(&expected_payload_bytes), - hex::encode(&received_payload) - ); - - // Check the piece CID data is present - // The contract receives the CID with an extra leading byte from the CBOR encoding, - // so we verify it contains the expected CID data after the first byte - let expected_cid_bytes = piece_cid0.to_bytes(); - assert!(!data_cid_bytes.is_empty(), "Data CID should not be empty"); - // Verify the CID data matches - assert_eq!(data_cid_bytes[0], 0, "Data CID should start with 0x00 for ipld cbor reasons"); - assert_eq!( - &data_cid_bytes[1..], - expected_cid_bytes, - "Piece CID data mismatch: expected 0x{}, got 0x{}", - hex::encode(&expected_cid_bytes), - hex::encode(&data_cid_bytes[1..]) - ); - - // Verify minimum_commitment_epoch matches the sector expiration - // The sector expiration is set to: precommit_epoch + min_sector_expiration + max_prove_commit_duration - let policy = Policy::default(); - let expected_expiration = precommit_epoch - + policy.min_sector_expiration - + max_prove_commit_duration(&policy, seal_proof).unwrap(); - - assert_eq!( - minimum_commitment_epoch, expected_expiration, - "Minimum commitment epoch mismatch: expected {}, got {}", - expected_expiration, minimum_commitment_epoch - ); - } + let policy = Policy::default(); + let expected_notification = ExpectedNotification { + sector: sector_number, + minimum_commitment_epoch: precommit_epoch + policy.min_sector_expiration + max_prove_commit_duration(&policy, seal_proof).unwrap(), + piece_cid: piece_cid0, + piece_size: piece_size0.0, + payload: notification_payload.to_vec(), + }; + + check_receiver_notification_count(v, &worker, &evm_robust_addr, 1); + check_receiver_notification_at(v, &worker, &evm_robust_addr, 0, &expected_notification); +} + +// Helper functions checking state of receiver contract + +pub fn check_receiver_notification_count(v: &dyn VM, sender_addr: &Address, receiver_addr: &Address, expected_count: u64) { + let call_params = NotificationReceiver::totalNotificationsCall::new(()).abi_encode(); + let call_result = v + .execute_message( + &sender_addr, + &receiver_addr, + &TokenAmount::zero(), + fil_actor_evm::Method::InvokeContract as u64, + Some(serialize_ok(&ContractParams(call_params.to_vec()))), + ) + .unwrap(); + + assert!( + call_result.code.is_success(), + "Failed to call totalNotifications: {}", + call_result.message + ); + + // Decode the return value + let return_data: BytesDe = call_result.ret.unwrap().deserialize().unwrap(); + let total_notifications = AlloyU256::abi_decode(&return_data.0) + .expect("Failed to decode totalNotifications return value"); + assert_eq!( + total_notifications, + AlloyU256::from(expected_count), + "Expected {} notification(s), got {}", + expected_count, + total_notifications + ); +} + +/// Struct to hold all notification values for checking against contract state. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ExpectedNotification { + pub sector: u64, + pub minimum_commitment_epoch: i64, + pub piece_cid: Cid, + pub piece_size: u64, + pub payload: Vec, +} + +pub fn check_receiver_notification_at(v: &dyn VM, sender_addr: &Address, receiver_addr: &Address, index: u64, expected: &ExpectedNotification) { + let call_params = + NotificationReceiver::getNotificationCall::new((AlloyU256::from(index),)).abi_encode(); + let call_result = v + .execute_message( + &sender_addr, + &receiver_addr, + &TokenAmount::zero(), + fil_actor_evm::Method::InvokeContract as u64, + Some(serialize_ok(&ContractParams(call_params.to_vec()))), + ) + .unwrap(); + assert!( + call_result.code.is_success(), + "Failed to call getNotification: {}", + call_result.message + ); + + // Decode the return value - it returns a tuple of (uint64, int64, bytes, uint64, bytes) + let return_data: BytesDe = call_result.ret.unwrap().deserialize().unwrap(); + + // Use the generated abi_decode_returns function + let notification_result = + NotificationReceiver::getNotificationCall::abi_decode_returns(&return_data.0) + .expect("Failed to decode getNotification return value"); + + let received_sector = notification_result.sector; + let minimum_commitment_epoch = notification_result.minimumCommitmentEpoch; + let data_cid_bytes = notification_result.dataCid; + let received_piece_size = notification_result.pieceSize; + let received_payload = notification_result.payload; + + assert_eq!( + received_sector, expected.sector, + "Sector number mismatch: expected {}, got {}", + expected.sector, received_sector + ); + + assert_eq!( + received_piece_size, expected.piece_size, + "Piece size mismatch: expected {}, got {}", + expected.piece_size, received_piece_size + ); + + let expected_payload_bytes = expected.payload.to_vec(); + assert_eq!( + received_payload.as_ref(), + expected_payload_bytes.as_slice(), + "Payload mismatch: expected 0x{:x?}, got 0x{:x?}", + &expected_payload_bytes, + &received_payload.as_ref() + ); + + // Check the piece CID data is present + // The contract receives the CID with an extra leading byte from the CBOR encoding, + // so we verify it contains the expected CID data after the first byte + let expected_cid_bytes = expected.piece_cid.to_bytes(); + assert!(!data_cid_bytes.is_empty(), "Data CID should not be empty"); + // Verify the CID data matches + assert_eq!(data_cid_bytes[0], 0, "Data CID should start with 0x00 for ipld cbor reasons"); + assert_eq!( + &data_cid_bytes[1..], + expected_cid_bytes, + "Piece CID data mismatch: expected {:x?}, got {:x?}", + &expected_cid_bytes, + &data_cid_bytes[1..] + ); + + assert_eq!( + minimum_commitment_epoch, expected.minimum_commitment_epoch, + "Minimum commitment epoch mismatch: expected {}, got {}", + expected.minimum_commitment_epoch, minimum_commitment_epoch + ); } + + From d78521306eff569647eb7e661e2c7d24f7df908a Mon Sep 17 00:00:00 2001 From: zenground0 Date: Tue, 2 Sep 2025 21:58:03 -0600 Subject: [PATCH 27/39] Attempt isMiner actor receiver contract --- .../tests/contracts/NotificationReceiver.sol | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/actors/evm/tests/contracts/NotificationReceiver.sol b/actors/evm/tests/contracts/NotificationReceiver.sol index 884af6981..d0bd56bd7 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.sol +++ b/actors/evm/tests/contracts/NotificationReceiver.sol @@ -98,6 +98,7 @@ contract NotificationReceiver { * All notifications are accepted so CBOR true returned for every piece of every notified sector */ function processSectorContentChanged(bytes memory params) internal returns (bytes memory) { + require(isMinerActor(msg.sender), "Only miner actor can call this function"); uint checkTupleLen; uint byteIdx = 0; @@ -176,6 +177,96 @@ contract NotificationReceiver { return getCBORData(ret_acc); } + /* Filecoin internal call helpers to enable isMiner check */ + + // FVM specific precompiles + address constant RESOLVE_ADDRESS_PRECOMPILE_ADDR = 0xFE00000000000000000000000000000000000001; + address constant CALL_ACTOR_ADDRESS = 0xfe00000000000000000000000000000000000003; + + // FVM system flags + uint64 constant READ_ONLY_FLAG = 0x00000001; + uint64 constant DEFAULT_FLAG = 0x00000000; + uint64 constant DAG_CBOR_CODEC = 0x71; + uint64 constant CBOR_CODEC = 0x51; + uint64 constant NONE_CODEC = 0x00; + + + // Power actor constants + uint64 constant MINER_RAW_POWER_METHOD_NUMBER = 3753401894; + uint64 constant POWER_ACTOR_ID = 4; + + // msg.sender to actor id conversion + address constant U64_MASK = 0xFffFfFffffFfFFffffFFFffF0000000000000000; + address constant ZERO_ID_ADDRESS = 0xfF00000000000000000000000000000000000000; + address constant MAX_U64 = 0x000000000000000000000000fFFFFFffFFFFfffF; + + + function isMinerActor(address caller) internal returns (bool) { + (bool isNative, uint64 minerID) = isIDAddress(caller); + require(isNative, "caller is not an ID addr"); + CBORBuffer memory buf = createCBOR(8); + writeUInt64(buf, minerID); + bytes memory rawRequest = getCBORData(buf); + (int256 exit,) = callById(POWER_ACTOR_ID, MINER_RAW_POWER_METHOD_NUMBER, CBOR_CODEC, rawRequest, 0, false); + // If the call succeeds, the address is a registered miner + return exit == 0; + } + + function isIDAddress(address _a) internal pure returns (bool isID, uint64 id) { + /// @solidity memory-safe-assembly + assembly { + // Zeroes out the last 8 bytes of _a + let a_mask := and(_a, U64_MASK) + + // If the result is equal to the ZERO_ID_ADDRESS, + // _a is an ID address. + if eq(a_mask, ZERO_ID_ADDRESS) { + isID := true + id := and(_a, MAX_U64) + } + } + } + + // Stripped down version of callByID to query power actor in our use case + function callById( + uint64 target, + uint256 method_num, + uint64 codec, + bytes memory raw_request, + uint256 value, + bool static_call + ) internal returns (int256, bytes memory) { + (bool success, bytes memory data) = address(CALL_ACTOR_ADDRESS).delegatecall( + abi.encode(uint64(method_num), value, static_call ? READ_ONLY_FLAG : DEFAULT_FLAG, codec, raw_request, target) + ); + if (!success) { + revert("fail to call actor"); + } + + return readRespData(data); + } + + function readRespData(bytes memory raw_response) internal pure returns (int256, bytes memory) { + (int256 exit, uint64 return_codec, bytes memory return_value) = abi.decode(raw_response, (int256, uint64, bytes)); + + if (return_codec == NONE_CODEC) { + if (return_value.length != 0) { + revert("invalid response length"); + } + } else if (return_codec == CBOR_CODEC || return_codec == DAG_CBOR_CODEC) { + if (return_value.length == 0) { + revert("invalid response length"); + } + } else { + revert("invalid codec"); + } + + return (exit, return_value); + } + + + + /* *** CBOR parsing *** */ uint8 constant MajUnsignedInt = 0; @@ -402,6 +493,13 @@ contract NotificationReceiver { appendUint8(buf.buf, uint8((MajOther << 5) | (val ? True_Type : False_Type))); } + /** + * @dev Write a Uint64 value + */ + function writeUInt64(CBORBuffer memory buf, uint64 value) internal pure { + writeFixedNumeric(buf, MajUnsignedInt, value); + } + // === INTERNAL HELPER FUNCTIONS === function initBuffer(Buffer memory buf, uint capacity) private pure { From d58fcb46966e5d4a1077af246b9f6be9d46ddf16 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Wed, 3 Sep 2025 07:45:54 +0200 Subject: [PATCH 28/39] Correct hex --- .../tests/contracts/NotificationReceiver.hex | 2 +- .../src/tests/evm_notification_test.rs | 27 +++++++++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/actors/evm/tests/contracts/NotificationReceiver.hex b/actors/evm/tests/contracts/NotificationReceiver.hex index e7d87da62..49623527e 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.hex +++ b/actors/evm/tests/contracts/NotificationReceiver.hex @@ -1 +1 @@ -60806040525f60035f6101000a81548160ff0219169083151502179055503480156027575f80fd5b50612888806100355f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063868e10c411610059578063868e10c41461013c5780638777d4d71461016e578063c153e97f1461018c578063ec680ea2146101c057610086565b806334c1f9441461008a57806344794f4f146100be5780634cbb3601146100ee578063529825951461010c575b5f80fd5b6100a4600480360381019061009f91906116b5565b6101f0565b6040516100b595949392919061178d565b60405180910390f35b6100d860048036038101906100d39190611816565b61036e565b6040516100e59190611850565b60405180910390f35b6100f661039f565b6040516101039190611883565b60405180910390f35b61012660048036038101906101219190611816565b6103b1565b6040516101339190611953565b60405180910390f35b61015660048036038101906101519190611a9f565b61042c565b60405161016593929190611b0b565b60405180910390f35b610176610501565b6040516101839190611850565b60405180910390f35b6101a660048036038101906101a191906116b5565b610507565b6040516101b795949392919061178d565b60405180910390f35b6101da60048036038101906101d59190611b47565b61074a565b6040516101e79190611850565b60405180910390f35b5f81815481106101fe575f80fd5b905f5260205f2090600402015f91509050805f015f9054906101000a900467ffffffffffffffff1690805f0160089054906101000a900460070b9080600101805461024890611bb2565b80601f016020809104026020016040519081016040528092919081815260200182805461027490611bb2565b80156102bf5780601f10610296576101008083540402835291602001916102bf565b820191905f5260205f20905b8154815290600101906020018083116102a257829003601f168201915b505050505090806002015f9054906101000a900467ffffffffffffffff16908060030180546102ed90611bb2565b80601f016020809104026020016040519081016040528092919081815260200182805461031990611bb2565b80156103645780601f1061033b57610100808354040283529160200191610364565b820191905f5260205f20905b81548152906001019060200180831161034757829003601f168201915b5050505050905085565b5f60015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f20805490509050919050565b60035f9054906101000a900460ff1681565b606060015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561042057602002820191905f5260205f20905b81548152602001906001019080831161040c575b50505050509050919050565b5f80606060518567ffffffffffffffff161461047d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047490611c3c565b60405180910390fd5b637942460367ffffffffffffffff168667ffffffffffffffff16036104bd575f6104a685610775565b90505f605190505f818394509450945050506104f8565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ef90611ca4565b60405180910390fd5b93509350939050565b60025481565b5f8060605f60605f805490508610610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b90611d0c565b60405180910390fd5b5f80878154811061056857610567611d2a565b5b905f5260205f2090600402016040518060a00160405290815f82015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020015f820160089054906101000a900460070b60070b60070b81526020016001820180546105db90611bb2565b80601f016020809104026020016040519081016040528092919081815260200182805461060790611bb2565b80156106525780601f1061062957610100808354040283529160200191610652565b820191905f5260205f20905b81548152906001019060200180831161063557829003601f168201915b50505050508152602001600282015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160038201805461069c90611bb2565b80601f01602080910402602001604051908101604052809291908181526020018280546106c890611bb2565b80156107135780601f106106ea57610100808354040283529160200191610713565b820191905f5260205f20905b8154815290600101906020018083116106f657829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b6001602052815f5260405f208181548110610763575f80fd5b905f5260205f20015f91509150505481565b60605f805f90505f6107878583610af3565b80935081925050505f81116107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c890611dc7565b60405180910390fd5b6107d961163f565b6107e36040610b72565b90506107ef8183610b8c565b5f5b82811015610ade576108038785610af3565b80955081965050506003851461084e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084590611e2f565b60405180910390fd5b5f6108598886610b9c565b80965081925050505f61086c8987610c1a565b80975081925050505f61087f8a88610af3565b80985081925050506108918582610b8c565b5f5b81811015610acd576108a58b89610af3565b809950819a505050600389146108f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e790611e97565b60405180910390fd5b60606108fc8c8a610ca9565b809a5081925050505f61090f8d8b610b9c565b809b50819250505060606109238e8c610ca9565b809c5081925050505f808054905090505f6040518060a001604052808a67ffffffffffffffff1681526020018960070b81526020018681526020018567ffffffffffffffff16815260200184815250908060018154018082558091505060019003905f5260205f2090600402015f909190919091505f820151815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506020820151815f0160086101000a81548167ffffffffffffffff021916908360070b67ffffffffffffffff1602179055506040820151816001019081610a0a9190612052565b506060820151816002015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506080820151816003019081610a4e9190612052565b50505060015f8967ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f909190919091505560025f815480929190610aac9061214e565b9190505550610abc8a6001610eab565b505050508080600101915050610893565b5050505080806001019150506107f1565b50610ae881610ed4565b945050505050919050565b5f805f80610b018686610ee4565b8167ffffffffffffffff169150809750819350829450505050600460ff168260ff1614610b63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5a906121df565b60405180910390fd5b80859350935050509250929050565b610b7a61163f565b610b87815f015183611100565b919050565b610b9882600483611169565b5050565b5f805f80610baa8686610ee4565b8167ffffffffffffffff1691508097508193508294505050505f60ff168260ff1614610c0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c029061226d565b60405180910390fd5b80859350935050509250929050565b5f805f80610c288686610ee4565b8167ffffffffffffffff169150809750819350829450505050600160ff168260ff161480610c5b57505f60ff168260ff16145b610c9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c91906122fb565b60405180910390fd5b80859350935050509250929050565b60605f805f610cb88686610ee4565b8167ffffffffffffffff169150809750819350829450505050600660ff168260ff161480610cec5750600260ff168260ff16145b610d2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2290612389565b60405180910390fd5b600660ff168260ff1603610da657610d438686610ee4565b8167ffffffffffffffff169150809750819350829450505050600260ff168260ff1614610da5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9c906123f1565b60405180910390fd5b5b5f8186610db3919061240f565b90505f8267ffffffffffffffff811115610dd057610dcf61197b565b5b6040519080825280601f01601f191660200182016040528015610e025781602001600182028036833780820191505090505b5090505f808890505b83811015610e8d57898181518110610e2657610e25611d2a565b5b602001015160f81c60f81b838381518110610e4457610e43611d2a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053508180610e7d9061214e565b9250508080600101915050610e0b565b50818489610e9b919061240f565b9650965050505050509250929050565b610ed0825f015182610ebe576014610ec1565b60155b6005600760ff16901b176112ab565b5050565b6060815f01515f01519050919050565b5f805f80610ef28686611305565b9050600185610f01919061240f565b94505f600560e0831660ff16901c90505f601f83169050601c8160ff1610610f5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f55906124b2565b60405180910390fd5b60188160ff161015610f81578181888160ff1691509550955095505050506110f9565b60188160ff1603611007575f610f978989611305565b9050600188610fa6919061240f565b975060188160ff161015610fef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe69061251a565b60405180910390fd5b8281898160ff169150965096509650505050506110f9565b60198160ff1603611047575f61101d898961137f565b905060028861102c919061240f565b97508281898161ffff169150965096509650505050506110f9565b601a8160ff1603611089575f61105d89896113e7565b905060048861106c919061240f565b97508281898163ffffffff169150965096509650505050506110f9565b601b8160ff16146110cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c690612582565b60405180910390fd5b5f6110da898961144f565b90506008886110e9919061240f565b9750828189965096509650505050505b9250925092565b5f60208261110e91906125cd565b1461113a5760208161112091906125cd565b602061112c91906125fd565b81611137919061240f565b90505b808260200181815250506040518083525f81528181016020018181101561115f575f80fd5b8060405250505050565b60178167ffffffffffffffff161161119957611194835f01518260058560ff16901b60ff16176112ab565b6112a6565b60ff8167ffffffffffffffff16116111e0576111c2835f0151601860058560ff16901b176112ab565b6111db835f01518267ffffffffffffffff1660016114b7565b6112a5565b61ffff8167ffffffffffffffff16116112285761120a835f0151601960058560ff16901b176112ab565b611223835f01518267ffffffffffffffff1660026114b7565b6112a4565b63ffffffff8167ffffffffffffffff161161127257611254835f0151601a60058560ff16901b176112ab565b61126d835f01518267ffffffffffffffff1660046114b7565b6112a3565b611289835f0151601b60058560ff16901b176112ab565b6112a2835f01518267ffffffffffffffff1660086114b7565b5b5b5b5b505050565b5f825f01515190505f6001826112c1919061240f565b9050836020015182106112e5576112e4846002836112df9190612630565b611533565b5b835160208382010184815381518311156112fd578282525b505050505050565b5f600182611313919061240f565b83511015611356576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134d906126bb565b60405180910390fd5b82828151811061136957611368611d2a565b5b602001015160f81c60f81b60f81c905092915050565b5f60028261138d919061240f565b835110156113d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c7906126bb565b60405180910390fd5b5f8260200184015190508060f01c91505092915050565b5f6004826113f5919061240f565b83511015611438576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142f906126bb565b60405180910390fd5b5f8260200184015190508060e01c91505092915050565b5f60088261145d919061240f565b835110156114a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611497906126bb565b60405180910390fd5b5f8260200184015190508060c01c91505092915050565b5f835f01515190505f81836114cc919061240f565b905084602001518111156114f1576114f0856002836114eb9190612630565b611533565b5b5f6001846101006115029190612808565b61150c91906125fd565b905085518281018683198251161781528151841115611529578382525b5050505050505050565b5f825f015190506115448383611100565b61154e8382611553565b505050565b5f815190505f835f01515190505f828261156d919061240f565b90508460200151811115611592576115918560028361158c9190612630565b611533565b5b5f80865180518560208301019350808511156115ac578482525b60208801925050505b602085106115f357805182526020826115ce919061240f565b91506020816115dd919061240f565b90506020856115ec91906125fd565b94506115b5565b5f851115611636575f600186602061160b91906125fd565b6101006116189190612808565b61162291906125fd565b905080198251168184511681811785525050505b50505050505050565b6040518060200160405280611652611658565b81525090565b6040518060400160405280606081526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b61169481611682565b811461169e575f80fd5b50565b5f813590506116af8161168b565b92915050565b5f602082840312156116ca576116c961167a565b5b5f6116d7848285016116a1565b91505092915050565b5f67ffffffffffffffff82169050919050565b6116fc816116e0565b82525050565b5f8160070b9050919050565b61171781611702565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61175f8261171d565b6117698185611727565b9350611779818560208601611737565b61178281611745565b840191505092915050565b5f60a0820190506117a05f8301886116f3565b6117ad602083018761170e565b81810360408301526117bf8186611755565b90506117ce60608301856116f3565b81810360808301526117e08184611755565b90509695505050505050565b6117f5816116e0565b81146117ff575f80fd5b50565b5f81359050611810816117ec565b92915050565b5f6020828403121561182b5761182a61167a565b5b5f61183884828501611802565b91505092915050565b61184a81611682565b82525050565b5f6020820190506118635f830184611841565b92915050565b5f8115159050919050565b61187d81611869565b82525050565b5f6020820190506118965f830184611874565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6118ce81611682565b82525050565b5f6118df83836118c5565b60208301905092915050565b5f602082019050919050565b5f6119018261189c565b61190b81856118a6565b9350611916836118b6565b805f5b8381101561194657815161192d88826118d4565b9750611938836118eb565b925050600181019050611919565b5085935050505092915050565b5f6020820190508181035f83015261196b81846118f7565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6119b182611745565b810181811067ffffffffffffffff821117156119d0576119cf61197b565b5b80604052505050565b5f6119e2611671565b90506119ee82826119a8565b919050565b5f67ffffffffffffffff821115611a0d57611a0c61197b565b5b611a1682611745565b9050602081019050919050565b828183375f83830152505050565b5f611a43611a3e846119f3565b6119d9565b905082815260208101848484011115611a5f57611a5e611977565b5b611a6a848285611a23565b509392505050565b5f82601f830112611a8657611a85611973565b5b8135611a96848260208601611a31565b91505092915050565b5f805f60608486031215611ab657611ab561167a565b5b5f611ac386828701611802565b9350506020611ad486828701611802565b925050604084013567ffffffffffffffff811115611af557611af461167e565b5b611b0186828701611a72565b9150509250925092565b5f606082019050611b1e5f8301866116f3565b611b2b60208301856116f3565b8181036040830152611b3d8184611755565b9050949350505050565b5f8060408385031215611b5d57611b5c61167a565b5b5f611b6a85828601611802565b9250506020611b7b858286016116a1565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611bc957607f821691505b602082108103611bdc57611bdb611b85565b5b50919050565b5f82825260208201905092915050565b7f496e76616c696420636f646563000000000000000000000000000000000000005f82015250565b5f611c26600d83611be2565b9150611c3182611bf2565b602082019050919050565b5f6020820190508181035f830152611c5381611c1a565b9050919050565b7f496e76616c6964206d6574686f640000000000000000000000000000000000005f82015250565b5f611c8e600e83611be2565b9150611c9982611c5a565b602082019050919050565b5f6020820190508181035f830152611cbb81611c82565b9050919050565b7f496e76616c6964206e6f74696669636174696f6e20696e6465780000000000005f82015250565b5f611cf6601a83611be2565b9150611d0182611cc2565b602082019050919050565b5f6020820190508181035f830152611d2381611cea565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f496e76616c6964206e6f6e20706f73697469766520736563746f7273206669655f8201527f6c64000000000000000000000000000000000000000000000000000000000000602082015250565b5f611db1602283611be2565b9150611dbc82611d57565b604082019050919050565b5f6020820190508181035f830152611dde81611da5565b9050919050565b7f496e76616c696420536563746f724368616e676573207475706c6500000000005f82015250565b5f611e19601b83611be2565b9150611e2482611de5565b602082019050919050565b5f6020820190508181035f830152611e4681611e0d565b9050919050565b7f496e76616c696420706172616d7320696e6e65720000000000000000000000005f82015250565b5f611e81601483611be2565b9150611e8c82611e4d565b602082019050919050565b5f6020820190508181035f830152611eae81611e75565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611f117fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611ed6565b611f1b8683611ed6565b95508019841693508086168417925050509392505050565b5f819050919050565b5f611f56611f51611f4c84611682565b611f33565b611682565b9050919050565b5f819050919050565b611f6f83611f3c565b611f83611f7b82611f5d565b848454611ee2565b825550505050565b5f90565b611f97611f8b565b611fa2818484611f66565b505050565b5b81811015611fc557611fba5f82611f8f565b600181019050611fa8565b5050565b601f82111561200a57611fdb81611eb5565b611fe484611ec7565b81016020851015611ff3578190505b612007611fff85611ec7565b830182611fa7565b50505b505050565b5f82821c905092915050565b5f61202a5f198460080261200f565b1980831691505092915050565b5f612042838361201b565b9150826002028217905092915050565b61205b8261171d565b67ffffffffffffffff8111156120745761207361197b565b5b61207e8254611bb2565b612089828285611fc9565b5f60209050601f8311600181146120ba575f84156120a8578287015190505b6120b28582612037565b865550612119565b601f1984166120c886611eb5565b5f5b828110156120ef578489015182556001820191506020850194506020810190506120ca565b8683101561210c5784890151612108601f89168261201b565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61215882611682565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361218a57612189612121565b5b600182019050919050565b7f696e76616c6964206d616a20286578706563746564204d616a417272617929005f82015250565b5f6121c9601f83611be2565b91506121d482612195565b602082019050919050565b5f6020820190508181035f8301526121f6816121bd565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a556e7369676e655f8201527f64496e7429000000000000000000000000000000000000000000000000000000602082015250565b5f612257602583611be2565b9150612262826121fd565b604082019050919050565b5f6020820190508181035f8301526122848161224b565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a5369676e6564495f8201527f6e74206f72204d616a556e7369676e6564496e74290000000000000000000000602082015250565b5f6122e5603583611be2565b91506122f08261228b565b604082019050919050565b5f6020820190508181035f830152612312816122d9565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a546167206f72205f8201527f4d616a42797465537472696e6729000000000000000000000000000000000000602082015250565b5f612373602e83611be2565b915061237e82612319565b604082019050919050565b5f6020820190508181035f8301526123a081612367565b9050919050565b7f6578706563746564204d616a42797465537472696e67000000000000000000005f82015250565b5f6123db601683611be2565b91506123e6826123a7565b602082019050919050565b5f6020820190508181035f830152612408816123cf565b9050919050565b5f61241982611682565b915061242483611682565b925082820190508082111561243c5761243b612121565b5b92915050565b7f63616e6e6f742068616e646c65206865616465727320776974682065787472615f8201527f203e203237000000000000000000000000000000000000000000000000000000602082015250565b5f61249c602583611be2565b91506124a782612442565b604082019050919050565b5f6020820190508181035f8301526124c981612490565b9050919050565b7f696e76616c69642063626f7200000000000000000000000000000000000000005f82015250565b5f612504600c83611be2565b915061250f826124d0565b602082019050919050565b5f6020820190508181035f830152612531816124f8565b9050919050565b7f45787065637465644c6f7756616c7565323700000000000000000000000000005f82015250565b5f61256c601283611be2565b915061257782612538565b602082019050919050565b5f6020820190508181035f83015261259981612560565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6125d782611682565b91506125e283611682565b9250826125f2576125f16125a0565b5b828206905092915050565b5f61260782611682565b915061261283611682565b925082820390508181111561262a57612629612121565b5b92915050565b5f61263a82611682565b915061264583611682565b925082820261265381611682565b9150828204841483151761266a57612669612121565b5b5092915050565b7f736c6963696e67206f7574206f662072616e67650000000000000000000000005f82015250565b5f6126a5601483611be2565b91506126b082612671565b602082019050919050565b5f6020820190508181035f8301526126d281612699565b9050919050565b5f8160011c9050919050565b5f808291508390505b600185111561272e5780860481111561270a57612709612121565b5b60018516156127195780820291505b8081029050612727856126d9565b94506126ee565b94509492505050565b5f826127465760019050612801565b81612753575f9050612801565b81600181146127695760028114612773576127a2565b6001915050612801565b60ff84111561278557612784612121565b5b8360020a91508482111561279c5761279b612121565b5b50612801565b5060208310610133831016604e8410600b84101617156127d75782820a9050838111156127d2576127d1612121565b5b612801565b6127e484848460016126e5565b925090508184048111156127fb576127fa612121565b5b81810290505b9392505050565b5f61281282611682565b915061281d83611682565b925061284a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484612737565b90509291505056fea2646970667358221220dee34eb57b2677a5a9e17b18d409545321dc23688a1842c6b605c619c085aa4764736f6c63430008190033 +60806040525f60035f6101000a81548160ff0219169083151502179055503480156027575f80fd5b50613035806100355f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063868e10c411610059578063868e10c41461013c5780638777d4d71461016e578063c153e97f1461018c578063ec680ea2146101c057610086565b806334c1f9441461008a57806344794f4f146100be5780634cbb3601146100ee578063529825951461010c575b5f80fd5b6100a4600480360381019061009f9190611a5d565b6101f0565b6040516100b5959493929190611b35565b60405180910390f35b6100d860048036038101906100d39190611bbe565b61036e565b6040516100e59190611bf8565b60405180910390f35b6100f661039f565b6040516101039190611c2b565b60405180910390f35b61012660048036038101906101219190611bbe565b6103b1565b6040516101339190611cfb565b60405180910390f35b61015660048036038101906101519190611e47565b61042c565b60405161016593929190611eb3565b60405180910390f35b610176610501565b6040516101839190611bf8565b60405180910390f35b6101a660048036038101906101a19190611a5d565b610507565b6040516101b7959493929190611b35565b60405180910390f35b6101da60048036038101906101d59190611eef565b61074a565b6040516101e79190611bf8565b60405180910390f35b5f81815481106101fe575f80fd5b905f5260205f2090600402015f91509050805f015f9054906101000a900467ffffffffffffffff1690805f0160089054906101000a900460070b9080600101805461024890611f5a565b80601f016020809104026020016040519081016040528092919081815260200182805461027490611f5a565b80156102bf5780601f10610296576101008083540402835291602001916102bf565b820191905f5260205f20905b8154815290600101906020018083116102a257829003601f168201915b505050505090806002015f9054906101000a900467ffffffffffffffff16908060030180546102ed90611f5a565b80601f016020809104026020016040519081016040528092919081815260200182805461031990611f5a565b80156103645780601f1061033b57610100808354040283529160200191610364565b820191905f5260205f20905b81548152906001019060200180831161034757829003601f168201915b5050505050905085565b5f60015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f20805490509050919050565b60035f9054906101000a900460ff1681565b606060015f8367ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561042057602002820191905f5260205f20905b81548152602001906001019080831161040c575b50505050509050919050565b5f80606060518567ffffffffffffffff161461047d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161047490611fe4565b60405180910390fd5b637942460367ffffffffffffffff168667ffffffffffffffff16036104bd575f6104a685610775565b90505f605190505f818394509450945050506104f8565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ef9061204c565b60405180910390fd5b93509350939050565b60025481565b5f8060605f60605f805490508610610554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054b906120b4565b60405180910390fd5b5f808781548110610568576105676120d2565b5b905f5260205f2090600402016040518060a00160405290815f82015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020015f820160089054906101000a900460070b60070b60070b81526020016001820180546105db90611f5a565b80601f016020809104026020016040519081016040528092919081815260200182805461060790611f5a565b80156106525780601f1061062957610100808354040283529160200191610652565b820191905f5260205f20905b81548152906001019060200180831161063557829003601f168201915b50505050508152602001600282015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160038201805461069c90611f5a565b80601f01602080910402602001604051908101604052809291908181526020018280546106c890611f5a565b80156107135780601f106106ea57610100808354040283529160200191610713565b820191905f5260205f20905b8154815290600101906020018083116106f657829003601f168201915b5050505050815250509050805f01518160200151826040015183606001518460800151955095509550955095505091939590929450565b6001602052815f5260405f208181548110610763575f80fd5b905f5260205f20015f91509150505481565b606061078033610b3b565b6107bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107b69061216f565b60405180910390fd5b5f805f90505f6107cf8583610bdf565b80935081925050505f8111610819576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610810906121fd565b60405180910390fd5b6108216119e7565b61082b6040610c5e565b90506108378183610c78565b5f5b82811015610b265761084b8785610bdf565b809550819650505060038514610896576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088d90612265565b60405180910390fd5b5f6108a18886610c88565b80965081925050505f6108b48987610d06565b80975081925050505f6108c78a88610bdf565b80985081925050506108d98582610c78565b5f5b81811015610b15576108ed8b89610bdf565b809950819a50505060038914610938576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092f906122cd565b60405180910390fd5b60606109448c8a610d95565b809a5081925050505f6109578d8b610c88565b809b508192505050606061096b8e8c610d95565b809c5081925050505f808054905090505f6040518060a001604052808a67ffffffffffffffff1681526020018960070b81526020018681526020018567ffffffffffffffff16815260200184815250908060018154018082558091505060019003905f5260205f2090600402015f909190919091505f820151815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506020820151815f0160086101000a81548167ffffffffffffffff021916908360070b67ffffffffffffffff1602179055506040820151816001019081610a529190612488565b506060820151816002015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506080820151816003019081610a969190612488565b50505060015f8967ffffffffffffffff1667ffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f909190919091505560025f815480929190610af490612584565b9190505550610b048a6001610f97565b5050505080806001019150506108db565b505050508080600101915050610839565b50610b3081610fc0565b945050505050919050565b5f805f610b4784610fd0565b9150915081610b8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8290612615565b60405180910390fd5b5f610b966008610c5e565b9050610ba2818361101c565b5f610bac82610fc0565b90505f610bcd600463dfb85e2667ffffffffffffffff166051855f8061102b565b5090505f811495505050505050919050565b5f805f80610bed868661113b565b8167ffffffffffffffff169150809750819350829450505050600460ff168260ff1614610c4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c469061267d565b60405180910390fd5b80859350935050509250929050565b610c666119e7565b610c73815f015183611357565b919050565b610c84826004836113c0565b5050565b5f805f80610c96868661113b565b8167ffffffffffffffff1691508097508193508294505050505f60ff168260ff1614610cf7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cee9061270b565b60405180910390fd5b80859350935050509250929050565b5f805f80610d14868661113b565b8167ffffffffffffffff169150809750819350829450505050600160ff168260ff161480610d4757505f60ff168260ff16145b610d86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d7d90612799565b60405180910390fd5b80859350935050509250929050565b60605f805f610da4868661113b565b8167ffffffffffffffff169150809750819350829450505050600660ff168260ff161480610dd85750600260ff168260ff16145b610e17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0e90612827565b60405180910390fd5b600660ff168260ff1603610e9257610e2f868661113b565b8167ffffffffffffffff169150809750819350829450505050600260ff168260ff1614610e91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e889061288f565b60405180910390fd5b5b5f8186610e9f91906128ad565b90505f8267ffffffffffffffff811115610ebc57610ebb611d23565b5b6040519080825280601f01601f191660200182016040528015610eee5781602001600182028036833780820191505090505b5090505f808890505b83811015610f7957898181518110610f1257610f116120d2565b5b602001015160f81c60f81b838381518110610f3057610f2f6120d2565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a9053508180610f6990612584565b9250508080600101915050610ef7565b50818489610f8791906128ad565b9650965050505050509250929050565b610fbc825f015182610faa576014610fad565b60155b6005600760ff16901b17611502565b5050565b6060815f01515f01519050919050565b5f8073ffffffffffffffffffffffff0000000000000000831673ff000000000000000000000000000000000000008103611016576001925067ffffffffffffffff841691505b50915091565b611027825f836113c0565b5050565b5f60605f8073fe0000000000000000000000000000000000000573ffffffffffffffffffffffffffffffffffffffff16898787611068575f61106b565b60015b8b8b8f604051602001611083969594939291906128e0565b60405160208183030381529060405260405161109f9190612980565b5f60405180830381855af49150503d805f81146110d7576040519150601f19603f3d011682016040523d82523d5f602084013e6110dc565b606091505b509150915081611121576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611118906129e0565b60405180910390fd5b61112a8161155c565b935093505050965096945050505050565b5f805f8061114986866116ad565b905060018561115891906128ad565b94505f600560e0831660ff16901c90505f601f83169050601c8160ff16106111b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ac90612a6e565b60405180910390fd5b60188160ff1610156111d8578181888160ff169150955095509550505050611350565b60188160ff160361125e575f6111ee89896116ad565b90506001886111fd91906128ad565b975060188160ff161015611246576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123d90612ad6565b60405180910390fd5b8281898160ff16915096509650965050505050611350565b60198160ff160361129e575f6112748989611727565b905060028861128391906128ad565b97508281898161ffff16915096509650965050505050611350565b601a8160ff16036112e0575f6112b4898961178f565b90506004886112c391906128ad565b97508281898163ffffffff16915096509650965050505050611350565b601b8160ff1614611326576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131d90612b3e565b60405180910390fd5b5f61133189896117f7565b905060088861134091906128ad565b9750828189965096509650505050505b9250925092565b5f6020826113659190612b89565b14611391576020816113779190612b89565b60206113839190612bb9565b8161138e91906128ad565b90505b808260200181815250506040518083525f8152818101602001818110156113b6575f80fd5b8060405250505050565b60178167ffffffffffffffff16116113f0576113eb835f01518260058560ff16901b60ff1617611502565b6114fd565b60ff8167ffffffffffffffff161161143757611419835f0151601860058560ff16901b17611502565b611432835f01518267ffffffffffffffff16600161185f565b6114fc565b61ffff8167ffffffffffffffff161161147f57611461835f0151601960058560ff16901b17611502565b61147a835f01518267ffffffffffffffff16600261185f565b6114fb565b63ffffffff8167ffffffffffffffff16116114c9576114ab835f0151601a60058560ff16901b17611502565b6114c4835f01518267ffffffffffffffff16600461185f565b6114fa565b6114e0835f0151601b60058560ff16901b17611502565b6114f9835f01518267ffffffffffffffff16600861185f565b5b5b5b5b505050565b5f825f01515190505f60018261151891906128ad565b90508360200151821061153c5761153b846002836115369190612bec565b6118db565b5b83516020838201018481538151831115611554578282525b505050505050565b5f60605f805f858060200190518101906115769190612ce2565b9250925092505f67ffffffffffffffff168267ffffffffffffffff16036115df575f8151146115da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115d190612d98565b60405180910390fd5b61169f565b605167ffffffffffffffff168267ffffffffffffffff1614806116165750607167ffffffffffffffff168267ffffffffffffffff16145b15611663575f81510361165e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165590612d98565b60405180910390fd5b61169e565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161169590612e00565b60405180910390fd5b5b828194509450505050915091565b5f6001826116bb91906128ad565b835110156116fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f590612e68565b60405180910390fd5b828281518110611711576117106120d2565b5b602001015160f81c60f81b60f81c905092915050565b5f60028261173591906128ad565b83511015611778576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161176f90612e68565b60405180910390fd5b5f8260200184015190508060f01c91505092915050565b5f60048261179d91906128ad565b835110156117e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d790612e68565b60405180910390fd5b5f8260200184015190508060e01c91505092915050565b5f60088261180591906128ad565b83511015611848576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183f90612e68565b60405180910390fd5b5f8260200184015190508060c01c91505092915050565b5f835f01515190505f818361187491906128ad565b9050846020015181111561189957611898856002836118939190612bec565b6118db565b5b5f6001846101006118aa9190612fb5565b6118b49190612bb9565b9050855182810186831982511617815281518411156118d1578382525b5050505050505050565b5f825f015190506118ec8383611357565b6118f683826118fb565b505050565b5f815190505f835f01515190505f828261191591906128ad565b9050846020015181111561193a57611939856002836119349190612bec565b6118db565b5b5f8086518051856020830101935080851115611954578482525b60208801925050505b6020851061199b578051825260208261197691906128ad565b915060208161198591906128ad565b90506020856119949190612bb9565b945061195d565b5f8511156119de575f60018660206119b39190612bb9565b6101006119c09190612fb5565b6119ca9190612bb9565b905080198251168184511681811785525050505b50505050505050565b60405180602001604052806119fa611a00565b81525090565b6040518060400160405280606081526020015f81525090565b5f604051905090565b5f80fd5b5f80fd5b5f819050919050565b611a3c81611a2a565b8114611a46575f80fd5b50565b5f81359050611a5781611a33565b92915050565b5f60208284031215611a7257611a71611a22565b5b5f611a7f84828501611a49565b91505092915050565b5f67ffffffffffffffff82169050919050565b611aa481611a88565b82525050565b5f8160070b9050919050565b611abf81611aaa565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f611b0782611ac5565b611b118185611acf565b9350611b21818560208601611adf565b611b2a81611aed565b840191505092915050565b5f60a082019050611b485f830188611a9b565b611b556020830187611ab6565b8181036040830152611b678186611afd565b9050611b766060830185611a9b565b8181036080830152611b888184611afd565b90509695505050505050565b611b9d81611a88565b8114611ba7575f80fd5b50565b5f81359050611bb881611b94565b92915050565b5f60208284031215611bd357611bd2611a22565b5b5f611be084828501611baa565b91505092915050565b611bf281611a2a565b82525050565b5f602082019050611c0b5f830184611be9565b92915050565b5f8115159050919050565b611c2581611c11565b82525050565b5f602082019050611c3e5f830184611c1c565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b611c7681611a2a565b82525050565b5f611c878383611c6d565b60208301905092915050565b5f602082019050919050565b5f611ca982611c44565b611cb38185611c4e565b9350611cbe83611c5e565b805f5b83811015611cee578151611cd58882611c7c565b9750611ce083611c93565b925050600181019050611cc1565b5085935050505092915050565b5f6020820190508181035f830152611d138184611c9f565b905092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611d5982611aed565b810181811067ffffffffffffffff82111715611d7857611d77611d23565b5b80604052505050565b5f611d8a611a19565b9050611d968282611d50565b919050565b5f67ffffffffffffffff821115611db557611db4611d23565b5b611dbe82611aed565b9050602081019050919050565b828183375f83830152505050565b5f611deb611de684611d9b565b611d81565b905082815260208101848484011115611e0757611e06611d1f565b5b611e12848285611dcb565b509392505050565b5f82601f830112611e2e57611e2d611d1b565b5b8135611e3e848260208601611dd9565b91505092915050565b5f805f60608486031215611e5e57611e5d611a22565b5b5f611e6b86828701611baa565b9350506020611e7c86828701611baa565b925050604084013567ffffffffffffffff811115611e9d57611e9c611a26565b5b611ea986828701611e1a565b9150509250925092565b5f606082019050611ec65f830186611a9b565b611ed36020830185611a9b565b8181036040830152611ee58184611afd565b9050949350505050565b5f8060408385031215611f0557611f04611a22565b5b5f611f1285828601611baa565b9250506020611f2385828601611a49565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611f7157607f821691505b602082108103611f8457611f83611f2d565b5b50919050565b5f82825260208201905092915050565b7f496e76616c696420636f646563000000000000000000000000000000000000005f82015250565b5f611fce600d83611f8a565b9150611fd982611f9a565b602082019050919050565b5f6020820190508181035f830152611ffb81611fc2565b9050919050565b7f496e76616c6964206d6574686f640000000000000000000000000000000000005f82015250565b5f612036600e83611f8a565b915061204182612002565b602082019050919050565b5f6020820190508181035f8301526120638161202a565b9050919050565b7f496e76616c6964206e6f74696669636174696f6e20696e6465780000000000005f82015250565b5f61209e601a83611f8a565b91506120a98261206a565b602082019050919050565b5f6020820190508181035f8301526120cb81612092565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4f6e6c79206d696e6572206163746f722063616e2063616c6c207468697320665f8201527f756e6374696f6e00000000000000000000000000000000000000000000000000602082015250565b5f612159602783611f8a565b9150612164826120ff565b604082019050919050565b5f6020820190508181035f8301526121868161214d565b9050919050565b7f496e76616c6964206e6f6e20706f73697469766520736563746f7273206669655f8201527f6c64000000000000000000000000000000000000000000000000000000000000602082015250565b5f6121e7602283611f8a565b91506121f28261218d565b604082019050919050565b5f6020820190508181035f830152612214816121db565b9050919050565b7f496e76616c696420536563746f724368616e676573207475706c6500000000005f82015250565b5f61224f601b83611f8a565b915061225a8261221b565b602082019050919050565b5f6020820190508181035f83015261227c81612243565b9050919050565b7f496e76616c696420706172616d7320696e6e65720000000000000000000000005f82015250565b5f6122b7601483611f8a565b91506122c282612283565b602082019050919050565b5f6020820190508181035f8301526122e4816122ab565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026123477fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261230c565b612351868361230c565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61238c61238761238284611a2a565b612369565b611a2a565b9050919050565b5f819050919050565b6123a583612372565b6123b96123b182612393565b848454612318565b825550505050565b5f90565b6123cd6123c1565b6123d881848461239c565b505050565b5b818110156123fb576123f05f826123c5565b6001810190506123de565b5050565b601f82111561244057612411816122eb565b61241a846122fd565b81016020851015612429578190505b61243d612435856122fd565b8301826123dd565b50505b505050565b5f82821c905092915050565b5f6124605f1984600802612445565b1980831691505092915050565b5f6124788383612451565b9150826002028217905092915050565b61249182611ac5565b67ffffffffffffffff8111156124aa576124a9611d23565b5b6124b48254611f5a565b6124bf8282856123ff565b5f60209050601f8311600181146124f0575f84156124de578287015190505b6124e8858261246d565b86555061254f565b601f1984166124fe866122eb565b5f5b8281101561252557848901518255600182019150602085019450602081019050612500565b86831015612542578489015161253e601f891682612451565b8355505b6001600288020188555050505b505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61258e82611a2a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036125c0576125bf612557565b5b600182019050919050565b7f63616c6c6572206973206e6f7420616e204944206164647200000000000000005f82015250565b5f6125ff601883611f8a565b915061260a826125cb565b602082019050919050565b5f6020820190508181035f83015261262c816125f3565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a417272617929005f82015250565b5f612667601f83611f8a565b915061267282612633565b602082019050919050565b5f6020820190508181035f8301526126948161265b565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a556e7369676e655f8201527f64496e7429000000000000000000000000000000000000000000000000000000602082015250565b5f6126f5602583611f8a565b91506127008261269b565b604082019050919050565b5f6020820190508181035f830152612722816126e9565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a5369676e6564495f8201527f6e74206f72204d616a556e7369676e6564496e74290000000000000000000000602082015250565b5f612783603583611f8a565b915061278e82612729565b604082019050919050565b5f6020820190508181035f8301526127b081612777565b9050919050565b7f696e76616c6964206d616a20286578706563746564204d616a546167206f72205f8201527f4d616a42797465537472696e6729000000000000000000000000000000000000602082015250565b5f612811602e83611f8a565b915061281c826127b7565b604082019050919050565b5f6020820190508181035f83015261283e81612805565b9050919050565b7f6578706563746564204d616a42797465537472696e67000000000000000000005f82015250565b5f612879601683611f8a565b915061288482612845565b602082019050919050565b5f6020820190508181035f8301526128a68161286d565b9050919050565b5f6128b782611a2a565b91506128c283611a2a565b92508282019050808211156128da576128d9612557565b5b92915050565b5f60c0820190506128f35f830189611a9b565b6129006020830188611be9565b61290d6040830187611a9b565b61291a6060830186611a9b565b818103608083015261292c8185611afd565b905061293b60a0830184611a9b565b979650505050505050565b5f81905092915050565b5f61295a82611ac5565b6129648185612946565b9350612974818560208601611adf565b80840191505092915050565b5f61298b8284612950565b915081905092915050565b7f6661696c20746f2063616c6c206163746f7200000000000000000000000000005f82015250565b5f6129ca601283611f8a565b91506129d582612996565b602082019050919050565b5f6020820190508181035f8301526129f7816129be565b9050919050565b7f63616e6e6f742068616e646c65206865616465727320776974682065787472615f8201527f203e203237000000000000000000000000000000000000000000000000000000602082015250565b5f612a58602583611f8a565b9150612a63826129fe565b604082019050919050565b5f6020820190508181035f830152612a8581612a4c565b9050919050565b7f696e76616c69642063626f7200000000000000000000000000000000000000005f82015250565b5f612ac0600c83611f8a565b9150612acb82612a8c565b602082019050919050565b5f6020820190508181035f830152612aed81612ab4565b9050919050565b7f45787065637465644c6f7756616c7565323700000000000000000000000000005f82015250565b5f612b28601283611f8a565b9150612b3382612af4565b602082019050919050565b5f6020820190508181035f830152612b5581612b1c565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f612b9382611a2a565b9150612b9e83611a2a565b925082612bae57612bad612b5c565b5b828206905092915050565b5f612bc382611a2a565b9150612bce83611a2a565b9250828203905081811115612be657612be5612557565b5b92915050565b5f612bf682611a2a565b9150612c0183611a2a565b9250828202612c0f81611a2a565b91508282048414831517612c2657612c25612557565b5b5092915050565b5f819050919050565b612c3f81612c2d565b8114612c49575f80fd5b50565b5f81519050612c5a81612c36565b92915050565b5f81519050612c6e81611b94565b92915050565b5f612c86612c8184611d9b565b611d81565b905082815260208101848484011115612ca257612ca1611d1f565b5b612cad848285611adf565b509392505050565b5f82601f830112612cc957612cc8611d1b565b5b8151612cd9848260208601612c74565b91505092915050565b5f805f60608486031215612cf957612cf8611a22565b5b5f612d0686828701612c4c565b9350506020612d1786828701612c60565b925050604084015167ffffffffffffffff811115612d3857612d37611a26565b5b612d4486828701612cb5565b9150509250925092565b7f696e76616c696420726573706f6e7365206c656e6774680000000000000000005f82015250565b5f612d82601783611f8a565b9150612d8d82612d4e565b602082019050919050565b5f6020820190508181035f830152612daf81612d76565b9050919050565b7f696e76616c696420636f646563000000000000000000000000000000000000005f82015250565b5f612dea600d83611f8a565b9150612df582612db6565b602082019050919050565b5f6020820190508181035f830152612e1781612dde565b9050919050565b7f736c6963696e67206f7574206f662072616e67650000000000000000000000005f82015250565b5f612e52601483611f8a565b9150612e5d82612e1e565b602082019050919050565b5f6020820190508181035f830152612e7f81612e46565b9050919050565b5f8160011c9050919050565b5f808291508390505b6001851115612edb57808604811115612eb757612eb6612557565b5b6001851615612ec65780820291505b8081029050612ed485612e86565b9450612e9b565b94509492505050565b5f82612ef35760019050612fae565b81612f00575f9050612fae565b8160018114612f165760028114612f2057612f4f565b6001915050612fae565b60ff841115612f3257612f31612557565b5b8360020a915084821115612f4957612f48612557565b5b50612fae565b5060208310610133831016604e8410600b8410161715612f845782820a905083811115612f7f57612f7e612557565b5b612fae565b612f918484846001612e92565b92509050818404811115612fa857612fa7612557565b5b81810290505b9392505050565b5f612fbf82611a2a565b9150612fca83611a2a565b9250612ff77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484612ee4565b90509291505056fea26469706673582212200c1908ec017c97a13a77a90455592bd02b2fe8bb0cae4469e97ef9d3b28a573364736f6c63430008190033 diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index baf748885..6fbd5279b 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -1,5 +1,6 @@ use alloy_core::sol_types::{SolCall, SolValue}; use alloy_core::{primitives::U256 as AlloyU256, sol}; +use cid::Cid; use export_macro::vm_test; use fil_actor_miner::{ CompactCommD, DataActivationNotification, Method as MinerMethod, PieceActivationManifest, @@ -7,17 +8,16 @@ use fil_actor_miner::{ }; use fil_actors_runtime::{EAM_ACTOR_ADDR, runtime::Policy, test_utils::make_piece_cid}; use fvm_ipld_encoding::{BytesDe, RawBytes, ipld_block::IpldBlock}; +use fvm_shared::address::Address; use fvm_shared::{ econ::TokenAmount, piece::PaddedPieceSize, piece::PieceInfo, sector::{RegisteredSealProof, SectorNumber}, }; -use fvm_shared::address::Address; use num_traits::Zero; use vm_api::VM; use vm_api::util::serialize_ok; -use cid::Cid; use crate::util::{ PrecommitMetadata, advance_by_deadline_to_epoch, create_accounts, create_miner, @@ -148,7 +148,9 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { let policy = Policy::default(); let expected_notification = ExpectedNotification { sector: sector_number, - minimum_commitment_epoch: precommit_epoch + policy.min_sector_expiration + max_prove_commit_duration(&policy, seal_proof).unwrap(), + minimum_commitment_epoch: precommit_epoch + + policy.min_sector_expiration + + max_prove_commit_duration(&policy, seal_proof).unwrap(), piece_cid: piece_cid0, piece_size: piece_size0.0, payload: notification_payload.to_vec(), @@ -158,9 +160,14 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { check_receiver_notification_at(v, &worker, &evm_robust_addr, 0, &expected_notification); } -// Helper functions checking state of receiver contract +// Helper functions checking state of receiver contract -pub fn check_receiver_notification_count(v: &dyn VM, sender_addr: &Address, receiver_addr: &Address, expected_count: u64) { +pub fn check_receiver_notification_count( + v: &dyn VM, + sender_addr: &Address, + receiver_addr: &Address, + expected_count: u64, +) { let call_params = NotificationReceiver::totalNotificationsCall::new(()).abi_encode(); let call_result = v .execute_message( @@ -201,7 +208,13 @@ pub struct ExpectedNotification { pub payload: Vec, } -pub fn check_receiver_notification_at(v: &dyn VM, sender_addr: &Address, receiver_addr: &Address, index: u64, expected: &ExpectedNotification) { +pub fn check_receiver_notification_at( + v: &dyn VM, + sender_addr: &Address, + receiver_addr: &Address, + index: u64, + expected: &ExpectedNotification, +) { let call_params = NotificationReceiver::getNotificationCall::new((AlloyU256::from(index),)).abi_encode(); let call_result = v @@ -275,5 +288,3 @@ pub fn check_receiver_notification_at(v: &dyn VM, sender_addr: &Address, receive expected.minimum_commitment_epoch, minimum_commitment_epoch ); } - - From 3068965f7cac3ba4d33205d9695d50c1af74e7d9 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Wed, 3 Sep 2025 07:48:21 +0200 Subject: [PATCH 29/39] Fix filecoin actor call bug --- actors/evm/tests/contracts/NotificationReceiver.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/actors/evm/tests/contracts/NotificationReceiver.sol b/actors/evm/tests/contracts/NotificationReceiver.sol index d0bd56bd7..5664c025d 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.sol +++ b/actors/evm/tests/contracts/NotificationReceiver.sol @@ -181,7 +181,7 @@ contract NotificationReceiver { // FVM specific precompiles address constant RESOLVE_ADDRESS_PRECOMPILE_ADDR = 0xFE00000000000000000000000000000000000001; - address constant CALL_ACTOR_ADDRESS = 0xfe00000000000000000000000000000000000003; + address constant CALL_ACTOR_ID = 0xfe00000000000000000000000000000000000005; // FVM system flags uint64 constant READ_ONLY_FLAG = 0x00000001; @@ -210,6 +210,7 @@ contract NotificationReceiver { (int256 exit,) = callById(POWER_ACTOR_ID, MINER_RAW_POWER_METHOD_NUMBER, CBOR_CODEC, rawRequest, 0, false); // If the call succeeds, the address is a registered miner return exit == 0; + } function isIDAddress(address _a) internal pure returns (bool isID, uint64 id) { @@ -236,7 +237,7 @@ contract NotificationReceiver { uint256 value, bool static_call ) internal returns (int256, bytes memory) { - (bool success, bytes memory data) = address(CALL_ACTOR_ADDRESS).delegatecall( + (bool success, bytes memory data) = address(CALL_ACTOR_ID).delegatecall( abi.encode(uint64(method_num), value, static_call ? READ_ONLY_FLAG : DEFAULT_FLAG, codec, raw_request, target) ); if (!success) { From 246dc487a26f7b4bdab272dd7f1f3d0486ef4d75 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Wed, 3 Sep 2025 08:40:54 +0200 Subject: [PATCH 30/39] Test that isMiner check rejects diret calls --- .../src/tests/evm_notification_test.rs | 95 ++++++++++++++++++- test_vm/tests/suite/evm_notification_test.rs | 12 ++- 2 files changed, 105 insertions(+), 2 deletions(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 6fbd5279b..93a2853c8 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -5,9 +5,10 @@ use export_macro::vm_test; use fil_actor_miner::{ CompactCommD, DataActivationNotification, Method as MinerMethod, PieceActivationManifest, ProveCommitSectors3Params, SectorActivationManifest, max_prove_commit_duration, + PieceChange, SectorChanges, SECTOR_CONTENT_CHANGED, }; use fil_actors_runtime::{EAM_ACTOR_ADDR, runtime::Policy, test_utils::make_piece_cid}; -use fvm_ipld_encoding::{BytesDe, RawBytes, ipld_block::IpldBlock}; +use fvm_ipld_encoding::{BytesDe, RawBytes, ipld_block::IpldBlock, CBOR}; use fvm_shared::address::Address; use fvm_shared::{ econ::TokenAmount, @@ -288,3 +289,95 @@ pub fn check_receiver_notification_at( expected.minimum_commitment_epoch, minimum_commitment_epoch ); } + +#[vm_test] +pub fn evm_direct_call_fails_non_miner_test(v: &dyn VM) { + // Create accounts + let addrs = create_accounts(v, 2, &TokenAmount::from_whole(10_000)); + let (_owner, worker) = (addrs[0], addrs[1]); + + // Deploy the NotificationReceiver EVM contract + let hex_str = std::fs::read_to_string("../actors/evm/tests/contracts/NotificationReceiver.hex") + .expect("Failed to read contract bytecode hex file"); + let hex_str = hex_str.trim(); + let contract_bytecode = hex::decode(hex_str).expect("Failed to decode contract bytecode hex"); + + // Create an EVM actor to receive notifications + let params = + IpldBlock::serialize_cbor(&fil_actor_eam::CreateExternalParams(contract_bytecode)).unwrap(); + + let create_result = v + .execute_message( + &worker, + &EAM_ACTOR_ADDR, + &TokenAmount::zero(), + fil_actor_eam::Method::CreateExternal as u64, + params, + ) + .unwrap(); + + assert!( + create_result.code.is_success(), + "Failed to create EVM contract: {}", + create_result.message + ); + + let create_return: fil_actor_eam::CreateReturn = + create_result.ret.unwrap().deserialize().expect("Failed to decode create return"); + let evm_robust_addr = create_return.robust_address.unwrap(); + + // Now attempt to call handle_filecoin_method directly from an account actor (not a miner) + // We'll construct the CBOR parameters for a SectorContentChanged notification + + // Create a dummy notification payload that matches the expected format + let piece_cid = make_piece_cid(b"test-piece"); + let piece_size = PaddedPieceSize(32 << 30); // 32 GiB + let notification_payload = hex::decode("cafe").unwrap(); + + // Build CBOR encoded params for handle_filecoin_method using builtin miner types + // The structure should be: + // [{sector: 100, minimum_commitment_epoch: 1000, added: [{data: piece_cid, size: piece_size, payload: notification_payload}]}] + use fvm_ipld_encoding::to_vec; + + let sector_changes = vec![SectorChanges { + sector: 100, + minimum_commitment_epoch: 1000, + added: vec![PieceChange { + data: piece_cid, + size: piece_size, + payload: RawBytes::from(notification_payload), + }], + }]; + + let cbor_params = to_vec(§or_changes).expect("Failed to serialize CBOR params"); + + // Now call handle_filecoin_method using the alloy interface + let _method_selector = NotificationReceiver::handle_filecoin_methodCall::SELECTOR; + + // Encode the call using alloy's ABI encoding + let call_params = NotificationReceiver::handle_filecoin_methodCall::new(( + SECTOR_CONTENT_CHANGED, + CBOR, + cbor_params.into(), + )).abi_encode(); + + // Attempt to invoke the contract method from a regular account (not a miner) + let call_result = v.execute_message( + &worker, + &evm_robust_addr, + &TokenAmount::zero(), + fil_actor_evm::Method::InvokeContract as u64, + Some(serialize_ok(&ContractParams(call_params.to_vec()))), + ); + + // Verify the error message contains information about the miner check + if let Ok(result) = call_result { + assert!( + !result.code.is_success(), + "Call should have failed with non-miner actor" + ); + } + + // Verify that no notifications were stored + check_receiver_notification_count(v, &worker, &evm_robust_addr, 0); +} diff --git a/test_vm/tests/suite/evm_notification_test.rs b/test_vm/tests/suite/evm_notification_test.rs index 77e72e0c9..780332b64 100644 --- a/test_vm/tests/suite/evm_notification_test.rs +++ b/test_vm/tests/suite/evm_notification_test.rs @@ -1,4 +1,6 @@ -use fil_actors_integration_tests::tests::evm_receives_ddo_notifications_test; +use fil_actors_integration_tests::tests::{ + evm_receives_ddo_notifications_test, evm_direct_call_fails_non_miner_test, +}; use fil_actors_runtime::test_blockstores::MemoryBlockstore; use test_vm::TestVM; @@ -9,3 +11,11 @@ fn evm_notification() { let v = TestVM::new_with_singletons(store); evm_receives_ddo_notifications_test(&v); } + +/* Test that direct EVM calls to notification receiver fail from non-miner actors */ +#[test] +fn evm_direct_call_fails_non_miner() { + let store = MemoryBlockstore::new(); + let v = TestVM::new_with_singletons(store); + evm_direct_call_fails_non_miner_test(&v); +} From 061547b5d60f7a894b43360efd2a17640f2b5520 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Wed, 3 Sep 2025 08:41:38 +0200 Subject: [PATCH 31/39] fmt --- .../src/tests/evm_notification_test.rs | 36 +++++++++---------- test_vm/tests/suite/evm_notification_test.rs | 2 +- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 93a2853c8..566d6ac2b 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -4,11 +4,11 @@ use cid::Cid; use export_macro::vm_test; use fil_actor_miner::{ CompactCommD, DataActivationNotification, Method as MinerMethod, PieceActivationManifest, - ProveCommitSectors3Params, SectorActivationManifest, max_prove_commit_duration, - PieceChange, SectorChanges, SECTOR_CONTENT_CHANGED, + PieceChange, ProveCommitSectors3Params, SECTOR_CONTENT_CHANGED, SectorActivationManifest, + SectorChanges, max_prove_commit_duration, }; use fil_actors_runtime::{EAM_ACTOR_ADDR, runtime::Policy, test_utils::make_piece_cid}; -use fvm_ipld_encoding::{BytesDe, RawBytes, ipld_block::IpldBlock, CBOR}; +use fvm_ipld_encoding::{BytesDe, CBOR, RawBytes, ipld_block::IpldBlock}; use fvm_shared::address::Address; use fvm_shared::{ econ::TokenAmount, @@ -295,7 +295,7 @@ pub fn evm_direct_call_fails_non_miner_test(v: &dyn VM) { // Create accounts let addrs = create_accounts(v, 2, &TokenAmount::from_whole(10_000)); let (_owner, worker) = (addrs[0], addrs[1]); - + // Deploy the NotificationReceiver EVM contract let hex_str = std::fs::read_to_string("../actors/evm/tests/contracts/NotificationReceiver.hex") .expect("Failed to read contract bytecode hex file"); @@ -325,20 +325,20 @@ pub fn evm_direct_call_fails_non_miner_test(v: &dyn VM) { let create_return: fil_actor_eam::CreateReturn = create_result.ret.unwrap().deserialize().expect("Failed to decode create return"); let evm_robust_addr = create_return.robust_address.unwrap(); - + // Now attempt to call handle_filecoin_method directly from an account actor (not a miner) // We'll construct the CBOR parameters for a SectorContentChanged notification - + // Create a dummy notification payload that matches the expected format let piece_cid = make_piece_cid(b"test-piece"); let piece_size = PaddedPieceSize(32 << 30); // 32 GiB let notification_payload = hex::decode("cafe").unwrap(); - + // Build CBOR encoded params for handle_filecoin_method using builtin miner types // The structure should be: // [{sector: 100, minimum_commitment_epoch: 1000, added: [{data: piece_cid, size: piece_size, payload: notification_payload}]}] use fvm_ipld_encoding::to_vec; - + let sector_changes = vec![SectorChanges { sector: 100, minimum_commitment_epoch: 1000, @@ -348,19 +348,20 @@ pub fn evm_direct_call_fails_non_miner_test(v: &dyn VM) { payload: RawBytes::from(notification_payload), }], }]; - + let cbor_params = to_vec(§or_changes).expect("Failed to serialize CBOR params"); - + // Now call handle_filecoin_method using the alloy interface let _method_selector = NotificationReceiver::handle_filecoin_methodCall::SELECTOR; - + // Encode the call using alloy's ABI encoding let call_params = NotificationReceiver::handle_filecoin_methodCall::new(( SECTOR_CONTENT_CHANGED, CBOR, cbor_params.into(), - )).abi_encode(); - + )) + .abi_encode(); + // Attempt to invoke the contract method from a regular account (not a miner) let call_result = v.execute_message( &worker, @@ -369,15 +370,12 @@ pub fn evm_direct_call_fails_non_miner_test(v: &dyn VM) { fil_actor_evm::Method::InvokeContract as u64, Some(serialize_ok(&ContractParams(call_params.to_vec()))), ); - + // Verify the error message contains information about the miner check if let Ok(result) = call_result { - assert!( - !result.code.is_success(), - "Call should have failed with non-miner actor" - ); + assert!(!result.code.is_success(), "Call should have failed with non-miner actor"); } - + // Verify that no notifications were stored check_receiver_notification_count(v, &worker, &evm_robust_addr, 0); } diff --git a/test_vm/tests/suite/evm_notification_test.rs b/test_vm/tests/suite/evm_notification_test.rs index 780332b64..6560db906 100644 --- a/test_vm/tests/suite/evm_notification_test.rs +++ b/test_vm/tests/suite/evm_notification_test.rs @@ -1,5 +1,5 @@ use fil_actors_integration_tests::tests::{ - evm_receives_ddo_notifications_test, evm_direct_call_fails_non_miner_test, + evm_direct_call_fails_non_miner_test, evm_receives_ddo_notifications_test, }; use fil_actors_runtime::test_blockstores::MemoryBlockstore; use test_vm::TestVM; From 9a90ab0b964ac37f895668faa7c7e9710673337f Mon Sep 17 00:00:00 2001 From: zenground0 Date: Wed, 3 Sep 2025 09:02:36 +0200 Subject: [PATCH 32/39] clippy --- integration_tests/src/tests/evm_notification_test.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 566d6ac2b..4f9daf81b 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -172,8 +172,8 @@ pub fn check_receiver_notification_count( let call_params = NotificationReceiver::totalNotificationsCall::new(()).abi_encode(); let call_result = v .execute_message( - &sender_addr, - &receiver_addr, + sender_addr, + receiver_addr, &TokenAmount::zero(), fil_actor_evm::Method::InvokeContract as u64, Some(serialize_ok(&ContractParams(call_params.to_vec()))), @@ -220,8 +220,8 @@ pub fn check_receiver_notification_at( NotificationReceiver::getNotificationCall::new((AlloyU256::from(index),)).abi_encode(); let call_result = v .execute_message( - &sender_addr, - &receiver_addr, + sender_addr, + receiver_addr, &TokenAmount::zero(), fil_actor_evm::Method::InvokeContract as u64, Some(serialize_ok(&ContractParams(call_params.to_vec()))), From 5fa2c4e04a675ebbbe4597c0fd90ecc33baa21c7 Mon Sep 17 00:00:00 2001 From: ZenGround0 <5515260+ZenGround0@users.noreply.github.com> Date: Wed, 3 Sep 2025 03:03:19 -0400 Subject: [PATCH 33/39] Update actors/evm/tests/contracts/NotificationReceiver.sol Co-authored-by: Rod Vagg --- actors/evm/tests/contracts/NotificationReceiver.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/actors/evm/tests/contracts/NotificationReceiver.sol b/actors/evm/tests/contracts/NotificationReceiver.sol index 5664c025d..1650137b9 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.sol +++ b/actors/evm/tests/contracts/NotificationReceiver.sol @@ -1,6 +1,11 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.25; +// ======================================================== +// NOTE: If using this contract as an example, consider depending on utilities +// available in https://github.com/filecoin-project/filecoin-solidity instead of +// copying reusable utilities from here. +// ======================================================== contract NotificationReceiver { // State variables to track received notifications From 5b105e7c7d1425533d872429b7424636dd64997d Mon Sep 17 00:00:00 2001 From: ZenGround0 <5515260+ZenGround0@users.noreply.github.com> Date: Wed, 3 Sep 2025 12:02:27 -0400 Subject: [PATCH 34/39] Update integration_tests/src/tests/evm_notification_test.rs Co-authored-by: Rod Vagg --- integration_tests/src/tests/evm_notification_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 4f9daf81b..06027ee64 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -119,7 +119,7 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { check_receiver_notification_count(v, &worker, &evm_robust_addr, 0); // Advance time to prove commit epoch - let prove_time = v.epoch() + 151; + let prove_time = v.epoch() + PRE_COMMIT_CHALLENGE_DELAY + 1; advance_by_deadline_to_epoch(v, &miner_addr, prove_time); // ProveCommitSectors3 with notifications From f800c8cd8762a738b20adfa23ac47a3f35db0d12 Mon Sep 17 00:00:00 2001 From: ZenGround0 <5515260+ZenGround0@users.noreply.github.com> Date: Wed, 3 Sep 2025 12:02:38 -0400 Subject: [PATCH 35/39] Update integration_tests/src/tests/evm_notification_test.rs Co-authored-by: Rod Vagg --- integration_tests/src/tests/evm_notification_test.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 06027ee64..9005a7138 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -292,6 +292,9 @@ pub fn check_receiver_notification_at( #[vm_test] pub fn evm_direct_call_fails_non_miner_test(v: &dyn VM) { + // This test is sanity checking that our `isMiner` logic in our NotificationReceiver contract is working, + // it does not actually check our miner actor logic. + // Create accounts let addrs = create_accounts(v, 2, &TokenAmount::from_whole(10_000)); let (_owner, worker) = (addrs[0], addrs[1]); From aac56d594ae4b1f3f742376ac0e2ae4fbb46c18d Mon Sep 17 00:00:00 2001 From: zenground0 Date: Wed, 3 Sep 2025 10:06:50 -0600 Subject: [PATCH 36/39] Tweak solidity test file for codecov to not fail --- .../tests/contracts/NotificationReceiver.sol | 40 +++++-------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/actors/evm/tests/contracts/NotificationReceiver.sol b/actors/evm/tests/contracts/NotificationReceiver.sol index 1650137b9..06e15e227 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.sol +++ b/actors/evm/tests/contracts/NotificationReceiver.sol @@ -32,23 +32,17 @@ contract NotificationReceiver { // Sector content changed method number uint64 constant SECTOR_CONTENT_CHANGED = 2034386435; - /** - * @dev Get the count of notifications for a specific sector - */ + // Get the count of notifications for a specific sector function getNotificationCount(uint64 sector) public view returns (uint256) { return sectorNotificationIndices[sector].length; } - /** - * @dev Get all notification indices for a sector - */ + // Get all notification indices for a sector function getSectorNotifications(uint64 sector) public view returns (uint256[] memory) { return sectorNotificationIndices[sector]; } - /** - * @dev Get a specific notification by index - */ + // Get a specific notification by index function getNotification(uint256 index) public view returns ( uint64 sector, int64 minimumCommitmentEpoch, @@ -67,10 +61,8 @@ contract NotificationReceiver { ); } - /** - * @dev Handle incoming Filecoin method calls - * This is the main entry point for receiving notifications from the miner actor - */ + // Handle incoming Filecoin method calls + // This is the main entry point for receiving notifications from the miner actor function handle_filecoin_method(uint64 method, uint64 inCodec, bytes memory params) public returns (uint64, uint64,bytes memory) { // 0x51 is IPLD CBOR codec require(inCodec == 0x51, "Invalid codec"); @@ -86,7 +78,7 @@ contract NotificationReceiver { } /** - * @dev Process sector content changed notification + * Process sector content changed notification * Expected params structure (CBOR encoded): * { * sectors: [{ @@ -470,38 +462,28 @@ contract NotificationReceiver { Buffer buf; } - /** - * @dev Create a new CBOR buffer with given capacity - */ + // Create a new CBOR buffer with given capacity function createCBOR(uint256 capacity) internal pure returns(CBORBuffer memory cbor) { initBuffer(cbor.buf, capacity); return cbor; } - /** - * @dev Get the encoded bytes from the buffer - */ + // Get the encoded bytes from the buffer function getCBORData(CBORBuffer memory buf) internal pure returns(bytes memory) { return buf.buf.buf; } - /** - * @dev Start a fixed-length array - */ + // Start a fixed-length array function startFixedArray(CBORBuffer memory buf, uint64 length) internal pure { writeFixedNumeric(buf, MajArray, length); } - /** - * @dev Write a boolean value - */ + // Write a boolean value function writeBool(CBORBuffer memory buf, bool val) internal pure { appendUint8(buf.buf, uint8((MajOther << 5) | (val ? True_Type : False_Type))); } - /** - * @dev Write a Uint64 value - */ + // Write a Uint64 value function writeUInt64(CBORBuffer memory buf, uint64 value) internal pure { writeFixedNumeric(buf, MajUnsignedInt, value); } From 7e1d627d565fee88de9e89c2d96993d1b38f3464 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Wed, 3 Sep 2025 10:08:04 -0600 Subject: [PATCH 37/39] fmt --- integration_tests/src/tests/evm_notification_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 9005a7138..4c2ad8705 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -294,7 +294,7 @@ pub fn check_receiver_notification_at( pub fn evm_direct_call_fails_non_miner_test(v: &dyn VM) { // This test is sanity checking that our `isMiner` logic in our NotificationReceiver contract is working, // it does not actually check our miner actor logic. - + // Create accounts let addrs = create_accounts(v, 2, &TokenAmount::from_whole(10_000)); let (_owner, worker) = (addrs[0], addrs[1]); From 6217cbd8935c0640748ac3b705fa08c20c1d54b5 Mon Sep 17 00:00:00 2001 From: zenground0 Date: Wed, 3 Sep 2025 10:19:34 -0600 Subject: [PATCH 38/39] Fixup review suggestion --- integration_tests/src/tests/evm_notification_test.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration_tests/src/tests/evm_notification_test.rs b/integration_tests/src/tests/evm_notification_test.rs index 4c2ad8705..064de5802 100644 --- a/integration_tests/src/tests/evm_notification_test.rs +++ b/integration_tests/src/tests/evm_notification_test.rs @@ -119,7 +119,8 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { check_receiver_notification_count(v, &worker, &evm_robust_addr, 0); // Advance time to prove commit epoch - let prove_time = v.epoch() + PRE_COMMIT_CHALLENGE_DELAY + 1; + let policy = Policy::default(); + let prove_time = v.epoch() + policy.pre_commit_challenge_delay + 1; advance_by_deadline_to_epoch(v, &miner_addr, prove_time); // ProveCommitSectors3 with notifications @@ -146,7 +147,6 @@ pub fn evm_receives_ddo_notifications_test(v: &dyn VM) { assert!(prove_result.code.is_success(), "ProveCommit failed: {}", prove_result.message); /* ***Verify that the EVM contract received the notifications correctly*** */ - let policy = Policy::default(); let expected_notification = ExpectedNotification { sector: sector_number, minimum_commitment_epoch: precommit_epoch From 3ceec26c5d9c8c9ad9be8f2dd1002aa36628df6f Mon Sep 17 00:00:00 2001 From: zenground0 Date: Wed, 3 Sep 2025 10:46:19 -0600 Subject: [PATCH 39/39] Codecov is extremely picky --- .../tests/contracts/NotificationReceiver.sol | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/actors/evm/tests/contracts/NotificationReceiver.sol b/actors/evm/tests/contracts/NotificationReceiver.sol index 06e15e227..935d34f63 100644 --- a/actors/evm/tests/contracts/NotificationReceiver.sol +++ b/actors/evm/tests/contracts/NotificationReceiver.sol @@ -77,23 +77,21 @@ contract NotificationReceiver { revert("Invalid method"); } - /** - * Process sector content changed notification - * Expected params structure (CBOR encoded): - * { - * sectors: [{ - * sector: uint64, - * minimum_commitment_epoch: int64, - * added: [{ - * data: Cid, - * size: uint64, - * payload: bytes - * }] - * }] - * } - * - * All notifications are accepted so CBOR true returned for every piece of every notified sector - */ + // Process sector content changed notification + // Expected params structure (CBOR encoded): + // { + // sectors: [{ + // sector: uint64, + // minimum_commitment_epoch: int64, + // added: [{ + // data: Cid, + // size: uint64, + // payload: bytes + // }] + // }] + // } + // + // All notifications are accepted so CBOR true returned for every piece of every notified sector function processSectorContentChanged(bytes memory params) internal returns (bytes memory) { require(isMinerActor(msg.sender), "Only miner actor can call this function");