From 3853491501ca46542408bb247d5487c8319c3446 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Mon, 15 Jul 2024 17:19:48 +0200 Subject: [PATCH 01/73] account header syscalls handlers initialized --- .../dryrun_syscall_handler.py | 71 ++++++++++++++++-- .../memorizer/account_memorizer.py | 17 +++++ .../memorizer/header_memorizer.py | 19 ++++- .../provider/account_key_provider.py | 2 +- .../provider/header_key_provider.py | 19 +++++ .../contract_bootloader/syscall_handler.py | 75 ++++++++++++++----- 6 files changed, 176 insertions(+), 27 deletions(-) create mode 100644 packages/contract_bootloader/provider/header_key_provider.py diff --git a/packages/contract_bootloader/dryrun_syscall_handler.py b/packages/contract_bootloader/dryrun_syscall_handler.py index 952b92fc..7c14316b 100644 --- a/packages/contract_bootloader/dryrun_syscall_handler.py +++ b/packages/contract_bootloader/dryrun_syscall_handler.py @@ -1,4 +1,3 @@ -from dataclasses import asdict from typing import ( Dict, Iterable, @@ -18,13 +17,20 @@ MemorizerFunctionId as AccountMemorizerFunctionId, MemorizerKey as AccountMemorizerKey, ) +from contract_bootloader.provider.header_key_provider import ( + HeaderKeyEVMProvider, +) from contract_bootloader.provider.account_key_provider import ( AccountKeyEVMProvider, ) from contract_bootloader.memorizer.header_memorizer import ( + AbstractHeaderMemorizerBase, + MemorizerFunctionId as HeaderMemorizerFunctionId, MemorizerKey as HeaderMemorizerKey, ) +EVM_PROVIDER_URL = "https://sepolia.ethereum.iosis.tech/" + class DryRunSyscallHandler(SyscallHandlerBase): """ @@ -64,7 +70,34 @@ def _call_contract_helper( ) memorizerId = MemorizerId.from_int(request.contract_address) - if memorizerId == MemorizerId.Account: + if memorizerId == MemorizerId.Header: + total_size = Memorizer.size() + HeaderMemorizerKey.size() + + if len(calldata) != total_size: + raise ValueError( + f"Memorizer read must be initialized with a list of {total_size} integers" + ) + + function_id = HeaderMemorizerFunctionId.from_int(request.selector) + memorizer = Memorizer( + dict_raw_ptrs=calldata[0 : Memorizer.size()], + dict_manager=self.dict_manager, + ) + + idx = Memorizer.size() + key = HeaderMemorizerKey.from_int( + calldata[idx : idx + HeaderMemorizerKey.size()] + ) + + handler = DryRunHeaderMemorizerHandler( + memorizer=memorizer, + evm_provider_url=EVM_PROVIDER_URL, + ) + retdata = handler.handle(function_id=function_id, key=key) + + self.fetch_keys_registry.append(handler.fetch_keys_dict()) + + elif memorizerId == MemorizerId.Account: total_size = Memorizer.size() + AccountMemorizerKey.size() if len(calldata) != total_size: @@ -85,7 +118,7 @@ def _call_contract_helper( handler = DryRunAccountMemorizerHandler( memorizer=memorizer, - evm_provider_url="https://sepolia.ethereum.iosis.tech/", + evm_provider_url=EVM_PROVIDER_URL, ) retdata = handler.handle(function_id=function_id, key=key) @@ -104,6 +137,33 @@ def fetch_keys_dict(self) -> list[dict]: return self.fetch_keys_registry +class DryRunHeaderMemorizerHandler(AbstractHeaderMemorizerBase): + def __init__(self, memorizer: Memorizer, evm_provider_url: str): + super().__init__(memorizer=memorizer) + self.evm_provider = HeaderKeyEVMProvider(provider_url=evm_provider_url) + self.fetch_keys_registry: set[HeaderMemorizerKey] = set() + + def get_parent(self, key: HeaderMemorizerKey) -> Tuple[int, int]: + self.fetch_keys_registry.add(key) + value = self.evm_provider.get_parent(key=key) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def fetch_keys_dict(self) -> set: + def create_dict(key: HeaderMemorizerKey): + data = dict() + data["type"] = "HeaderMemorizerKey" + data["key"] = key.to_dict() + return data + + dictionary = dict() + for fetch_key in list(self.fetch_keys_registry): + dictionary.update(create_dict(fetch_key)) + return dictionary + + class DryRunAccountMemorizerHandler(AbstractAccountMemorizerBase): def __init__(self, memorizer: Memorizer, evm_provider_url: str): super().__init__(memorizer=memorizer) @@ -121,11 +181,8 @@ def get_balance(self, key: AccountMemorizerKey) -> Tuple[int, int]: def fetch_keys_dict(self) -> set: def create_dict(key: AccountMemorizerKey): data = dict() + data["type"] = "AccountMemorizerKey" data["key"] = key.to_dict() - if isinstance(key, HeaderMemorizerKey): - data["type"] = "HeaderMemorizerKey" - elif isinstance(key, AccountMemorizerKey): - data["type"] = "AccountMemorizerKey" return data dictionary = dict() diff --git a/packages/contract_bootloader/memorizer/account_memorizer.py b/packages/contract_bootloader/memorizer/account_memorizer.py index fab3d723..8bab3af9 100644 --- a/packages/contract_bootloader/memorizer/account_memorizer.py +++ b/packages/contract_bootloader/memorizer/account_memorizer.py @@ -5,6 +5,7 @@ from contract_bootloader.memorizer.memorizer import Memorizer from marshmallow_dataclass import dataclass from starkware.cairo.lang.vm.crypto import poseidon_hash_many +from starkware.cairo.lang.vm.relocatable import RelocatableValue class MemorizerFunctionId(Enum): @@ -66,3 +67,19 @@ def handle( @abstractmethod def get_balance(self, key: MemorizerKey) -> Tuple[int, int]: pass + + def _get_felt_range(self, start_addr: int, end_addr: int) -> List[int]: + assert isinstance(start_addr, RelocatableValue) + assert isinstance(end_addr, RelocatableValue) + assert start_addr.segment_index == end_addr.segment_index, ( + "Inconsistent start and end segment indices " + f"({start_addr.segment_index} != {end_addr.segment_index})." + ) + + assert start_addr.offset <= end_addr.offset, ( + "The start offset cannot be greater than the end offset" + f"({start_addr.offset} > {end_addr.offset})." + ) + + size = end_addr.offset - start_addr.offset + return self.segments.memory.get_range_as_ints(addr=start_addr, size=size) diff --git a/packages/contract_bootloader/memorizer/header_memorizer.py b/packages/contract_bootloader/memorizer/header_memorizer.py index d28e4a72..e91edefe 100644 --- a/packages/contract_bootloader/memorizer/header_memorizer.py +++ b/packages/contract_bootloader/memorizer/header_memorizer.py @@ -4,6 +4,7 @@ from contract_bootloader.memorizer.memorizer import Memorizer from marshmallow_dataclass import dataclass from starkware.cairo.lang.vm.crypto import poseidon_hash_many +from starkware.cairo.lang.vm.relocatable import RelocatableValue class MemorizerFunctionId(Enum): @@ -46,7 +47,7 @@ def size(cls) -> int: return 2 -class AbstractAccountMemorizerBase(ABC): +class AbstractHeaderMemorizerBase(ABC): def __init__(self, memorizer: Memorizer): self.memorizer = memorizer @@ -59,3 +60,19 @@ def handle( @abstractmethod def get_parent(self, key: MemorizerKey) -> Tuple[int, int]: pass + + def _get_felt_range(self, start_addr: int, end_addr: int) -> List[int]: + assert isinstance(start_addr, RelocatableValue) + assert isinstance(end_addr, RelocatableValue) + assert start_addr.segment_index == end_addr.segment_index, ( + "Inconsistent start and end segment indices " + f"({start_addr.segment_index} != {end_addr.segment_index})." + ) + + assert start_addr.offset <= end_addr.offset, ( + "The start offset cannot be greater than the end offset" + f"({start_addr.offset} > {end_addr.offset})." + ) + + size = end_addr.offset - start_addr.offset + return self.segments.memory.get_range_as_ints(addr=start_addr, size=size) diff --git a/packages/contract_bootloader/provider/account_key_provider.py b/packages/contract_bootloader/provider/account_key_provider.py index 4f5a56ac..51f1646b 100644 --- a/packages/contract_bootloader/provider/account_key_provider.py +++ b/packages/contract_bootloader/provider/account_key_provider.py @@ -9,7 +9,7 @@ class AccountKeyEVMProvider(EVMProvider): def __init__(self, provider_url: str): super().__init__(provider_url=provider_url) - def get_balance(self, key: AccountMemorizerKey): + def get_balance(self, key: AccountMemorizerKey) -> int: address = Web3.toChecksumAddress(hex(key.address)) if not self.web3.isAddress(address): raise ValueError(f"Invalid Ethereum address: {address}") diff --git a/packages/contract_bootloader/provider/header_key_provider.py b/packages/contract_bootloader/provider/header_key_provider.py new file mode 100644 index 00000000..7bca3855 --- /dev/null +++ b/packages/contract_bootloader/provider/header_key_provider.py @@ -0,0 +1,19 @@ +from contract_bootloader.memorizer.header_memorizer import ( + MemorizerKey as HeaderMemorizerKey, +) +from contract_bootloader.provider.evm_provider import EVMProvider + + +class HeaderKeyEVMProvider(EVMProvider): + def __init__(self, provider_url: str): + super().__init__(provider_url=provider_url) + + def get_parent(self, key: HeaderMemorizerKey) -> int: + try: + # Fetch the block details + block = self.web3.eth.get_block(key.block_number) + # Get the parent block number + parent_block_number = block["parentHash"] + return int(parent_block_number) + except Exception as e: + raise Exception(f"An error occurred while fetching the parent block: {e}") diff --git a/packages/contract_bootloader/syscall_handler.py b/packages/contract_bootloader/syscall_handler.py index ae6f8696..26549817 100644 --- a/packages/contract_bootloader/syscall_handler.py +++ b/packages/contract_bootloader/syscall_handler.py @@ -2,7 +2,6 @@ from typing import ( Dict, Iterable, - List, Tuple, ) from tools.py.utils import little_8_bytes_chunks_to_bytes @@ -12,11 +11,17 @@ from starkware.cairo.common.dict import DictManager from starkware.cairo.common.structs import CairoStructProxy from tools.py.account import Account +from tools.py.block_header import BlockHeaderDencun from tools.py.rlp import get_rlp_len from starkware.starknet.business_logic.execution.objects import ( CallResult, ) from contract_bootloader.memorizer.memorizer import MemorizerId, Memorizer +from contract_bootloader.memorizer.header_memorizer import ( + AbstractHeaderMemorizerBase, + MemorizerFunctionId as HeaderMemorizerFunctionId, + MemorizerKey as HeaderMemorizerKey, +) from contract_bootloader.memorizer.account_memorizer import ( AbstractAccountMemorizerBase, MemorizerFunctionId as AccountMemorizerFunctionId, @@ -59,8 +64,32 @@ def _call_contract_helper( memorizerId = MemorizerId.from_int(request.contract_address) functionId = AccountMemorizerFunctionId.from_int(request.selector) + if memorizerId == MemorizerId.Header: + total_size = Memorizer.size() + HeaderMemorizerKey.size() + + if len(calldata) != total_size: + raise ValueError( + f"Memorizer read must be initialized with a list of {total_size} integers" + ) + + function_id = HeaderMemorizerFunctionId.from_int(request.selector) + memorizer = Memorizer( + dict_raw_ptrs=calldata[0 : Memorizer.size()], + dict_manager=self.dict_manager, + ) - if memorizerId == MemorizerId.Account: + idx = Memorizer.size() + key = HeaderMemorizerKey.from_int( + calldata[idx : idx + HeaderMemorizerKey.size()] + ) + + handler = HeaderMemorizerHandler( + segments=self.segments, + memorizer=memorizer, + ) + retdata = handler.handle(function_id=function_id, key=key) + + elif memorizerId == MemorizerId.Account: total_size = Memorizer.size() + AccountMemorizerKey.size() if len(calldata) != total_size: @@ -91,6 +120,32 @@ def _call_contract_helper( ) +class HeaderMemorizerHandler(AbstractHeaderMemorizerBase): + def __init__(self, segments: MemorySegmentManager, memorizer: Memorizer): + super().__init__(memorizer=memorizer) + self.segments = segments + + def get_parent(self, key: HeaderMemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["parentHash"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + class AccountMemorizerHandler(AbstractAccountMemorizerBase): def __init__(self, segments: MemorySegmentManager, memorizer: Memorizer): super().__init__(memorizer=memorizer) @@ -115,19 +170,3 @@ def get_balance(self, key: AccountMemorizerKey) -> Tuple[int, int]: value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, ) - - def _get_felt_range(self, start_addr: int, end_addr: int) -> List[int]: - assert isinstance(start_addr, RelocatableValue) - assert isinstance(end_addr, RelocatableValue) - assert start_addr.segment_index == end_addr.segment_index, ( - "Inconsistent start and end segment indices " - f"({start_addr.segment_index} != {end_addr.segment_index})." - ) - - assert start_addr.offset <= end_addr.offset, ( - "The start offset cannot be greater than the end offset" - f"({start_addr.offset} > {end_addr.offset})." - ) - - size = end_addr.offset - start_addr.offset - return self.segments.memory.get_range_as_ints(addr=start_addr, size=size) From 5e6cd4e6bc939b276cbe5a2025b89578928ac6eb Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 16 Jul 2024 09:41:56 +0200 Subject: [PATCH 02/73] syscall handlers reorganized --- .../dryrun_syscall_handler.py | 73 +---------- .../account_memorizer_handler.py | 43 ++++++ .../header_memorizer_handler.py | 91 +++++++++++++ .../memorizer/account_memorizer.py | 29 ++++- .../memorizer/header_memorizer.py | 123 +++++++++++++++++- .../contract_bootloader/syscall_handler.py | 70 +--------- .../account_memorizer_handler.py | 46 +++++++ .../header_memorizer_handler.py | 94 +++++++++++++ 8 files changed, 435 insertions(+), 134 deletions(-) create mode 100644 packages/contract_bootloader/dryrun_syscall_handler/account_memorizer_handler.py create mode 100644 packages/contract_bootloader/dryrun_syscall_handler/header_memorizer_handler.py create mode 100644 packages/contract_bootloader/syscall_handler/account_memorizer_handler.py create mode 100644 packages/contract_bootloader/syscall_handler/header_memorizer_handler.py diff --git a/packages/contract_bootloader/dryrun_syscall_handler.py b/packages/contract_bootloader/dryrun_syscall_handler.py index 7c14316b..eca2d235 100644 --- a/packages/contract_bootloader/dryrun_syscall_handler.py +++ b/packages/contract_bootloader/dryrun_syscall_handler.py @@ -1,33 +1,28 @@ from typing import ( Dict, Iterable, - Tuple, ) from starkware.cairo.lang.vm.relocatable import RelocatableValue, MaybeRelocatable from starkware.cairo.lang.vm.memory_segments import MemorySegmentManager from contract_bootloader.syscall_handler_base import SyscallHandlerBase from starkware.cairo.common.dict import DictManager from starkware.cairo.common.structs import CairoStructProxy -from starkware.starknet.business_logic.execution.objects import ( - CallResult, -) +from starkware.starknet.business_logic.execution.objects import CallResult from contract_bootloader.memorizer.memorizer import MemorizerId, Memorizer from contract_bootloader.memorizer.account_memorizer import ( - AbstractAccountMemorizerBase, MemorizerFunctionId as AccountMemorizerFunctionId, MemorizerKey as AccountMemorizerKey, ) -from contract_bootloader.provider.header_key_provider import ( - HeaderKeyEVMProvider, -) -from contract_bootloader.provider.account_key_provider import ( - AccountKeyEVMProvider, -) from contract_bootloader.memorizer.header_memorizer import ( - AbstractHeaderMemorizerBase, MemorizerFunctionId as HeaderMemorizerFunctionId, MemorizerKey as HeaderMemorizerKey, ) +from contract_bootloader.dryrun_syscall_handler.header_memorizer_handler import ( + DryRunHeaderMemorizerHandler, +) +from contract_bootloader.dryrun_syscall_handler.account_memorizer_handler import ( + DryRunAccountMemorizerHandler, +) EVM_PROVIDER_URL = "https://sepolia.ethereum.iosis.tech/" @@ -135,57 +130,3 @@ def clear_fetch_keys_registry(self): def fetch_keys_dict(self) -> list[dict]: return self.fetch_keys_registry - - -class DryRunHeaderMemorizerHandler(AbstractHeaderMemorizerBase): - def __init__(self, memorizer: Memorizer, evm_provider_url: str): - super().__init__(memorizer=memorizer) - self.evm_provider = HeaderKeyEVMProvider(provider_url=evm_provider_url) - self.fetch_keys_registry: set[HeaderMemorizerKey] = set() - - def get_parent(self, key: HeaderMemorizerKey) -> Tuple[int, int]: - self.fetch_keys_registry.add(key) - value = self.evm_provider.get_parent(key=key) - return ( - value % 0x100000000000000000000000000000000, - value // 0x100000000000000000000000000000000, - ) - - def fetch_keys_dict(self) -> set: - def create_dict(key: HeaderMemorizerKey): - data = dict() - data["type"] = "HeaderMemorizerKey" - data["key"] = key.to_dict() - return data - - dictionary = dict() - for fetch_key in list(self.fetch_keys_registry): - dictionary.update(create_dict(fetch_key)) - return dictionary - - -class DryRunAccountMemorizerHandler(AbstractAccountMemorizerBase): - def __init__(self, memorizer: Memorizer, evm_provider_url: str): - super().__init__(memorizer=memorizer) - self.evm_provider = AccountKeyEVMProvider(provider_url=evm_provider_url) - self.fetch_keys_registry: set[AccountMemorizerKey] = set() - - def get_balance(self, key: AccountMemorizerKey) -> Tuple[int, int]: - self.fetch_keys_registry.add(key) - value = self.evm_provider.get_balance(key=key) - return ( - value % 0x100000000000000000000000000000000, - value // 0x100000000000000000000000000000000, - ) - - def fetch_keys_dict(self) -> set: - def create_dict(key: AccountMemorizerKey): - data = dict() - data["type"] = "AccountMemorizerKey" - data["key"] = key.to_dict() - return data - - dictionary = dict() - for fetch_key in list(self.fetch_keys_registry): - dictionary.update(create_dict(fetch_key)) - return dictionary diff --git a/packages/contract_bootloader/dryrun_syscall_handler/account_memorizer_handler.py b/packages/contract_bootloader/dryrun_syscall_handler/account_memorizer_handler.py new file mode 100644 index 00000000..869a8bd6 --- /dev/null +++ b/packages/contract_bootloader/dryrun_syscall_handler/account_memorizer_handler.py @@ -0,0 +1,43 @@ +from typing import Tuple +from contract_bootloader.memorizer.memorizer import Memorizer +from contract_bootloader.memorizer.account_memorizer import ( + AbstractAccountMemorizerBase, + MemorizerKey, +) +from contract_bootloader.provider.account_key_provider import AccountKeyEVMProvider + + +class DryRunAccountMemorizerHandler(AbstractAccountMemorizerBase): + def __init__(self, memorizer: Memorizer, evm_provider_url: str): + super().__init__(memorizer=memorizer) + self.evm_provider = AccountKeyEVMProvider(provider_url=evm_provider_url) + self.fetch_keys_registry: set[MemorizerKey] = set() + + def get_balance(self, key: MemorizerKey) -> Tuple[int, int]: + self.fetch_keys_registry.add(key) + value = self.evm_provider.get_balance(key=key) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_balance(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_code_hash(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def fetch_keys_dict(self) -> set: + def create_dict(key: MemorizerKey): + data = dict() + data["type"] = "AccountMemorizerKey" + data["key"] = key.to_dict() + return data + + dictionary = dict() + for fetch_key in list(self.fetch_keys_registry): + dictionary.update(create_dict(fetch_key)) + return dictionary diff --git a/packages/contract_bootloader/dryrun_syscall_handler/header_memorizer_handler.py b/packages/contract_bootloader/dryrun_syscall_handler/header_memorizer_handler.py new file mode 100644 index 00000000..6c0313cc --- /dev/null +++ b/packages/contract_bootloader/dryrun_syscall_handler/header_memorizer_handler.py @@ -0,0 +1,91 @@ +from typing import Tuple +from contract_bootloader.memorizer.memorizer import Memorizer +from contract_bootloader.memorizer.header_memorizer import ( + AbstractHeaderMemorizerBase, + MemorizerKey, +) +from contract_bootloader.provider.header_key_provider import HeaderKeyEVMProvider + + +class DryRunHeaderMemorizerHandler(AbstractHeaderMemorizerBase): + def __init__(self, memorizer: Memorizer, evm_provider_url: str): + super().__init__(memorizer=memorizer) + self.evm_provider = HeaderKeyEVMProvider(provider_url=evm_provider_url) + self.fetch_keys_registry: set[MemorizerKey] = set() + + def get_parent(self, key: MemorizerKey) -> Tuple[int, int]: + self.fetch_keys_registry.add(key) + value = self.evm_provider.get_parent(key=key) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_uncle(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_coinbase(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_transaction_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_receipt_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_bloom(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_difficulty(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_number(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_gas_limit(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_timestamp(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_extra_data(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_mix_hash(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_nonce(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_base_fee_per_gas(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_withdrawals_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_blob_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_excess_blob_gas(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_parent_beacon_block_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def fetch_keys_dict(self) -> set: + def create_dict(key: MemorizerKey): + data = dict() + data["type"] = "HeaderMemorizerKey" + data["key"] = key.to_dict() + return data + + dictionary = dict() + for fetch_key in list(self.fetch_keys_registry): + dictionary.update(create_dict(fetch_key)) + return dictionary diff --git a/packages/contract_bootloader/memorizer/account_memorizer.py b/packages/contract_bootloader/memorizer/account_memorizer.py index 8bab3af9..28557d07 100644 --- a/packages/contract_bootloader/memorizer/account_memorizer.py +++ b/packages/contract_bootloader/memorizer/account_memorizer.py @@ -9,7 +9,10 @@ class MemorizerFunctionId(Enum): - GET_BALANCE = 0 + GET_NONCE = 0 + GET_BALANCE = 1 + GET_STATE_ROOT = 2 + GET_CODE_HASH = 3 @classmethod def from_int(cls, value: int): @@ -57,17 +60,37 @@ def size(cls) -> int: class AbstractAccountMemorizerBase(ABC): def __init__(self, memorizer: Memorizer): self.memorizer = memorizer + self.function_map = { + MemorizerFunctionId.GET_NONCE: self.get_nonce, + MemorizerFunctionId.GET_BALANCE: self.get_balance, + MemorizerFunctionId.GET_STATE_ROOT: self.get_state_root, + MemorizerFunctionId.GET_CODE_HASH: self.get_code_hash, + } def handle( self, function_id: MemorizerFunctionId, key: MemorizerKey ) -> Tuple[int, int]: - if function_id == MemorizerFunctionId.GET_BALANCE: - return self.get_balance(key=key) + if function_id in self.function_map: + return self.function_map[function_id](key=key) + else: + raise ValueError(f"Function ID {function_id} is not recognized.") + + @abstractmethod + def get_nonce(self, key: MemorizerKey) -> Tuple[int, int]: + pass @abstractmethod def get_balance(self, key: MemorizerKey) -> Tuple[int, int]: pass + @abstractmethod + def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_code_hash(self, key: MemorizerKey) -> Tuple[int, int]: + pass + def _get_felt_range(self, start_addr: int, end_addr: int) -> List[int]: assert isinstance(start_addr, RelocatableValue) assert isinstance(end_addr, RelocatableValue) diff --git a/packages/contract_bootloader/memorizer/header_memorizer.py b/packages/contract_bootloader/memorizer/header_memorizer.py index e91edefe..b077a7db 100644 --- a/packages/contract_bootloader/memorizer/header_memorizer.py +++ b/packages/contract_bootloader/memorizer/header_memorizer.py @@ -9,6 +9,25 @@ class MemorizerFunctionId(Enum): GET_PARENT = 0 + GET_UNCLE = 1 + GET_COINBASE = 2 + GET_STATE_ROOT = 3 + GET_TRANSACTION_ROOT = 4 + GET_RECEIPT_ROOT = 5 + GET_BLOOM = 6 + GET_DIFFICULTY = 7 + GET_NUMBER = 8 + GET_GAS_LIMIT = 9 + GET_GAS_USED = 10 + GET_TIMESTAMP = 11 + GET_EXTRA_DATA = 12 + GET_MIX_HASH = 13 + GET_NONCE = 14 + GET_BASE_FEE_PER_GAS = 15 + GET_WITHDRAWALS_ROOT = 16 + GET_BLOB_GAS_USED = 17 + GET_EXCESS_BLOB_GAS = 18 + GET_PARENT_BEACON_BLOCK_ROOT = 19 @classmethod def from_int(cls, value: int): @@ -50,17 +69,117 @@ def size(cls) -> int: class AbstractHeaderMemorizerBase(ABC): def __init__(self, memorizer: Memorizer): self.memorizer = memorizer + self.function_map = { + MemorizerFunctionId.GET_PARENT: self.get_parent, + MemorizerFunctionId.GET_UNCLE: self.get_uncle, + MemorizerFunctionId.GET_COINBASE: self.get_coinbase, + MemorizerFunctionId.GET_STATE_ROOT: self.get_state_root, + MemorizerFunctionId.GET_TRANSACTION_ROOT: self.get_transaction_root, + MemorizerFunctionId.GET_RECEIPT_ROOT: self.get_receipt_root, + MemorizerFunctionId.GET_BLOOM: self.get_bloom, + MemorizerFunctionId.GET_DIFFICULTY: self.get_difficulty, + MemorizerFunctionId.GET_NUMBER: self.get_number, + MemorizerFunctionId.GET_GAS_LIMIT: self.get_gas_limit, + MemorizerFunctionId.GET_GAS_USED: self.get_gas_used, + MemorizerFunctionId.GET_TIMESTAMP: self.get_timestamp, + MemorizerFunctionId.GET_EXTRA_DATA: self.get_extra_data, + MemorizerFunctionId.GET_MIX_HASH: self.get_mix_hash, + MemorizerFunctionId.GET_NONCE: self.get_nonce, + MemorizerFunctionId.GET_BASE_FEE_PER_GAS: self.get_base_fee_per_gas, + MemorizerFunctionId.GET_WITHDRAWALS_ROOT: self.get_withdrawals_root, + MemorizerFunctionId.GET_BLOB_GAS_USED: self.get_blob_gas_used, + MemorizerFunctionId.GET_EXCESS_BLOB_GAS: self.get_excess_blob_gas, + MemorizerFunctionId.GET_PARENT_BEACON_BLOCK_ROOT: self.get_parent_beacon_block_root, + } def handle( self, function_id: MemorizerFunctionId, key: MemorizerKey ) -> Tuple[int, int]: - if function_id == MemorizerFunctionId.GET_PARENT: - return self.get_parent(self, key=key) + if function_id in self.function_map: + return self.function_map[function_id](key=key) + else: + raise ValueError(f"Function ID {function_id} is not recognized.") @abstractmethod def get_parent(self, key: MemorizerKey) -> Tuple[int, int]: pass + @abstractmethod + def get_uncle(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_coinbase(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_transaction_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_receipt_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_bloom(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_difficulty(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_number(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_gas_limit(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_timestamp(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_extra_data(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_mix_hash(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_nonce(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_base_fee_per_gas(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_withdrawals_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_blob_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_excess_blob_gas(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + @abstractmethod + def get_parent_beacon_block_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + def _get_felt_range(self, start_addr: int, end_addr: int) -> List[int]: assert isinstance(start_addr, RelocatableValue) assert isinstance(end_addr, RelocatableValue) diff --git a/packages/contract_bootloader/syscall_handler.py b/packages/contract_bootloader/syscall_handler.py index 26549817..8e7d4d06 100644 --- a/packages/contract_bootloader/syscall_handler.py +++ b/packages/contract_bootloader/syscall_handler.py @@ -1,32 +1,28 @@ -from rlp import decode from typing import ( Dict, Iterable, - Tuple, ) -from tools.py.utils import little_8_bytes_chunks_to_bytes from starkware.cairo.lang.vm.relocatable import RelocatableValue, MaybeRelocatable from starkware.cairo.lang.vm.memory_segments import MemorySegmentManager from contract_bootloader.syscall_handler_base import SyscallHandlerBase from starkware.cairo.common.dict import DictManager from starkware.cairo.common.structs import CairoStructProxy -from tools.py.account import Account -from tools.py.block_header import BlockHeaderDencun -from tools.py.rlp import get_rlp_len -from starkware.starknet.business_logic.execution.objects import ( - CallResult, -) +from starkware.starknet.business_logic.execution.objects import CallResult from contract_bootloader.memorizer.memorizer import MemorizerId, Memorizer from contract_bootloader.memorizer.header_memorizer import ( - AbstractHeaderMemorizerBase, MemorizerFunctionId as HeaderMemorizerFunctionId, MemorizerKey as HeaderMemorizerKey, ) from contract_bootloader.memorizer.account_memorizer import ( - AbstractAccountMemorizerBase, MemorizerFunctionId as AccountMemorizerFunctionId, MemorizerKey as AccountMemorizerKey, ) +from contract_bootloader.syscall_handler.account_memorizer_handler import ( + AccountMemorizerHandler, +) +from contract_bootloader.syscall_handler.header_memorizer_handler import ( + HeaderMemorizerHandler, +) class SyscallHandler(SyscallHandlerBase): @@ -118,55 +114,3 @@ def _call_contract_helper( failure_flag=0, retdata=list(retdata), ) - - -class HeaderMemorizerHandler(AbstractHeaderMemorizerBase): - def __init__(self, segments: MemorySegmentManager, memorizer: Memorizer): - super().__init__(memorizer=memorizer) - self.segments = segments - - def get_parent(self, key: HeaderMemorizerKey) -> Tuple[int, int]: - memorizer_value_ptr = self.memorizer.read(key=key.derive()) - - rlp_len = get_rlp_len( - rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 - ) - rlp = self._get_felt_range( - start_addr=memorizer_value_ptr, - end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, - ) - - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["parentHash"] - - return ( - value % 0x100000000000000000000000000000000, - value // 0x100000000000000000000000000000000, - ) - - -class AccountMemorizerHandler(AbstractAccountMemorizerBase): - def __init__(self, segments: MemorySegmentManager, memorizer: Memorizer): - super().__init__(memorizer=memorizer) - self.segments = segments - - def get_balance(self, key: AccountMemorizerKey) -> Tuple[int, int]: - memorizer_value_ptr = self.memorizer.read(key=key.derive()) - - rlp_len = get_rlp_len( - rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 - ) - rlp = self._get_felt_range( - start_addr=memorizer_value_ptr, - end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, - ) - - value = decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account).as_dict()[ - "balance" - ] - - return ( - value % 0x100000000000000000000000000000000, - value // 0x100000000000000000000000000000000, - ) diff --git a/packages/contract_bootloader/syscall_handler/account_memorizer_handler.py b/packages/contract_bootloader/syscall_handler/account_memorizer_handler.py new file mode 100644 index 00000000..9a1de520 --- /dev/null +++ b/packages/contract_bootloader/syscall_handler/account_memorizer_handler.py @@ -0,0 +1,46 @@ +from rlp import decode +from typing import Tuple +from contract_bootloader.memorizer.memorizer import Memorizer +from contract_bootloader.memorizer.account_memorizer import ( + AbstractAccountMemorizerBase, + MemorizerKey, +) +from starkware.cairo.lang.vm.memory_segments import MemorySegmentManager +from tools.py.account import Account +from tools.py.rlp import get_rlp_len +from tools.py.utils import little_8_bytes_chunks_to_bytes + + +class AccountMemorizerHandler(AbstractAccountMemorizerBase): + def __init__(self, segments: MemorySegmentManager, memorizer: Memorizer): + super().__init__(memorizer=memorizer) + self.segments = segments + + def get_balance(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account).as_dict()[ + "balance" + ] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_balance(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_code_hash(self, key: MemorizerKey) -> Tuple[int, int]: + pass diff --git a/packages/contract_bootloader/syscall_handler/header_memorizer_handler.py b/packages/contract_bootloader/syscall_handler/header_memorizer_handler.py new file mode 100644 index 00000000..9d9ab270 --- /dev/null +++ b/packages/contract_bootloader/syscall_handler/header_memorizer_handler.py @@ -0,0 +1,94 @@ +from rlp import decode +from typing import Tuple +from contract_bootloader.memorizer.memorizer import Memorizer +from contract_bootloader.memorizer.header_memorizer import ( + AbstractHeaderMemorizerBase, + MemorizerKey, +) +from starkware.cairo.lang.vm.memory_segments import MemorySegmentManager +from tools.py.block_header import BlockHeaderDencun +from tools.py.rlp import get_rlp_len +from tools.py.utils import little_8_bytes_chunks_to_bytes + + +class HeaderMemorizerHandler(AbstractHeaderMemorizerBase): + def __init__(self, segments: MemorySegmentManager, memorizer: Memorizer): + super().__init__(memorizer=memorizer) + self.segments = segments + + def get_parent(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["parentHash"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_uncle(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_coinbase(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_transaction_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_receipt_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_bloom(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_difficulty(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_number(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_gas_limit(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_timestamp(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_extra_data(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_mix_hash(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_nonce(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_base_fee_per_gas(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_withdrawals_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_blob_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_excess_blob_gas(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_parent_beacon_block_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass From eb0797c09195daa3d1516cbe2e43d62e8ea9ba27 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 16 Jul 2024 10:43:56 +0200 Subject: [PATCH 03/73] syscall crude impl --- .../account_memorizer_handler.py | 25 ++++- .../header_memorizer_handler.py | 93 ++++++++++++++++--- .../provider/account_key_provider.py | 37 +++++++- .../provider/header_key_provider.py | 12 +-- 4 files changed, 136 insertions(+), 31 deletions(-) diff --git a/packages/contract_bootloader/dryrun_syscall_handler/account_memorizer_handler.py b/packages/contract_bootloader/dryrun_syscall_handler/account_memorizer_handler.py index 869a8bd6..031042f6 100644 --- a/packages/contract_bootloader/dryrun_syscall_handler/account_memorizer_handler.py +++ b/packages/contract_bootloader/dryrun_syscall_handler/account_memorizer_handler.py @@ -13,22 +13,37 @@ def __init__(self, memorizer: Memorizer, evm_provider_url: str): self.evm_provider = AccountKeyEVMProvider(provider_url=evm_provider_url) self.fetch_keys_registry: set[MemorizerKey] = set() - def get_balance(self, key: MemorizerKey) -> Tuple[int, int]: + def get_nonce(self, key: MemorizerKey) -> Tuple[int]: self.fetch_keys_registry.add(key) - value = self.evm_provider.get_balance(key=key) + value = self.evm_provider.get_nonce(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, ) def get_balance(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = self.evm_provider.get_balance(key=key) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = self.evm_provider.get_state_root(key=key) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_code_hash(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = self.evm_provider.get_code_hash(key=key) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def fetch_keys_dict(self) -> set: def create_dict(key: MemorizerKey): diff --git a/packages/contract_bootloader/dryrun_syscall_handler/header_memorizer_handler.py b/packages/contract_bootloader/dryrun_syscall_handler/header_memorizer_handler.py index 6c0313cc..4f849739 100644 --- a/packages/contract_bootloader/dryrun_syscall_handler/header_memorizer_handler.py +++ b/packages/contract_bootloader/dryrun_syscall_handler/header_memorizer_handler.py @@ -15,56 +15,121 @@ def __init__(self, memorizer: Memorizer, evm_provider_url: str): def get_parent(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = self.evm_provider.get_parent(key=key) + value = int(self.evm_provider.get_block(key=key)["parentHash"]) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, ) def get_uncle(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = int(self.evm_provider.get_block(key=key)["sha3Uncles"]) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_coinbase(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = int(self.evm_provider.get_block(key=key)["miner"]) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = int(self.evm_provider.get_block(key=key)["stateRoot"]) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_transaction_root(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = int(self.evm_provider.get_block(key=key)["transactionsRoot"]) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_receipt_root(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = int(self.evm_provider.get_block(key=key)["receiptRoot"]) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_bloom(self, key: MemorizerKey) -> Tuple[int, int]: pass def get_difficulty(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = int(self.evm_provider.get_block(key=key)["difficulty"]) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_number(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = int(self.evm_provider.get_block(key=key)["number"]) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_gas_limit(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = int(self.evm_provider.get_block(key=key)["gasLimit"]) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = int(self.evm_provider.get_block(key=key)["gasUsed"]) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_timestamp(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = int(self.evm_provider.get_block(key=key)["timestamp"]) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_extra_data(self, key: MemorizerKey) -> Tuple[int, int]: pass def get_mix_hash(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = int(self.evm_provider.get_block(key=key)["mixHash"]) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_nonce(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = int(self.evm_provider.get_block(key=key)["nonce"]) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_base_fee_per_gas(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = int(self.evm_provider.get_block(key=key)["baseFeePerGas"]) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_withdrawals_root(self, key: MemorizerKey) -> Tuple[int, int]: pass diff --git a/packages/contract_bootloader/provider/account_key_provider.py b/packages/contract_bootloader/provider/account_key_provider.py index 51f1646b..a23bdc55 100644 --- a/packages/contract_bootloader/provider/account_key_provider.py +++ b/packages/contract_bootloader/provider/account_key_provider.py @@ -1,7 +1,5 @@ from web3 import Web3 -from contract_bootloader.memorizer.account_memorizer import ( - MemorizerKey as AccountMemorizerKey, -) +from contract_bootloader.memorizer.account_memorizer import MemorizerKey from contract_bootloader.provider.evm_provider import EVMProvider @@ -9,7 +7,20 @@ class AccountKeyEVMProvider(EVMProvider): def __init__(self, provider_url: str): super().__init__(provider_url=provider_url) - def get_balance(self, key: AccountMemorizerKey) -> int: + def get_nonce(self, key: MemorizerKey) -> int: + address = Web3.toChecksumAddress(hex(key.address)) + if not self.web3.isAddress(address): + raise ValueError(f"Invalid Ethereum address: {address}") + + try: + nonce = self.web3.eth.get_transaction_count( + address, block_identifier=key.block_number + ) + return int(nonce) + except Exception as e: + raise Exception(f"An error occurred while fetching the nonce: {e}") + + def get_balance(self, key: MemorizerKey) -> int: address = Web3.toChecksumAddress(hex(key.address)) if not self.web3.isAddress(address): raise ValueError(f"Invalid Ethereum address: {address}") @@ -21,3 +32,21 @@ def get_balance(self, key: AccountMemorizerKey) -> int: return int(balance) except Exception as e: raise Exception(f"An error occurred while fetching the balance: {e}") + + def get_state_root(self, key: MemorizerKey) -> int: + try: + block = self.web3.eth.get_block(key.block_number) + return int(block["stateRoot"], 16) + except Exception as e: + raise Exception(f"An error occurred while fetching the state root: {e}") + + def get_code_hash(self, key: MemorizerKey) -> int: + address = Web3.toChecksumAddress(hex(key.address)) + if not self.web3.isAddress(address): + raise ValueError(f"Invalid Ethereum address: {address}") + + try: + code = self.web3.eth.get_code(address, block_identifier=key.block_number) + return int(Web3.sha3(code).hex(), 16) + except Exception as e: + raise Exception(f"An error occurred while fetching the code hash: {e}") diff --git a/packages/contract_bootloader/provider/header_key_provider.py b/packages/contract_bootloader/provider/header_key_provider.py index 7bca3855..46344415 100644 --- a/packages/contract_bootloader/provider/header_key_provider.py +++ b/packages/contract_bootloader/provider/header_key_provider.py @@ -1,6 +1,5 @@ -from contract_bootloader.memorizer.header_memorizer import ( - MemorizerKey as HeaderMemorizerKey, -) +from web3.types import BlockData +from contract_bootloader.memorizer.header_memorizer import MemorizerKey from contract_bootloader.provider.evm_provider import EVMProvider @@ -8,12 +7,9 @@ class HeaderKeyEVMProvider(EVMProvider): def __init__(self, provider_url: str): super().__init__(provider_url=provider_url) - def get_parent(self, key: HeaderMemorizerKey) -> int: + def get_block(self, key: MemorizerKey) -> BlockData: try: # Fetch the block details - block = self.web3.eth.get_block(key.block_number) - # Get the parent block number - parent_block_number = block["parentHash"] - return int(parent_block_number) + return self.web3.eth.get_block(key.block_number) except Exception as e: raise Exception(f"An error occurred while fetching the parent block: {e}") From 1008fb48583f2274f186aaa5bfef17e3a291fc73 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 16 Jul 2024 10:56:22 +0200 Subject: [PATCH 04/73] __init__.py files --- packages/contract_bootloader/dryrun_syscall_handler/__init__.py | 0 packages/contract_bootloader/syscall_handler/__init__.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 packages/contract_bootloader/dryrun_syscall_handler/__init__.py create mode 100644 packages/contract_bootloader/syscall_handler/__init__.py diff --git a/packages/contract_bootloader/dryrun_syscall_handler/__init__.py b/packages/contract_bootloader/dryrun_syscall_handler/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/packages/contract_bootloader/syscall_handler/__init__.py b/packages/contract_bootloader/syscall_handler/__init__.py new file mode 100644 index 00000000..e69de29b From 1d6191d7b6ab68fc0d632b0a87c62e3101433f87 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 16 Jul 2024 11:44:01 +0200 Subject: [PATCH 05/73] rename --- .../dryrun_syscall_handler.py | 4 +- .../__init__.py | 0 .../account_memorizer_handler.py | 0 .../header_memorizer_handler.py | 0 .../contract_bootloader/syscall_handler.py | 4 +- .../account_memorizer_handler.py | 46 --- .../header_memorizer_handler.py | 94 ------ .../__init__.py | 0 .../account_memorizer_handler.py | 97 ++++++ .../header_memorizer_handler.py | 315 ++++++++++++++++++ 10 files changed, 416 insertions(+), 144 deletions(-) rename packages/contract_bootloader/{dryrun_syscall_handler => dryrun_syscall_handler_memorizer}/__init__.py (100%) rename packages/contract_bootloader/{dryrun_syscall_handler => dryrun_syscall_handler_memorizer}/account_memorizer_handler.py (100%) rename packages/contract_bootloader/{dryrun_syscall_handler => dryrun_syscall_handler_memorizer}/header_memorizer_handler.py (100%) delete mode 100644 packages/contract_bootloader/syscall_handler/account_memorizer_handler.py delete mode 100644 packages/contract_bootloader/syscall_handler/header_memorizer_handler.py rename packages/contract_bootloader/{syscall_handler => syscall_handler_memorizer}/__init__.py (100%) create mode 100644 packages/contract_bootloader/syscall_handler_memorizer/account_memorizer_handler.py create mode 100644 packages/contract_bootloader/syscall_handler_memorizer/header_memorizer_handler.py diff --git a/packages/contract_bootloader/dryrun_syscall_handler.py b/packages/contract_bootloader/dryrun_syscall_handler.py index eca2d235..f11a70dc 100644 --- a/packages/contract_bootloader/dryrun_syscall_handler.py +++ b/packages/contract_bootloader/dryrun_syscall_handler.py @@ -17,10 +17,10 @@ MemorizerFunctionId as HeaderMemorizerFunctionId, MemorizerKey as HeaderMemorizerKey, ) -from contract_bootloader.dryrun_syscall_handler.header_memorizer_handler import ( +from contract_bootloader.dryrun_syscall_handler_memorizer.header_memorizer_handler import ( DryRunHeaderMemorizerHandler, ) -from contract_bootloader.dryrun_syscall_handler.account_memorizer_handler import ( +from contract_bootloader.dryrun_syscall_handler_memorizer.account_memorizer_handler import ( DryRunAccountMemorizerHandler, ) diff --git a/packages/contract_bootloader/dryrun_syscall_handler/__init__.py b/packages/contract_bootloader/dryrun_syscall_handler_memorizer/__init__.py similarity index 100% rename from packages/contract_bootloader/dryrun_syscall_handler/__init__.py rename to packages/contract_bootloader/dryrun_syscall_handler_memorizer/__init__.py diff --git a/packages/contract_bootloader/dryrun_syscall_handler/account_memorizer_handler.py b/packages/contract_bootloader/dryrun_syscall_handler_memorizer/account_memorizer_handler.py similarity index 100% rename from packages/contract_bootloader/dryrun_syscall_handler/account_memorizer_handler.py rename to packages/contract_bootloader/dryrun_syscall_handler_memorizer/account_memorizer_handler.py diff --git a/packages/contract_bootloader/dryrun_syscall_handler/header_memorizer_handler.py b/packages/contract_bootloader/dryrun_syscall_handler_memorizer/header_memorizer_handler.py similarity index 100% rename from packages/contract_bootloader/dryrun_syscall_handler/header_memorizer_handler.py rename to packages/contract_bootloader/dryrun_syscall_handler_memorizer/header_memorizer_handler.py diff --git a/packages/contract_bootloader/syscall_handler.py b/packages/contract_bootloader/syscall_handler.py index 8e7d4d06..ea8afbfb 100644 --- a/packages/contract_bootloader/syscall_handler.py +++ b/packages/contract_bootloader/syscall_handler.py @@ -17,10 +17,10 @@ MemorizerFunctionId as AccountMemorizerFunctionId, MemorizerKey as AccountMemorizerKey, ) -from contract_bootloader.syscall_handler.account_memorizer_handler import ( +from contract_bootloader.syscall_handler_memorizer.account_memorizer_handler import ( AccountMemorizerHandler, ) -from contract_bootloader.syscall_handler.header_memorizer_handler import ( +from contract_bootloader.syscall_handler_memorizer.header_memorizer_handler import ( HeaderMemorizerHandler, ) diff --git a/packages/contract_bootloader/syscall_handler/account_memorizer_handler.py b/packages/contract_bootloader/syscall_handler/account_memorizer_handler.py deleted file mode 100644 index 9a1de520..00000000 --- a/packages/contract_bootloader/syscall_handler/account_memorizer_handler.py +++ /dev/null @@ -1,46 +0,0 @@ -from rlp import decode -from typing import Tuple -from contract_bootloader.memorizer.memorizer import Memorizer -from contract_bootloader.memorizer.account_memorizer import ( - AbstractAccountMemorizerBase, - MemorizerKey, -) -from starkware.cairo.lang.vm.memory_segments import MemorySegmentManager -from tools.py.account import Account -from tools.py.rlp import get_rlp_len -from tools.py.utils import little_8_bytes_chunks_to_bytes - - -class AccountMemorizerHandler(AbstractAccountMemorizerBase): - def __init__(self, segments: MemorySegmentManager, memorizer: Memorizer): - super().__init__(memorizer=memorizer) - self.segments = segments - - def get_balance(self, key: MemorizerKey) -> Tuple[int, int]: - memorizer_value_ptr = self.memorizer.read(key=key.derive()) - - rlp_len = get_rlp_len( - rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 - ) - rlp = self._get_felt_range( - start_addr=memorizer_value_ptr, - end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, - ) - - value = decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account).as_dict()[ - "balance" - ] - - return ( - value % 0x100000000000000000000000000000000, - value // 0x100000000000000000000000000000000, - ) - - def get_balance(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_code_hash(self, key: MemorizerKey) -> Tuple[int, int]: - pass diff --git a/packages/contract_bootloader/syscall_handler/header_memorizer_handler.py b/packages/contract_bootloader/syscall_handler/header_memorizer_handler.py deleted file mode 100644 index 9d9ab270..00000000 --- a/packages/contract_bootloader/syscall_handler/header_memorizer_handler.py +++ /dev/null @@ -1,94 +0,0 @@ -from rlp import decode -from typing import Tuple -from contract_bootloader.memorizer.memorizer import Memorizer -from contract_bootloader.memorizer.header_memorizer import ( - AbstractHeaderMemorizerBase, - MemorizerKey, -) -from starkware.cairo.lang.vm.memory_segments import MemorySegmentManager -from tools.py.block_header import BlockHeaderDencun -from tools.py.rlp import get_rlp_len -from tools.py.utils import little_8_bytes_chunks_to_bytes - - -class HeaderMemorizerHandler(AbstractHeaderMemorizerBase): - def __init__(self, segments: MemorySegmentManager, memorizer: Memorizer): - super().__init__(memorizer=memorizer) - self.segments = segments - - def get_parent(self, key: MemorizerKey) -> Tuple[int, int]: - memorizer_value_ptr = self.memorizer.read(key=key.derive()) - - rlp_len = get_rlp_len( - rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 - ) - rlp = self._get_felt_range( - start_addr=memorizer_value_ptr, - end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, - ) - - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["parentHash"] - - return ( - value % 0x100000000000000000000000000000000, - value // 0x100000000000000000000000000000000, - ) - - def get_uncle(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_coinbase(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_transaction_root(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_receipt_root(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_bloom(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_difficulty(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_number(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_gas_limit(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_timestamp(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_extra_data(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_mix_hash(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_nonce(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_base_fee_per_gas(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_withdrawals_root(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_blob_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_excess_blob_gas(self, key: MemorizerKey) -> Tuple[int, int]: - pass - - def get_parent_beacon_block_root(self, key: MemorizerKey) -> Tuple[int, int]: - pass diff --git a/packages/contract_bootloader/syscall_handler/__init__.py b/packages/contract_bootloader/syscall_handler_memorizer/__init__.py similarity index 100% rename from packages/contract_bootloader/syscall_handler/__init__.py rename to packages/contract_bootloader/syscall_handler_memorizer/__init__.py diff --git a/packages/contract_bootloader/syscall_handler_memorizer/account_memorizer_handler.py b/packages/contract_bootloader/syscall_handler_memorizer/account_memorizer_handler.py new file mode 100644 index 00000000..760c584c --- /dev/null +++ b/packages/contract_bootloader/syscall_handler_memorizer/account_memorizer_handler.py @@ -0,0 +1,97 @@ +from rlp import decode +from typing import Tuple +from contract_bootloader.memorizer.memorizer import Memorizer +from contract_bootloader.memorizer.account_memorizer import ( + AbstractAccountMemorizerBase, + MemorizerKey, +) +from starkware.cairo.lang.vm.memory_segments import MemorySegmentManager +from tools.py.account import Account +from tools.py.rlp import get_rlp_len +from tools.py.utils import little_8_bytes_chunks_to_bytes + + +class AccountMemorizerHandler(AbstractAccountMemorizerBase): + def __init__(self, segments: MemorySegmentManager, memorizer: Memorizer): + super().__init__(memorizer=memorizer) + self.segments = segments + + def get_nonce(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account).as_dict()[ + "nonce" + ] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_balance(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account).as_dict()[ + "balance" + ] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account).as_dict()[ + "storageRoot" + ] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_code_hash(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account).as_dict()[ + "codeHash" + ] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) diff --git a/packages/contract_bootloader/syscall_handler_memorizer/header_memorizer_handler.py b/packages/contract_bootloader/syscall_handler_memorizer/header_memorizer_handler.py new file mode 100644 index 00000000..eb1cd381 --- /dev/null +++ b/packages/contract_bootloader/syscall_handler_memorizer/header_memorizer_handler.py @@ -0,0 +1,315 @@ +from rlp import decode +from typing import Tuple +from contract_bootloader.memorizer.memorizer import Memorizer +from contract_bootloader.memorizer.header_memorizer import ( + AbstractHeaderMemorizerBase, + MemorizerKey, +) +from starkware.cairo.lang.vm.memory_segments import MemorySegmentManager +from tools.py.block_header import BlockHeaderDencun +from tools.py.rlp import get_rlp_len +from tools.py.utils import little_8_bytes_chunks_to_bytes + + +class HeaderMemorizerHandler(AbstractHeaderMemorizerBase): + def __init__(self, segments: MemorySegmentManager, memorizer: Memorizer): + super().__init__(memorizer=memorizer) + self.segments = segments + + def get_parent(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["parentHash"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_uncle(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["unclesHash"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_coinbase(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["coinbase"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["stateRoot"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_transaction_root(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["transactionsRoot"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_receipt_root(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["receiptsRoot"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_bloom(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_difficulty(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["difficulty"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_number(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["number"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_gas_limit(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["gasLimit"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["gasUsed"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_timestamp(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["timestamp"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_extra_data(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_mix_hash(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["mixHash"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_nonce(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["nonce"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_base_fee_per_gas(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["baseFeePerGas"] + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def get_withdrawals_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_blob_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_excess_blob_gas(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def get_parent_beacon_block_root(self, key: MemorizerKey) -> Tuple[int, int]: + pass From 8398c1eef9dd86d5daecdc621df33abb543e6e6b Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 16 Jul 2024 16:21:46 +0200 Subject: [PATCH 06/73] wip --- .../execute_syscalls.cairo | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/contract_bootloader/execute_syscalls.cairo b/packages/contract_bootloader/execute_syscalls.cairo index 1f975a8e..45e7c2b4 100644 --- a/packages/contract_bootloader/execute_syscalls.cairo +++ b/packages/contract_bootloader/execute_syscalls.cairo @@ -58,6 +58,29 @@ namespace MemorizerId { const ACCOUNT = 1; } +namespace HeaderMemorizerFunctionId { + const GET_PARENT = 0; + const GET_UNCLE = 1; + const GET_COINBASE = 2; + const GET_STATE_ROOT = 3; + const GET_TRANSACTION_ROOT = 4; + const GET_RECEIPT_ROOT = 5; + const GET_BLOOM = 6; + const GET_DIFFICULTY = 7; + const GET_NUMBER = 8; + const GET_GAS_LIMIT = 9; + const GET_GAS_USED = 10; + const GET_TIMESTAMP = 11; + const GET_EXTRA_DATA = 12; + const GET_MIX_HASH = 13; + const GET_NONCE = 14; + const GET_BASE_FEE_PER_GAS = 15; + const GET_WITHDRAWALS_ROOT = 16; + const GET_BLOB_GAS_USED = 17; + const GET_EXCESS_BLOB_GAS = 18; + const GET_PARENT_BEACON_BLOCK_ROOT = 19; +} + namespace AccountMemorizerFunctionId { const GET_BALANCE = 0; } From 706022e2dfa46168d2f21605e60e31e4611dda3a Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 16 Jul 2024 16:35:41 +0200 Subject: [PATCH 07/73] wip --- packages/contract_bootloader/execute_syscalls.cairo | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/contract_bootloader/execute_syscalls.cairo b/packages/contract_bootloader/execute_syscalls.cairo index 45e7c2b4..08873603 100644 --- a/packages/contract_bootloader/execute_syscalls.cairo +++ b/packages/contract_bootloader/execute_syscalls.cairo @@ -82,7 +82,10 @@ namespace HeaderMemorizerFunctionId { } namespace AccountMemorizerFunctionId { - const GET_BALANCE = 0; + const GET_NONCE = 0; + const GET_BALANCE = 1; + const GET_STATE_ROOT = 2; + const GET_CODE_HASH = 3; } // Executes a syscall that calls another contract. From e642f8213b6b4ee7932986d30a96df78db336b4f Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 16 Jul 2024 16:42:34 +0200 Subject: [PATCH 08/73] rename --- packages/contract_bootloader/dryrun_syscall_handler.py | 4 ++-- .../__init__.py | 0 .../account_memorizer_handler.py | 0 .../header_memorizer_handler.py | 0 packages/contract_bootloader/syscall_handler.py | 4 ++-- .../__init__.py | 0 .../account_memorizer_handler.py | 0 .../header_memorizer_handler.py | 0 8 files changed, 4 insertions(+), 4 deletions(-) rename packages/contract_bootloader/{dryrun_syscall_handler_memorizer => dryrun_syscall_memorizer_handler}/__init__.py (100%) rename packages/contract_bootloader/{dryrun_syscall_handler_memorizer => dryrun_syscall_memorizer_handler}/account_memorizer_handler.py (100%) rename packages/contract_bootloader/{dryrun_syscall_handler_memorizer => dryrun_syscall_memorizer_handler}/header_memorizer_handler.py (100%) rename packages/contract_bootloader/{syscall_handler_memorizer => syscall_memorizer_handler}/__init__.py (100%) rename packages/contract_bootloader/{syscall_handler_memorizer => syscall_memorizer_handler}/account_memorizer_handler.py (100%) rename packages/contract_bootloader/{syscall_handler_memorizer => syscall_memorizer_handler}/header_memorizer_handler.py (100%) diff --git a/packages/contract_bootloader/dryrun_syscall_handler.py b/packages/contract_bootloader/dryrun_syscall_handler.py index f11a70dc..1e41344d 100644 --- a/packages/contract_bootloader/dryrun_syscall_handler.py +++ b/packages/contract_bootloader/dryrun_syscall_handler.py @@ -17,10 +17,10 @@ MemorizerFunctionId as HeaderMemorizerFunctionId, MemorizerKey as HeaderMemorizerKey, ) -from contract_bootloader.dryrun_syscall_handler_memorizer.header_memorizer_handler import ( +from contract_bootloader.dryrun_syscall_memorizer_handler.header_memorizer_handler import ( DryRunHeaderMemorizerHandler, ) -from contract_bootloader.dryrun_syscall_handler_memorizer.account_memorizer_handler import ( +from contract_bootloader.dryrun_syscall_memorizer_handler.account_memorizer_handler import ( DryRunAccountMemorizerHandler, ) diff --git a/packages/contract_bootloader/dryrun_syscall_handler_memorizer/__init__.py b/packages/contract_bootloader/dryrun_syscall_memorizer_handler/__init__.py similarity index 100% rename from packages/contract_bootloader/dryrun_syscall_handler_memorizer/__init__.py rename to packages/contract_bootloader/dryrun_syscall_memorizer_handler/__init__.py diff --git a/packages/contract_bootloader/dryrun_syscall_handler_memorizer/account_memorizer_handler.py b/packages/contract_bootloader/dryrun_syscall_memorizer_handler/account_memorizer_handler.py similarity index 100% rename from packages/contract_bootloader/dryrun_syscall_handler_memorizer/account_memorizer_handler.py rename to packages/contract_bootloader/dryrun_syscall_memorizer_handler/account_memorizer_handler.py diff --git a/packages/contract_bootloader/dryrun_syscall_handler_memorizer/header_memorizer_handler.py b/packages/contract_bootloader/dryrun_syscall_memorizer_handler/header_memorizer_handler.py similarity index 100% rename from packages/contract_bootloader/dryrun_syscall_handler_memorizer/header_memorizer_handler.py rename to packages/contract_bootloader/dryrun_syscall_memorizer_handler/header_memorizer_handler.py diff --git a/packages/contract_bootloader/syscall_handler.py b/packages/contract_bootloader/syscall_handler.py index ea8afbfb..49f4f229 100644 --- a/packages/contract_bootloader/syscall_handler.py +++ b/packages/contract_bootloader/syscall_handler.py @@ -17,10 +17,10 @@ MemorizerFunctionId as AccountMemorizerFunctionId, MemorizerKey as AccountMemorizerKey, ) -from contract_bootloader.syscall_handler_memorizer.account_memorizer_handler import ( +from contract_bootloader.syscall_memorizer_handler.account_memorizer_handler import ( AccountMemorizerHandler, ) -from contract_bootloader.syscall_handler_memorizer.header_memorizer_handler import ( +from contract_bootloader.syscall_memorizer_handler.header_memorizer_handler import ( HeaderMemorizerHandler, ) diff --git a/packages/contract_bootloader/syscall_handler_memorizer/__init__.py b/packages/contract_bootloader/syscall_memorizer_handler/__init__.py similarity index 100% rename from packages/contract_bootloader/syscall_handler_memorizer/__init__.py rename to packages/contract_bootloader/syscall_memorizer_handler/__init__.py diff --git a/packages/contract_bootloader/syscall_handler_memorizer/account_memorizer_handler.py b/packages/contract_bootloader/syscall_memorizer_handler/account_memorizer_handler.py similarity index 100% rename from packages/contract_bootloader/syscall_handler_memorizer/account_memorizer_handler.py rename to packages/contract_bootloader/syscall_memorizer_handler/account_memorizer_handler.py diff --git a/packages/contract_bootloader/syscall_handler_memorizer/header_memorizer_handler.py b/packages/contract_bootloader/syscall_memorizer_handler/header_memorizer_handler.py similarity index 100% rename from packages/contract_bootloader/syscall_handler_memorizer/header_memorizer_handler.py rename to packages/contract_bootloader/syscall_memorizer_handler/header_memorizer_handler.py From 07a097150c856e361b84e085121006074ce79645 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 16 Jul 2024 16:44:05 +0200 Subject: [PATCH 09/73] format script fix --- tools/make/format_cairo_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/make/format_cairo_files.sh b/tools/make/format_cairo_files.sh index beca4ce5..1dec6e05 100755 --- a/tools/make/format_cairo_files.sh +++ b/tools/make/format_cairo_files.sh @@ -34,7 +34,7 @@ export -f format_scarb_project # Find all .cairo files under src/ and tests/ directories and format them in parallel echo "Formatting .cairo files..." -find ./src ./tests ./packages/contract_bootloader/ ./packages/hdp_bootloader/ -name '*.cairo' ! -path "./src/cairo1/*" ! -path "./src/contracts/*" | parallel --halt soon,fail=1 format_file {} +find ./src ./tests ./packages/contract_bootloader/ -name '*.cairo' ! -path "./src/cairo1/*" ! -path "./src/contracts/*" | parallel --halt soon,fail=1 format_file {} # Capture the exit status of parallel for .cairo files exit_status_cairo_files=$? From 32c1d2a7ba5455ac6a295ccdc8ba5dc600571562 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 16 Jul 2024 18:09:54 +0200 Subject: [PATCH 10/73] fix --- .gitignore | 2 - cairo/src/memorizer/account_memorizer.cairo | 11 +- cairo/src/memorizer/header_memorizer.cairo | 27 +- src/hdp_input.json | 1143 +++++++++++-------- 4 files changed, 685 insertions(+), 498 deletions(-) diff --git a/.gitignore b/.gitignore index e32a4097..8af5fa99 100644 --- a/.gitignore +++ b/.gitignore @@ -52,8 +52,6 @@ hdp/ *.memory *.trace -src/hdp_input.json - # Whitelist - these files should not be ignored !tests/cairo_programs/fixtures/*.json !tools/js/package.json diff --git a/cairo/src/memorizer/account_memorizer.cairo b/cairo/src/memorizer/account_memorizer.cairo index 0cdcbad9..1f6964fe 100644 --- a/cairo/src/memorizer/account_memorizer.cairo +++ b/cairo/src/memorizer/account_memorizer.cairo @@ -2,9 +2,12 @@ use hdp_cairo::Memorizer; use starknet::syscalls::call_contract_syscall; use starknet::{SyscallResult, SyscallResultTrait}; -const ACCOUNT_MEMORIZER_ID: felt252 = 0x1; +const ACCOUNT_MEMORIZER: felt252 = 0x1; -const ACCOUNT_MEMORIZER_GET_BALANCE_ID: felt252 = 0x0; +const ACCOUNT_MEMORIZER_GET_NONCE: felt252 = 0; +const ACCOUNT_MEMORIZER_GET_BALANCE: felt252 = 1; +const ACCOUNT_MEMORIZER_GET_STATE_ROOT: felt252 = 2; +const ACCOUNT_MEMORIZER_GET_CODE_HASH: felt252 = 3; #[derive(Serde, Drop)] pub struct AccountKey { @@ -17,8 +20,8 @@ pub struct AccountKey { pub impl AccountMemorizerImpl of AccountMemorizerTrait { fn get_balance(self: @Memorizer, key: AccountKey) -> u256 { let value = call_contract_syscall( - ACCOUNT_MEMORIZER_ID.try_into().unwrap(), - ACCOUNT_MEMORIZER_GET_BALANCE_ID, + ACCOUNT_MEMORIZER.try_into().unwrap(), + ACCOUNT_MEMORIZER_GET_BALANCE, array![ *self.dict.segment_index, *self.dict.offset, diff --git a/cairo/src/memorizer/header_memorizer.cairo b/cairo/src/memorizer/header_memorizer.cairo index 3b97b736..7c47af9c 100644 --- a/cairo/src/memorizer/header_memorizer.cairo +++ b/cairo/src/memorizer/header_memorizer.cairo @@ -2,9 +2,28 @@ use hdp_cairo::Memorizer; use starknet::syscalls::call_contract_syscall; use starknet::{SyscallResult, SyscallResultTrait}; -const HEADER_MEMORIZER_ID: felt252 = 0x0; +const HEADER_MEMORIZER: felt252 = 0x0; -const HEADER_MEMORIZER_GET_PARENT_ID: felt252 = 0x0; +const HEADER_MEMORIZER_GET_PARENT: felt252 = 0; +const HEADER_MEMORIZER_GET_UNCLE: felt252 = 1; +const HEADER_MEMORIZER_GET_COINBASE: felt252 = 2; +const HEADER_MEMORIZER_GET_STATE_ROOT: felt252 = 3; +const HEADER_MEMORIZER_GET_TRANSACTION_ROOT: felt252 = 4; +const HEADER_MEMORIZER_GET_RECEIPT_ROOT: felt252 = 5; +const HEADER_MEMORIZER_GET_BLOOM: felt252 = 6; +const HEADER_MEMORIZER_GET_DIFFICULTY: felt252 = 7; +const HEADER_MEMORIZER_GET_NUMBER: felt252 = 8; +const HEADER_MEMORIZER_GET_GAS_LIMIT: felt252 = 9; +const HEADER_MEMORIZER_GET_GAS_USED: felt252 = 10; +const HEADER_MEMORIZER_GET_TIMESTAMP: felt252 = 11; +const HEADER_MEMORIZER_GET_EXTRA_DATA: felt252 = 12; +const HEADER_MEMORIZER_GET_MIX_HASH: felt252 = 13; +const HEADER_MEMORIZER_GET_NONCE: felt252 = 14; +const HEADER_MEMORIZER_GET_BASE_FEE_PER_GAS: felt252 = 15; +const HEADER_MEMORIZER_GET_WITHDRAWALS_ROOT: felt252 = 16; +const HEADER_MEMORIZER_GET_BLOB_GAS_USED: felt252 = 17; +const HEADER_MEMORIZER_GET_EXCESS_BLOB_GAS: felt252 = 18; +const HEADER_MEMORIZER_GET_PARENT_BEACON_BLOCK_ROOT: felt252 = 19; #[derive(Serde, Drop)] pub struct HeaderKey { @@ -16,8 +35,8 @@ pub struct HeaderKey { pub impl HeaderMemorizerImpl of HeaderMemorizerTrait { fn get_parent(self: @Memorizer, key: HeaderKey) -> u256 { let value = call_contract_syscall( - HEADER_MEMORIZER_ID.try_into().unwrap(), - HEADER_MEMORIZER_GET_PARENT_ID, + HEADER_MEMORIZER.try_into().unwrap(), + HEADER_MEMORIZER_GET_PARENT, array![*self.dict.segment_index, *self.dict.offset, key.chain_id, key.block_number,] .span() ) diff --git a/src/hdp_input.json b/src/hdp_input.json index 98931b33..5622f20e 100644 --- a/src/hdp_input.json +++ b/src/hdp_input.json @@ -1,29 +1,31 @@ { "cairo_run_output_path": "cairo_run_output.json", - "task_root": "0xa51a6cc7bc840aec540121e72180d35414db998f26ecb1eda7c8896baaf451b7", - "result_root": "0x5fe7dd5abe72bbb124c33cbd4b25dfc1ccebe944a918dfd5a93015f85589e117", + "task_root": "0xd5bebffa1a6bd30a791b99a7b5debe341fab1ddb9b1baa21c86828b3e60494e9", + "result_root": "0xf8d8233646456e43b3d79f8e165fd0ff8edf9eab4cf1322ae9ce4d2d0dd76ce3", "proofs": { - "mmr_metas": [{ - "id": 27, - "root": "0x492627ffa5084ec078f4d461408dfaa50b504a022c5471452d598da0040c066", - "size": 13024091, - "peaks": [ - "0x262c4c9b1cb2a036924aecf563dc9952e5f8b41004310adde86f22abb793eb1", - "0x10b39aed56c8f244a1df559c944ada6f12b7238f8c06a2c243ba4276b8059b0", - "0x46f45f218ea3aec481f350cda528a6f9f926a2dd53dae302e2cb610e5f152c7", - "0x1d52a06e6d02569893a1d842c00bb67c044be541c614e88613d7fc7187e18c1", - "0x770ebf618a589c17e3dc05bda7121acbedc0b48cd25f2943dc43f395f8bf0db", - "0x7263e878f7deafdc49b47da57f8594d477e572d3ac2bec27bb73860a35b1899", - "0x7b9e99f008949f9ee33d2965708ac6773a57965514df6383d55de104a39ab8c", - "0x28f6ccdcd38f6be6c437d100fcd62604c3293e31342a777dc37c712869ab08c", - "0x13d87197fe5d6f646a57dc918dcbef210737020dca9b89537fd8718ac69da3e", - "0x7eef4b790b56858c0232b494034d4c8699112d88f358209f71f02d5e93a7084", - "0x25cd2f0b579c902c41ac26df96ed5b21e16a3127dce2b471973dc86eb4c099f", - "0x5fdedfd0123b7461d5b3162fe82f7f3172c42fda6209415367870086f7c7918", - "0x7c0a415d5a6c4c90fd2dde1b340c3be305a72aa3b758dd26b8d7b4a78b53681" - ], - "chain_id": 11155111 - }], + "mmr_metas": [ + { + "id": 27, + "root": "0x492627ffa5084ec078f4d461408dfaa50b504a022c5471452d598da0040c066", + "size": 13024091, + "peaks": [ + "0x262c4c9b1cb2a036924aecf563dc9952e5f8b41004310adde86f22abb793eb1", + "0x10b39aed56c8f244a1df559c944ada6f12b7238f8c06a2c243ba4276b8059b0", + "0x46f45f218ea3aec481f350cda528a6f9f926a2dd53dae302e2cb610e5f152c7", + "0x1d52a06e6d02569893a1d842c00bb67c044be541c614e88613d7fc7187e18c1", + "0x770ebf618a589c17e3dc05bda7121acbedc0b48cd25f2943dc43f395f8bf0db", + "0x7263e878f7deafdc49b47da57f8594d477e572d3ac2bec27bb73860a35b1899", + "0x7b9e99f008949f9ee33d2965708ac6773a57965514df6383d55de104a39ab8c", + "0x28f6ccdcd38f6be6c437d100fcd62604c3293e31342a777dc37c712869ab08c", + "0x13d87197fe5d6f646a57dc918dcbef210737020dca9b89537fd8718ac69da3e", + "0x7eef4b790b56858c0232b494034d4c8699112d88f358209f71f02d5e93a7084", + "0x25cd2f0b579c902c41ac26df96ed5b21e16a3127dce2b471973dc86eb4c099f", + "0x5fdedfd0123b7461d5b3162fe82f7f3172c42fda6209415367870086f7c7918", + "0x7c0a415d5a6c4c90fd2dde1b340c3be305a72aa3b758dd26b8d7b4a78b53681" + ], + "chain_id": 11155111 + } + ], "headers": [ { "rlp": [ @@ -129,107 +131,6 @@ ] } }, - { - "rlp": [ - "0x2a661c27a02302f9", - "0x55599ca3ef044c21", - "0x7f4f6425b632d127", - "0x3bd25b345f2626d7", - "0x4dcc1da00079af17", - "0xb585ab7a5dc7dee8", - "0x4512d31ad4ccb667", - "0x42a1f013748a941b", - "0x2638944793d440fd", - "0x19f1dc688dbd9c53", - "0x8c27b45745990be8", - "0x44ecee1ef0a09fec", - "0x31ef5fc8b35f9240", - "0x5cff3221a63c3ff9", - "0x3a1b50acab9f2849", - "0x7b399c9ea0c9300c", - "0x928ab55d3c647fd8", - "0x75a98e7503cfb543", - "0xad77b5f16bbe83fb", - "0x46332fa029c561eb", - "0x3235cf0e42cc5876", - "0xafa351e8b25fdefb", - "0xdc2a3effd032bc5d", - "0x1b9525359b820", - "0x894220490e02024e", - "0x4629522101940", - "0x4140010320402180", - "0x3002ba00680310c2", - "0x8907908001000040", - "0xd30004402c884faa", - "0x6003a010f3068880", - "0x800024a004983085", - "0x4052070801e408c0", - "0x30000080a004a40", - "0xf8420c0504184085", - "0x111008300004000", - "0x124240030a08a048", - "0x440b5006054201c4", - "0x30004086c1265900", - "0x140c3b0090c40401", - "0x441884101a202002", - "0xc078801820130030", - "0x4d2200922018904", - "0x4118404d80f01198", - "0x220444880500a96", - "0x284548340004038", - "0x40800020262003b", - "0x80b20005020490a4", - "0x200084302098083", - "0x140470b11212c00", - "0x110428032523000", - "0xc73002400ad1102", - "0x344921862c929198", - "0x400902102100820", - "0x8210b13046004", - "0x90a6080080302c0", - "0xc90184e7214f8380", - "0x84c2f66c018480c3", - "0x43e8a0802c4eb965", - "0xbe857c88f0776672", - "0xb0e4fb3cb43479f4", - "0xdf1c5b163586f8b7", - "0x88895e9a10b91e", - "0x8500000000000000", - "0x6d90a0275acc5501", - "0xa9a52bfadf2cd5ff", - "0xd313639d4cc9140b", - "0xece5fda22a1d5a16", - "0x39b6181c72ba" - ], - "rlp_bytes_len": 550, - "proof": { - "leaf_idx": 1521895, - "mmr_path": [ - "0x598955397f4891983bce4886d22fa19c0d22255f94bb8aaa1faa7aec92cfc7f", - "0x2f91fb12566af84978eb5b8694abba5b6d23d0c57ca791fd3bfd01ecd3a0c8c", - "0x3b508668f7d92d379884c79d9031878cbaeb3fa28f053f48b57a7502e45611c", - "0x6ae0557449080a7745c6ad43b21c6f6f57d452817b23b77b5c2ff3d8ccb3760", - "0x593ac29a8b112e2bd247cad0b7b016786ad04217bee18f5e0ea41127ba23f75", - "0x787989b47e298c397a0a6123049fb85d5bd2f962ed9149ee6df656dbc605dda", - "0x6984af357d277724980ece2c11e93d6b6e14200715769b3fd9cbc9a0eaf29c7", - "0x61bc1b0b3467541328174831626b59bcebaec7ef9fda196df6895acfaca4ace", - "0x4fa6272ed7dae6104f103fdec5b82c09f8006abfc9e8e9bc44cff298749599c", - "0x4c9f22576f8d894fd2f992221402ee2d0a703c35c9e1d114f31411b13246bfc", - "0x5b620a5f345977ec7fd3bdeba082078594768bc2fac155ba33b1eab8885a069", - "0x572b3407be5793b54c558f5a7d9d4fb194aea5b14f2b2b7e2c8f526cefbde18", - "0x716621bd5c6f555cca5badd2849633fea9f506876642b58f985f6ab1de6340c", - "0x019df1b143b7076f7c8db2d84794c5bf29be24dbcd64d6a7482c7ff5490486f", - "0x145418fa00ec0102943417073ea3015c793e55e1a11f303aef71a154b2d418c", - "0x164770888e7afc464c2c3a956cf13d2aaf4b5786baec8424357e46f8e1968b2", - "0x46034840abeb358ce87e74d2963f6fb9c655841b31df46eab6e2b784b35d82c", - "0x4b2dfec0bb9b57c4e7ac16cedcd3ff50f381f7ab2df50bcfa3596308f79135a", - "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", - "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", - "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", - "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" - ] - } - }, { "rlp": [ "0x26400d37a04102f9", @@ -334,100 +235,215 @@ "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" ] } + }, + { + "rlp": [ + "0x2a661c27a02302f9", + "0x55599ca3ef044c21", + "0x7f4f6425b632d127", + "0x3bd25b345f2626d7", + "0x4dcc1da00079af17", + "0xb585ab7a5dc7dee8", + "0x4512d31ad4ccb667", + "0x42a1f013748a941b", + "0x2638944793d440fd", + "0x19f1dc688dbd9c53", + "0x8c27b45745990be8", + "0x44ecee1ef0a09fec", + "0x31ef5fc8b35f9240", + "0x5cff3221a63c3ff9", + "0x3a1b50acab9f2849", + "0x7b399c9ea0c9300c", + "0x928ab55d3c647fd8", + "0x75a98e7503cfb543", + "0xad77b5f16bbe83fb", + "0x46332fa029c561eb", + "0x3235cf0e42cc5876", + "0xafa351e8b25fdefb", + "0xdc2a3effd032bc5d", + "0x1b9525359b820", + "0x894220490e02024e", + "0x4629522101940", + "0x4140010320402180", + "0x3002ba00680310c2", + "0x8907908001000040", + "0xd30004402c884faa", + "0x6003a010f3068880", + "0x800024a004983085", + "0x4052070801e408c0", + "0x30000080a004a40", + "0xf8420c0504184085", + "0x111008300004000", + "0x124240030a08a048", + "0x440b5006054201c4", + "0x30004086c1265900", + "0x140c3b0090c40401", + "0x441884101a202002", + "0xc078801820130030", + "0x4d2200922018904", + "0x4118404d80f01198", + "0x220444880500a96", + "0x284548340004038", + "0x40800020262003b", + "0x80b20005020490a4", + "0x200084302098083", + "0x140470b11212c00", + "0x110428032523000", + "0xc73002400ad1102", + "0x344921862c929198", + "0x400902102100820", + "0x8210b13046004", + "0x90a6080080302c0", + "0xc90184e7214f8380", + "0x84c2f66c018480c3", + "0x43e8a0802c4eb965", + "0xbe857c88f0776672", + "0xb0e4fb3cb43479f4", + "0xdf1c5b163586f8b7", + "0x88895e9a10b91e", + "0x8500000000000000", + "0x6d90a0275acc5501", + "0xa9a52bfadf2cd5ff", + "0xd313639d4cc9140b", + "0xece5fda22a1d5a16", + "0x39b6181c72ba" + ], + "rlp_bytes_len": 550, + "proof": { + "leaf_idx": 1521895, + "mmr_path": [ + "0x598955397f4891983bce4886d22fa19c0d22255f94bb8aaa1faa7aec92cfc7f", + "0x2f91fb12566af84978eb5b8694abba5b6d23d0c57ca791fd3bfd01ecd3a0c8c", + "0x3b508668f7d92d379884c79d9031878cbaeb3fa28f053f48b57a7502e45611c", + "0x6ae0557449080a7745c6ad43b21c6f6f57d452817b23b77b5c2ff3d8ccb3760", + "0x593ac29a8b112e2bd247cad0b7b016786ad04217bee18f5e0ea41127ba23f75", + "0x787989b47e298c397a0a6123049fb85d5bd2f962ed9149ee6df656dbc605dda", + "0x6984af357d277724980ece2c11e93d6b6e14200715769b3fd9cbc9a0eaf29c7", + "0x61bc1b0b3467541328174831626b59bcebaec7ef9fda196df6895acfaca4ace", + "0x4fa6272ed7dae6104f103fdec5b82c09f8006abfc9e8e9bc44cff298749599c", + "0x4c9f22576f8d894fd2f992221402ee2d0a703c35c9e1d114f31411b13246bfc", + "0x5b620a5f345977ec7fd3bdeba082078594768bc2fac155ba33b1eab8885a069", + "0x572b3407be5793b54c558f5a7d9d4fb194aea5b14f2b2b7e2c8f526cefbde18", + "0x716621bd5c6f555cca5badd2849633fea9f506876642b58f985f6ab1de6340c", + "0x019df1b143b7076f7c8db2d84794c5bf29be24dbcd64d6a7482c7ff5490486f", + "0x145418fa00ec0102943417073ea3015c793e55e1a11f303aef71a154b2d418c", + "0x164770888e7afc464c2c3a956cf13d2aaf4b5786baec8424357e46f8e1968b2", + "0x46034840abeb358ce87e74d2963f6fb9c655841b31df46eab6e2b784b35d82c", + "0x4b2dfec0bb9b57c4e7ac16cedcd3ff50f381f7ab2df50bcfa3596308f79135a", + "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", + "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", + "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", + "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" + ] + } } ], "accounts": [ { - "address": ["0x97a0134ae36acb13", "0x874bc2eb01714d7f", "0xd5f023bb"], + "address": [ + "0x97a0134ae36acb13", + "0x874bc2eb01714d7f", + "0xd5f023bb" + ], "account_key": "0x8ad2b901594e58a241532055dfe914294630ed5c33ffc31905452799f9b4aab0", "proofs": [ { - "block_number": 5186021, - "proof_bytes_len": [532, 532, 532, 532, 532, 436, 147, 83, 104], + "block_number": 5186022, + "proof_bytes_len": [ + 532, + 532, + 532, + 532, + 532, + 436, + 147, + 83, + 104 + ], "proof": [ [ - "0xe0cd1db9a01102f9", - "0xa14d3bb2862563e6", - "0x70e4db75915c9636", - "0xaec7e6a5b2c27dc2", - "0x2935f5a0e7122aca", - "0xb5b3ad19dc4eb821", - "0x3b91dcafa579fbe2", - "0x686db0215398e26d", - "0xa72aa0cf3a7a9014", - "0x6567fbd49323bc14", - "0xe34cd2f396e033f7", - "0x707532681b146e78", - "0x8ea001b8da6a97f5", - "0x5f30286d7cc0dbe4", - "0x542adf1c07d7f631", - "0x2740bf38b12d5d5a", - "0xa0e83549f281629b", - "0xf7bbc83f064b0353", - "0x2b80a96ddad69f6", - "0x9c3331ebc8f0eca3", - "0xe1d2011e616de763", - "0x1af35c190c5ff0a0", - "0x2f099b5ccfe5b09a", - "0xf5f0a02c1b627496", - "0x5df7f938afe597cc", - "0x67edec108083a00a", - "0x4e95c350254b6dee", - "0xef7bf5fd504496d1", - "0x7d1b848ce5135f0e", - "0x231549d434a0a0d7", - "0xc2f998c7f2e9a07f", - "0x4832b44b767cad58", - "0xcac3d2b7c575e109", - "0x862a4a2da0198935", - "0xf02bfde41c180bb0", - "0x9d5aabd6317198f0", - "0x4b07ebe2f6a502fd", - "0x6571c5a06e43502e", - "0x7e01d4aa20c8e6a5", - "0xf23047a7cbc87301", - "0x8117ff061405cc81", - "0xa3eba06df9cfd7d7", - "0xd826e0532db0b5d4", - "0x884b85573586c8c0", - "0x9a598f3bfb4290d7", - "0xdaa0d323fc97880a", - "0xba2b821dad75883b", - "0xcd3d26f0e81d5656", - "0x52cd6baaea88126", - "0xa0ac20f46b287d0a", - "0x7855a45ce13fc327", - "0x1d92fd6e3a34cacf", - "0x968d0982250f06e5", - "0x9bdb55a66bc067ba", - "0x9c658ec05785f4a0", - "0x3ad8be6e8daa819a", - "0x9936a22d00c8a120", - "0x826772caea15a651", - "0xfc876705be88a0ba", - "0x3a36a65ce58cebc0", - "0xe62fcacc361e0836", - "0x96a0a7092938293a", - "0x78e066810ea043ad", - "0x93b19da040839c35", - "0x432f387d0fe20dbb", - "0x197d099cd23057bc", - "0x805e72a8" + "0xa56441cca01102f9", + "0x485779b9ac3e33da", + "0x45bba8cc7cab8b88", + "0x97f1a360d0fc4298", + "0xda5d4ba0cd0fee2a", + "0x4cea18af7c23d4a0", + "0x67290fdc761585b0", + "0x46c75fe72480cfcc", + "0x30dba091f5da704c", + "0xf5ffdb29cc6cdc1a", + "0xac4fb8743ce7cc12", + "0x8f093f32b732af4f", + "0xda0aa25fed40548", + "0xfd7a9beb227fe053", + "0xd570d52b2115ea5f", + "0xfe229a0827fc520f", + "0xa012454939c57e5c", + "0x21c9887e8ee3f3b1", + "0x5156b1ebfc356cf7", + "0x472d2d64d9ff9480", + "0xd98b7ec0bf9199a7", + "0xa67222f4c5bdcda0", + "0xcb44efdda2e66b74", + "0xac7624bf37444d9d", + "0xa07fca47762cdbf", + "0x2779f753784ca07e", + "0xb5696d5ba2df3e6a", + "0xe1accfc5d1c49211", + "0xea31e9b0f0cbd29b", + "0xeab1a6bca0a0f663", + "0x697d9b97b06c60b5", + "0x9c47e390d62b89a0", + "0x798dbe2cd348cdd2", + "0xf73b544fa04ca910", + "0xcc8a0d2bed50be8a", + "0x61a57b36a1879202", + "0xa73ca0ba46fd8dea", + "0x8b4bbda0c664f43b", + "0x175c3dff5bd40cb7", + "0xbd660f7dca4e90e6", + "0x22854668ebefbe42", + "0xd68a0640b490553", + "0x1c02474bce1b1166", + "0x2fb2f9451cba664a", + "0x80fe06bb9ad35e9a", + "0x5ba05f2c78048e7f", + "0xb5f31e7738ded2ba", + "0xf447594f1998bb5f", + "0x27cd80c48ed1f15d", + "0xa09bd8e385d9f9db", + "0x8ae951222b70f58d", + "0xf52b0ebec8f25e3f", + "0xfed270af9a1469e", + "0x2b3f02042fc5b693", + "0x6ae28be870b10a0", + "0x16291604b227317a", + "0x8dac0fbce38ceefd", + "0xace93a8dc1fb0612", + "0xbc530efeb3ca0fd", + "0xb450cf74a528f7cb", + "0x8d160635de93de22", + "0x442e0f173e0f2b12", + "0xf81b15653aa0471f", + "0xa7bda111d440a7e6", + "0x12e35ee20d909c5", + "0x852d8e1515ad2c3e", + "0x807d369a" ], [ - "0xb234669ca01102f9", - "0xa514acded44cdcfd", - "0xce1fc4ae557828c5", - "0x4d03d4eaefe0b5a4", - "0x5ebaa00ac42047", - "0x6d64f363db5ff755", - "0xf34c1f7346e39b13", - "0x57c795c7d9a47ec6", - "0x22bda03111568be0", - "0xe34860413e495932", - "0x3aab05ace194bcdc", - "0x74c8e078f209328d", - "0xeaa0fffbb5171935", + "0x2203510a01102f9", + "0x9b6493f1eafbce8f", + "0xcab50cf7550ea03", + "0xa6166a1fc684449d", + "0x2f611ca0278a613f", + "0x390432baa62b1a9c", + "0xca085e0f40b93f89", + "0x29c27ae3f970b810", + "0x4f11a0348697ea23", + "0x15fae1bdff89aae", + "0x2d379662a57f6c3e", + "0x94b9e0fa577c0bd9", + "0xeaa073b2b96e399c", "0x7f5589bcdb15412e", "0xdde3c93dc089245f", "0xd8fd736ca136a614", @@ -440,15 +456,15 @@ "0x955f28c7518cfc49", "0xb4be12419fce2f7b", "0x773a029286892019", - "0xd1293be70b65a06f", - "0x30876b01f78024fa", - "0xa01ce8a717136cbc", - "0xa4343b72c435eaa2", - "0x2ea46ddcd9a07380", - "0x6895c381d439aa3e", - "0xb48f4760627d9664", - "0x7e95272413581907", - "0x1487b0b4a009cb6c", + "0xd5b4924cbd96a06f", + "0x90e1fae24960eed4", + "0x898f646d618fe2da", + "0x4ffd46ba2191ffcc", + "0x23feafcdaa083d7", + "0xc1b401d92b41c162", + "0xaf55e71b1cc32c0b", + "0x295c5bfb1a52901a", + "0x1487b0b4a06896cc", "0xd44cbea352feca7a", "0x6dc058cae697e48d", "0x8659ed45c7db8c69", @@ -460,15 +476,15 @@ "0x16bda1dac8b25389", "0xa1dc3981db0b5286", "0x5aae51ed9b411bd4", - "0xf6a0e73edf470da8", - "0x6090d8651fa2f6ac", - "0x5a69f8785ae6c8dc", - "0xceaf9ef7b58f48d3", - "0xa0fb6044f34c4680", - "0xd3a88757f243a6a4", - "0xb75f6bcf43e90852", - "0x44c9974d979d2be8", - "0xab1d380a9d5f00e", + "0x86a0e73edf470da8", + "0x4f09e70d776da168", + "0x1cbfd4c4ce386f3", + "0xaab65a74219a1a2f", + "0xa02a061e70248482", + "0x829fcd24f9eec9d4", + "0xa55445bad38a715", + "0x15844d0c36e329f", + "0x9d093fbf60fdff33", "0xd9a3d455f75fd2a0", "0xab3a7fc6a1d33828", "0xae5e998f387e2891", @@ -799,96 +815,106 @@ ] }, { - "block_number": 5186022, - "proof_bytes_len": [532, 532, 532, 532, 532, 436, 147, 83, 104], + "block_number": 5186023, + "proof_bytes_len": [ + 532, + 532, + 532, + 532, + 532, + 436, + 147, + 83, + 104 + ], "proof": [ [ - "0xa56441cca01102f9", - "0x485779b9ac3e33da", - "0x45bba8cc7cab8b88", - "0x97f1a360d0fc4298", - "0xda5d4ba0cd0fee2a", - "0x4cea18af7c23d4a0", - "0x67290fdc761585b0", - "0x46c75fe72480cfcc", - "0x30dba091f5da704c", - "0xf5ffdb29cc6cdc1a", - "0xac4fb8743ce7cc12", - "0x8f093f32b732af4f", - "0xda0aa25fed40548", - "0xfd7a9beb227fe053", - "0xd570d52b2115ea5f", - "0xfe229a0827fc520f", - "0xa012454939c57e5c", - "0x21c9887e8ee3f3b1", - "0x5156b1ebfc356cf7", - "0x472d2d64d9ff9480", - "0xd98b7ec0bf9199a7", - "0xa67222f4c5bdcda0", - "0xcb44efdda2e66b74", - "0xac7624bf37444d9d", - "0xa07fca47762cdbf", - "0x2779f753784ca07e", - "0xb5696d5ba2df3e6a", - "0xe1accfc5d1c49211", - "0xea31e9b0f0cbd29b", - "0xeab1a6bca0a0f663", - "0x697d9b97b06c60b5", - "0x9c47e390d62b89a0", - "0x798dbe2cd348cdd2", - "0xf73b544fa04ca910", - "0xcc8a0d2bed50be8a", - "0x61a57b36a1879202", - "0xa73ca0ba46fd8dea", - "0x8b4bbda0c664f43b", - "0x175c3dff5bd40cb7", - "0xbd660f7dca4e90e6", - "0x22854668ebefbe42", - "0xd68a0640b490553", - "0x1c02474bce1b1166", - "0x2fb2f9451cba664a", - "0x80fe06bb9ad35e9a", - "0x5ba05f2c78048e7f", - "0xb5f31e7738ded2ba", - "0xf447594f1998bb5f", - "0x27cd80c48ed1f15d", - "0xa09bd8e385d9f9db", - "0x8ae951222b70f58d", - "0xf52b0ebec8f25e3f", - "0xfed270af9a1469e", - "0x2b3f02042fc5b693", - "0x6ae28be870b10a0", - "0x16291604b227317a", - "0x8dac0fbce38ceefd", - "0xace93a8dc1fb0612", - "0xbc530efeb3ca0fd", - "0xb450cf74a528f7cb", - "0x8d160635de93de22", - "0x442e0f173e0f2b12", - "0xf81b15653aa0471f", - "0xa7bda111d440a7e6", - "0x12e35ee20d909c5", - "0x852d8e1515ad2c3e", - "0x807d369a" + "0x58444a19a01102f9", + "0x6186aa6c4bc2f7f5", + "0x6184b7400645ceb8", + "0x3432964db06ab3fa", + "0x5798e0a01aa7c11e", + "0x69c22a52bbd3da36", + "0xc193223917a9e4d5", + "0x5d16e5da8393253e", + "0xd1aea0adbb62b640", + "0x7f69eb2eae8ad843", + "0xeff40cb50c390b52", + "0xad7a89c1ae3d5a01", + "0x51a089f820fcd629", + "0xe20558b8b776455d", + "0x10f8bd05fb96d051", + "0xfb1767334c91ceed", + "0xa09fcceaf965a8a3", + "0x101d508f191dfb8e", + "0x5bb5986074297ab9", + "0x3e0bf1dd917913e0", + "0x3e36b93acd6e2eea", + "0xc88425cf6da209a0", + "0xfcb2166cd45e503e", + "0xe65bb3922725d69b", + "0x800a431934b6d1a7", + "0x8bb03acfb08ba041", + "0xcc1b0a7dc223167b", + "0xd84f206f0caa9606", + "0xb32389c0d2d6977c", + "0xf62965f9a6a0bcab", + "0xdd36c65f0faad792", + "0xead9cccb6a889923", + "0xc0dcabd20910bd4", + "0xc44f224ca034ac90", + "0x49ec9e9e2beb786d", + "0x92818730075c99b2", + "0x786ad2678143d2a1", + "0x13293ba099aa8534", + "0xfa4e5074579f71ce", + "0x742e1850d3e32270", + "0x1d2c0a57888d87ff", + "0x3166a0bff089e666", + "0x4db2002e17450b44", + "0x12e4183aab01a0ac", + "0x80035805dc8e1ab5", + "0xc3a00955c3ad3941", + "0xa63804703e4267a2", + "0x3a106468d3dc7203", + "0x9fb70db168fdc96c", + "0xa0a832ac509828fb", + "0x7ef632aa0f1cc00", + "0x5c2123aba626012a", + "0x35109a6575dbd707", + "0xe9a2d7571c0db0a3", + "0x67e9ba3837d041a0", + "0x4127470df1024135", + "0xddfd667cf6bc5239", + "0x2742eba7a44bae42", + "0x79f9db0a20fa038", + "0xbc64f3ab69c82752", + "0x9a19ce6f2f1e0b46", + "0x2f86d39b6ed70147", + "0xc2495bcb12a0aba4", + "0xb98551cad578ca95", + "0x65f799018826d439", + "0x6e588e68abc35e2b", + "0x800100d6" ], [ - "0x2203510a01102f9", - "0x9b6493f1eafbce8f", - "0xcab50cf7550ea03", - "0xa6166a1fc684449d", - "0x2f611ca0278a613f", + "0x9872fa8ba01102f9", + "0xebf32a01c304911b", + "0x7a90055f9401af09", + "0xc2ba94afe0afe786", + "0x2f611ca0e690fc3c", "0x390432baa62b1a9c", "0xca085e0f40b93f89", "0x29c27ae3f970b810", - "0x4f11a0348697ea23", - "0x15fae1bdff89aae", - "0x2d379662a57f6c3e", - "0x94b9e0fa577c0bd9", - "0xeaa073b2b96e399c", - "0x7f5589bcdb15412e", - "0xdde3c93dc089245f", - "0xd8fd736ca136a614", - "0xa016f7ef94a462b8", + "0xbd61a0348697ea23", + "0xa44ae2ff8e39cb97", + "0x6fc8d2b6e578cd7c", + "0x1e826e42f9ad3011", + "0xc6a0a0f182a6676c", + "0xdb9c4dc5b4c03eb8", + "0xb2aec4fcde466b5d", + "0xca5a8a2ffb11d58", + "0xa04952eb424ede4f", "0xcf0538fb63aad0e9", "0xb26d3e80af58fdf5", "0x20ca30148b2cec11", @@ -897,48 +923,48 @@ "0x955f28c7518cfc49", "0xb4be12419fce2f7b", "0x773a029286892019", - "0xd5b4924cbd96a06f", - "0x90e1fae24960eed4", - "0x898f646d618fe2da", - "0x4ffd46ba2191ffcc", - "0x23feafcdaa083d7", - "0xc1b401d92b41c162", - "0xaf55e71b1cc32c0b", - "0x295c5bfb1a52901a", - "0x1487b0b4a06896cc", + "0xfcc56c3d2015a06f", + "0x64aac5a84cae088e", + "0xfa553497f5842d68", + "0x427cb9bce0af3b1b", + "0xfe7dbdb928a0af56", + "0xb1e5b3ff64efb8e4", + "0x93ac8fc710c859e2", + "0xf428706c93752615", + "0x1487b0b4a0a1c9cc", "0xd44cbea352feca7a", "0x6dc058cae697e48d", "0x8659ed45c7db8c69", - "0x7ce74aa08db158a9", - "0x564d9a064d0d3c2", - "0xa585d9c2b3a50627", - "0x593872a183de1500", - "0x138ea0b9b7e46808", + "0x562c19a08db158a9", + "0xe414bdf4b7b4ea52", + "0x300d204a6a0f4698", + "0xe9b4e532fbe5297c", + "0x138ea0de0a724737", "0x16bda1dac8b25389", "0xa1dc3981db0b5286", "0x5aae51ed9b411bd4", - "0x86a0e73edf470da8", - "0x4f09e70d776da168", - "0x1cbfd4c4ce386f3", - "0xaab65a74219a1a2f", - "0xa02a061e70248482", - "0x829fcd24f9eec9d4", - "0xa55445bad38a715", - "0x15844d0c36e329f", - "0x9d093fbf60fdff33", + "0x85a0e73edf470da8", + "0xbcf54c26f2702ecb", + "0x64b9e0044cbd4c16", + "0x3328de9d25006830", + "0xa0d0c9c72af81dec", + "0x87a68bcceca88565", + "0xf87e863d3afa3ca9", + "0xa536665210fb6e0c", + "0x936f481ec643e73c", "0xd9a3d455f75fd2a0", "0xab3a7fc6a1d33828", "0xae5e998f387e2891", "0xee2b8a2c2c03186a", - "0xde6ed0b1b955a0e4", - "0xfa6bdfeffedccc63", - "0x3d91aa809af2dbbf", - "0xda17eb79d5185449", - "0xc579977dea0164d", - "0x88cea7f4eec1f0ba", - "0x42a3f8b633052428", - "0x39012bdf2dbfc373", - "0x802cfb9b" + "0x6663d5b55563a0e4", + "0xb041ee83b314d7a2", + "0x5745d9f896165267", + "0xb04b843caa6605fb", + "0xdccd8b7ccaa06355", + "0x4bd24db9c1106802", + "0x2be0ebdc7e9a4f28", + "0x9f42696729e380d4", + "0x80eb8545" ], [ "0xc40409caa01102f9", @@ -1256,96 +1282,106 @@ ] }, { - "block_number": 5186023, - "proof_bytes_len": [532, 532, 532, 532, 532, 436, 147, 83, 104], + "block_number": 5186021, + "proof_bytes_len": [ + 532, + 532, + 532, + 532, + 532, + 436, + 147, + 83, + 104 + ], "proof": [ [ - "0x58444a19a01102f9", - "0x6186aa6c4bc2f7f5", - "0x6184b7400645ceb8", - "0x3432964db06ab3fa", - "0x5798e0a01aa7c11e", - "0x69c22a52bbd3da36", - "0xc193223917a9e4d5", - "0x5d16e5da8393253e", - "0xd1aea0adbb62b640", - "0x7f69eb2eae8ad843", - "0xeff40cb50c390b52", - "0xad7a89c1ae3d5a01", - "0x51a089f820fcd629", - "0xe20558b8b776455d", - "0x10f8bd05fb96d051", - "0xfb1767334c91ceed", - "0xa09fcceaf965a8a3", - "0x101d508f191dfb8e", - "0x5bb5986074297ab9", - "0x3e0bf1dd917913e0", - "0x3e36b93acd6e2eea", - "0xc88425cf6da209a0", - "0xfcb2166cd45e503e", - "0xe65bb3922725d69b", - "0x800a431934b6d1a7", - "0x8bb03acfb08ba041", - "0xcc1b0a7dc223167b", - "0xd84f206f0caa9606", - "0xb32389c0d2d6977c", - "0xf62965f9a6a0bcab", - "0xdd36c65f0faad792", - "0xead9cccb6a889923", - "0xc0dcabd20910bd4", - "0xc44f224ca034ac90", - "0x49ec9e9e2beb786d", - "0x92818730075c99b2", - "0x786ad2678143d2a1", - "0x13293ba099aa8534", - "0xfa4e5074579f71ce", - "0x742e1850d3e32270", - "0x1d2c0a57888d87ff", - "0x3166a0bff089e666", - "0x4db2002e17450b44", - "0x12e4183aab01a0ac", - "0x80035805dc8e1ab5", - "0xc3a00955c3ad3941", - "0xa63804703e4267a2", - "0x3a106468d3dc7203", - "0x9fb70db168fdc96c", - "0xa0a832ac509828fb", - "0x7ef632aa0f1cc00", - "0x5c2123aba626012a", - "0x35109a6575dbd707", - "0xe9a2d7571c0db0a3", - "0x67e9ba3837d041a0", - "0x4127470df1024135", - "0xddfd667cf6bc5239", - "0x2742eba7a44bae42", - "0x79f9db0a20fa038", - "0xbc64f3ab69c82752", - "0x9a19ce6f2f1e0b46", - "0x2f86d39b6ed70147", - "0xc2495bcb12a0aba4", - "0xb98551cad578ca95", - "0x65f799018826d439", - "0x6e588e68abc35e2b", - "0x800100d6" + "0xe0cd1db9a01102f9", + "0xa14d3bb2862563e6", + "0x70e4db75915c9636", + "0xaec7e6a5b2c27dc2", + "0x2935f5a0e7122aca", + "0xb5b3ad19dc4eb821", + "0x3b91dcafa579fbe2", + "0x686db0215398e26d", + "0xa72aa0cf3a7a9014", + "0x6567fbd49323bc14", + "0xe34cd2f396e033f7", + "0x707532681b146e78", + "0x8ea001b8da6a97f5", + "0x5f30286d7cc0dbe4", + "0x542adf1c07d7f631", + "0x2740bf38b12d5d5a", + "0xa0e83549f281629b", + "0xf7bbc83f064b0353", + "0x2b80a96ddad69f6", + "0x9c3331ebc8f0eca3", + "0xe1d2011e616de763", + "0x1af35c190c5ff0a0", + "0x2f099b5ccfe5b09a", + "0xf5f0a02c1b627496", + "0x5df7f938afe597cc", + "0x67edec108083a00a", + "0x4e95c350254b6dee", + "0xef7bf5fd504496d1", + "0x7d1b848ce5135f0e", + "0x231549d434a0a0d7", + "0xc2f998c7f2e9a07f", + "0x4832b44b767cad58", + "0xcac3d2b7c575e109", + "0x862a4a2da0198935", + "0xf02bfde41c180bb0", + "0x9d5aabd6317198f0", + "0x4b07ebe2f6a502fd", + "0x6571c5a06e43502e", + "0x7e01d4aa20c8e6a5", + "0xf23047a7cbc87301", + "0x8117ff061405cc81", + "0xa3eba06df9cfd7d7", + "0xd826e0532db0b5d4", + "0x884b85573586c8c0", + "0x9a598f3bfb4290d7", + "0xdaa0d323fc97880a", + "0xba2b821dad75883b", + "0xcd3d26f0e81d5656", + "0x52cd6baaea88126", + "0xa0ac20f46b287d0a", + "0x7855a45ce13fc327", + "0x1d92fd6e3a34cacf", + "0x968d0982250f06e5", + "0x9bdb55a66bc067ba", + "0x9c658ec05785f4a0", + "0x3ad8be6e8daa819a", + "0x9936a22d00c8a120", + "0x826772caea15a651", + "0xfc876705be88a0ba", + "0x3a36a65ce58cebc0", + "0xe62fcacc361e0836", + "0x96a0a7092938293a", + "0x78e066810ea043ad", + "0x93b19da040839c35", + "0x432f387d0fe20dbb", + "0x197d099cd23057bc", + "0x805e72a8" ], [ - "0x9872fa8ba01102f9", - "0xebf32a01c304911b", - "0x7a90055f9401af09", - "0xc2ba94afe0afe786", - "0x2f611ca0e690fc3c", - "0x390432baa62b1a9c", - "0xca085e0f40b93f89", - "0x29c27ae3f970b810", - "0xbd61a0348697ea23", - "0xa44ae2ff8e39cb97", - "0x6fc8d2b6e578cd7c", - "0x1e826e42f9ad3011", - "0xc6a0a0f182a6676c", - "0xdb9c4dc5b4c03eb8", - "0xb2aec4fcde466b5d", - "0xca5a8a2ffb11d58", - "0xa04952eb424ede4f", + "0xb234669ca01102f9", + "0xa514acded44cdcfd", + "0xce1fc4ae557828c5", + "0x4d03d4eaefe0b5a4", + "0x5ebaa00ac42047", + "0x6d64f363db5ff755", + "0xf34c1f7346e39b13", + "0x57c795c7d9a47ec6", + "0x22bda03111568be0", + "0xe34860413e495932", + "0x3aab05ace194bcdc", + "0x74c8e078f209328d", + "0xeaa0fffbb5171935", + "0x7f5589bcdb15412e", + "0xdde3c93dc089245f", + "0xd8fd736ca136a614", + "0xa016f7ef94a462b8", "0xcf0538fb63aad0e9", "0xb26d3e80af58fdf5", "0x20ca30148b2cec11", @@ -1354,48 +1390,48 @@ "0x955f28c7518cfc49", "0xb4be12419fce2f7b", "0x773a029286892019", - "0xfcc56c3d2015a06f", - "0x64aac5a84cae088e", - "0xfa553497f5842d68", - "0x427cb9bce0af3b1b", - "0xfe7dbdb928a0af56", - "0xb1e5b3ff64efb8e4", - "0x93ac8fc710c859e2", - "0xf428706c93752615", - "0x1487b0b4a0a1c9cc", + "0xd1293be70b65a06f", + "0x30876b01f78024fa", + "0xa01ce8a717136cbc", + "0xa4343b72c435eaa2", + "0x2ea46ddcd9a07380", + "0x6895c381d439aa3e", + "0xb48f4760627d9664", + "0x7e95272413581907", + "0x1487b0b4a009cb6c", "0xd44cbea352feca7a", "0x6dc058cae697e48d", "0x8659ed45c7db8c69", - "0x562c19a08db158a9", - "0xe414bdf4b7b4ea52", - "0x300d204a6a0f4698", - "0xe9b4e532fbe5297c", - "0x138ea0de0a724737", + "0x7ce74aa08db158a9", + "0x564d9a064d0d3c2", + "0xa585d9c2b3a50627", + "0x593872a183de1500", + "0x138ea0b9b7e46808", "0x16bda1dac8b25389", "0xa1dc3981db0b5286", "0x5aae51ed9b411bd4", - "0x85a0e73edf470da8", - "0xbcf54c26f2702ecb", - "0x64b9e0044cbd4c16", - "0x3328de9d25006830", - "0xa0d0c9c72af81dec", - "0x87a68bcceca88565", - "0xf87e863d3afa3ca9", - "0xa536665210fb6e0c", - "0x936f481ec643e73c", + "0xf6a0e73edf470da8", + "0x6090d8651fa2f6ac", + "0x5a69f8785ae6c8dc", + "0xceaf9ef7b58f48d3", + "0xa0fb6044f34c4680", + "0xd3a88757f243a6a4", + "0xb75f6bcf43e90852", + "0x44c9974d979d2be8", + "0xab1d380a9d5f00e", "0xd9a3d455f75fd2a0", "0xab3a7fc6a1d33828", "0xae5e998f387e2891", "0xee2b8a2c2c03186a", - "0x6663d5b55563a0e4", - "0xb041ee83b314d7a2", - "0x5745d9f896165267", - "0xb04b843caa6605fb", - "0xdccd8b7ccaa06355", - "0x4bd24db9c1106802", - "0x2be0ebdc7e9a4f28", - "0x9f42696729e380d4", - "0x80eb8545" + "0xde6ed0b1b955a0e4", + "0xfa6bdfeffedccc63", + "0x3d91aa809af2dbbf", + "0xda17eb79d5185449", + "0xc579977dea0164d", + "0x88cea7f4eec1f0ba", + "0x42a3f8b633052428", + "0x39012bdf2dbfc373", + "0x802cfb9b" ], [ "0xc40409caa01102f9", @@ -2450,7 +2486,7 @@ "0x400180037fff7ffc", "0x400180047fff7ffd", "0x480680017fff8000", - "0x0", + "0x1", "0x48127ffe7fff8000", "0x482480017ffd8000", "0x5", @@ -2656,7 +2692,12 @@ "0x1", "0x208b7fff7fff7ffe" ], - "bytecode_segment_lengths": [305, 181, 200, 237], + "bytecode_segment_lengths": [ + 305, + 181, + 200, + 237 + ], "hints": [ [ 0, @@ -3421,10 +3462,17 @@ ] ], "pythonic_hints": [ - [0, ["memory[ap + 0] = 2320 <= memory[fp + -6]"]], + [ + 0, + [ + "memory[ap + 0] = 2320 <= memory[fp + -6]" + ] + ], [ 40, - ["memory[ap + 0] = (memory[ap + -1] + 0) % PRIME < 4294967296"] + [ + "memory[ap + 0] = (memory[ap + -1] + 0) % PRIME < 4294967296" + ] ], [ 44, @@ -3434,7 +3482,9 @@ ], [ 86, - ["memory[ap + 0] = (memory[ap + -1] + 0) % PRIME < 4294967296"] + [ + "memory[ap + 0] = (memory[ap + -1] + 0) % PRIME < 4294967296" + ] ], [ 90, @@ -3442,17 +3492,72 @@ "\n(value, scalar) = (memory[ap + -1], 10633823966279327296825105735305134080)\nx = min(value // scalar, 340282366920938463463374607431768211454)\ny = value - x * scalar\nmemory[ap + 0] = x\nmemory[ap + 1] = y\n" ] ], - [136, ["memory[ap + 0] = segments.add()"]], - [155, ["memory[ap + 0] = 2570 <= memory[ap + -71]"]], - [184, ["memory[ap + 0] = segments.add()"]], - [205, ["memory[ap + 0] = segments.add()"]], - [220, ["memory[ap + 0] = segments.add()"]], - [241, ["memory[ap + 0] = segments.add()"]], - [262, ["memory[ap + 0] = segments.add()"]], - [276, ["memory[ap + 0] = segments.add()"]], - [290, ["memory[ap + 0] = segments.add()"]], - [486, ["memory[ap + 0] = 24170 <= memory[fp + -11]"]], - [497, ["memory[ap + -1] = memory[ap + 0] < 4294967296"]], + [ + 136, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 155, + [ + "memory[ap + 0] = 2570 <= memory[ap + -71]" + ] + ], + [ + 184, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 205, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 220, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 241, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 262, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 276, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 290, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 486, + [ + "memory[ap + 0] = 24170 <= memory[fp + -11]" + ] + ], + [ + 497, + [ + "memory[ap + -1] = memory[ap + 0] < 4294967296" + ] + ], [ 530, [ @@ -3477,9 +3582,24 @@ "memory[ap + 0] = (memory[fp + -9] + memory[ap + -1]) % PRIME < 4294967296" ] ], - [626, ["memory[ap + 0] = segments.add()"]], - [643, ["memory[ap + 0] = segments.add()"]], - [669, ["memory[ap + 0] = segments.add()"]], + [ + 626, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 643, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 669, + [ + "memory[ap + 0] = segments.add()" + ] + ], [ 688, [ @@ -3498,9 +3618,24 @@ "\n(value, scalar) = (memory[ap + -2], 10633823966279326983230456482242756608)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -1] = x\nmemory[ap + 0] = y\n" ] ], - [710, ["memory[ap + 0] = segments.add()"]], - [732, ["syscall_handler.syscall(syscall_ptr=memory[fp + -8])"]], - [745, ["memory[ap + 0] = memory[ap + -6] < memory[ap + -1]"]], + [ + 710, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 732, + [ + "syscall_handler.syscall(syscall_ptr=memory[fp + -8])" + ] + ], + [ + 745, + [ + "memory[ap + 0] = memory[ap + -6] < memory[ap + -1]" + ] + ], [ 757, [ @@ -3513,7 +3648,12 @@ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], - [783, ["memory[ap + 0] = memory[ap + -2] < memory[ap + -1]"]], + [ + 783, + [ + "memory[ap + 0] = memory[ap + -2] < memory[ap + -1]" + ] + ], [ 795, [ @@ -3526,18 +3666,45 @@ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], - [829, ["memory[ap + 0] = segments.add()"]], - [846, ["memory[ap + 0] = segments.add()"]], - [863, ["memory[ap + 0] = segments.add()"]], - [880, ["memory[ap + 0] = segments.add()"]], - [908, ["memory[ap + 0] = segments.add()"]] + [ + 829, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 846, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 863, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 880, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 908, + [ + "memory[ap + 0] = segments.add()" + ] + ] ], "entry_points_by_type": { "EXTERNAL": [ { "selector": "0xe2054f8a912367e38a22ce773328ff8aabf8082c4120bad9ef085e1dbf29a7", "offset": 0, - "builtins": ["range_check"] + "builtins": [ + "range_check" + ] } ], "L1_HANDLER": [], @@ -3547,4 +3714,4 @@ } } ] -} +} \ No newline at end of file From 337b90478160b2b19e62cbd6bcebad161555a055 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 16 Jul 2024 19:22:38 +0200 Subject: [PATCH 11/73] wip --- tools/make/full_flow_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/make/full_flow_test.sh b/tools/make/full_flow_test.sh index 62cfbce1..6774a9fc 100755 --- a/tools/make/full_flow_test.sh +++ b/tools/make/full_flow_test.sh @@ -39,7 +39,7 @@ cairo-compile --cairo_path="packages/eth_essentials" "src/hdp.cairo" --output "b # Clone the repository if the directory doesn't exist if [ ! -d "hdp-test" ]; then - git clone https://github.com/HerodotusDev/hdp-test && cd hdp-test && cd .. + git clone https://github.com/HerodotusDev/hdp-test && cd hdp-test && git checkout syscalls && cd .. fi echo "Starting tests..." From ca1a077eaa5b545d947610529bffea6f2237da89 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 16 Jul 2024 19:50:58 +0200 Subject: [PATCH 12/73] small example --- src/hdp_input.json | 666 ++++++++++++++++++++++----------------------- 1 file changed, 333 insertions(+), 333 deletions(-) diff --git a/src/hdp_input.json b/src/hdp_input.json index 5622f20e..fc52c852 100644 --- a/src/hdp_input.json +++ b/src/hdp_input.json @@ -27,110 +27,6 @@ } ], "headers": [ - { - "rlp": [ - "0xa2c4089da03c02f9", - "0x2bce89e6d5f8587e", - "0xa15cc324f748751b", - "0x176ca7a076d396ae", - "0x4dcc1da013dc007d", - "0xb585ab7a5dc7dee8", - "0x4512d31ad4ccb667", - "0x42a1f013748a941b", - "0x609a944793d440fd", - "0xc19a4031d44cc834", - "0xdaff36dac77852a3", - "0xad707dc040a0e553", - "0xd4c2ae43a23f2bd9", - "0x38ea4bab5e8a8359", - "0x21b9d84b5bbb6b58", - "0x2880f0c3a069913c", - "0xc16c52cc54dfbd47", - "0xa962b7c9a137722b", - "0xb8e1d23facc43591", - "0x68ea09a0deff0e00", - "0xb3f740ca3f14626f", - "0xa3aca8f2b76cad43", - "0x9ef02f560f9aa7dc", - "0x1b9e1eaea0976", - "0x444b820bc4760008", - "0x5125398402549938", - "0x5209b1031090b9c0", - "0x300aaa308a21d40c", - "0x492201d024404040", - "0xda002433449a488e", - "0x10eb200e2020182", - "0x406124043398542f", - "0x19cad001ac40238", - "0x88047889db409840", - "0x15084930c1cb884", - "0x6042c34211092a63", - "0x500260822da161ca", - "0x652941842542c8c2", - "0x600082d1c8648800", - "0x435209a8a4920", - "0x4d0a5091e6020b2", - "0xc955300a040ba16c", - "0x90280c28741810", - "0x499940c420115d9c", - "0xe11a449380e0cdf", - "0x2480d60c00604248", - "0x3e8d091e12a01219", - "0x1860da066a249c24", - "0xb12180183819290", - "0xc1f0c01071003", - "0x15035a8014191614", - "0x3f7104a800a28102", - "0x606021a23082d4c9", - "0x88a000200481", - "0xda00142b20d29a8e", - "0xc9278ab440e43e1", - "0xc90184e6214f8380", - "0x84280627018480c3", - "0x183d899204eb965", - "0x8868746567840b0d", - "0x362e31322e316f67", - "0xd3a078756e696c85", - "0x923ffe54329a64ce", - "0xe664b4692332c5de", - "0xb46f6501a25537cc", - "0x882ceb57856f14eb", - "0x0", - "0x18a005d1e1490185", - "0x96ff33950e01687", - "0x52be51d588eae138", - "0xb575a1705b4e3c09", - "0x55aa60b375c9a9" - ], - "rlp_bytes_len": 575, - "proof": { - "leaf_idx": 1521897, - "mmr_path": [ - "0x09c4f998f67aeaaa13f6431812b34599dc12335897d57493c52e5cfa1183fc9", - "0x4751e9833ffe590494bd269b46391a8f474aa5224183e126f9d6ee75b4d9f26", - "0x3b508668f7d92d379884c79d9031878cbaeb3fa28f053f48b57a7502e45611c", - "0x6ae0557449080a7745c6ad43b21c6f6f57d452817b23b77b5c2ff3d8ccb3760", - "0x593ac29a8b112e2bd247cad0b7b016786ad04217bee18f5e0ea41127ba23f75", - "0x787989b47e298c397a0a6123049fb85d5bd2f962ed9149ee6df656dbc605dda", - "0x6984af357d277724980ece2c11e93d6b6e14200715769b3fd9cbc9a0eaf29c7", - "0x61bc1b0b3467541328174831626b59bcebaec7ef9fda196df6895acfaca4ace", - "0x4fa6272ed7dae6104f103fdec5b82c09f8006abfc9e8e9bc44cff298749599c", - "0x4c9f22576f8d894fd2f992221402ee2d0a703c35c9e1d114f31411b13246bfc", - "0x5b620a5f345977ec7fd3bdeba082078594768bc2fac155ba33b1eab8885a069", - "0x572b3407be5793b54c558f5a7d9d4fb194aea5b14f2b2b7e2c8f526cefbde18", - "0x716621bd5c6f555cca5badd2849633fea9f506876642b58f985f6ab1de6340c", - "0x019df1b143b7076f7c8db2d84794c5bf29be24dbcd64d6a7482c7ff5490486f", - "0x145418fa00ec0102943417073ea3015c793e55e1a11f303aef71a154b2d418c", - "0x164770888e7afc464c2c3a956cf13d2aaf4b5786baec8424357e46f8e1968b2", - "0x46034840abeb358ce87e74d2963f6fb9c655841b31df46eab6e2b784b35d82c", - "0x4b2dfec0bb9b57c4e7ac16cedcd3ff50f381f7ab2df50bcfa3596308f79135a", - "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", - "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", - "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", - "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" - ] - } - }, { "rlp": [ "0x26400d37a04102f9", @@ -236,6 +132,110 @@ ] } }, + { + "rlp": [ + "0xa2c4089da03c02f9", + "0x2bce89e6d5f8587e", + "0xa15cc324f748751b", + "0x176ca7a076d396ae", + "0x4dcc1da013dc007d", + "0xb585ab7a5dc7dee8", + "0x4512d31ad4ccb667", + "0x42a1f013748a941b", + "0x609a944793d440fd", + "0xc19a4031d44cc834", + "0xdaff36dac77852a3", + "0xad707dc040a0e553", + "0xd4c2ae43a23f2bd9", + "0x38ea4bab5e8a8359", + "0x21b9d84b5bbb6b58", + "0x2880f0c3a069913c", + "0xc16c52cc54dfbd47", + "0xa962b7c9a137722b", + "0xb8e1d23facc43591", + "0x68ea09a0deff0e00", + "0xb3f740ca3f14626f", + "0xa3aca8f2b76cad43", + "0x9ef02f560f9aa7dc", + "0x1b9e1eaea0976", + "0x444b820bc4760008", + "0x5125398402549938", + "0x5209b1031090b9c0", + "0x300aaa308a21d40c", + "0x492201d024404040", + "0xda002433449a488e", + "0x10eb200e2020182", + "0x406124043398542f", + "0x19cad001ac40238", + "0x88047889db409840", + "0x15084930c1cb884", + "0x6042c34211092a63", + "0x500260822da161ca", + "0x652941842542c8c2", + "0x600082d1c8648800", + "0x435209a8a4920", + "0x4d0a5091e6020b2", + "0xc955300a040ba16c", + "0x90280c28741810", + "0x499940c420115d9c", + "0xe11a449380e0cdf", + "0x2480d60c00604248", + "0x3e8d091e12a01219", + "0x1860da066a249c24", + "0xb12180183819290", + "0xc1f0c01071003", + "0x15035a8014191614", + "0x3f7104a800a28102", + "0x606021a23082d4c9", + "0x88a000200481", + "0xda00142b20d29a8e", + "0xc9278ab440e43e1", + "0xc90184e6214f8380", + "0x84280627018480c3", + "0x183d899204eb965", + "0x8868746567840b0d", + "0x362e31322e316f67", + "0xd3a078756e696c85", + "0x923ffe54329a64ce", + "0xe664b4692332c5de", + "0xb46f6501a25537cc", + "0x882ceb57856f14eb", + "0x0", + "0x18a005d1e1490185", + "0x96ff33950e01687", + "0x52be51d588eae138", + "0xb575a1705b4e3c09", + "0x55aa60b375c9a9" + ], + "rlp_bytes_len": 575, + "proof": { + "leaf_idx": 1521897, + "mmr_path": [ + "0x09c4f998f67aeaaa13f6431812b34599dc12335897d57493c52e5cfa1183fc9", + "0x4751e9833ffe590494bd269b46391a8f474aa5224183e126f9d6ee75b4d9f26", + "0x3b508668f7d92d379884c79d9031878cbaeb3fa28f053f48b57a7502e45611c", + "0x6ae0557449080a7745c6ad43b21c6f6f57d452817b23b77b5c2ff3d8ccb3760", + "0x593ac29a8b112e2bd247cad0b7b016786ad04217bee18f5e0ea41127ba23f75", + "0x787989b47e298c397a0a6123049fb85d5bd2f962ed9149ee6df656dbc605dda", + "0x6984af357d277724980ece2c11e93d6b6e14200715769b3fd9cbc9a0eaf29c7", + "0x61bc1b0b3467541328174831626b59bcebaec7ef9fda196df6895acfaca4ace", + "0x4fa6272ed7dae6104f103fdec5b82c09f8006abfc9e8e9bc44cff298749599c", + "0x4c9f22576f8d894fd2f992221402ee2d0a703c35c9e1d114f31411b13246bfc", + "0x5b620a5f345977ec7fd3bdeba082078594768bc2fac155ba33b1eab8885a069", + "0x572b3407be5793b54c558f5a7d9d4fb194aea5b14f2b2b7e2c8f526cefbde18", + "0x716621bd5c6f555cca5badd2849633fea9f506876642b58f985f6ab1de6340c", + "0x019df1b143b7076f7c8db2d84794c5bf29be24dbcd64d6a7482c7ff5490486f", + "0x145418fa00ec0102943417073ea3015c793e55e1a11f303aef71a154b2d418c", + "0x164770888e7afc464c2c3a956cf13d2aaf4b5786baec8424357e46f8e1968b2", + "0x46034840abeb358ce87e74d2963f6fb9c655841b31df46eab6e2b784b35d82c", + "0x4b2dfec0bb9b57c4e7ac16cedcd3ff50f381f7ab2df50bcfa3596308f79135a", + "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", + "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", + "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", + "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" + ] + } + }, { "rlp": [ "0x2a661c27a02302f9", @@ -348,7 +348,7 @@ "account_key": "0x8ad2b901594e58a241532055dfe914294630ed5c33ffc31905452799f9b4aab0", "proofs": [ { - "block_number": 5186022, + "block_number": 5186023, "proof_bytes_len": [ 532, 532, @@ -362,92 +362,92 @@ ], "proof": [ [ - "0xa56441cca01102f9", - "0x485779b9ac3e33da", - "0x45bba8cc7cab8b88", - "0x97f1a360d0fc4298", - "0xda5d4ba0cd0fee2a", - "0x4cea18af7c23d4a0", - "0x67290fdc761585b0", - "0x46c75fe72480cfcc", - "0x30dba091f5da704c", - "0xf5ffdb29cc6cdc1a", - "0xac4fb8743ce7cc12", - "0x8f093f32b732af4f", - "0xda0aa25fed40548", - "0xfd7a9beb227fe053", - "0xd570d52b2115ea5f", - "0xfe229a0827fc520f", - "0xa012454939c57e5c", - "0x21c9887e8ee3f3b1", - "0x5156b1ebfc356cf7", - "0x472d2d64d9ff9480", - "0xd98b7ec0bf9199a7", - "0xa67222f4c5bdcda0", - "0xcb44efdda2e66b74", - "0xac7624bf37444d9d", - "0xa07fca47762cdbf", - "0x2779f753784ca07e", - "0xb5696d5ba2df3e6a", - "0xe1accfc5d1c49211", - "0xea31e9b0f0cbd29b", - "0xeab1a6bca0a0f663", - "0x697d9b97b06c60b5", - "0x9c47e390d62b89a0", - "0x798dbe2cd348cdd2", - "0xf73b544fa04ca910", - "0xcc8a0d2bed50be8a", - "0x61a57b36a1879202", - "0xa73ca0ba46fd8dea", - "0x8b4bbda0c664f43b", - "0x175c3dff5bd40cb7", - "0xbd660f7dca4e90e6", - "0x22854668ebefbe42", - "0xd68a0640b490553", - "0x1c02474bce1b1166", - "0x2fb2f9451cba664a", - "0x80fe06bb9ad35e9a", - "0x5ba05f2c78048e7f", - "0xb5f31e7738ded2ba", - "0xf447594f1998bb5f", - "0x27cd80c48ed1f15d", - "0xa09bd8e385d9f9db", - "0x8ae951222b70f58d", - "0xf52b0ebec8f25e3f", - "0xfed270af9a1469e", - "0x2b3f02042fc5b693", - "0x6ae28be870b10a0", - "0x16291604b227317a", - "0x8dac0fbce38ceefd", - "0xace93a8dc1fb0612", - "0xbc530efeb3ca0fd", - "0xb450cf74a528f7cb", - "0x8d160635de93de22", - "0x442e0f173e0f2b12", - "0xf81b15653aa0471f", - "0xa7bda111d440a7e6", - "0x12e35ee20d909c5", - "0x852d8e1515ad2c3e", - "0x807d369a" + "0x58444a19a01102f9", + "0x6186aa6c4bc2f7f5", + "0x6184b7400645ceb8", + "0x3432964db06ab3fa", + "0x5798e0a01aa7c11e", + "0x69c22a52bbd3da36", + "0xc193223917a9e4d5", + "0x5d16e5da8393253e", + "0xd1aea0adbb62b640", + "0x7f69eb2eae8ad843", + "0xeff40cb50c390b52", + "0xad7a89c1ae3d5a01", + "0x51a089f820fcd629", + "0xe20558b8b776455d", + "0x10f8bd05fb96d051", + "0xfb1767334c91ceed", + "0xa09fcceaf965a8a3", + "0x101d508f191dfb8e", + "0x5bb5986074297ab9", + "0x3e0bf1dd917913e0", + "0x3e36b93acd6e2eea", + "0xc88425cf6da209a0", + "0xfcb2166cd45e503e", + "0xe65bb3922725d69b", + "0x800a431934b6d1a7", + "0x8bb03acfb08ba041", + "0xcc1b0a7dc223167b", + "0xd84f206f0caa9606", + "0xb32389c0d2d6977c", + "0xf62965f9a6a0bcab", + "0xdd36c65f0faad792", + "0xead9cccb6a889923", + "0xc0dcabd20910bd4", + "0xc44f224ca034ac90", + "0x49ec9e9e2beb786d", + "0x92818730075c99b2", + "0x786ad2678143d2a1", + "0x13293ba099aa8534", + "0xfa4e5074579f71ce", + "0x742e1850d3e32270", + "0x1d2c0a57888d87ff", + "0x3166a0bff089e666", + "0x4db2002e17450b44", + "0x12e4183aab01a0ac", + "0x80035805dc8e1ab5", + "0xc3a00955c3ad3941", + "0xa63804703e4267a2", + "0x3a106468d3dc7203", + "0x9fb70db168fdc96c", + "0xa0a832ac509828fb", + "0x7ef632aa0f1cc00", + "0x5c2123aba626012a", + "0x35109a6575dbd707", + "0xe9a2d7571c0db0a3", + "0x67e9ba3837d041a0", + "0x4127470df1024135", + "0xddfd667cf6bc5239", + "0x2742eba7a44bae42", + "0x79f9db0a20fa038", + "0xbc64f3ab69c82752", + "0x9a19ce6f2f1e0b46", + "0x2f86d39b6ed70147", + "0xc2495bcb12a0aba4", + "0xb98551cad578ca95", + "0x65f799018826d439", + "0x6e588e68abc35e2b", + "0x800100d6" ], [ - "0x2203510a01102f9", - "0x9b6493f1eafbce8f", - "0xcab50cf7550ea03", - "0xa6166a1fc684449d", - "0x2f611ca0278a613f", + "0x9872fa8ba01102f9", + "0xebf32a01c304911b", + "0x7a90055f9401af09", + "0xc2ba94afe0afe786", + "0x2f611ca0e690fc3c", "0x390432baa62b1a9c", "0xca085e0f40b93f89", "0x29c27ae3f970b810", - "0x4f11a0348697ea23", - "0x15fae1bdff89aae", - "0x2d379662a57f6c3e", - "0x94b9e0fa577c0bd9", - "0xeaa073b2b96e399c", - "0x7f5589bcdb15412e", - "0xdde3c93dc089245f", - "0xd8fd736ca136a614", - "0xa016f7ef94a462b8", + "0xbd61a0348697ea23", + "0xa44ae2ff8e39cb97", + "0x6fc8d2b6e578cd7c", + "0x1e826e42f9ad3011", + "0xc6a0a0f182a6676c", + "0xdb9c4dc5b4c03eb8", + "0xb2aec4fcde466b5d", + "0xca5a8a2ffb11d58", + "0xa04952eb424ede4f", "0xcf0538fb63aad0e9", "0xb26d3e80af58fdf5", "0x20ca30148b2cec11", @@ -456,48 +456,48 @@ "0x955f28c7518cfc49", "0xb4be12419fce2f7b", "0x773a029286892019", - "0xd5b4924cbd96a06f", - "0x90e1fae24960eed4", - "0x898f646d618fe2da", - "0x4ffd46ba2191ffcc", - "0x23feafcdaa083d7", - "0xc1b401d92b41c162", - "0xaf55e71b1cc32c0b", - "0x295c5bfb1a52901a", - "0x1487b0b4a06896cc", + "0xfcc56c3d2015a06f", + "0x64aac5a84cae088e", + "0xfa553497f5842d68", + "0x427cb9bce0af3b1b", + "0xfe7dbdb928a0af56", + "0xb1e5b3ff64efb8e4", + "0x93ac8fc710c859e2", + "0xf428706c93752615", + "0x1487b0b4a0a1c9cc", "0xd44cbea352feca7a", "0x6dc058cae697e48d", "0x8659ed45c7db8c69", - "0x7ce74aa08db158a9", - "0x564d9a064d0d3c2", - "0xa585d9c2b3a50627", - "0x593872a183de1500", - "0x138ea0b9b7e46808", + "0x562c19a08db158a9", + "0xe414bdf4b7b4ea52", + "0x300d204a6a0f4698", + "0xe9b4e532fbe5297c", + "0x138ea0de0a724737", "0x16bda1dac8b25389", "0xa1dc3981db0b5286", - "0x5aae51ed9b411bd4", - "0x86a0e73edf470da8", - "0x4f09e70d776da168", - "0x1cbfd4c4ce386f3", - "0xaab65a74219a1a2f", - "0xa02a061e70248482", - "0x829fcd24f9eec9d4", - "0xa55445bad38a715", - "0x15844d0c36e329f", - "0x9d093fbf60fdff33", + "0x5aae51ed9b411bd4", + "0x85a0e73edf470da8", + "0xbcf54c26f2702ecb", + "0x64b9e0044cbd4c16", + "0x3328de9d25006830", + "0xa0d0c9c72af81dec", + "0x87a68bcceca88565", + "0xf87e863d3afa3ca9", + "0xa536665210fb6e0c", + "0x936f481ec643e73c", "0xd9a3d455f75fd2a0", "0xab3a7fc6a1d33828", "0xae5e998f387e2891", "0xee2b8a2c2c03186a", - "0xde6ed0b1b955a0e4", - "0xfa6bdfeffedccc63", - "0x3d91aa809af2dbbf", - "0xda17eb79d5185449", - "0xc579977dea0164d", - "0x88cea7f4eec1f0ba", - "0x42a3f8b633052428", - "0x39012bdf2dbfc373", - "0x802cfb9b" + "0x6663d5b55563a0e4", + "0xb041ee83b314d7a2", + "0x5745d9f896165267", + "0xb04b843caa6605fb", + "0xdccd8b7ccaa06355", + "0x4bd24db9c1106802", + "0x2be0ebdc7e9a4f28", + "0x9f42696729e380d4", + "0x80eb8545" ], [ "0xc40409caa01102f9", @@ -815,7 +815,7 @@ ] }, { - "block_number": 5186023, + "block_number": 5186022, "proof_bytes_len": [ 532, 532, @@ -829,92 +829,92 @@ ], "proof": [ [ - "0x58444a19a01102f9", - "0x6186aa6c4bc2f7f5", - "0x6184b7400645ceb8", - "0x3432964db06ab3fa", - "0x5798e0a01aa7c11e", - "0x69c22a52bbd3da36", - "0xc193223917a9e4d5", - "0x5d16e5da8393253e", - "0xd1aea0adbb62b640", - "0x7f69eb2eae8ad843", - "0xeff40cb50c390b52", - "0xad7a89c1ae3d5a01", - "0x51a089f820fcd629", - "0xe20558b8b776455d", - "0x10f8bd05fb96d051", - "0xfb1767334c91ceed", - "0xa09fcceaf965a8a3", - "0x101d508f191dfb8e", - "0x5bb5986074297ab9", - "0x3e0bf1dd917913e0", - "0x3e36b93acd6e2eea", - "0xc88425cf6da209a0", - "0xfcb2166cd45e503e", - "0xe65bb3922725d69b", - "0x800a431934b6d1a7", - "0x8bb03acfb08ba041", - "0xcc1b0a7dc223167b", - "0xd84f206f0caa9606", - "0xb32389c0d2d6977c", - "0xf62965f9a6a0bcab", - "0xdd36c65f0faad792", - "0xead9cccb6a889923", - "0xc0dcabd20910bd4", - "0xc44f224ca034ac90", - "0x49ec9e9e2beb786d", - "0x92818730075c99b2", - "0x786ad2678143d2a1", - "0x13293ba099aa8534", - "0xfa4e5074579f71ce", - "0x742e1850d3e32270", - "0x1d2c0a57888d87ff", - "0x3166a0bff089e666", - "0x4db2002e17450b44", - "0x12e4183aab01a0ac", - "0x80035805dc8e1ab5", - "0xc3a00955c3ad3941", - "0xa63804703e4267a2", - "0x3a106468d3dc7203", - "0x9fb70db168fdc96c", - "0xa0a832ac509828fb", - "0x7ef632aa0f1cc00", - "0x5c2123aba626012a", - "0x35109a6575dbd707", - "0xe9a2d7571c0db0a3", - "0x67e9ba3837d041a0", - "0x4127470df1024135", - "0xddfd667cf6bc5239", - "0x2742eba7a44bae42", - "0x79f9db0a20fa038", - "0xbc64f3ab69c82752", - "0x9a19ce6f2f1e0b46", - "0x2f86d39b6ed70147", - "0xc2495bcb12a0aba4", - "0xb98551cad578ca95", - "0x65f799018826d439", - "0x6e588e68abc35e2b", - "0x800100d6" + "0xa56441cca01102f9", + "0x485779b9ac3e33da", + "0x45bba8cc7cab8b88", + "0x97f1a360d0fc4298", + "0xda5d4ba0cd0fee2a", + "0x4cea18af7c23d4a0", + "0x67290fdc761585b0", + "0x46c75fe72480cfcc", + "0x30dba091f5da704c", + "0xf5ffdb29cc6cdc1a", + "0xac4fb8743ce7cc12", + "0x8f093f32b732af4f", + "0xda0aa25fed40548", + "0xfd7a9beb227fe053", + "0xd570d52b2115ea5f", + "0xfe229a0827fc520f", + "0xa012454939c57e5c", + "0x21c9887e8ee3f3b1", + "0x5156b1ebfc356cf7", + "0x472d2d64d9ff9480", + "0xd98b7ec0bf9199a7", + "0xa67222f4c5bdcda0", + "0xcb44efdda2e66b74", + "0xac7624bf37444d9d", + "0xa07fca47762cdbf", + "0x2779f753784ca07e", + "0xb5696d5ba2df3e6a", + "0xe1accfc5d1c49211", + "0xea31e9b0f0cbd29b", + "0xeab1a6bca0a0f663", + "0x697d9b97b06c60b5", + "0x9c47e390d62b89a0", + "0x798dbe2cd348cdd2", + "0xf73b544fa04ca910", + "0xcc8a0d2bed50be8a", + "0x61a57b36a1879202", + "0xa73ca0ba46fd8dea", + "0x8b4bbda0c664f43b", + "0x175c3dff5bd40cb7", + "0xbd660f7dca4e90e6", + "0x22854668ebefbe42", + "0xd68a0640b490553", + "0x1c02474bce1b1166", + "0x2fb2f9451cba664a", + "0x80fe06bb9ad35e9a", + "0x5ba05f2c78048e7f", + "0xb5f31e7738ded2ba", + "0xf447594f1998bb5f", + "0x27cd80c48ed1f15d", + "0xa09bd8e385d9f9db", + "0x8ae951222b70f58d", + "0xf52b0ebec8f25e3f", + "0xfed270af9a1469e", + "0x2b3f02042fc5b693", + "0x6ae28be870b10a0", + "0x16291604b227317a", + "0x8dac0fbce38ceefd", + "0xace93a8dc1fb0612", + "0xbc530efeb3ca0fd", + "0xb450cf74a528f7cb", + "0x8d160635de93de22", + "0x442e0f173e0f2b12", + "0xf81b15653aa0471f", + "0xa7bda111d440a7e6", + "0x12e35ee20d909c5", + "0x852d8e1515ad2c3e", + "0x807d369a" ], [ - "0x9872fa8ba01102f9", - "0xebf32a01c304911b", - "0x7a90055f9401af09", - "0xc2ba94afe0afe786", - "0x2f611ca0e690fc3c", + "0x2203510a01102f9", + "0x9b6493f1eafbce8f", + "0xcab50cf7550ea03", + "0xa6166a1fc684449d", + "0x2f611ca0278a613f", "0x390432baa62b1a9c", "0xca085e0f40b93f89", "0x29c27ae3f970b810", - "0xbd61a0348697ea23", - "0xa44ae2ff8e39cb97", - "0x6fc8d2b6e578cd7c", - "0x1e826e42f9ad3011", - "0xc6a0a0f182a6676c", - "0xdb9c4dc5b4c03eb8", - "0xb2aec4fcde466b5d", - "0xca5a8a2ffb11d58", - "0xa04952eb424ede4f", + "0x4f11a0348697ea23", + "0x15fae1bdff89aae", + "0x2d379662a57f6c3e", + "0x94b9e0fa577c0bd9", + "0xeaa073b2b96e399c", + "0x7f5589bcdb15412e", + "0xdde3c93dc089245f", + "0xd8fd736ca136a614", + "0xa016f7ef94a462b8", "0xcf0538fb63aad0e9", "0xb26d3e80af58fdf5", "0x20ca30148b2cec11", @@ -923,48 +923,48 @@ "0x955f28c7518cfc49", "0xb4be12419fce2f7b", "0x773a029286892019", - "0xfcc56c3d2015a06f", - "0x64aac5a84cae088e", - "0xfa553497f5842d68", - "0x427cb9bce0af3b1b", - "0xfe7dbdb928a0af56", - "0xb1e5b3ff64efb8e4", - "0x93ac8fc710c859e2", - "0xf428706c93752615", - "0x1487b0b4a0a1c9cc", + "0xd5b4924cbd96a06f", + "0x90e1fae24960eed4", + "0x898f646d618fe2da", + "0x4ffd46ba2191ffcc", + "0x23feafcdaa083d7", + "0xc1b401d92b41c162", + "0xaf55e71b1cc32c0b", + "0x295c5bfb1a52901a", + "0x1487b0b4a06896cc", "0xd44cbea352feca7a", "0x6dc058cae697e48d", "0x8659ed45c7db8c69", - "0x562c19a08db158a9", - "0xe414bdf4b7b4ea52", - "0x300d204a6a0f4698", - "0xe9b4e532fbe5297c", - "0x138ea0de0a724737", + "0x7ce74aa08db158a9", + "0x564d9a064d0d3c2", + "0xa585d9c2b3a50627", + "0x593872a183de1500", + "0x138ea0b9b7e46808", "0x16bda1dac8b25389", "0xa1dc3981db0b5286", "0x5aae51ed9b411bd4", - "0x85a0e73edf470da8", - "0xbcf54c26f2702ecb", - "0x64b9e0044cbd4c16", - "0x3328de9d25006830", - "0xa0d0c9c72af81dec", - "0x87a68bcceca88565", - "0xf87e863d3afa3ca9", - "0xa536665210fb6e0c", - "0x936f481ec643e73c", + "0x86a0e73edf470da8", + "0x4f09e70d776da168", + "0x1cbfd4c4ce386f3", + "0xaab65a74219a1a2f", + "0xa02a061e70248482", + "0x829fcd24f9eec9d4", + "0xa55445bad38a715", + "0x15844d0c36e329f", + "0x9d093fbf60fdff33", "0xd9a3d455f75fd2a0", "0xab3a7fc6a1d33828", "0xae5e998f387e2891", "0xee2b8a2c2c03186a", - "0x6663d5b55563a0e4", - "0xb041ee83b314d7a2", - "0x5745d9f896165267", - "0xb04b843caa6605fb", - "0xdccd8b7ccaa06355", - "0x4bd24db9c1106802", - "0x2be0ebdc7e9a4f28", - "0x9f42696729e380d4", - "0x80eb8545" + "0xde6ed0b1b955a0e4", + "0xfa6bdfeffedccc63", + "0x3d91aa809af2dbbf", + "0xda17eb79d5185449", + "0xc579977dea0164d", + "0x88cea7f4eec1f0ba", + "0x42a3f8b633052428", + "0x39012bdf2dbfc373", + "0x802cfb9b" ], [ "0xc40409caa01102f9", From 6a7d2d2aea7133761f184fda03f17869f88608aa Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 17 Jul 2024 16:02:03 +0200 Subject: [PATCH 13/73] header syscalls & account syscalls finalized not tested --- .../account_memorizer_handler.py | 2 +- .../execute_syscalls.cairo | 186 +++++++++++++++++- 2 files changed, 177 insertions(+), 11 deletions(-) diff --git a/packages/contract_bootloader/dryrun_syscall_memorizer_handler/account_memorizer_handler.py b/packages/contract_bootloader/dryrun_syscall_memorizer_handler/account_memorizer_handler.py index 031042f6..8e80a588 100644 --- a/packages/contract_bootloader/dryrun_syscall_memorizer_handler/account_memorizer_handler.py +++ b/packages/contract_bootloader/dryrun_syscall_memorizer_handler/account_memorizer_handler.py @@ -13,7 +13,7 @@ def __init__(self, memorizer: Memorizer, evm_provider_url: str): self.evm_provider = AccountKeyEVMProvider(provider_url=evm_provider_url) self.fetch_keys_registry: set[MemorizerKey] = set() - def get_nonce(self, key: MemorizerKey) -> Tuple[int]: + def get_nonce(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) value = self.evm_provider.get_nonce(key=key) return ( diff --git a/packages/contract_bootloader/execute_syscalls.cairo b/packages/contract_bootloader/execute_syscalls.cairo index 08873603..ef929672 100644 --- a/packages/contract_bootloader/execute_syscalls.cairo +++ b/packages/contract_bootloader/execute_syscalls.cairo @@ -9,7 +9,7 @@ from starkware.starknet.common.new_syscalls import ( from starkware.cairo.common.cairo_builtins import BitwiseBuiltin, PoseidonBuiltin from starkware.starknet.core.os.builtins import BuiltinPointers from src.memorizer import HeaderMemorizer, AccountMemorizer -from src.decoders.header_decoder import HeaderDecoder +from src.decoders.header_decoder import HeaderDecoder, HeaderField from src.decoders.account_decoder import AccountDecoder, AccountField from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian from starkware.cairo.common.dict_access import DictAccess @@ -115,17 +115,163 @@ func execute_call_contract{ let memorizerId = call_contract_request.contract_address; let functionId = call_contract_request.selector; + if (memorizerId == MemorizerId.HEADER) { + let (rlp) = HeaderMemorizer.get( + chain_id=call_contract_request.calldata_start[2], + block_number=call_contract_request.calldata_start[3], + ); + if (functionId == HeaderMemorizerFunctionId.GET_PARENT) { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.PARENT); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == HeaderMemorizerFunctionId.GET_UNCLE) { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.UNCLE); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == HeaderMemorizerFunctionId.GET_COINBASE) { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.COINBASE); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == HeaderMemorizerFunctionId.GET_STATE_ROOT) { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.STATE_ROOT); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == HeaderMemorizerFunctionId.GET_TRANSACTION_ROOT) { + let field: Uint256 = HeaderDecoder.get_field( + rlp=rlp, field=HeaderField.TRANSACTION_ROOT + ); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == HeaderMemorizerFunctionId.GET_RECEIPT_ROOT) { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.RECEIPT_ROOT); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == HeaderMemorizerFunctionId.GET_DIFFICULTY) { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.DIFFICULTY); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == HeaderMemorizerFunctionId.GET_NUMBER) { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.NUMBER); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == HeaderMemorizerFunctionId.GET_GAS_LIMIT) { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.GAS_LIMIT); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == HeaderMemorizerFunctionId.GET_GAS_USED) { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.GAS_USED); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == HeaderMemorizerFunctionId.GET_TIMESTAMP) { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.TIMESTAMP); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == HeaderMemorizerFunctionId.GET_EXTRA_DATA) { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.MIX_HASH); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == HeaderMemorizerFunctionId.GET_NONCE) { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.NONCE); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == HeaderMemorizerFunctionId.GET_BASE_FEE_PER_GAS) { + let field: Uint256 = HeaderDecoder.get_field( + rlp=rlp, field=HeaderField.BASE_FEE_PER_GAS + ); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + + // Unknown HeaderMemorizerFunctionId + assert 1 = 0; + + return (); + } if (memorizerId == MemorizerId.ACCOUNT) { + let (rlp) = AccountMemorizer.get( + chain_id=call_contract_request.calldata_start[2], + block_number=call_contract_request.calldata_start[3], + address=call_contract_request.calldata_start[4], + ); + if (functionId == AccountMemorizerFunctionId.GET_NONCE) { + let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.NONCE); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } if (functionId == AccountMemorizerFunctionId.GET_BALANCE) { - assert 2 + 3 = call_contract_request.calldata_end - - call_contract_request.calldata_start; - assert 2 = call_contract_response.retdata_end - call_contract_response.retdata_start; - - let (rlp) = AccountMemorizer.get( - chain_id=call_contract_request.calldata_start[2], - block_number=call_contract_request.calldata_start[3], - address=call_contract_request.calldata_start[4], - ); let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.BALANCE); let (value) = uint256_reverse_endian(num=field); @@ -134,9 +280,29 @@ func execute_call_contract{ return (); } + if (functionId == AccountMemorizerFunctionId.GET_STATE_ROOT) { + let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.STATE_ROOT); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == AccountMemorizerFunctionId.GET_CODE_HASH) { + let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.CODE_HASH); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } // Unknown AccountMemorizerFunctionId assert 1 = 0; + + return (); } // Unknown MemorizerId From 4d65da51e3fa5a7ed282e0d4d0d871918d512209 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 17 Jul 2024 17:26:12 +0200 Subject: [PATCH 14/73] syscalls full support (not tested) --- cairo/src/lib.cairo | 1 + cairo/src/memorizer.cairo | 1 + cairo/src/memorizer/storage_memorizer.cairo | 37 ++++++++ .../contract_bootloader.cairo | 1 + .../dryrun_syscall_handler.py | 37 ++++++++ .../storage_memorizer_handler.py | 34 +++++++ .../execute_entry_point.cairo | 1 + .../execute_syscalls.cairo | 34 ++++++- .../memorizer/memorizer.py | 1 + .../memorizer/storage_memorizer.py | 95 +++++++++++++++++++ .../provider/storage_key_provider.py | 25 +++++ .../contract_bootloader/syscall_handler.py | 34 +++++++ .../storage_memorizer_handler.py | 37 ++++++++ src/contract_dry_run.cairo | 10 +- src/tasks/aggregate_functions/contract.cairo | 8 +- 15 files changed, 348 insertions(+), 8 deletions(-) create mode 100644 cairo/src/memorizer/storage_memorizer.cairo create mode 100644 packages/contract_bootloader/dryrun_syscall_memorizer_handler/storage_memorizer_handler.py create mode 100644 packages/contract_bootloader/memorizer/storage_memorizer.py create mode 100644 packages/contract_bootloader/provider/storage_key_provider.py create mode 100644 packages/contract_bootloader/syscall_memorizer_handler/storage_memorizer_handler.py diff --git a/cairo/src/lib.cairo b/cairo/src/lib.cairo index deddb2a8..8782a1c2 100644 --- a/cairo/src/lib.cairo +++ b/cairo/src/lib.cairo @@ -4,6 +4,7 @@ pub mod memorizer; pub struct HDP { pub header_memorizer: Memorizer, pub account_memorizer: Memorizer, + pub storage_memorizer: Memorizer, } #[derive(Serde, Drop)] diff --git a/cairo/src/memorizer.cairo b/cairo/src/memorizer.cairo index fb5c7920..9fc0806e 100644 --- a/cairo/src/memorizer.cairo +++ b/cairo/src/memorizer.cairo @@ -1,2 +1,3 @@ pub mod header_memorizer; pub mod account_memorizer; +pub mod storage_memorizer; diff --git a/cairo/src/memorizer/storage_memorizer.cairo b/cairo/src/memorizer/storage_memorizer.cairo new file mode 100644 index 00000000..3cbddb7a --- /dev/null +++ b/cairo/src/memorizer/storage_memorizer.cairo @@ -0,0 +1,37 @@ +use hdp_cairo::Memorizer; +use starknet::syscalls::call_contract_syscall; +use starknet::{SyscallResult, SyscallResultTrait}; + +const STORAGE_MEMORIZER: felt252 = 0x2; + +const STORAGE_MEMORIZER_GET_SLOT: felt252 = 0; + +#[derive(Serde, Drop)] +pub struct StorageKey { + pub chain_id: felt252, + pub block_number: felt252, + pub address: felt252, + pub storage_slot: u256, +} + +#[generate_trait] +pub impl AccountMemorizerImpl of AccountMemorizerTrait { + fn get_slot(self: @Memorizer, key: StorageKey) -> u256 { + let value = call_contract_syscall( + STORAGE_MEMORIZER.try_into().unwrap(), + STORAGE_MEMORIZER_GET_SLOT, + array![ + *self.dict.segment_index, + *self.dict.offset, + key.chain_id, + key.block_number, + key.address, + key.storage_slot.low.into(), + key.storage_slot.high.into(), + ] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } +} diff --git a/packages/contract_bootloader/contract_bootloader.cairo b/packages/contract_bootloader/contract_bootloader.cairo index dee5daf6..75a01f8a 100644 --- a/packages/contract_bootloader/contract_bootloader.cairo +++ b/packages/contract_bootloader/contract_bootloader.cairo @@ -42,6 +42,7 @@ func run_contract_bootloader{ poseidon_ptr: PoseidonBuiltin*, header_dict: DictAccess*, account_dict: DictAccess*, + storage_dict: DictAccess*, pow2_array: felt*, }(compiled_class: CompiledClass*, calldata_size: felt, calldata: felt*, dry_run: felt) -> ( retdata_size: felt, retdata: felt* diff --git a/packages/contract_bootloader/dryrun_syscall_handler.py b/packages/contract_bootloader/dryrun_syscall_handler.py index 1e41344d..b424007e 100644 --- a/packages/contract_bootloader/dryrun_syscall_handler.py +++ b/packages/contract_bootloader/dryrun_syscall_handler.py @@ -17,12 +17,19 @@ MemorizerFunctionId as HeaderMemorizerFunctionId, MemorizerKey as HeaderMemorizerKey, ) +from contract_bootloader.memorizer.storage_memorizer import ( + MemorizerFunctionId as StorageMemorizerFunctionId, + MemorizerKey as StorageMemorizerKey, +) from contract_bootloader.dryrun_syscall_memorizer_handler.header_memorizer_handler import ( DryRunHeaderMemorizerHandler, ) from contract_bootloader.dryrun_syscall_memorizer_handler.account_memorizer_handler import ( DryRunAccountMemorizerHandler, ) +from contract_bootloader.dryrun_syscall_memorizer_handler.storage_memorizer_handler import ( + DryRunStorageMemorizerHandler, +) EVM_PROVIDER_URL = "https://sepolia.ethereum.iosis.tech/" @@ -119,6 +126,36 @@ def _call_contract_helper( self.fetch_keys_registry.append(handler.fetch_keys_dict()) + elif memorizerId == MemorizerId.Storage: + total_size = Memorizer.size() + StorageMemorizerKey.size() + + if len(calldata) != total_size: + raise ValueError( + f"Memorizer read must be initialized with a list of {total_size} integers" + ) + + function_id = StorageMemorizerFunctionId.from_int(request.selector) + memorizer = Memorizer( + dict_raw_ptrs=calldata[0 : Memorizer.size()], + dict_manager=self.dict_manager, + ) + + idx = Memorizer.size() + key = StorageMemorizerKey.from_int( + calldata[idx : idx + StorageMemorizerKey.size()] + ) + + handler = DryRunStorageMemorizerHandler( + memorizer=memorizer, + evm_provider_url=EVM_PROVIDER_URL, + ) + retdata = handler.handle(function_id=function_id, key=key) + + self.fetch_keys_registry.append(handler.fetch_keys_dict()) + + else: + raise ValueError(f"MemorizerId {memorizerId} not matched") + return CallResult( gas_consumed=0, failure_flag=0, diff --git a/packages/contract_bootloader/dryrun_syscall_memorizer_handler/storage_memorizer_handler.py b/packages/contract_bootloader/dryrun_syscall_memorizer_handler/storage_memorizer_handler.py new file mode 100644 index 00000000..32f80ebf --- /dev/null +++ b/packages/contract_bootloader/dryrun_syscall_memorizer_handler/storage_memorizer_handler.py @@ -0,0 +1,34 @@ +from typing import Tuple +from contract_bootloader.memorizer.memorizer import Memorizer +from contract_bootloader.memorizer.storage_memorizer import ( + AbstractStorageMemorizerBase, + MemorizerKey, +) +from contract_bootloader.provider.storage_key_provider import StorageKeyEVMProvider + + +class DryRunStorageMemorizerHandler(AbstractStorageMemorizerBase): + def __init__(self, memorizer: Memorizer, evm_provider_url: str): + super().__init__(memorizer=memorizer) + self.evm_provider = StorageKeyEVMProvider(provider_url=evm_provider_url) + self.fetch_keys_registry: set[MemorizerKey] = set() + + def get_slot(self, key: MemorizerKey) -> Tuple[int, int]: + self.fetch_keys_registry.add(key) + value = self.evm_provider.get_slot(key=key) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) + + def fetch_keys_dict(self) -> set: + def create_dict(key: MemorizerKey): + data = dict() + data["type"] = "AccountMemorizerKey" + data["key"] = key.to_dict() + return data + + dictionary = dict() + for fetch_key in list(self.fetch_keys_registry): + dictionary.update(create_dict(fetch_key)) + return dictionary diff --git a/packages/contract_bootloader/execute_entry_point.cairo b/packages/contract_bootloader/execute_entry_point.cairo index 8796c1fb..d1d67c64 100644 --- a/packages/contract_bootloader/execute_entry_point.cairo +++ b/packages/contract_bootloader/execute_entry_point.cairo @@ -125,6 +125,7 @@ func execute_entry_point{ builtin_params: BuiltinParams*, header_dict: DictAccess*, account_dict: DictAccess*, + storage_dict: DictAccess*, pow2_array: felt*, }(compiled_class: CompiledClass*, execution_context: ExecutionContext*, dry_run: felt) -> ( retdata_size: felt, retdata: felt* diff --git a/packages/contract_bootloader/execute_syscalls.cairo b/packages/contract_bootloader/execute_syscalls.cairo index ef929672..dc1b4e8e 100644 --- a/packages/contract_bootloader/execute_syscalls.cairo +++ b/packages/contract_bootloader/execute_syscalls.cairo @@ -8,9 +8,10 @@ from starkware.starknet.common.new_syscalls import ( ) from starkware.cairo.common.cairo_builtins import BitwiseBuiltin, PoseidonBuiltin from starkware.starknet.core.os.builtins import BuiltinPointers -from src.memorizer import HeaderMemorizer, AccountMemorizer +from src.memorizer import HeaderMemorizer, AccountMemorizer, StorageMemorizer from src.decoders.header_decoder import HeaderDecoder, HeaderField from src.decoders.account_decoder import AccountDecoder, AccountField +from src.decoders.storage_slot_decoder import StorageSlotDecoder from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian from starkware.cairo.common.dict_access import DictAccess @@ -41,6 +42,7 @@ func execute_syscalls{ builtin_ptrs: BuiltinPointers*, header_dict: DictAccess*, account_dict: DictAccess*, + storage_dict: DictAccess*, pow2_array: felt*, }(execution_context: ExecutionContext*, syscall_ptr_end: felt*) { if (syscall_ptr == syscall_ptr_end) { @@ -56,6 +58,7 @@ func execute_syscalls{ namespace MemorizerId { const HEADER = 0; const ACCOUNT = 1; + const STORAGE = 2; } namespace HeaderMemorizerFunctionId { @@ -88,6 +91,10 @@ namespace AccountMemorizerFunctionId { const GET_CODE_HASH = 3; } +namespace StorageMemorizerFunctionId { + const GET_SLOT = 0; +} + // Executes a syscall that calls another contract. func execute_call_contract{ range_check_ptr, @@ -97,6 +104,7 @@ func execute_call_contract{ builtin_ptrs: BuiltinPointers*, header_dict: DictAccess*, account_dict: DictAccess*, + storage_dict: DictAccess*, pow2_array: felt*, }(caller_execution_context: ExecutionContext*) { alloc_locals; @@ -304,6 +312,30 @@ func execute_call_contract{ return (); } + if (memorizerId == MemorizerId.STORAGE) { + let (rlp) = StorageMemorizer.get( + chain_id=call_contract_request.calldata_start[2], + block_number=call_contract_request.calldata_start[3], + address=call_contract_request.calldata_start[4], + storage_slot=Uint256( + call_contract_request.calldata_start[5], call_contract_request.calldata_start[6] + ), + ); + if (functionId == StorageMemorizerFunctionId.GET_SLOT) { + let field: Uint256 = StorageSlotDecoder.get_word(rlp=rlp); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + + // Unknown StorageMemorizerFunctionId + assert 1 = 0; + + return (); + } // Unknown MemorizerId assert 1 = 0; diff --git a/packages/contract_bootloader/memorizer/memorizer.py b/packages/contract_bootloader/memorizer/memorizer.py index 9fa957fc..d751d520 100644 --- a/packages/contract_bootloader/memorizer/memorizer.py +++ b/packages/contract_bootloader/memorizer/memorizer.py @@ -7,6 +7,7 @@ class MemorizerId(Enum): Header = 0 Account = 1 + Storage = 2 @classmethod def from_int(cls, value: int): diff --git a/packages/contract_bootloader/memorizer/storage_memorizer.py b/packages/contract_bootloader/memorizer/storage_memorizer.py new file mode 100644 index 00000000..fd3f20c3 --- /dev/null +++ b/packages/contract_bootloader/memorizer/storage_memorizer.py @@ -0,0 +1,95 @@ +from enum import Enum +from typing import List, Tuple +from abc import ABC, abstractmethod +from contract_bootloader.memorizer.memorizer import Memorizer +from marshmallow_dataclass import dataclass +from starkware.cairo.lang.vm.crypto import poseidon_hash_many +from starkware.cairo.lang.vm.relocatable import RelocatableValue +from web3 import Web3 + + +class MemorizerFunctionId(Enum): + GET_SLOT = 0 + + @classmethod + def from_int(cls, value: int): + if not isinstance(value, int): + raise ValueError(f"Value must be an integer, got {type(value)}") + for member in cls: + if member.value == value: + return member + raise ValueError(f"{value} is not a valid {cls.__name__}") + + +@dataclass(frozen=True) +class MemorizerKey: + chain_id: int + block_number: int + address: int + storage_slot: Tuple[int, int] + + @classmethod + def from_int(cls, values: List[int]): + if len(values) != cls.size(): + raise ValueError( + "MemorizerKey must be initialized with a list of five integers" + ) + return cls(values[0], values[1], values[2], (values[3], values[4])) + + def derive(self) -> int: + return poseidon_hash_many( + [ + self.chain_id, + self.block_number, + self.storage_slot[0], + self.storage_slot[1], + ] + ) + + def to_dict(self): + return { + "chain_id": self.chain_id, + "block_number": self.block_number, + "address": Web3.toChecksumAddress(hex(self.address)), + "storage_slot": self.storage_slot, + } + + @classmethod + def size(cls) -> int: + return 5 + + +class AbstractStorageMemorizerBase(ABC): + def __init__(self, memorizer: Memorizer): + self.memorizer = memorizer + self.function_map = { + MemorizerFunctionId.GET_SLOT: self.get_slot, + } + + def handle( + self, function_id: MemorizerFunctionId, key: MemorizerKey + ) -> Tuple[int, int]: + if function_id in self.function_map: + return self.function_map[function_id](key=key) + else: + raise ValueError(f"Function ID {function_id} is not recognized.") + + @abstractmethod + def get_slot(self, key: MemorizerKey) -> Tuple[int, int]: + pass + + def _get_felt_range(self, start_addr: int, end_addr: int) -> List[int]: + assert isinstance(start_addr, RelocatableValue) + assert isinstance(end_addr, RelocatableValue) + assert start_addr.segment_index == end_addr.segment_index, ( + "Inconsistent start and end segment indices " + f"({start_addr.segment_index} != {end_addr.segment_index})." + ) + + assert start_addr.offset <= end_addr.offset, ( + "The start offset cannot be greater than the end offset" + f"({start_addr.offset} > {end_addr.offset})." + ) + + size = end_addr.offset - start_addr.offset + return self.segments.memory.get_range_as_ints(addr=start_addr, size=size) diff --git a/packages/contract_bootloader/provider/storage_key_provider.py b/packages/contract_bootloader/provider/storage_key_provider.py new file mode 100644 index 00000000..1e28e62a --- /dev/null +++ b/packages/contract_bootloader/provider/storage_key_provider.py @@ -0,0 +1,25 @@ +from web3 import Web3 +from contract_bootloader.memorizer.storage_memorizer import MemorizerKey +from contract_bootloader.provider.evm_provider import EVMProvider + + +class StorageKeyEVMProvider(EVMProvider): + def __init__(self, provider_url: str): + super().__init__(provider_url=provider_url) + + def get_slot(self, key: MemorizerKey) -> int: + address = Web3.toChecksumAddress(hex(key.address)) + if not self.web3.isAddress(address): + raise ValueError(f"Invalid Ethereum address: {address}") + + try: + # Combine the storage slot tuple into a single slot key + slot_key = key.storage_slot[1] << 128 | key.storage_slot[0] + # Fetch the storage slot data + return int( + self.web3.eth.get_storage_at( + address, slot_key, block_identifier=key.block_number + ) + ) + except Exception as e: + raise Exception(f"An error occurred while fetching the parent block: {e}") diff --git a/packages/contract_bootloader/syscall_handler.py b/packages/contract_bootloader/syscall_handler.py index 49f4f229..fb00bb55 100644 --- a/packages/contract_bootloader/syscall_handler.py +++ b/packages/contract_bootloader/syscall_handler.py @@ -17,12 +17,19 @@ MemorizerFunctionId as AccountMemorizerFunctionId, MemorizerKey as AccountMemorizerKey, ) +from contract_bootloader.memorizer.storage_memorizer import ( + MemorizerFunctionId as StorageMemorizerFunctionId, + MemorizerKey as StorageMemorizerKey, +) from contract_bootloader.syscall_memorizer_handler.account_memorizer_handler import ( AccountMemorizerHandler, ) from contract_bootloader.syscall_memorizer_handler.header_memorizer_handler import ( HeaderMemorizerHandler, ) +from contract_bootloader.syscall_memorizer_handler.storage_memorizer_handler import ( + StorageMemorizerHandler, +) class SyscallHandler(SyscallHandlerBase): @@ -109,6 +116,33 @@ def _call_contract_helper( ) retdata = handler.handle(function_id=functionId, key=key) + elif memorizerId == MemorizerId.Storage: + total_size = Memorizer.size() + StorageMemorizerKey.size() + + if len(calldata) != total_size: + raise ValueError( + f"Memorizer read must be initialized with a list of {total_size} integers" + ) + + memorizer = Memorizer( + dict_raw_ptrs=calldata[0 : Memorizer.size()], + dict_manager=self.dict_manager, + ) + + idx = Memorizer.size() + key = StorageMemorizerKey.from_int( + calldata[idx : idx + StorageMemorizerKey.size()] + ) + + handler = StorageMemorizerHandler( + segments=self.segments, + memorizer=memorizer, + ) + retdata = handler.handle(function_id=functionId, key=key) + + else: + raise ValueError(f"MemorizerId {memorizerId} not matched") + return CallResult( gas_consumed=0, failure_flag=0, diff --git a/packages/contract_bootloader/syscall_memorizer_handler/storage_memorizer_handler.py b/packages/contract_bootloader/syscall_memorizer_handler/storage_memorizer_handler.py new file mode 100644 index 00000000..d8049b8c --- /dev/null +++ b/packages/contract_bootloader/syscall_memorizer_handler/storage_memorizer_handler.py @@ -0,0 +1,37 @@ +from rlp import decode +from typing import Tuple +from contract_bootloader.memorizer.memorizer import Memorizer +from contract_bootloader.memorizer.storage_memorizer import ( + AbstractStorageMemorizerBase, + MemorizerKey, +) +from starkware.cairo.lang.vm.memory_segments import MemorySegmentManager +from tools.py.rlp import get_rlp_len +from tools.py.utils import little_8_bytes_chunks_to_bytes +from rlp.sedes import Binary + + +class StorageMemorizerHandler(AbstractStorageMemorizerBase): + def __init__(self, segments: MemorySegmentManager, memorizer: Memorizer): + super().__init__(memorizer=memorizer) + self.segments = segments + + def get_slot(self, key: MemorizerKey) -> Tuple[int, int]: + memorizer_value_ptr = self.memorizer.read(key=key.derive()) + + rlp_len = get_rlp_len( + rlp=self.segments.memory[memorizer_value_ptr], item_start_offset=0 + ) + rlp = self._get_felt_range( + start_addr=memorizer_value_ptr, + end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, + ) + + value = decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), Binary.fixed_length(32) + ) + + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) diff --git a/src/contract_dry_run.cairo b/src/contract_dry_run.cairo index 4d2b81c7..e967bf8c 100644 --- a/src/contract_dry_run.cairo +++ b/src/contract_dry_run.cairo @@ -93,9 +93,9 @@ func main{ ) %} + let (local header_dict) = default_dict_new(default_value=7); let (local account_dict) = default_dict_new(default_value=7); let (local storage_dict) = default_dict_new(default_value=7); - let (local header_dict) = default_dict_new(default_value=7); let (local block_tx_dict) = default_dict_new(default_value=7); let (local block_receipt_dict) = default_dict_new(default_value=7); local pow2_array: felt* = nondet %{ segments.add() %}; @@ -116,10 +116,12 @@ func main{ assert calldata[1] = nondet %{ ids.header_dict.address_.offset %}; assert calldata[2] = nondet %{ ids.account_dict.address_.segment_index %}; assert calldata[3] = nondet %{ ids.account_dict.address_.offset %}; - memcpy(dst=calldata + 4, src=inputs, len=inputs_len); - let calldata_size = inputs_len + 4; + assert calldata[4] = nondet %{ ids.storage_dict.address_.segment_index %}; + assert calldata[5] = nondet %{ ids.storage_dict.address_.offset %}; + memcpy(dst=calldata + 6, src=inputs, len=inputs_len); + let calldata_size = inputs_len + 6; - with account_dict, storage_dict, header_dict, block_tx_dict, block_receipt_dict, pow2_array { + with header_dict, account_dict, storage_dict, block_tx_dict, block_receipt_dict, pow2_array { let (retdata_size, retdata) = run_contract_bootloader( compiled_class=compiled_class, calldata_size=calldata_size, calldata=calldata, dry_run=1 ); diff --git a/src/tasks/aggregate_functions/contract.cairo b/src/tasks/aggregate_functions/contract.cairo index 43ed7439..5481b48f 100644 --- a/src/tasks/aggregate_functions/contract.cairo +++ b/src/tasks/aggregate_functions/contract.cairo @@ -79,10 +79,12 @@ func compute_contract{ assert calldata[1] = nondet %{ ids.header_dict.address_.offset %}; assert calldata[2] = nondet %{ ids.account_dict.address_.segment_index %}; assert calldata[3] = nondet %{ ids.account_dict.address_.offset %}; - memcpy(dst=calldata + 4, src=inputs, len=inputs_len); - let calldata_size = inputs_len + 4; + assert calldata[4] = nondet %{ ids.storage_dict.address_.segment_index %}; + assert calldata[5] = nondet %{ ids.storage_dict.address_.offset %}; + memcpy(dst=calldata + 6, src=inputs, len=inputs_len); + let calldata_size = inputs_len + 6; - with account_dict, storage_dict, header_dict, block_tx_dict, block_receipt_dict, pow2_array { + with header_dict, account_dict, storage_dict, block_tx_dict, block_receipt_dict, pow2_array { let (retdata_size, retdata) = run_contract_bootloader( compiled_class=compiled_class, calldata_size=calldata_size, calldata=calldata, dry_run=0 ); From 56115d060ec5d44bfdd2d7de7068cbe1c0faa54f Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 17 Jul 2024 17:37:01 +0200 Subject: [PATCH 15/73] fix --- packages/contract_bootloader/execute_entry_point.cairo | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/contract_bootloader/execute_entry_point.cairo b/packages/contract_bootloader/execute_entry_point.cairo index d1d67c64..ac7fe900 100644 --- a/packages/contract_bootloader/execute_entry_point.cairo +++ b/packages/contract_bootloader/execute_entry_point.cairo @@ -53,6 +53,7 @@ func call_execute_syscalls{ builtin_ptrs: BuiltinPointers*, header_dict: DictAccess*, account_dict: DictAccess*, + storage_dict: DictAccess*, pow2_array: felt*, }(execution_context: ExecutionContext*, syscall_ptr_end: felt*, dry_run: felt) { if (dry_run == 1) { From 7ce892ad350ae2f5f8afd57c34b8dd514b1ad279 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 17 Jul 2024 17:58:39 +0200 Subject: [PATCH 16/73] working example --- src/hdp_input.json | 941 +++++++++++++++++++++++++-------------------- 1 file changed, 521 insertions(+), 420 deletions(-) diff --git a/src/hdp_input.json b/src/hdp_input.json index fc52c852..da854bc2 100644 --- a/src/hdp_input.json +++ b/src/hdp_input.json @@ -1,7 +1,7 @@ { "cairo_run_output_path": "cairo_run_output.json", - "task_root": "0xd5bebffa1a6bd30a791b99a7b5debe341fab1ddb9b1baa21c86828b3e60494e9", - "result_root": "0xf8d8233646456e43b3d79f8e165fd0ff8edf9eab4cf1322ae9ce4d2d0dd76ce3", + "task_root": "0x5ce564b894328395542088257ba161b16f5b86f87e76dcabe0f403bd02192ec2", + "result_root": "0xedaa74e295a7534bbc08da06efb1300d30265da914c4908adfe7894cba8ffc9a", "proofs": { "mmr_metas": [ { @@ -27,6 +27,107 @@ } ], "headers": [ + { + "rlp": [ + "0x2a661c27a02302f9", + "0x55599ca3ef044c21", + "0x7f4f6425b632d127", + "0x3bd25b345f2626d7", + "0x4dcc1da00079af17", + "0xb585ab7a5dc7dee8", + "0x4512d31ad4ccb667", + "0x42a1f013748a941b", + "0x2638944793d440fd", + "0x19f1dc688dbd9c53", + "0x8c27b45745990be8", + "0x44ecee1ef0a09fec", + "0x31ef5fc8b35f9240", + "0x5cff3221a63c3ff9", + "0x3a1b50acab9f2849", + "0x7b399c9ea0c9300c", + "0x928ab55d3c647fd8", + "0x75a98e7503cfb543", + "0xad77b5f16bbe83fb", + "0x46332fa029c561eb", + "0x3235cf0e42cc5876", + "0xafa351e8b25fdefb", + "0xdc2a3effd032bc5d", + "0x1b9525359b820", + "0x894220490e02024e", + "0x4629522101940", + "0x4140010320402180", + "0x3002ba00680310c2", + "0x8907908001000040", + "0xd30004402c884faa", + "0x6003a010f3068880", + "0x800024a004983085", + "0x4052070801e408c0", + "0x30000080a004a40", + "0xf8420c0504184085", + "0x111008300004000", + "0x124240030a08a048", + "0x440b5006054201c4", + "0x30004086c1265900", + "0x140c3b0090c40401", + "0x441884101a202002", + "0xc078801820130030", + "0x4d2200922018904", + "0x4118404d80f01198", + "0x220444880500a96", + "0x284548340004038", + "0x40800020262003b", + "0x80b20005020490a4", + "0x200084302098083", + "0x140470b11212c00", + "0x110428032523000", + "0xc73002400ad1102", + "0x344921862c929198", + "0x400902102100820", + "0x8210b13046004", + "0x90a6080080302c0", + "0xc90184e7214f8380", + "0x84c2f66c018480c3", + "0x43e8a0802c4eb965", + "0xbe857c88f0776672", + "0xb0e4fb3cb43479f4", + "0xdf1c5b163586f8b7", + "0x88895e9a10b91e", + "0x8500000000000000", + "0x6d90a0275acc5501", + "0xa9a52bfadf2cd5ff", + "0xd313639d4cc9140b", + "0xece5fda22a1d5a16", + "0x39b6181c72ba" + ], + "rlp_bytes_len": 550, + "proof": { + "leaf_idx": 1521895, + "mmr_path": [ + "0x598955397f4891983bce4886d22fa19c0d22255f94bb8aaa1faa7aec92cfc7f", + "0x2f91fb12566af84978eb5b8694abba5b6d23d0c57ca791fd3bfd01ecd3a0c8c", + "0x3b508668f7d92d379884c79d9031878cbaeb3fa28f053f48b57a7502e45611c", + "0x6ae0557449080a7745c6ad43b21c6f6f57d452817b23b77b5c2ff3d8ccb3760", + "0x593ac29a8b112e2bd247cad0b7b016786ad04217bee18f5e0ea41127ba23f75", + "0x787989b47e298c397a0a6123049fb85d5bd2f962ed9149ee6df656dbc605dda", + "0x6984af357d277724980ece2c11e93d6b6e14200715769b3fd9cbc9a0eaf29c7", + "0x61bc1b0b3467541328174831626b59bcebaec7ef9fda196df6895acfaca4ace", + "0x4fa6272ed7dae6104f103fdec5b82c09f8006abfc9e8e9bc44cff298749599c", + "0x4c9f22576f8d894fd2f992221402ee2d0a703c35c9e1d114f31411b13246bfc", + "0x5b620a5f345977ec7fd3bdeba082078594768bc2fac155ba33b1eab8885a069", + "0x572b3407be5793b54c558f5a7d9d4fb194aea5b14f2b2b7e2c8f526cefbde18", + "0x716621bd5c6f555cca5badd2849633fea9f506876642b58f985f6ab1de6340c", + "0x019df1b143b7076f7c8db2d84794c5bf29be24dbcd64d6a7482c7ff5490486f", + "0x145418fa00ec0102943417073ea3015c793e55e1a11f303aef71a154b2d418c", + "0x164770888e7afc464c2c3a956cf13d2aaf4b5786baec8424357e46f8e1968b2", + "0x46034840abeb358ce87e74d2963f6fb9c655841b31df46eab6e2b784b35d82c", + "0x4b2dfec0bb9b57c4e7ac16cedcd3ff50f381f7ab2df50bcfa3596308f79135a", + "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", + "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", + "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", + "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" + ] + } + }, { "rlp": [ "0x26400d37a04102f9", @@ -235,107 +336,6 @@ "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" ] } - }, - { - "rlp": [ - "0x2a661c27a02302f9", - "0x55599ca3ef044c21", - "0x7f4f6425b632d127", - "0x3bd25b345f2626d7", - "0x4dcc1da00079af17", - "0xb585ab7a5dc7dee8", - "0x4512d31ad4ccb667", - "0x42a1f013748a941b", - "0x2638944793d440fd", - "0x19f1dc688dbd9c53", - "0x8c27b45745990be8", - "0x44ecee1ef0a09fec", - "0x31ef5fc8b35f9240", - "0x5cff3221a63c3ff9", - "0x3a1b50acab9f2849", - "0x7b399c9ea0c9300c", - "0x928ab55d3c647fd8", - "0x75a98e7503cfb543", - "0xad77b5f16bbe83fb", - "0x46332fa029c561eb", - "0x3235cf0e42cc5876", - "0xafa351e8b25fdefb", - "0xdc2a3effd032bc5d", - "0x1b9525359b820", - "0x894220490e02024e", - "0x4629522101940", - "0x4140010320402180", - "0x3002ba00680310c2", - "0x8907908001000040", - "0xd30004402c884faa", - "0x6003a010f3068880", - "0x800024a004983085", - "0x4052070801e408c0", - "0x30000080a004a40", - "0xf8420c0504184085", - "0x111008300004000", - "0x124240030a08a048", - "0x440b5006054201c4", - "0x30004086c1265900", - "0x140c3b0090c40401", - "0x441884101a202002", - "0xc078801820130030", - "0x4d2200922018904", - "0x4118404d80f01198", - "0x220444880500a96", - "0x284548340004038", - "0x40800020262003b", - "0x80b20005020490a4", - "0x200084302098083", - "0x140470b11212c00", - "0x110428032523000", - "0xc73002400ad1102", - "0x344921862c929198", - "0x400902102100820", - "0x8210b13046004", - "0x90a6080080302c0", - "0xc90184e7214f8380", - "0x84c2f66c018480c3", - "0x43e8a0802c4eb965", - "0xbe857c88f0776672", - "0xb0e4fb3cb43479f4", - "0xdf1c5b163586f8b7", - "0x88895e9a10b91e", - "0x8500000000000000", - "0x6d90a0275acc5501", - "0xa9a52bfadf2cd5ff", - "0xd313639d4cc9140b", - "0xece5fda22a1d5a16", - "0x39b6181c72ba" - ], - "rlp_bytes_len": 550, - "proof": { - "leaf_idx": 1521895, - "mmr_path": [ - "0x598955397f4891983bce4886d22fa19c0d22255f94bb8aaa1faa7aec92cfc7f", - "0x2f91fb12566af84978eb5b8694abba5b6d23d0c57ca791fd3bfd01ecd3a0c8c", - "0x3b508668f7d92d379884c79d9031878cbaeb3fa28f053f48b57a7502e45611c", - "0x6ae0557449080a7745c6ad43b21c6f6f57d452817b23b77b5c2ff3d8ccb3760", - "0x593ac29a8b112e2bd247cad0b7b016786ad04217bee18f5e0ea41127ba23f75", - "0x787989b47e298c397a0a6123049fb85d5bd2f962ed9149ee6df656dbc605dda", - "0x6984af357d277724980ece2c11e93d6b6e14200715769b3fd9cbc9a0eaf29c7", - "0x61bc1b0b3467541328174831626b59bcebaec7ef9fda196df6895acfaca4ace", - "0x4fa6272ed7dae6104f103fdec5b82c09f8006abfc9e8e9bc44cff298749599c", - "0x4c9f22576f8d894fd2f992221402ee2d0a703c35c9e1d114f31411b13246bfc", - "0x5b620a5f345977ec7fd3bdeba082078594768bc2fac155ba33b1eab8885a069", - "0x572b3407be5793b54c558f5a7d9d4fb194aea5b14f2b2b7e2c8f526cefbde18", - "0x716621bd5c6f555cca5badd2849633fea9f506876642b58f985f6ab1de6340c", - "0x019df1b143b7076f7c8db2d84794c5bf29be24dbcd64d6a7482c7ff5490486f", - "0x145418fa00ec0102943417073ea3015c793e55e1a11f303aef71a154b2d418c", - "0x164770888e7afc464c2c3a956cf13d2aaf4b5786baec8424357e46f8e1968b2", - "0x46034840abeb358ce87e74d2963f6fb9c655841b31df46eab6e2b784b35d82c", - "0x4b2dfec0bb9b57c4e7ac16cedcd3ff50f381f7ab2df50bcfa3596308f79135a", - "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", - "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", - "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", - "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" - ] - } } ], "accounts": [ @@ -348,7 +348,7 @@ "account_key": "0x8ad2b901594e58a241532055dfe914294630ed5c33ffc31905452799f9b4aab0", "proofs": [ { - "block_number": 5186023, + "block_number": 5186022, "proof_bytes_len": [ 532, 532, @@ -356,98 +356,98 @@ 532, 532, 436, - 147, - 83, - 104 - ], - "proof": [ - [ - "0x58444a19a01102f9", - "0x6186aa6c4bc2f7f5", - "0x6184b7400645ceb8", - "0x3432964db06ab3fa", - "0x5798e0a01aa7c11e", - "0x69c22a52bbd3da36", - "0xc193223917a9e4d5", - "0x5d16e5da8393253e", - "0xd1aea0adbb62b640", - "0x7f69eb2eae8ad843", - "0xeff40cb50c390b52", - "0xad7a89c1ae3d5a01", - "0x51a089f820fcd629", - "0xe20558b8b776455d", - "0x10f8bd05fb96d051", - "0xfb1767334c91ceed", - "0xa09fcceaf965a8a3", - "0x101d508f191dfb8e", - "0x5bb5986074297ab9", - "0x3e0bf1dd917913e0", - "0x3e36b93acd6e2eea", - "0xc88425cf6da209a0", - "0xfcb2166cd45e503e", - "0xe65bb3922725d69b", - "0x800a431934b6d1a7", - "0x8bb03acfb08ba041", - "0xcc1b0a7dc223167b", - "0xd84f206f0caa9606", - "0xb32389c0d2d6977c", - "0xf62965f9a6a0bcab", - "0xdd36c65f0faad792", - "0xead9cccb6a889923", - "0xc0dcabd20910bd4", - "0xc44f224ca034ac90", - "0x49ec9e9e2beb786d", - "0x92818730075c99b2", - "0x786ad2678143d2a1", - "0x13293ba099aa8534", - "0xfa4e5074579f71ce", - "0x742e1850d3e32270", - "0x1d2c0a57888d87ff", - "0x3166a0bff089e666", - "0x4db2002e17450b44", - "0x12e4183aab01a0ac", - "0x80035805dc8e1ab5", - "0xc3a00955c3ad3941", - "0xa63804703e4267a2", - "0x3a106468d3dc7203", - "0x9fb70db168fdc96c", - "0xa0a832ac509828fb", - "0x7ef632aa0f1cc00", - "0x5c2123aba626012a", - "0x35109a6575dbd707", - "0xe9a2d7571c0db0a3", - "0x67e9ba3837d041a0", - "0x4127470df1024135", - "0xddfd667cf6bc5239", - "0x2742eba7a44bae42", - "0x79f9db0a20fa038", - "0xbc64f3ab69c82752", - "0x9a19ce6f2f1e0b46", - "0x2f86d39b6ed70147", - "0xc2495bcb12a0aba4", - "0xb98551cad578ca95", - "0x65f799018826d439", - "0x6e588e68abc35e2b", - "0x800100d6" + 147, + 83, + 104 + ], + "proof": [ + [ + "0xa56441cca01102f9", + "0x485779b9ac3e33da", + "0x45bba8cc7cab8b88", + "0x97f1a360d0fc4298", + "0xda5d4ba0cd0fee2a", + "0x4cea18af7c23d4a0", + "0x67290fdc761585b0", + "0x46c75fe72480cfcc", + "0x30dba091f5da704c", + "0xf5ffdb29cc6cdc1a", + "0xac4fb8743ce7cc12", + "0x8f093f32b732af4f", + "0xda0aa25fed40548", + "0xfd7a9beb227fe053", + "0xd570d52b2115ea5f", + "0xfe229a0827fc520f", + "0xa012454939c57e5c", + "0x21c9887e8ee3f3b1", + "0x5156b1ebfc356cf7", + "0x472d2d64d9ff9480", + "0xd98b7ec0bf9199a7", + "0xa67222f4c5bdcda0", + "0xcb44efdda2e66b74", + "0xac7624bf37444d9d", + "0xa07fca47762cdbf", + "0x2779f753784ca07e", + "0xb5696d5ba2df3e6a", + "0xe1accfc5d1c49211", + "0xea31e9b0f0cbd29b", + "0xeab1a6bca0a0f663", + "0x697d9b97b06c60b5", + "0x9c47e390d62b89a0", + "0x798dbe2cd348cdd2", + "0xf73b544fa04ca910", + "0xcc8a0d2bed50be8a", + "0x61a57b36a1879202", + "0xa73ca0ba46fd8dea", + "0x8b4bbda0c664f43b", + "0x175c3dff5bd40cb7", + "0xbd660f7dca4e90e6", + "0x22854668ebefbe42", + "0xd68a0640b490553", + "0x1c02474bce1b1166", + "0x2fb2f9451cba664a", + "0x80fe06bb9ad35e9a", + "0x5ba05f2c78048e7f", + "0xb5f31e7738ded2ba", + "0xf447594f1998bb5f", + "0x27cd80c48ed1f15d", + "0xa09bd8e385d9f9db", + "0x8ae951222b70f58d", + "0xf52b0ebec8f25e3f", + "0xfed270af9a1469e", + "0x2b3f02042fc5b693", + "0x6ae28be870b10a0", + "0x16291604b227317a", + "0x8dac0fbce38ceefd", + "0xace93a8dc1fb0612", + "0xbc530efeb3ca0fd", + "0xb450cf74a528f7cb", + "0x8d160635de93de22", + "0x442e0f173e0f2b12", + "0xf81b15653aa0471f", + "0xa7bda111d440a7e6", + "0x12e35ee20d909c5", + "0x852d8e1515ad2c3e", + "0x807d369a" ], [ - "0x9872fa8ba01102f9", - "0xebf32a01c304911b", - "0x7a90055f9401af09", - "0xc2ba94afe0afe786", - "0x2f611ca0e690fc3c", + "0x2203510a01102f9", + "0x9b6493f1eafbce8f", + "0xcab50cf7550ea03", + "0xa6166a1fc684449d", + "0x2f611ca0278a613f", "0x390432baa62b1a9c", "0xca085e0f40b93f89", "0x29c27ae3f970b810", - "0xbd61a0348697ea23", - "0xa44ae2ff8e39cb97", - "0x6fc8d2b6e578cd7c", - "0x1e826e42f9ad3011", - "0xc6a0a0f182a6676c", - "0xdb9c4dc5b4c03eb8", - "0xb2aec4fcde466b5d", - "0xca5a8a2ffb11d58", - "0xa04952eb424ede4f", + "0x4f11a0348697ea23", + "0x15fae1bdff89aae", + "0x2d379662a57f6c3e", + "0x94b9e0fa577c0bd9", + "0xeaa073b2b96e399c", + "0x7f5589bcdb15412e", + "0xdde3c93dc089245f", + "0xd8fd736ca136a614", + "0xa016f7ef94a462b8", "0xcf0538fb63aad0e9", "0xb26d3e80af58fdf5", "0x20ca30148b2cec11", @@ -456,48 +456,48 @@ "0x955f28c7518cfc49", "0xb4be12419fce2f7b", "0x773a029286892019", - "0xfcc56c3d2015a06f", - "0x64aac5a84cae088e", - "0xfa553497f5842d68", - "0x427cb9bce0af3b1b", - "0xfe7dbdb928a0af56", - "0xb1e5b3ff64efb8e4", - "0x93ac8fc710c859e2", - "0xf428706c93752615", - "0x1487b0b4a0a1c9cc", + "0xd5b4924cbd96a06f", + "0x90e1fae24960eed4", + "0x898f646d618fe2da", + "0x4ffd46ba2191ffcc", + "0x23feafcdaa083d7", + "0xc1b401d92b41c162", + "0xaf55e71b1cc32c0b", + "0x295c5bfb1a52901a", + "0x1487b0b4a06896cc", "0xd44cbea352feca7a", "0x6dc058cae697e48d", "0x8659ed45c7db8c69", - "0x562c19a08db158a9", - "0xe414bdf4b7b4ea52", - "0x300d204a6a0f4698", - "0xe9b4e532fbe5297c", - "0x138ea0de0a724737", + "0x7ce74aa08db158a9", + "0x564d9a064d0d3c2", + "0xa585d9c2b3a50627", + "0x593872a183de1500", + "0x138ea0b9b7e46808", "0x16bda1dac8b25389", "0xa1dc3981db0b5286", "0x5aae51ed9b411bd4", - "0x85a0e73edf470da8", - "0xbcf54c26f2702ecb", - "0x64b9e0044cbd4c16", - "0x3328de9d25006830", - "0xa0d0c9c72af81dec", - "0x87a68bcceca88565", - "0xf87e863d3afa3ca9", - "0xa536665210fb6e0c", - "0x936f481ec643e73c", + "0x86a0e73edf470da8", + "0x4f09e70d776da168", + "0x1cbfd4c4ce386f3", + "0xaab65a74219a1a2f", + "0xa02a061e70248482", + "0x829fcd24f9eec9d4", + "0xa55445bad38a715", + "0x15844d0c36e329f", + "0x9d093fbf60fdff33", "0xd9a3d455f75fd2a0", "0xab3a7fc6a1d33828", "0xae5e998f387e2891", "0xee2b8a2c2c03186a", - "0x6663d5b55563a0e4", - "0xb041ee83b314d7a2", - "0x5745d9f896165267", - "0xb04b843caa6605fb", - "0xdccd8b7ccaa06355", - "0x4bd24db9c1106802", - "0x2be0ebdc7e9a4f28", - "0x9f42696729e380d4", - "0x80eb8545" + "0xde6ed0b1b955a0e4", + "0xfa6bdfeffedccc63", + "0x3d91aa809af2dbbf", + "0xda17eb79d5185449", + "0xc579977dea0164d", + "0x88cea7f4eec1f0ba", + "0x42a3f8b633052428", + "0x39012bdf2dbfc373", + "0x802cfb9b" ], [ "0xc40409caa01102f9", @@ -815,7 +815,7 @@ ] }, { - "block_number": 5186022, + "block_number": 5186023, "proof_bytes_len": [ 532, 532, @@ -829,92 +829,92 @@ ], "proof": [ [ - "0xa56441cca01102f9", - "0x485779b9ac3e33da", - "0x45bba8cc7cab8b88", - "0x97f1a360d0fc4298", - "0xda5d4ba0cd0fee2a", - "0x4cea18af7c23d4a0", - "0x67290fdc761585b0", - "0x46c75fe72480cfcc", - "0x30dba091f5da704c", - "0xf5ffdb29cc6cdc1a", - "0xac4fb8743ce7cc12", - "0x8f093f32b732af4f", - "0xda0aa25fed40548", - "0xfd7a9beb227fe053", - "0xd570d52b2115ea5f", - "0xfe229a0827fc520f", - "0xa012454939c57e5c", - "0x21c9887e8ee3f3b1", - "0x5156b1ebfc356cf7", - "0x472d2d64d9ff9480", - "0xd98b7ec0bf9199a7", - "0xa67222f4c5bdcda0", - "0xcb44efdda2e66b74", - "0xac7624bf37444d9d", - "0xa07fca47762cdbf", - "0x2779f753784ca07e", - "0xb5696d5ba2df3e6a", - "0xe1accfc5d1c49211", - "0xea31e9b0f0cbd29b", - "0xeab1a6bca0a0f663", - "0x697d9b97b06c60b5", - "0x9c47e390d62b89a0", - "0x798dbe2cd348cdd2", - "0xf73b544fa04ca910", - "0xcc8a0d2bed50be8a", - "0x61a57b36a1879202", - "0xa73ca0ba46fd8dea", - "0x8b4bbda0c664f43b", - "0x175c3dff5bd40cb7", - "0xbd660f7dca4e90e6", - "0x22854668ebefbe42", - "0xd68a0640b490553", - "0x1c02474bce1b1166", - "0x2fb2f9451cba664a", - "0x80fe06bb9ad35e9a", - "0x5ba05f2c78048e7f", - "0xb5f31e7738ded2ba", - "0xf447594f1998bb5f", - "0x27cd80c48ed1f15d", - "0xa09bd8e385d9f9db", - "0x8ae951222b70f58d", - "0xf52b0ebec8f25e3f", - "0xfed270af9a1469e", - "0x2b3f02042fc5b693", - "0x6ae28be870b10a0", - "0x16291604b227317a", - "0x8dac0fbce38ceefd", - "0xace93a8dc1fb0612", - "0xbc530efeb3ca0fd", - "0xb450cf74a528f7cb", - "0x8d160635de93de22", - "0x442e0f173e0f2b12", - "0xf81b15653aa0471f", - "0xa7bda111d440a7e6", - "0x12e35ee20d909c5", - "0x852d8e1515ad2c3e", - "0x807d369a" + "0x58444a19a01102f9", + "0x6186aa6c4bc2f7f5", + "0x6184b7400645ceb8", + "0x3432964db06ab3fa", + "0x5798e0a01aa7c11e", + "0x69c22a52bbd3da36", + "0xc193223917a9e4d5", + "0x5d16e5da8393253e", + "0xd1aea0adbb62b640", + "0x7f69eb2eae8ad843", + "0xeff40cb50c390b52", + "0xad7a89c1ae3d5a01", + "0x51a089f820fcd629", + "0xe20558b8b776455d", + "0x10f8bd05fb96d051", + "0xfb1767334c91ceed", + "0xa09fcceaf965a8a3", + "0x101d508f191dfb8e", + "0x5bb5986074297ab9", + "0x3e0bf1dd917913e0", + "0x3e36b93acd6e2eea", + "0xc88425cf6da209a0", + "0xfcb2166cd45e503e", + "0xe65bb3922725d69b", + "0x800a431934b6d1a7", + "0x8bb03acfb08ba041", + "0xcc1b0a7dc223167b", + "0xd84f206f0caa9606", + "0xb32389c0d2d6977c", + "0xf62965f9a6a0bcab", + "0xdd36c65f0faad792", + "0xead9cccb6a889923", + "0xc0dcabd20910bd4", + "0xc44f224ca034ac90", + "0x49ec9e9e2beb786d", + "0x92818730075c99b2", + "0x786ad2678143d2a1", + "0x13293ba099aa8534", + "0xfa4e5074579f71ce", + "0x742e1850d3e32270", + "0x1d2c0a57888d87ff", + "0x3166a0bff089e666", + "0x4db2002e17450b44", + "0x12e4183aab01a0ac", + "0x80035805dc8e1ab5", + "0xc3a00955c3ad3941", + "0xa63804703e4267a2", + "0x3a106468d3dc7203", + "0x9fb70db168fdc96c", + "0xa0a832ac509828fb", + "0x7ef632aa0f1cc00", + "0x5c2123aba626012a", + "0x35109a6575dbd707", + "0xe9a2d7571c0db0a3", + "0x67e9ba3837d041a0", + "0x4127470df1024135", + "0xddfd667cf6bc5239", + "0x2742eba7a44bae42", + "0x79f9db0a20fa038", + "0xbc64f3ab69c82752", + "0x9a19ce6f2f1e0b46", + "0x2f86d39b6ed70147", + "0xc2495bcb12a0aba4", + "0xb98551cad578ca95", + "0x65f799018826d439", + "0x6e588e68abc35e2b", + "0x800100d6" ], [ - "0x2203510a01102f9", - "0x9b6493f1eafbce8f", - "0xcab50cf7550ea03", - "0xa6166a1fc684449d", - "0x2f611ca0278a613f", + "0x9872fa8ba01102f9", + "0xebf32a01c304911b", + "0x7a90055f9401af09", + "0xc2ba94afe0afe786", + "0x2f611ca0e690fc3c", "0x390432baa62b1a9c", "0xca085e0f40b93f89", "0x29c27ae3f970b810", - "0x4f11a0348697ea23", - "0x15fae1bdff89aae", - "0x2d379662a57f6c3e", - "0x94b9e0fa577c0bd9", - "0xeaa073b2b96e399c", - "0x7f5589bcdb15412e", - "0xdde3c93dc089245f", - "0xd8fd736ca136a614", - "0xa016f7ef94a462b8", + "0xbd61a0348697ea23", + "0xa44ae2ff8e39cb97", + "0x6fc8d2b6e578cd7c", + "0x1e826e42f9ad3011", + "0xc6a0a0f182a6676c", + "0xdb9c4dc5b4c03eb8", + "0xb2aec4fcde466b5d", + "0xca5a8a2ffb11d58", + "0xa04952eb424ede4f", "0xcf0538fb63aad0e9", "0xb26d3e80af58fdf5", "0x20ca30148b2cec11", @@ -923,48 +923,48 @@ "0x955f28c7518cfc49", "0xb4be12419fce2f7b", "0x773a029286892019", - "0xd5b4924cbd96a06f", - "0x90e1fae24960eed4", - "0x898f646d618fe2da", - "0x4ffd46ba2191ffcc", - "0x23feafcdaa083d7", - "0xc1b401d92b41c162", - "0xaf55e71b1cc32c0b", - "0x295c5bfb1a52901a", - "0x1487b0b4a06896cc", + "0xfcc56c3d2015a06f", + "0x64aac5a84cae088e", + "0xfa553497f5842d68", + "0x427cb9bce0af3b1b", + "0xfe7dbdb928a0af56", + "0xb1e5b3ff64efb8e4", + "0x93ac8fc710c859e2", + "0xf428706c93752615", + "0x1487b0b4a0a1c9cc", "0xd44cbea352feca7a", "0x6dc058cae697e48d", "0x8659ed45c7db8c69", - "0x7ce74aa08db158a9", - "0x564d9a064d0d3c2", - "0xa585d9c2b3a50627", - "0x593872a183de1500", - "0x138ea0b9b7e46808", + "0x562c19a08db158a9", + "0xe414bdf4b7b4ea52", + "0x300d204a6a0f4698", + "0xe9b4e532fbe5297c", + "0x138ea0de0a724737", "0x16bda1dac8b25389", "0xa1dc3981db0b5286", "0x5aae51ed9b411bd4", - "0x86a0e73edf470da8", - "0x4f09e70d776da168", - "0x1cbfd4c4ce386f3", - "0xaab65a74219a1a2f", - "0xa02a061e70248482", - "0x829fcd24f9eec9d4", - "0xa55445bad38a715", - "0x15844d0c36e329f", - "0x9d093fbf60fdff33", + "0x85a0e73edf470da8", + "0xbcf54c26f2702ecb", + "0x64b9e0044cbd4c16", + "0x3328de9d25006830", + "0xa0d0c9c72af81dec", + "0x87a68bcceca88565", + "0xf87e863d3afa3ca9", + "0xa536665210fb6e0c", + "0x936f481ec643e73c", "0xd9a3d455f75fd2a0", "0xab3a7fc6a1d33828", "0xae5e998f387e2891", "0xee2b8a2c2c03186a", - "0xde6ed0b1b955a0e4", - "0xfa6bdfeffedccc63", - "0x3d91aa809af2dbbf", - "0xda17eb79d5185449", - "0xc579977dea0164d", - "0x88cea7f4eec1f0ba", - "0x42a3f8b633052428", - "0x39012bdf2dbfc373", - "0x802cfb9b" + "0x6663d5b55563a0e4", + "0xb041ee83b314d7a2", + "0x5745d9f896165267", + "0xb04b843caa6605fb", + "0xdccd8b7ccaa06355", + "0x4bd24db9c1106802", + "0x2be0ebdc7e9a4f28", + "0x9f42696729e380d4", + "0x80eb8545" ], [ "0xc40409caa01102f9", @@ -1771,12 +1771,12 @@ "0xa0680017fff8000", "0x7", "0x482680017ffa8000", - "0xfffffffffffffffffffffffffffff6f0", + "0xffffffffffffffffffffffffffffed2c", "0x400280007ff97fff", "0x10780017fff7fff", "0x11d", "0x4825800180007ffa", - "0x910", + "0x12d4", "0x400280007ff97fff", "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", @@ -1784,23 +1784,23 @@ "0x125", "0x482680017ff98000", "0x1", - "0x20680017fff7ffa", + "0x20680017fff7ff8", "0x104", - "0x48307ff880007ff9", + "0x48307ff680007ff7", "0x20680017fff7fff", "0x4", "0x10780017fff7fff", "0xa", - "0x482480017ff78000", + "0x482480017ff58000", "0x1", - "0x48127ff77fff8000", + "0x48127ff57fff8000", "0x480680017fff8000", "0x0", - "0x48127ff47fff8000", + "0x48127ff27fff8000", "0x10780017fff7fff", "0x8", - "0x48127ff77fff8000", - "0x48127ff77fff8000", + "0x48127ff57fff8000", + "0x48127ff57fff8000", "0x480680017fff8000", "0x1", "0x480680017fff8000", @@ -1910,7 +1910,7 @@ "0x496e70757420746f6f206c6f6e6720666f7220617267756d656e7473", "0x400080007ffe7fff", "0x48127ff77fff8000", - "0x48127fba7fff8000", + "0x48127fa97fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -1919,20 +1919,20 @@ "0x1", "0x208b7fff7fff7ffe", "0x1104800180018000", - "0x305", + "0x36a", "0x482480017fff8000", - "0x304", + "0x369", "0x480080007fff8000", "0xa0680017fff8000", "0x9", - "0x4824800180007fb8", + "0x4824800180007fa7", "0xa0a", "0x482480017fff8000", "0x100000000000000000000000000000000", "0x400080007ff27fff", "0x10780017fff7fff", "0x2b", - "0x4824800180007fb8", + "0x4824800180007fa7", "0xa0a", "0x400080007ff37fff", "0x482480017ff38000", @@ -1945,11 +1945,11 @@ "0x0", "0x480680017fff8000", "0x0", - "0x48127fd87fff8000", - "0x48127fd87fff8000", + "0x48127fd67fff8000", + "0x48127fd67fff8000", "0x48127fef7fff8000", "0x1104800180018000", - "0x132", + "0x197", "0x20680017fff7ffc", "0xf", "0x40780017fff7fff", @@ -1980,7 +1980,7 @@ "0x400080007ffe7fff", "0x482480017ff08000", "0x1", - "0x48127fb37fff8000", + "0x48127fa27fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -1994,7 +1994,7 @@ "0x4661696c656420746f20646573657269616c697a6520706172616d202334", "0x400080007ffe7fff", "0x48127ff87fff8000", - "0x48127fbb7fff8000", + "0x48127faa7fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -2015,7 +2015,7 @@ "0x4661696c656420746f20646573657269616c697a6520706172616d202333", "0x400080007ffe7fff", "0x48127ffd7fff8000", - "0x48127fbb7fff8000", + "0x48127faa7fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -2036,7 +2036,7 @@ "0x4661696c656420746f20646573657269616c697a6520706172616d202332", "0x400080007ffe7fff", "0x48127ffd7fff8000", - "0x48127fc47fff8000", + "0x48127fb37fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -2050,7 +2050,7 @@ "0x4661696c656420746f20646573657269616c697a6520706172616d202331", "0x400080007ffe7fff", "0x48127ffd7fff8000", - "0x48127fd27fff8000", + "0x48127fc17fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -2144,7 +2144,7 @@ "0x480680017fff8000", "0x0", "0x20680017fff7ffd", - "0x60", + "0xc1", "0x48307ffb80007ffc", "0x20680017fff7fff", "0x4", @@ -2216,15 +2216,89 @@ "0x480680017fff8000", "0x0", "0x20680017fff7ffd", - "0xb", + "0x66", + "0x48307ffb80007ffc", + "0x20680017fff7fff", + "0x4", + "0x10780017fff7fff", + "0xa", + "0x482480017ffa8000", + "0x1", + "0x48127ffa7fff8000", + "0x480680017fff8000", + "0x0", + "0x480080007ff78000", + "0x10780017fff7fff", + "0x8", + "0x48127ffa7fff8000", + "0x48127ffa7fff8000", + "0x480680017fff8000", + "0x1", + "0x480680017fff8000", + "0x0", + "0x20680017fff7ffe", + "0x29", + "0x48307ffc80007ffd", + "0x20680017fff7fff", + "0x4", + "0x10780017fff7fff", + "0xa", + "0x482480017ffb8000", + "0x1", + "0x48127ffb7fff8000", + "0x480680017fff8000", + "0x0", + "0x480080007ff88000", + "0x10780017fff7fff", + "0x8", "0x48127ffb7fff8000", "0x48127ffb7fff8000", "0x480680017fff8000", + "0x1", + "0x480680017fff8000", "0x0", - "0x48127fec7fff8000", - "0x48127fec7fff8000", - "0x48127ff97fff8000", - "0x48127ff97fff8000", + "0x20680017fff7ffe", + "0xa", + "0x48127ffc7fff8000", + "0x48127ffc7fff8000", + "0x480680017fff8000", + "0x0", + "0x48127ff77fff8000", + "0x48127ffb7fff8000", + "0x10780017fff7fff", + "0x16", + "0x48127ffc7fff8000", + "0x48127ffc7fff8000", + "0x480680017fff8000", + "0x1", + "0x480680017fff8000", + "0x0", + "0x480680017fff8000", + "0x0", + "0x10780017fff7fff", + "0xc", + "0x40780017fff7fff", + "0x5", + "0x48127ff77fff8000", + "0x48127ff77fff8000", + "0x480680017fff8000", + "0x1", + "0x480680017fff8000", + "0x0", + "0x480680017fff8000", + "0x0", + "0x20680017fff7ffd", + "0xd", + "0x48127ffb7fff8000", + "0x48127ffb7fff8000", + "0x480680017fff8000", + "0x0", + "0x48127fdd7fff8000", + "0x48127fdd7fff8000", + "0x48127fea7fff8000", + "0x48127fea7fff8000", + "0x48127ff77fff8000", + "0x48127ff77fff8000", "0x208b7fff7fff7ffe", "0x48127ffb7fff8000", "0x48127ffb7fff8000", @@ -2238,6 +2312,10 @@ "0x0", "0x480680017fff8000", "0x0", + "0x480680017fff8000", + "0x0", + "0x480680017fff8000", + "0x0", "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0xf", @@ -2253,6 +2331,29 @@ "0x0", "0x480680017fff8000", "0x0", + "0x480680017fff8000", + "0x0", + "0x480680017fff8000", + "0x0", + "0x208b7fff7fff7ffe", + "0x40780017fff7fff", + "0x1e", + "0x48127fdd7fff8000", + "0x48127fdd7fff8000", + "0x480680017fff8000", + "0x1", + "0x480680017fff8000", + "0x0", + "0x480680017fff8000", + "0x0", + "0x480680017fff8000", + "0x0", + "0x480680017fff8000", + "0x0", + "0x480680017fff8000", + "0x0", + "0x480680017fff8000", + "0x0", "0x208b7fff7fff7ffe", "0xa0680017fff8000", "0x7", @@ -2694,7 +2795,7 @@ ], "bytecode_segment_lengths": [ 305, - 181, + 282, 200, 237 ], @@ -2705,7 +2806,7 @@ { "TestLessThanOrEqual": { "lhs": { - "Immediate": "0x910" + "Immediate": "0x12d4" }, "rhs": { "Deref": { @@ -2859,7 +2960,7 @@ "rhs": { "Deref": { "register": "AP", - "offset": -71 + "offset": -88 } }, "dst": { @@ -2962,7 +3063,7 @@ ] ], [ - 486, + 587, [ { "TestLessThanOrEqual": { @@ -2984,7 +3085,7 @@ ] ], [ - 497, + 598, [ { "TestLessThan": { @@ -3006,7 +3107,7 @@ ] ], [ - 530, + 631, [ { "TestLessThan": { @@ -3028,7 +3129,7 @@ ] ], [ - 553, + 654, [ { "TestLessThan": { @@ -3050,7 +3151,7 @@ ] ], [ - 573, + 674, [ { "TestLessThan": { @@ -3072,7 +3173,7 @@ ] ], [ - 600, + 701, [ { "TestLessThan": { @@ -3103,7 +3204,7 @@ ] ], [ - 626, + 727, [ { "AllocSegment": { @@ -3116,7 +3217,7 @@ ] ], [ - 643, + 744, [ { "AllocSegment": { @@ -3129,7 +3230,7 @@ ] ], [ - 669, + 770, [ { "AllocSegment": { @@ -3142,7 +3243,7 @@ ] ], [ - 688, + 789, [ { "TestLessThan": { @@ -3164,7 +3265,7 @@ ] ], [ - 692, + 793, [ { "LinearSplit": { @@ -3193,7 +3294,7 @@ ] ], [ - 702, + 803, [ { "LinearSplit": { @@ -3222,7 +3323,7 @@ ] ], [ - 710, + 811, [ { "AllocSegment": { @@ -3235,7 +3336,7 @@ ] ], [ - 732, + 833, [ { "SystemCall": { @@ -3250,7 +3351,7 @@ ] ], [ - 745, + 846, [ { "TestLessThan": { @@ -3275,7 +3376,7 @@ ] ], [ - 757, + 858, [ { "TestLessThan": { @@ -3297,7 +3398,7 @@ ] ], [ - 759, + 860, [ { "DivMod": { @@ -3323,7 +3424,7 @@ ] ], [ - 783, + 884, [ { "TestLessThan": { @@ -3348,7 +3449,7 @@ ] ], [ - 795, + 896, [ { "TestLessThan": { @@ -3370,7 +3471,7 @@ ] ], [ - 797, + 898, [ { "DivMod": { @@ -3396,7 +3497,7 @@ ] ], [ - 829, + 930, [ { "AllocSegment": { @@ -3409,7 +3510,7 @@ ] ], [ - 846, + 947, [ { "AllocSegment": { @@ -3422,7 +3523,7 @@ ] ], [ - 863, + 964, [ { "AllocSegment": { @@ -3435,7 +3536,7 @@ ] ], [ - 880, + 981, [ { "AllocSegment": { @@ -3448,7 +3549,7 @@ ] ], [ - 908, + 1009, [ { "AllocSegment": { @@ -3465,7 +3566,7 @@ [ 0, [ - "memory[ap + 0] = 2320 <= memory[fp + -6]" + "memory[ap + 0] = 4820 <= memory[fp + -6]" ] ], [ @@ -3501,7 +3602,7 @@ [ 155, [ - "memory[ap + 0] = 2570 <= memory[ap + -71]" + "memory[ap + 0] = 2570 <= memory[ap + -88]" ] ], [ @@ -3547,151 +3648,151 @@ ] ], [ - 486, + 587, [ "memory[ap + 0] = 24170 <= memory[fp + -11]" ] ], [ - 497, + 598, [ "memory[ap + -1] = memory[ap + 0] < 4294967296" ] ], [ - 530, + 631, [ "memory[ap + -1] = memory[ap + 0] < 340282366920938463463374607431768211456" ] ], [ - 553, + 654, [ "memory[ap + -1] = memory[ap + 0] < 340282366920938463463374607431768211456" ] ], [ - 573, + 674, [ "memory[ap + -1] = memory[ap + 0] < 340282366920938463463374607431768211456" ] ], [ - 600, + 701, [ "memory[ap + 0] = (memory[fp + -9] + memory[ap + -1]) % PRIME < 4294967296" ] ], [ - 626, + 727, [ "memory[ap + 0] = segments.add()" ] ], [ - 643, + 744, [ "memory[ap + 0] = segments.add()" ] ], [ - 669, + 770, [ "memory[ap + 0] = segments.add()" ] ], [ - 688, + 789, [ "memory[ap + 4] = memory[ap + -1] < 3618502788666131106986593281521497120414687020801267626233049500247285301248" ] ], [ - 692, + 793, [ "\n(value, scalar) = (memory[ap + 3], 313594649253062377472)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -2] = x\nmemory[ap + -1] = y\n" ] ], [ - 702, + 803, [ "\n(value, scalar) = (memory[ap + -2], 10633823966279326983230456482242756608)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -1] = x\nmemory[ap + 0] = y\n" ] ], [ - 710, + 811, [ "memory[ap + 0] = segments.add()" ] ], [ - 732, + 833, [ "syscall_handler.syscall(syscall_ptr=memory[fp + -8])" ] ], [ - 745, + 846, [ "memory[ap + 0] = memory[ap + -6] < memory[ap + -1]" ] ], [ - 757, + 858, [ "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" ] ], [ - 759, + 860, [ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], [ - 783, + 884, [ "memory[ap + 0] = memory[ap + -2] < memory[ap + -1]" ] ], [ - 795, + 896, [ "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" ] ], [ - 797, + 898, [ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], [ - 829, + 930, [ "memory[ap + 0] = segments.add()" ] ], [ - 846, + 947, [ "memory[ap + 0] = segments.add()" ] ], [ - 863, + 964, [ "memory[ap + 0] = segments.add()" ] ], [ - 880, + 981, [ "memory[ap + 0] = segments.add()" ] ], [ - 908, + 1009, [ "memory[ap + 0] = segments.add()" ] From 57e7c25a8fbdfacac4335ed9313b9daf44fe5bab Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Thu, 18 Jul 2024 19:46:11 +0200 Subject: [PATCH 17/73] compute_tasks_hash_v2 --- src/merkle.cairo | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/merkle.cairo b/src/merkle.cairo index f8ba267d..174e8639 100644 --- a/src/merkle.cairo +++ b/src/merkle.cairo @@ -86,21 +86,35 @@ func compute_tasks_hash_v2{ }(program_hash: felt, inputs: felt*, inputs_len: felt) -> Uint256 { alloc_locals; - let (input_hash) = keccak_felts_bigend{ - range_check_ptr=range_check_ptr, bitwise_ptr=bitwise_ptr, keccak_ptr=keccak_ptr - }(n_elements=inputs_len, elements=inputs); + local data: felt* = nondet %{ segments.add() %}; + local offset: Uint256 = Uint256(low=0x40, high=0x0); + local input_length: Uint256 = Uint256(low=inputs_len, high=0x0); - %{ print("Inputs Hash:", hex(ids.input_hash.high * 2 ** 128 + ids.input_hash.low)) %} + assert data[0] = program_hash; + assert data[1] = offset.high; + assert data[2] = offset.low; + assert data[3] = input_length.high; + assert data[4] = input_length.low; - let conv_program_hash = felt_to_uint256(program_hash); + let data = data[5]; - let (pair: Uint256*) = alloc(); - assert pair[0] = conv_program_hash; - assert pair[1] = input_hash; + tempvar i = 0; + + copy_loop: + let i = [ap - 1]; + if (i == inputs_len) { + jmp end_loop; + } + + assert data[i] = inputs[i]; + [ap] = i + 1, ap++; + jmp copy_loop; + + end_loop: - let (task_hash) = keccak_uint256s_bigend{ + let (task_hash) = keccak_felts_bigend{ range_check_ptr=range_check_ptr, bitwise_ptr=bitwise_ptr, keccak_ptr=keccak_ptr - }(n_elements=2, elements=pair); + }(n_elements=inputs_len+5, elements=data); return task_hash; } From 6336198beecd8bac26c85008c01ef90f33f10017 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Fri, 19 Jul 2024 11:42:34 +0200 Subject: [PATCH 18/73] wip --- cairo/src/memorizer/account_memorizer.cairo | 2 +- .../execute_syscalls.cairo | 2 +- .../memorizer/account_memorizer.py | 2 +- snfoundry.toml | 2 +- src/hdp_input.json | 1201 ++++++++++------- src/merkle.cairo | 9 +- 6 files changed, 695 insertions(+), 523 deletions(-) diff --git a/cairo/src/memorizer/account_memorizer.cairo b/cairo/src/memorizer/account_memorizer.cairo index 0cdcbad9..eaa8b6ff 100644 --- a/cairo/src/memorizer/account_memorizer.cairo +++ b/cairo/src/memorizer/account_memorizer.cairo @@ -4,7 +4,7 @@ use starknet::{SyscallResult, SyscallResultTrait}; const ACCOUNT_MEMORIZER_ID: felt252 = 0x1; -const ACCOUNT_MEMORIZER_GET_BALANCE_ID: felt252 = 0x0; +const ACCOUNT_MEMORIZER_GET_BALANCE_ID: felt252 = 0x1; #[derive(Serde, Drop)] pub struct AccountKey { diff --git a/packages/contract_bootloader/execute_syscalls.cairo b/packages/contract_bootloader/execute_syscalls.cairo index 1f975a8e..4c505a02 100644 --- a/packages/contract_bootloader/execute_syscalls.cairo +++ b/packages/contract_bootloader/execute_syscalls.cairo @@ -59,7 +59,7 @@ namespace MemorizerId { } namespace AccountMemorizerFunctionId { - const GET_BALANCE = 0; + const GET_BALANCE = 1; } // Executes a syscall that calls another contract. diff --git a/packages/contract_bootloader/memorizer/account_memorizer.py b/packages/contract_bootloader/memorizer/account_memorizer.py index fab3d723..8493287b 100644 --- a/packages/contract_bootloader/memorizer/account_memorizer.py +++ b/packages/contract_bootloader/memorizer/account_memorizer.py @@ -8,7 +8,7 @@ class MemorizerFunctionId(Enum): - GET_BALANCE = 0 + GET_BALANCE = 1 @classmethod def from_int(cls, value: int): diff --git a/snfoundry.toml b/snfoundry.toml index 96b5143d..2ea84ea2 100644 --- a/snfoundry.toml +++ b/snfoundry.toml @@ -1,4 +1,4 @@ [sncast.testnet] account = "testnet-sepolia" accounts-file = "~/.starknet_accounts/starknet_open_zeppelin_accounts.json" -url = "https://free-rpc.nethermind.io/sepolia-juno/v0_7" \ No newline at end of file +url = "https://pathfinder.sepolia.iosis.tech/" \ No newline at end of file diff --git a/src/hdp_input.json b/src/hdp_input.json index 98931b33..fb098607 100644 --- a/src/hdp_input.json +++ b/src/hdp_input.json @@ -1,30 +1,137 @@ { "cairo_run_output_path": "cairo_run_output.json", - "task_root": "0xa51a6cc7bc840aec540121e72180d35414db998f26ecb1eda7c8896baaf451b7", - "result_root": "0x5fe7dd5abe72bbb124c33cbd4b25dfc1ccebe944a918dfd5a93015f85589e117", + "task_root": "0xd5bebffa1a6bd30a791b99a7b5debe341fab1ddb9b1baa21c86828b3e60494e9", + "result_root": "0xf8d8233646456e43b3d79f8e165fd0ff8edf9eab4cf1322ae9ce4d2d0dd76ce3", "proofs": { - "mmr_metas": [{ - "id": 27, - "root": "0x492627ffa5084ec078f4d461408dfaa50b504a022c5471452d598da0040c066", - "size": 13024091, - "peaks": [ - "0x262c4c9b1cb2a036924aecf563dc9952e5f8b41004310adde86f22abb793eb1", - "0x10b39aed56c8f244a1df559c944ada6f12b7238f8c06a2c243ba4276b8059b0", - "0x46f45f218ea3aec481f350cda528a6f9f926a2dd53dae302e2cb610e5f152c7", - "0x1d52a06e6d02569893a1d842c00bb67c044be541c614e88613d7fc7187e18c1", - "0x770ebf618a589c17e3dc05bda7121acbedc0b48cd25f2943dc43f395f8bf0db", - "0x7263e878f7deafdc49b47da57f8594d477e572d3ac2bec27bb73860a35b1899", - "0x7b9e99f008949f9ee33d2965708ac6773a57965514df6383d55de104a39ab8c", - "0x28f6ccdcd38f6be6c437d100fcd62604c3293e31342a777dc37c712869ab08c", - "0x13d87197fe5d6f646a57dc918dcbef210737020dca9b89537fd8718ac69da3e", - "0x7eef4b790b56858c0232b494034d4c8699112d88f358209f71f02d5e93a7084", - "0x25cd2f0b579c902c41ac26df96ed5b21e16a3127dce2b471973dc86eb4c099f", - "0x5fdedfd0123b7461d5b3162fe82f7f3172c42fda6209415367870086f7c7918", - "0x7c0a415d5a6c4c90fd2dde1b340c3be305a72aa3b758dd26b8d7b4a78b53681" - ], - "chain_id": 11155111 - }], + "mmr_metas": [ + { + "id": 27, + "root": "0x492627ffa5084ec078f4d461408dfaa50b504a022c5471452d598da0040c066", + "size": 13024091, + "peaks": [ + "0x262c4c9b1cb2a036924aecf563dc9952e5f8b41004310adde86f22abb793eb1", + "0x10b39aed56c8f244a1df559c944ada6f12b7238f8c06a2c243ba4276b8059b0", + "0x46f45f218ea3aec481f350cda528a6f9f926a2dd53dae302e2cb610e5f152c7", + "0x1d52a06e6d02569893a1d842c00bb67c044be541c614e88613d7fc7187e18c1", + "0x770ebf618a589c17e3dc05bda7121acbedc0b48cd25f2943dc43f395f8bf0db", + "0x7263e878f7deafdc49b47da57f8594d477e572d3ac2bec27bb73860a35b1899", + "0x7b9e99f008949f9ee33d2965708ac6773a57965514df6383d55de104a39ab8c", + "0x28f6ccdcd38f6be6c437d100fcd62604c3293e31342a777dc37c712869ab08c", + "0x13d87197fe5d6f646a57dc918dcbef210737020dca9b89537fd8718ac69da3e", + "0x7eef4b790b56858c0232b494034d4c8699112d88f358209f71f02d5e93a7084", + "0x25cd2f0b579c902c41ac26df96ed5b21e16a3127dce2b471973dc86eb4c099f", + "0x5fdedfd0123b7461d5b3162fe82f7f3172c42fda6209415367870086f7c7918", + "0x7c0a415d5a6c4c90fd2dde1b340c3be305a72aa3b758dd26b8d7b4a78b53681" + ], + "chain_id": 11155111 + } + ], "headers": [ + { + "rlp": [ + "0x26400d37a04102f9", + "0x2051c2b236035188", + "0x684242b9dff023b", + "0x1df35e94dc7e86ae", + "0x4dcc1da0085b324d", + "0xb585ab7a5dc7dee8", + "0x4512d31ad4ccb667", + "0x42a1f013748a941b", + "0xcb13944793d440fd", + "0x4d7f97a0134ae36a", + "0x23bb874bc2eb0171", + "0xf5c2968698a0d5f0", + "0xa9546b27ed06b52b", + "0x94ab3ffc793e2add", + "0xe841e932753ab1d8", + "0xe001926ba07e7c2e", + "0xc27d5a64d86dd96a", + "0x1c030189615b4daa", + "0x8b3c9ecd562c85a", + "0x3c0c71a05e60ba16", + "0xedf338f821750595", + "0x6e5cc3fb4ab8e7a8", + "0x98c57d0650e5f7b7", + "0x1b9ba32d98671", + "0x48522109c65227e8", + "0x384640112295d925", + "0x504a301e34011905", + "0x1803acd54e009405", + "0x8944448004440562", + "0xca241500008824aa", + "0x6092a34686135ace", + "0x820164a00090c085", + "0x802245202450090", + "0xab00a18a4a00b852", + "0x24a8504541c0585", + "0x4a4000c20105401a", + "0x1a42490e0c406088", + "0x8e284916454a82c6", + "0x4080608ad0a44984", + "0x508c4a0012880281", + "0x64a210989020b602", + "0xc1523008256b2934", + "0x4dc204905518000", + "0x41104c8490e02128", + "0x7e89a4e81600089e", + "0x2884488102284168", + "0x2b99009f1220409a", + "0xc5a0c21f22299164", + "0xb8084207108350", + "0x1018132a81008803", + "0x44a400454303010", + "0x8ff2709800b80140", + "0x528821e34bc2d08a", + "0xca8a0a800900009", + "0xc001244a288c5826", + "0x16260004d466281", + "0xc90184e5214f8380", + "0x658457d1f68380c3", + "0x756c6c499f144eb9", + "0x44206574616e696d", + "0x7a69746172636f6d", + "0x6269727473442065", + "0xe9c3dc64a0657475", + "0xfb66a396cc302611", + "0x32c1ff3ed429a6ed", + "0x1523a487d871bf30", + "0x88a9c52c1e", + "0x4601850000000000", + "0xa6b809f0a02e9fae", + "0xfc4ad77783d05270", + "0x3b4c65ca7a376705", + "0x7815fdbd4a25c9cc", + "0x3b801f32" + ], + "rlp_bytes_len": 580, + "proof": { + "leaf_idx": 1521898, + "mmr_path": [ + "0x5b5df03578b03a53f15245e98dc34fabd51e5e349ce852738bad940e641266a", + "0x4751e9833ffe590494bd269b46391a8f474aa5224183e126f9d6ee75b4d9f26", + "0x3b508668f7d92d379884c79d9031878cbaeb3fa28f053f48b57a7502e45611c", + "0x6ae0557449080a7745c6ad43b21c6f6f57d452817b23b77b5c2ff3d8ccb3760", + "0x593ac29a8b112e2bd247cad0b7b016786ad04217bee18f5e0ea41127ba23f75", + "0x787989b47e298c397a0a6123049fb85d5bd2f962ed9149ee6df656dbc605dda", + "0x6984af357d277724980ece2c11e93d6b6e14200715769b3fd9cbc9a0eaf29c7", + "0x61bc1b0b3467541328174831626b59bcebaec7ef9fda196df6895acfaca4ace", + "0x4fa6272ed7dae6104f103fdec5b82c09f8006abfc9e8e9bc44cff298749599c", + "0x4c9f22576f8d894fd2f992221402ee2d0a703c35c9e1d114f31411b13246bfc", + "0x5b620a5f345977ec7fd3bdeba082078594768bc2fac155ba33b1eab8885a069", + "0x572b3407be5793b54c558f5a7d9d4fb194aea5b14f2b2b7e2c8f526cefbde18", + "0x716621bd5c6f555cca5badd2849633fea9f506876642b58f985f6ab1de6340c", + "0x019df1b143b7076f7c8db2d84794c5bf29be24dbcd64d6a7482c7ff5490486f", + "0x145418fa00ec0102943417073ea3015c793e55e1a11f303aef71a154b2d418c", + "0x164770888e7afc464c2c3a956cf13d2aaf4b5786baec8424357e46f8e1968b2", + "0x46034840abeb358ce87e74d2963f6fb9c655841b31df46eab6e2b784b35d82c", + "0x4b2dfec0bb9b57c4e7ac16cedcd3ff50f381f7ab2df50bcfa3596308f79135a", + "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", + "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", + "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", + "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" + ] + } + }, { "rlp": [ "0xa2c4089da03c02f9", @@ -229,209 +336,118 @@ "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" ] } - }, - { - "rlp": [ - "0x26400d37a04102f9", - "0x2051c2b236035188", - "0x684242b9dff023b", - "0x1df35e94dc7e86ae", - "0x4dcc1da0085b324d", - "0xb585ab7a5dc7dee8", - "0x4512d31ad4ccb667", - "0x42a1f013748a941b", - "0xcb13944793d440fd", - "0x4d7f97a0134ae36a", - "0x23bb874bc2eb0171", - "0xf5c2968698a0d5f0", - "0xa9546b27ed06b52b", - "0x94ab3ffc793e2add", - "0xe841e932753ab1d8", - "0xe001926ba07e7c2e", - "0xc27d5a64d86dd96a", - "0x1c030189615b4daa", - "0x8b3c9ecd562c85a", - "0x3c0c71a05e60ba16", - "0xedf338f821750595", - "0x6e5cc3fb4ab8e7a8", - "0x98c57d0650e5f7b7", - "0x1b9ba32d98671", - "0x48522109c65227e8", - "0x384640112295d925", - "0x504a301e34011905", - "0x1803acd54e009405", - "0x8944448004440562", - "0xca241500008824aa", - "0x6092a34686135ace", - "0x820164a00090c085", - "0x802245202450090", - "0xab00a18a4a00b852", - "0x24a8504541c0585", - "0x4a4000c20105401a", - "0x1a42490e0c406088", - "0x8e284916454a82c6", - "0x4080608ad0a44984", - "0x508c4a0012880281", - "0x64a210989020b602", - "0xc1523008256b2934", - "0x4dc204905518000", - "0x41104c8490e02128", - "0x7e89a4e81600089e", - "0x2884488102284168", - "0x2b99009f1220409a", - "0xc5a0c21f22299164", - "0xb8084207108350", - "0x1018132a81008803", - "0x44a400454303010", - "0x8ff2709800b80140", - "0x528821e34bc2d08a", - "0xca8a0a800900009", - "0xc001244a288c5826", - "0x16260004d466281", - "0xc90184e5214f8380", - "0x658457d1f68380c3", - "0x756c6c499f144eb9", - "0x44206574616e696d", - "0x7a69746172636f6d", - "0x6269727473442065", - "0xe9c3dc64a0657475", - "0xfb66a396cc302611", - "0x32c1ff3ed429a6ed", - "0x1523a487d871bf30", - "0x88a9c52c1e", - "0x4601850000000000", - "0xa6b809f0a02e9fae", - "0xfc4ad77783d05270", - "0x3b4c65ca7a376705", - "0x7815fdbd4a25c9cc", - "0x3b801f32" - ], - "rlp_bytes_len": 580, - "proof": { - "leaf_idx": 1521898, - "mmr_path": [ - "0x5b5df03578b03a53f15245e98dc34fabd51e5e349ce852738bad940e641266a", - "0x4751e9833ffe590494bd269b46391a8f474aa5224183e126f9d6ee75b4d9f26", - "0x3b508668f7d92d379884c79d9031878cbaeb3fa28f053f48b57a7502e45611c", - "0x6ae0557449080a7745c6ad43b21c6f6f57d452817b23b77b5c2ff3d8ccb3760", - "0x593ac29a8b112e2bd247cad0b7b016786ad04217bee18f5e0ea41127ba23f75", - "0x787989b47e298c397a0a6123049fb85d5bd2f962ed9149ee6df656dbc605dda", - "0x6984af357d277724980ece2c11e93d6b6e14200715769b3fd9cbc9a0eaf29c7", - "0x61bc1b0b3467541328174831626b59bcebaec7ef9fda196df6895acfaca4ace", - "0x4fa6272ed7dae6104f103fdec5b82c09f8006abfc9e8e9bc44cff298749599c", - "0x4c9f22576f8d894fd2f992221402ee2d0a703c35c9e1d114f31411b13246bfc", - "0x5b620a5f345977ec7fd3bdeba082078594768bc2fac155ba33b1eab8885a069", - "0x572b3407be5793b54c558f5a7d9d4fb194aea5b14f2b2b7e2c8f526cefbde18", - "0x716621bd5c6f555cca5badd2849633fea9f506876642b58f985f6ab1de6340c", - "0x019df1b143b7076f7c8db2d84794c5bf29be24dbcd64d6a7482c7ff5490486f", - "0x145418fa00ec0102943417073ea3015c793e55e1a11f303aef71a154b2d418c", - "0x164770888e7afc464c2c3a956cf13d2aaf4b5786baec8424357e46f8e1968b2", - "0x46034840abeb358ce87e74d2963f6fb9c655841b31df46eab6e2b784b35d82c", - "0x4b2dfec0bb9b57c4e7ac16cedcd3ff50f381f7ab2df50bcfa3596308f79135a", - "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", - "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", - "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", - "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" - ] - } } ], "accounts": [ { - "address": ["0x97a0134ae36acb13", "0x874bc2eb01714d7f", "0xd5f023bb"], + "address": [ + "0x97a0134ae36acb13", + "0x874bc2eb01714d7f", + "0xd5f023bb" + ], "account_key": "0x8ad2b901594e58a241532055dfe914294630ed5c33ffc31905452799f9b4aab0", "proofs": [ { - "block_number": 5186021, - "proof_bytes_len": [532, 532, 532, 532, 532, 436, 147, 83, 104], + "block_number": 5186023, + "proof_bytes_len": [ + 532, + 532, + 532, + 532, + 532, + 436, + 147, + 83, + 104 + ], "proof": [ [ - "0xe0cd1db9a01102f9", - "0xa14d3bb2862563e6", - "0x70e4db75915c9636", - "0xaec7e6a5b2c27dc2", - "0x2935f5a0e7122aca", - "0xb5b3ad19dc4eb821", - "0x3b91dcafa579fbe2", - "0x686db0215398e26d", - "0xa72aa0cf3a7a9014", - "0x6567fbd49323bc14", - "0xe34cd2f396e033f7", - "0x707532681b146e78", - "0x8ea001b8da6a97f5", - "0x5f30286d7cc0dbe4", - "0x542adf1c07d7f631", - "0x2740bf38b12d5d5a", - "0xa0e83549f281629b", - "0xf7bbc83f064b0353", - "0x2b80a96ddad69f6", - "0x9c3331ebc8f0eca3", - "0xe1d2011e616de763", - "0x1af35c190c5ff0a0", - "0x2f099b5ccfe5b09a", - "0xf5f0a02c1b627496", - "0x5df7f938afe597cc", - "0x67edec108083a00a", - "0x4e95c350254b6dee", - "0xef7bf5fd504496d1", - "0x7d1b848ce5135f0e", - "0x231549d434a0a0d7", - "0xc2f998c7f2e9a07f", - "0x4832b44b767cad58", - "0xcac3d2b7c575e109", - "0x862a4a2da0198935", - "0xf02bfde41c180bb0", - "0x9d5aabd6317198f0", - "0x4b07ebe2f6a502fd", - "0x6571c5a06e43502e", - "0x7e01d4aa20c8e6a5", - "0xf23047a7cbc87301", - "0x8117ff061405cc81", - "0xa3eba06df9cfd7d7", - "0xd826e0532db0b5d4", - "0x884b85573586c8c0", - "0x9a598f3bfb4290d7", - "0xdaa0d323fc97880a", - "0xba2b821dad75883b", - "0xcd3d26f0e81d5656", - "0x52cd6baaea88126", - "0xa0ac20f46b287d0a", - "0x7855a45ce13fc327", - "0x1d92fd6e3a34cacf", - "0x968d0982250f06e5", - "0x9bdb55a66bc067ba", - "0x9c658ec05785f4a0", - "0x3ad8be6e8daa819a", - "0x9936a22d00c8a120", - "0x826772caea15a651", - "0xfc876705be88a0ba", - "0x3a36a65ce58cebc0", - "0xe62fcacc361e0836", - "0x96a0a7092938293a", - "0x78e066810ea043ad", - "0x93b19da040839c35", - "0x432f387d0fe20dbb", - "0x197d099cd23057bc", - "0x805e72a8" + "0x58444a19a01102f9", + "0x6186aa6c4bc2f7f5", + "0x6184b7400645ceb8", + "0x3432964db06ab3fa", + "0x5798e0a01aa7c11e", + "0x69c22a52bbd3da36", + "0xc193223917a9e4d5", + "0x5d16e5da8393253e", + "0xd1aea0adbb62b640", + "0x7f69eb2eae8ad843", + "0xeff40cb50c390b52", + "0xad7a89c1ae3d5a01", + "0x51a089f820fcd629", + "0xe20558b8b776455d", + "0x10f8bd05fb96d051", + "0xfb1767334c91ceed", + "0xa09fcceaf965a8a3", + "0x101d508f191dfb8e", + "0x5bb5986074297ab9", + "0x3e0bf1dd917913e0", + "0x3e36b93acd6e2eea", + "0xc88425cf6da209a0", + "0xfcb2166cd45e503e", + "0xe65bb3922725d69b", + "0x800a431934b6d1a7", + "0x8bb03acfb08ba041", + "0xcc1b0a7dc223167b", + "0xd84f206f0caa9606", + "0xb32389c0d2d6977c", + "0xf62965f9a6a0bcab", + "0xdd36c65f0faad792", + "0xead9cccb6a889923", + "0xc0dcabd20910bd4", + "0xc44f224ca034ac90", + "0x49ec9e9e2beb786d", + "0x92818730075c99b2", + "0x786ad2678143d2a1", + "0x13293ba099aa8534", + "0xfa4e5074579f71ce", + "0x742e1850d3e32270", + "0x1d2c0a57888d87ff", + "0x3166a0bff089e666", + "0x4db2002e17450b44", + "0x12e4183aab01a0ac", + "0x80035805dc8e1ab5", + "0xc3a00955c3ad3941", + "0xa63804703e4267a2", + "0x3a106468d3dc7203", + "0x9fb70db168fdc96c", + "0xa0a832ac509828fb", + "0x7ef632aa0f1cc00", + "0x5c2123aba626012a", + "0x35109a6575dbd707", + "0xe9a2d7571c0db0a3", + "0x67e9ba3837d041a0", + "0x4127470df1024135", + "0xddfd667cf6bc5239", + "0x2742eba7a44bae42", + "0x79f9db0a20fa038", + "0xbc64f3ab69c82752", + "0x9a19ce6f2f1e0b46", + "0x2f86d39b6ed70147", + "0xc2495bcb12a0aba4", + "0xb98551cad578ca95", + "0x65f799018826d439", + "0x6e588e68abc35e2b", + "0x800100d6" ], [ - "0xb234669ca01102f9", - "0xa514acded44cdcfd", - "0xce1fc4ae557828c5", - "0x4d03d4eaefe0b5a4", - "0x5ebaa00ac42047", - "0x6d64f363db5ff755", - "0xf34c1f7346e39b13", - "0x57c795c7d9a47ec6", - "0x22bda03111568be0", - "0xe34860413e495932", - "0x3aab05ace194bcdc", - "0x74c8e078f209328d", - "0xeaa0fffbb5171935", - "0x7f5589bcdb15412e", - "0xdde3c93dc089245f", - "0xd8fd736ca136a614", - "0xa016f7ef94a462b8", + "0x9872fa8ba01102f9", + "0xebf32a01c304911b", + "0x7a90055f9401af09", + "0xc2ba94afe0afe786", + "0x2f611ca0e690fc3c", + "0x390432baa62b1a9c", + "0xca085e0f40b93f89", + "0x29c27ae3f970b810", + "0xbd61a0348697ea23", + "0xa44ae2ff8e39cb97", + "0x6fc8d2b6e578cd7c", + "0x1e826e42f9ad3011", + "0xc6a0a0f182a6676c", + "0xdb9c4dc5b4c03eb8", + "0xb2aec4fcde466b5d", + "0xca5a8a2ffb11d58", + "0xa04952eb424ede4f", "0xcf0538fb63aad0e9", "0xb26d3e80af58fdf5", "0x20ca30148b2cec11", @@ -440,48 +456,48 @@ "0x955f28c7518cfc49", "0xb4be12419fce2f7b", "0x773a029286892019", - "0xd1293be70b65a06f", - "0x30876b01f78024fa", - "0xa01ce8a717136cbc", - "0xa4343b72c435eaa2", - "0x2ea46ddcd9a07380", - "0x6895c381d439aa3e", - "0xb48f4760627d9664", - "0x7e95272413581907", - "0x1487b0b4a009cb6c", + "0xfcc56c3d2015a06f", + "0x64aac5a84cae088e", + "0xfa553497f5842d68", + "0x427cb9bce0af3b1b", + "0xfe7dbdb928a0af56", + "0xb1e5b3ff64efb8e4", + "0x93ac8fc710c859e2", + "0xf428706c93752615", + "0x1487b0b4a0a1c9cc", "0xd44cbea352feca7a", "0x6dc058cae697e48d", "0x8659ed45c7db8c69", - "0x7ce74aa08db158a9", - "0x564d9a064d0d3c2", - "0xa585d9c2b3a50627", - "0x593872a183de1500", - "0x138ea0b9b7e46808", + "0x562c19a08db158a9", + "0xe414bdf4b7b4ea52", + "0x300d204a6a0f4698", + "0xe9b4e532fbe5297c", + "0x138ea0de0a724737", "0x16bda1dac8b25389", "0xa1dc3981db0b5286", "0x5aae51ed9b411bd4", - "0xf6a0e73edf470da8", - "0x6090d8651fa2f6ac", - "0x5a69f8785ae6c8dc", - "0xceaf9ef7b58f48d3", - "0xa0fb6044f34c4680", - "0xd3a88757f243a6a4", - "0xb75f6bcf43e90852", - "0x44c9974d979d2be8", - "0xab1d380a9d5f00e", + "0x85a0e73edf470da8", + "0xbcf54c26f2702ecb", + "0x64b9e0044cbd4c16", + "0x3328de9d25006830", + "0xa0d0c9c72af81dec", + "0x87a68bcceca88565", + "0xf87e863d3afa3ca9", + "0xa536665210fb6e0c", + "0x936f481ec643e73c", "0xd9a3d455f75fd2a0", "0xab3a7fc6a1d33828", "0xae5e998f387e2891", "0xee2b8a2c2c03186a", - "0xde6ed0b1b955a0e4", - "0xfa6bdfeffedccc63", - "0x3d91aa809af2dbbf", - "0xda17eb79d5185449", - "0xc579977dea0164d", - "0x88cea7f4eec1f0ba", - "0x42a3f8b633052428", - "0x39012bdf2dbfc373", - "0x802cfb9b" + "0x6663d5b55563a0e4", + "0xb041ee83b314d7a2", + "0x5745d9f896165267", + "0xb04b843caa6605fb", + "0xdccd8b7ccaa06355", + "0x4bd24db9c1106802", + "0x2be0ebdc7e9a4f28", + "0x9f42696729e380d4", + "0x80eb8545" ], [ "0xc40409caa01102f9", @@ -776,115 +792,125 @@ "0x80808080d16c4da8", "0xda5d26326c8ba080", "0xfa0d187d28e2397a", - "0x4eb95b8e08b4e0bc", - "0x7f323b88311b42cc", - "0x8080808080803c90", - "0x808080" - ], - [ - "0xa2584e59209d66f8", - "0x2914e9df55205341", - "0x19c3ff335ced3046", - "0xb0aab4f999274505", - "0x56a0800144f846b8", - "0xffa655cc1b171fe8", - "0x5b6ef8c092e64583", - "0x1c0ad6c991be048", - "0xa021b463e3b52f62", - "0x3c23f7860146d2c5", - "0xc003c7dcb27d7e92", - "0x3b2782ca53b600e5", - "0x70a4855d04d8fa7b" - ] - ] - }, - { - "block_number": 5186022, - "proof_bytes_len": [532, 532, 532, 532, 532, 436, 147, 83, 104], - "proof": [ - [ - "0xa56441cca01102f9", - "0x485779b9ac3e33da", - "0x45bba8cc7cab8b88", - "0x97f1a360d0fc4298", - "0xda5d4ba0cd0fee2a", - "0x4cea18af7c23d4a0", - "0x67290fdc761585b0", - "0x46c75fe72480cfcc", - "0x30dba091f5da704c", - "0xf5ffdb29cc6cdc1a", - "0xac4fb8743ce7cc12", - "0x8f093f32b732af4f", - "0xda0aa25fed40548", - "0xfd7a9beb227fe053", - "0xd570d52b2115ea5f", - "0xfe229a0827fc520f", - "0xa012454939c57e5c", - "0x21c9887e8ee3f3b1", - "0x5156b1ebfc356cf7", - "0x472d2d64d9ff9480", - "0xd98b7ec0bf9199a7", - "0xa67222f4c5bdcda0", - "0xcb44efdda2e66b74", - "0xac7624bf37444d9d", - "0xa07fca47762cdbf", - "0x2779f753784ca07e", - "0xb5696d5ba2df3e6a", - "0xe1accfc5d1c49211", - "0xea31e9b0f0cbd29b", - "0xeab1a6bca0a0f663", - "0x697d9b97b06c60b5", - "0x9c47e390d62b89a0", - "0x798dbe2cd348cdd2", - "0xf73b544fa04ca910", - "0xcc8a0d2bed50be8a", - "0x61a57b36a1879202", - "0xa73ca0ba46fd8dea", - "0x8b4bbda0c664f43b", - "0x175c3dff5bd40cb7", - "0xbd660f7dca4e90e6", - "0x22854668ebefbe42", - "0xd68a0640b490553", - "0x1c02474bce1b1166", - "0x2fb2f9451cba664a", - "0x80fe06bb9ad35e9a", - "0x5ba05f2c78048e7f", - "0xb5f31e7738ded2ba", - "0xf447594f1998bb5f", - "0x27cd80c48ed1f15d", - "0xa09bd8e385d9f9db", - "0x8ae951222b70f58d", - "0xf52b0ebec8f25e3f", - "0xfed270af9a1469e", - "0x2b3f02042fc5b693", - "0x6ae28be870b10a0", - "0x16291604b227317a", - "0x8dac0fbce38ceefd", - "0xace93a8dc1fb0612", - "0xbc530efeb3ca0fd", - "0xb450cf74a528f7cb", - "0x8d160635de93de22", - "0x442e0f173e0f2b12", - "0xf81b15653aa0471f", - "0xa7bda111d440a7e6", - "0x12e35ee20d909c5", - "0x852d8e1515ad2c3e", - "0x807d369a" + "0x4eb95b8e08b4e0bc", + "0x7f323b88311b42cc", + "0x8080808080803c90", + "0x808080" ], [ - "0x2203510a01102f9", - "0x9b6493f1eafbce8f", - "0xcab50cf7550ea03", - "0xa6166a1fc684449d", - "0x2f611ca0278a613f", - "0x390432baa62b1a9c", - "0xca085e0f40b93f89", - "0x29c27ae3f970b810", - "0x4f11a0348697ea23", - "0x15fae1bdff89aae", - "0x2d379662a57f6c3e", - "0x94b9e0fa577c0bd9", - "0xeaa073b2b96e399c", + "0xa2584e59209d66f8", + "0x2914e9df55205341", + "0x19c3ff335ced3046", + "0xb0aab4f999274505", + "0x56a0800144f846b8", + "0xffa655cc1b171fe8", + "0x5b6ef8c092e64583", + "0x1c0ad6c991be048", + "0xa021b463e3b52f62", + "0x3c23f7860146d2c5", + "0xc003c7dcb27d7e92", + "0x3b2782ca53b600e5", + "0x70a4855d04d8fa7b" + ] + ] + }, + { + "block_number": 5186021, + "proof_bytes_len": [ + 532, + 532, + 532, + 532, + 532, + 436, + 147, + 83, + 104 + ], + "proof": [ + [ + "0xe0cd1db9a01102f9", + "0xa14d3bb2862563e6", + "0x70e4db75915c9636", + "0xaec7e6a5b2c27dc2", + "0x2935f5a0e7122aca", + "0xb5b3ad19dc4eb821", + "0x3b91dcafa579fbe2", + "0x686db0215398e26d", + "0xa72aa0cf3a7a9014", + "0x6567fbd49323bc14", + "0xe34cd2f396e033f7", + "0x707532681b146e78", + "0x8ea001b8da6a97f5", + "0x5f30286d7cc0dbe4", + "0x542adf1c07d7f631", + "0x2740bf38b12d5d5a", + "0xa0e83549f281629b", + "0xf7bbc83f064b0353", + "0x2b80a96ddad69f6", + "0x9c3331ebc8f0eca3", + "0xe1d2011e616de763", + "0x1af35c190c5ff0a0", + "0x2f099b5ccfe5b09a", + "0xf5f0a02c1b627496", + "0x5df7f938afe597cc", + "0x67edec108083a00a", + "0x4e95c350254b6dee", + "0xef7bf5fd504496d1", + "0x7d1b848ce5135f0e", + "0x231549d434a0a0d7", + "0xc2f998c7f2e9a07f", + "0x4832b44b767cad58", + "0xcac3d2b7c575e109", + "0x862a4a2da0198935", + "0xf02bfde41c180bb0", + "0x9d5aabd6317198f0", + "0x4b07ebe2f6a502fd", + "0x6571c5a06e43502e", + "0x7e01d4aa20c8e6a5", + "0xf23047a7cbc87301", + "0x8117ff061405cc81", + "0xa3eba06df9cfd7d7", + "0xd826e0532db0b5d4", + "0x884b85573586c8c0", + "0x9a598f3bfb4290d7", + "0xdaa0d323fc97880a", + "0xba2b821dad75883b", + "0xcd3d26f0e81d5656", + "0x52cd6baaea88126", + "0xa0ac20f46b287d0a", + "0x7855a45ce13fc327", + "0x1d92fd6e3a34cacf", + "0x968d0982250f06e5", + "0x9bdb55a66bc067ba", + "0x9c658ec05785f4a0", + "0x3ad8be6e8daa819a", + "0x9936a22d00c8a120", + "0x826772caea15a651", + "0xfc876705be88a0ba", + "0x3a36a65ce58cebc0", + "0xe62fcacc361e0836", + "0x96a0a7092938293a", + "0x78e066810ea043ad", + "0x93b19da040839c35", + "0x432f387d0fe20dbb", + "0x197d099cd23057bc", + "0x805e72a8" + ], + [ + "0xb234669ca01102f9", + "0xa514acded44cdcfd", + "0xce1fc4ae557828c5", + "0x4d03d4eaefe0b5a4", + "0x5ebaa00ac42047", + "0x6d64f363db5ff755", + "0xf34c1f7346e39b13", + "0x57c795c7d9a47ec6", + "0x22bda03111568be0", + "0xe34860413e495932", + "0x3aab05ace194bcdc", + "0x74c8e078f209328d", + "0xeaa0fffbb5171935", "0x7f5589bcdb15412e", "0xdde3c93dc089245f", "0xd8fd736ca136a614", @@ -897,15 +923,15 @@ "0x955f28c7518cfc49", "0xb4be12419fce2f7b", "0x773a029286892019", - "0xd5b4924cbd96a06f", - "0x90e1fae24960eed4", - "0x898f646d618fe2da", - "0x4ffd46ba2191ffcc", - "0x23feafcdaa083d7", - "0xc1b401d92b41c162", - "0xaf55e71b1cc32c0b", - "0x295c5bfb1a52901a", - "0x1487b0b4a06896cc", + "0xd1293be70b65a06f", + "0x30876b01f78024fa", + "0xa01ce8a717136cbc", + "0xa4343b72c435eaa2", + "0x2ea46ddcd9a07380", + "0x6895c381d439aa3e", + "0xb48f4760627d9664", + "0x7e95272413581907", + "0x1487b0b4a009cb6c", "0xd44cbea352feca7a", "0x6dc058cae697e48d", "0x8659ed45c7db8c69", @@ -917,15 +943,15 @@ "0x16bda1dac8b25389", "0xa1dc3981db0b5286", "0x5aae51ed9b411bd4", - "0x86a0e73edf470da8", - "0x4f09e70d776da168", - "0x1cbfd4c4ce386f3", - "0xaab65a74219a1a2f", - "0xa02a061e70248482", - "0x829fcd24f9eec9d4", - "0xa55445bad38a715", - "0x15844d0c36e329f", - "0x9d093fbf60fdff33", + "0xf6a0e73edf470da8", + "0x6090d8651fa2f6ac", + "0x5a69f8785ae6c8dc", + "0xceaf9ef7b58f48d3", + "0xa0fb6044f34c4680", + "0xd3a88757f243a6a4", + "0xb75f6bcf43e90852", + "0x44c9974d979d2be8", + "0xab1d380a9d5f00e", "0xd9a3d455f75fd2a0", "0xab3a7fc6a1d33828", "0xae5e998f387e2891", @@ -1256,96 +1282,106 @@ ] }, { - "block_number": 5186023, - "proof_bytes_len": [532, 532, 532, 532, 532, 436, 147, 83, 104], + "block_number": 5186022, + "proof_bytes_len": [ + 532, + 532, + 532, + 532, + 532, + 436, + 147, + 83, + 104 + ], "proof": [ [ - "0x58444a19a01102f9", - "0x6186aa6c4bc2f7f5", - "0x6184b7400645ceb8", - "0x3432964db06ab3fa", - "0x5798e0a01aa7c11e", - "0x69c22a52bbd3da36", - "0xc193223917a9e4d5", - "0x5d16e5da8393253e", - "0xd1aea0adbb62b640", - "0x7f69eb2eae8ad843", - "0xeff40cb50c390b52", - "0xad7a89c1ae3d5a01", - "0x51a089f820fcd629", - "0xe20558b8b776455d", - "0x10f8bd05fb96d051", - "0xfb1767334c91ceed", - "0xa09fcceaf965a8a3", - "0x101d508f191dfb8e", - "0x5bb5986074297ab9", - "0x3e0bf1dd917913e0", - "0x3e36b93acd6e2eea", - "0xc88425cf6da209a0", - "0xfcb2166cd45e503e", - "0xe65bb3922725d69b", - "0x800a431934b6d1a7", - "0x8bb03acfb08ba041", - "0xcc1b0a7dc223167b", - "0xd84f206f0caa9606", - "0xb32389c0d2d6977c", - "0xf62965f9a6a0bcab", - "0xdd36c65f0faad792", - "0xead9cccb6a889923", - "0xc0dcabd20910bd4", - "0xc44f224ca034ac90", - "0x49ec9e9e2beb786d", - "0x92818730075c99b2", - "0x786ad2678143d2a1", - "0x13293ba099aa8534", - "0xfa4e5074579f71ce", - "0x742e1850d3e32270", - "0x1d2c0a57888d87ff", - "0x3166a0bff089e666", - "0x4db2002e17450b44", - "0x12e4183aab01a0ac", - "0x80035805dc8e1ab5", - "0xc3a00955c3ad3941", - "0xa63804703e4267a2", - "0x3a106468d3dc7203", - "0x9fb70db168fdc96c", - "0xa0a832ac509828fb", - "0x7ef632aa0f1cc00", - "0x5c2123aba626012a", - "0x35109a6575dbd707", - "0xe9a2d7571c0db0a3", - "0x67e9ba3837d041a0", - "0x4127470df1024135", - "0xddfd667cf6bc5239", - "0x2742eba7a44bae42", - "0x79f9db0a20fa038", - "0xbc64f3ab69c82752", - "0x9a19ce6f2f1e0b46", - "0x2f86d39b6ed70147", - "0xc2495bcb12a0aba4", - "0xb98551cad578ca95", - "0x65f799018826d439", - "0x6e588e68abc35e2b", - "0x800100d6" + "0xa56441cca01102f9", + "0x485779b9ac3e33da", + "0x45bba8cc7cab8b88", + "0x97f1a360d0fc4298", + "0xda5d4ba0cd0fee2a", + "0x4cea18af7c23d4a0", + "0x67290fdc761585b0", + "0x46c75fe72480cfcc", + "0x30dba091f5da704c", + "0xf5ffdb29cc6cdc1a", + "0xac4fb8743ce7cc12", + "0x8f093f32b732af4f", + "0xda0aa25fed40548", + "0xfd7a9beb227fe053", + "0xd570d52b2115ea5f", + "0xfe229a0827fc520f", + "0xa012454939c57e5c", + "0x21c9887e8ee3f3b1", + "0x5156b1ebfc356cf7", + "0x472d2d64d9ff9480", + "0xd98b7ec0bf9199a7", + "0xa67222f4c5bdcda0", + "0xcb44efdda2e66b74", + "0xac7624bf37444d9d", + "0xa07fca47762cdbf", + "0x2779f753784ca07e", + "0xb5696d5ba2df3e6a", + "0xe1accfc5d1c49211", + "0xea31e9b0f0cbd29b", + "0xeab1a6bca0a0f663", + "0x697d9b97b06c60b5", + "0x9c47e390d62b89a0", + "0x798dbe2cd348cdd2", + "0xf73b544fa04ca910", + "0xcc8a0d2bed50be8a", + "0x61a57b36a1879202", + "0xa73ca0ba46fd8dea", + "0x8b4bbda0c664f43b", + "0x175c3dff5bd40cb7", + "0xbd660f7dca4e90e6", + "0x22854668ebefbe42", + "0xd68a0640b490553", + "0x1c02474bce1b1166", + "0x2fb2f9451cba664a", + "0x80fe06bb9ad35e9a", + "0x5ba05f2c78048e7f", + "0xb5f31e7738ded2ba", + "0xf447594f1998bb5f", + "0x27cd80c48ed1f15d", + "0xa09bd8e385d9f9db", + "0x8ae951222b70f58d", + "0xf52b0ebec8f25e3f", + "0xfed270af9a1469e", + "0x2b3f02042fc5b693", + "0x6ae28be870b10a0", + "0x16291604b227317a", + "0x8dac0fbce38ceefd", + "0xace93a8dc1fb0612", + "0xbc530efeb3ca0fd", + "0xb450cf74a528f7cb", + "0x8d160635de93de22", + "0x442e0f173e0f2b12", + "0xf81b15653aa0471f", + "0xa7bda111d440a7e6", + "0x12e35ee20d909c5", + "0x852d8e1515ad2c3e", + "0x807d369a" ], [ - "0x9872fa8ba01102f9", - "0xebf32a01c304911b", - "0x7a90055f9401af09", - "0xc2ba94afe0afe786", - "0x2f611ca0e690fc3c", + "0x2203510a01102f9", + "0x9b6493f1eafbce8f", + "0xcab50cf7550ea03", + "0xa6166a1fc684449d", + "0x2f611ca0278a613f", "0x390432baa62b1a9c", "0xca085e0f40b93f89", "0x29c27ae3f970b810", - "0xbd61a0348697ea23", - "0xa44ae2ff8e39cb97", - "0x6fc8d2b6e578cd7c", - "0x1e826e42f9ad3011", - "0xc6a0a0f182a6676c", - "0xdb9c4dc5b4c03eb8", - "0xb2aec4fcde466b5d", - "0xca5a8a2ffb11d58", - "0xa04952eb424ede4f", + "0x4f11a0348697ea23", + "0x15fae1bdff89aae", + "0x2d379662a57f6c3e", + "0x94b9e0fa577c0bd9", + "0xeaa073b2b96e399c", + "0x7f5589bcdb15412e", + "0xdde3c93dc089245f", + "0xd8fd736ca136a614", + "0xa016f7ef94a462b8", "0xcf0538fb63aad0e9", "0xb26d3e80af58fdf5", "0x20ca30148b2cec11", @@ -1354,48 +1390,48 @@ "0x955f28c7518cfc49", "0xb4be12419fce2f7b", "0x773a029286892019", - "0xfcc56c3d2015a06f", - "0x64aac5a84cae088e", - "0xfa553497f5842d68", - "0x427cb9bce0af3b1b", - "0xfe7dbdb928a0af56", - "0xb1e5b3ff64efb8e4", - "0x93ac8fc710c859e2", - "0xf428706c93752615", - "0x1487b0b4a0a1c9cc", + "0xd5b4924cbd96a06f", + "0x90e1fae24960eed4", + "0x898f646d618fe2da", + "0x4ffd46ba2191ffcc", + "0x23feafcdaa083d7", + "0xc1b401d92b41c162", + "0xaf55e71b1cc32c0b", + "0x295c5bfb1a52901a", + "0x1487b0b4a06896cc", "0xd44cbea352feca7a", "0x6dc058cae697e48d", "0x8659ed45c7db8c69", - "0x562c19a08db158a9", - "0xe414bdf4b7b4ea52", - "0x300d204a6a0f4698", - "0xe9b4e532fbe5297c", - "0x138ea0de0a724737", + "0x7ce74aa08db158a9", + "0x564d9a064d0d3c2", + "0xa585d9c2b3a50627", + "0x593872a183de1500", + "0x138ea0b9b7e46808", "0x16bda1dac8b25389", "0xa1dc3981db0b5286", "0x5aae51ed9b411bd4", - "0x85a0e73edf470da8", - "0xbcf54c26f2702ecb", - "0x64b9e0044cbd4c16", - "0x3328de9d25006830", - "0xa0d0c9c72af81dec", - "0x87a68bcceca88565", - "0xf87e863d3afa3ca9", - "0xa536665210fb6e0c", - "0x936f481ec643e73c", + "0x86a0e73edf470da8", + "0x4f09e70d776da168", + "0x1cbfd4c4ce386f3", + "0xaab65a74219a1a2f", + "0xa02a061e70248482", + "0x829fcd24f9eec9d4", + "0xa55445bad38a715", + "0x15844d0c36e329f", + "0x9d093fbf60fdff33", "0xd9a3d455f75fd2a0", "0xab3a7fc6a1d33828", "0xae5e998f387e2891", "0xee2b8a2c2c03186a", - "0x6663d5b55563a0e4", - "0xb041ee83b314d7a2", - "0x5745d9f896165267", - "0xb04b843caa6605fb", - "0xdccd8b7ccaa06355", - "0x4bd24db9c1106802", - "0x2be0ebdc7e9a4f28", - "0x9f42696729e380d4", - "0x80eb8545" + "0xde6ed0b1b955a0e4", + "0xfa6bdfeffedccc63", + "0x3d91aa809af2dbbf", + "0xda17eb79d5185449", + "0xc579977dea0164d", + "0x88cea7f4eec1f0ba", + "0x42a3f8b633052428", + "0x39012bdf2dbfc373", + "0x802cfb9b" ], [ "0xc40409caa01102f9", @@ -2450,7 +2486,7 @@ "0x400180037fff7ffc", "0x400180047fff7ffd", "0x480680017fff8000", - "0x0", + "0x1", "0x48127ffe7fff8000", "0x482480017ffd8000", "0x5", @@ -2656,7 +2692,12 @@ "0x1", "0x208b7fff7fff7ffe" ], - "bytecode_segment_lengths": [305, 181, 200, 237], + "bytecode_segment_lengths": [ + 305, + 181, + 200, + 237 + ], "hints": [ [ 0, @@ -3421,10 +3462,17 @@ ] ], "pythonic_hints": [ - [0, ["memory[ap + 0] = 2320 <= memory[fp + -6]"]], + [ + 0, + [ + "memory[ap + 0] = 2320 <= memory[fp + -6]" + ] + ], [ 40, - ["memory[ap + 0] = (memory[ap + -1] + 0) % PRIME < 4294967296"] + [ + "memory[ap + 0] = (memory[ap + -1] + 0) % PRIME < 4294967296" + ] ], [ 44, @@ -3434,7 +3482,9 @@ ], [ 86, - ["memory[ap + 0] = (memory[ap + -1] + 0) % PRIME < 4294967296"] + [ + "memory[ap + 0] = (memory[ap + -1] + 0) % PRIME < 4294967296" + ] ], [ 90, @@ -3442,17 +3492,72 @@ "\n(value, scalar) = (memory[ap + -1], 10633823966279327296825105735305134080)\nx = min(value // scalar, 340282366920938463463374607431768211454)\ny = value - x * scalar\nmemory[ap + 0] = x\nmemory[ap + 1] = y\n" ] ], - [136, ["memory[ap + 0] = segments.add()"]], - [155, ["memory[ap + 0] = 2570 <= memory[ap + -71]"]], - [184, ["memory[ap + 0] = segments.add()"]], - [205, ["memory[ap + 0] = segments.add()"]], - [220, ["memory[ap + 0] = segments.add()"]], - [241, ["memory[ap + 0] = segments.add()"]], - [262, ["memory[ap + 0] = segments.add()"]], - [276, ["memory[ap + 0] = segments.add()"]], - [290, ["memory[ap + 0] = segments.add()"]], - [486, ["memory[ap + 0] = 24170 <= memory[fp + -11]"]], - [497, ["memory[ap + -1] = memory[ap + 0] < 4294967296"]], + [ + 136, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 155, + [ + "memory[ap + 0] = 2570 <= memory[ap + -71]" + ] + ], + [ + 184, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 205, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 220, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 241, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 262, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 276, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 290, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 486, + [ + "memory[ap + 0] = 24170 <= memory[fp + -11]" + ] + ], + [ + 497, + [ + "memory[ap + -1] = memory[ap + 0] < 4294967296" + ] + ], [ 530, [ @@ -3477,9 +3582,24 @@ "memory[ap + 0] = (memory[fp + -9] + memory[ap + -1]) % PRIME < 4294967296" ] ], - [626, ["memory[ap + 0] = segments.add()"]], - [643, ["memory[ap + 0] = segments.add()"]], - [669, ["memory[ap + 0] = segments.add()"]], + [ + 626, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 643, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 669, + [ + "memory[ap + 0] = segments.add()" + ] + ], [ 688, [ @@ -3498,9 +3618,24 @@ "\n(value, scalar) = (memory[ap + -2], 10633823966279326983230456482242756608)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -1] = x\nmemory[ap + 0] = y\n" ] ], - [710, ["memory[ap + 0] = segments.add()"]], - [732, ["syscall_handler.syscall(syscall_ptr=memory[fp + -8])"]], - [745, ["memory[ap + 0] = memory[ap + -6] < memory[ap + -1]"]], + [ + 710, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 732, + [ + "syscall_handler.syscall(syscall_ptr=memory[fp + -8])" + ] + ], + [ + 745, + [ + "memory[ap + 0] = memory[ap + -6] < memory[ap + -1]" + ] + ], [ 757, [ @@ -3513,7 +3648,12 @@ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], - [783, ["memory[ap + 0] = memory[ap + -2] < memory[ap + -1]"]], + [ + 783, + [ + "memory[ap + 0] = memory[ap + -2] < memory[ap + -1]" + ] + ], [ 795, [ @@ -3526,18 +3666,45 @@ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], - [829, ["memory[ap + 0] = segments.add()"]], - [846, ["memory[ap + 0] = segments.add()"]], - [863, ["memory[ap + 0] = segments.add()"]], - [880, ["memory[ap + 0] = segments.add()"]], - [908, ["memory[ap + 0] = segments.add()"]] + [ + 829, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 846, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 863, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 880, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 908, + [ + "memory[ap + 0] = segments.add()" + ] + ] ], "entry_points_by_type": { "EXTERNAL": [ { "selector": "0xe2054f8a912367e38a22ce773328ff8aabf8082c4120bad9ef085e1dbf29a7", "offset": 0, - "builtins": ["range_check"] + "builtins": [ + "range_check" + ] } ], "L1_HANDLER": [], @@ -3547,4 +3714,4 @@ } } ] -} +} \ No newline at end of file diff --git a/src/merkle.cairo b/src/merkle.cairo index 174e8639..97e247d1 100644 --- a/src/merkle.cairo +++ b/src/merkle.cairo @@ -96,7 +96,7 @@ func compute_tasks_hash_v2{ assert data[3] = input_length.high; assert data[4] = input_length.low; - let data = data[5]; + let data_copy: felt* = data + 5; tempvar i = 0; @@ -106,7 +106,7 @@ func compute_tasks_hash_v2{ jmp end_loop; } - assert data[i] = inputs[i]; + assert data_copy[i] = inputs[i]; [ap] = i + 1, ap++; jmp copy_loop; @@ -116,6 +116,11 @@ func compute_tasks_hash_v2{ range_check_ptr=range_check_ptr, bitwise_ptr=bitwise_ptr, keccak_ptr=keccak_ptr }(n_elements=inputs_len+5, elements=data); + %{ + print(hex(ids.task_hash.low)) + print(hex(ids.task_hash.high)) + %} + return task_hash; } From c1a75fa062525d43c0c90eb0809446b1ed77ca49 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Fri, 19 Jul 2024 12:43:33 +0200 Subject: [PATCH 19/73] cairo1 package --- cairo/src/memorizer/account_memorizer.cairo | 50 +++++++- cairo/src/memorizer/header_memorizer.cairo | 122 +++++++++++++++++++- cairo/src/memorizer/storage_memorizer.cairo | 2 +- 3 files changed, 171 insertions(+), 3 deletions(-) diff --git a/cairo/src/memorizer/account_memorizer.cairo b/cairo/src/memorizer/account_memorizer.cairo index 1f6964fe..c41d45cc 100644 --- a/cairo/src/memorizer/account_memorizer.cairo +++ b/cairo/src/memorizer/account_memorizer.cairo @@ -2,7 +2,7 @@ use hdp_cairo::Memorizer; use starknet::syscalls::call_contract_syscall; use starknet::{SyscallResult, SyscallResultTrait}; -const ACCOUNT_MEMORIZER: felt252 = 0x1; +const ACCOUNT_MEMORIZER: felt252 = 1; const ACCOUNT_MEMORIZER_GET_NONCE: felt252 = 0; const ACCOUNT_MEMORIZER_GET_BALANCE: felt252 = 1; @@ -18,6 +18,22 @@ pub struct AccountKey { #[generate_trait] pub impl AccountMemorizerImpl of AccountMemorizerTrait { + fn get_nonce(self: @Memorizer, key: AccountKey) -> u256 { + let value = call_contract_syscall( + ACCOUNT_MEMORIZER.try_into().unwrap(), + ACCOUNT_MEMORIZER_GET_NONCE, + array![ + *self.dict.segment_index, + *self.dict.offset, + key.chain_id, + key.block_number, + key.address, + ] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } fn get_balance(self: @Memorizer, key: AccountKey) -> u256 { let value = call_contract_syscall( ACCOUNT_MEMORIZER.try_into().unwrap(), @@ -34,4 +50,36 @@ pub impl AccountMemorizerImpl of AccountMemorizerTrait { .unwrap_syscall(); u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } } + fn get_state_root(self: @Memorizer, key: AccountKey) -> u256 { + let value = call_contract_syscall( + ACCOUNT_MEMORIZER.try_into().unwrap(), + ACCOUNT_MEMORIZER_GET_STATE_ROOT, + array![ + *self.dict.segment_index, + *self.dict.offset, + key.chain_id, + key.block_number, + key.address, + ] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } + fn get_code_hash(self: @Memorizer, key: AccountKey) -> u256 { + let value = call_contract_syscall( + ACCOUNT_MEMORIZER.try_into().unwrap(), + ACCOUNT_MEMORIZER_GET_CODE_HASH, + array![ + *self.dict.segment_index, + *self.dict.offset, + key.chain_id, + key.block_number, + key.address, + ] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } } diff --git a/cairo/src/memorizer/header_memorizer.cairo b/cairo/src/memorizer/header_memorizer.cairo index 7c47af9c..57113fc2 100644 --- a/cairo/src/memorizer/header_memorizer.cairo +++ b/cairo/src/memorizer/header_memorizer.cairo @@ -2,7 +2,7 @@ use hdp_cairo::Memorizer; use starknet::syscalls::call_contract_syscall; use starknet::{SyscallResult, SyscallResultTrait}; -const HEADER_MEMORIZER: felt252 = 0x0; +const HEADER_MEMORIZER: felt252 = 0; const HEADER_MEMORIZER_GET_PARENT: felt252 = 0; const HEADER_MEMORIZER_GET_UNCLE: felt252 = 1; @@ -43,4 +43,124 @@ pub impl HeaderMemorizerImpl of HeaderMemorizerTrait { .unwrap_syscall(); u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } } + fn get_uncle(self: @Memorizer, key: HeaderKey) -> u256 { + let value = call_contract_syscall( + HEADER_MEMORIZER.try_into().unwrap(), + HEADER_MEMORIZER_GET_UNCLE, + array![*self.dict.segment_index, *self.dict.offset, key.chain_id, key.block_number,] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } + fn get_coinbase(self: @Memorizer, key: HeaderKey) -> u256 { + let value = call_contract_syscall( + HEADER_MEMORIZER.try_into().unwrap(), + HEADER_MEMORIZER_GET_COINBASE, + array![*self.dict.segment_index, *self.dict.offset, key.chain_id, key.block_number,] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } + fn get_state_root(self: @Memorizer, key: HeaderKey) -> u256 { + let value = call_contract_syscall( + HEADER_MEMORIZER.try_into().unwrap(), + HEADER_MEMORIZER_GET_STATE_ROOT, + array![*self.dict.segment_index, *self.dict.offset, key.chain_id, key.block_number,] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } + fn get_transaction_root(self: @Memorizer, key: HeaderKey) -> u256 { + let value = call_contract_syscall( + HEADER_MEMORIZER.try_into().unwrap(), + HEADER_MEMORIZER_GET_TRANSACTION_ROOT, + array![*self.dict.segment_index, *self.dict.offset, key.chain_id, key.block_number,] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } + fn get_receipt_root(self: @Memorizer, key: HeaderKey) -> u256 { + let value = call_contract_syscall( + HEADER_MEMORIZER.try_into().unwrap(), + HEADER_MEMORIZER_GET_RECEIPT_ROOT, + array![*self.dict.segment_index, *self.dict.offset, key.chain_id, key.block_number,] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } + fn get_difficulty(self: @Memorizer, key: HeaderKey) -> u256 { + let value = call_contract_syscall( + HEADER_MEMORIZER.try_into().unwrap(), + HEADER_MEMORIZER_GET_DIFFICULTY, + array![*self.dict.segment_index, *self.dict.offset, key.chain_id, key.block_number,] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } + fn get_number(self: @Memorizer, key: HeaderKey) -> u256 { + let value = call_contract_syscall( + HEADER_MEMORIZER.try_into().unwrap(), + HEADER_MEMORIZER_GET_NUMBER, + array![*self.dict.segment_index, *self.dict.offset, key.chain_id, key.block_number,] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } + fn get_gas_limit(self: @Memorizer, key: HeaderKey) -> u256 { + let value = call_contract_syscall( + HEADER_MEMORIZER.try_into().unwrap(), + HEADER_MEMORIZER_GET_GAS_LIMIT, + array![*self.dict.segment_index, *self.dict.offset, key.chain_id, key.block_number,] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } + fn get_gas_used(self: @Memorizer, key: HeaderKey) -> u256 { + let value = call_contract_syscall( + HEADER_MEMORIZER.try_into().unwrap(), + HEADER_MEMORIZER_GET_GAS_USED, + array![*self.dict.segment_index, *self.dict.offset, key.chain_id, key.block_number,] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } + fn get_mix_hash(self: @Memorizer, key: HeaderKey) -> u256 { + let value = call_contract_syscall( + HEADER_MEMORIZER.try_into().unwrap(), + HEADER_MEMORIZER_GET_MIX_HASH, + array![*self.dict.segment_index, *self.dict.offset, key.chain_id, key.block_number,] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } + fn get_nonce(self: @Memorizer, key: HeaderKey) -> u256 { + let value = call_contract_syscall( + HEADER_MEMORIZER.try_into().unwrap(), + HEADER_MEMORIZER_GET_NONCE, + array![*self.dict.segment_index, *self.dict.offset, key.chain_id, key.block_number,] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } + fn get_base_fee_per_gas(self: @Memorizer, key: HeaderKey) -> u256 { + let value = call_contract_syscall( + HEADER_MEMORIZER.try_into().unwrap(), + HEADER_MEMORIZER_GET_BASE_FEE_PER_GAS, + array![*self.dict.segment_index, *self.dict.offset, key.chain_id, key.block_number,] + .span() + ) + .unwrap_syscall(); + u256 { low: (*value[0]).try_into().unwrap(), high: (*value[1]).try_into().unwrap() } + } } diff --git a/cairo/src/memorizer/storage_memorizer.cairo b/cairo/src/memorizer/storage_memorizer.cairo index 3cbddb7a..a74a80f2 100644 --- a/cairo/src/memorizer/storage_memorizer.cairo +++ b/cairo/src/memorizer/storage_memorizer.cairo @@ -2,7 +2,7 @@ use hdp_cairo::Memorizer; use starknet::syscalls::call_contract_syscall; use starknet::{SyscallResult, SyscallResultTrait}; -const STORAGE_MEMORIZER: felt252 = 0x2; +const STORAGE_MEMORIZER: felt252 = 2; const STORAGE_MEMORIZER_GET_SLOT: felt252 = 0; From 54e1ceda8dfd9de04e07dbc2c0c92112ebf7e646 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Fri, 19 Jul 2024 13:00:19 +0200 Subject: [PATCH 20/73] fix --- cairo/src/memorizer/storage_memorizer.cairo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cairo/src/memorizer/storage_memorizer.cairo b/cairo/src/memorizer/storage_memorizer.cairo index a74a80f2..87b675ea 100644 --- a/cairo/src/memorizer/storage_memorizer.cairo +++ b/cairo/src/memorizer/storage_memorizer.cairo @@ -15,7 +15,7 @@ pub struct StorageKey { } #[generate_trait] -pub impl AccountMemorizerImpl of AccountMemorizerTrait { +pub impl StorageMemorizerImpl of StorageMemorizerTrait { fn get_slot(self: @Memorizer, key: StorageKey) -> u256 { let value = call_contract_syscall( STORAGE_MEMORIZER.try_into().unwrap(), From da36ef02595bffd113b9badc2d5dff09c957f503 Mon Sep 17 00:00:00 2001 From: Pia Date: Fri, 19 Jul 2024 13:49:27 +0200 Subject: [PATCH 21/73] wip --- src/hdp.cairo | 3 --- src/merkle.cairo | 30 +++++++++++++++++------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/hdp.cairo b/src/hdp.cairo index 7abbb0dd..1fcce044 100644 --- a/src/hdp.cairo +++ b/src/hdp.cairo @@ -194,9 +194,6 @@ func run{ // Post Verification Checks: Ensure the roots match the expected roots %{ - if "result_root" in program_input: - assert ids.results_root.high * 2 ** 128 + ids.results_root.low == hex_to_int(program_input["result_root"]), "Expected results root mismatch" - if "task_root" in program_input: assert ids.tasks_root.high * 2 ** 128 + ids.tasks_root.low == hex_to_int(program_input["task_root"]), "Expected results root mismatch" %} diff --git a/src/merkle.cairo b/src/merkle.cairo index 97e247d1..8a744050 100644 --- a/src/merkle.cairo +++ b/src/merkle.cairo @@ -86,17 +86,16 @@ func compute_tasks_hash_v2{ }(program_hash: felt, inputs: felt*, inputs_len: felt) -> Uint256 { alloc_locals; - local data: felt* = nondet %{ segments.add() %}; + let (local data: Uint256*) = alloc(); local offset: Uint256 = Uint256(low=0x40, high=0x0); local input_length: Uint256 = Uint256(low=inputs_len, high=0x0); + let conv_program_hash: Uint256 = felt_to_uint256(program_hash); - assert data[0] = program_hash; - assert data[1] = offset.high; - assert data[2] = offset.low; - assert data[3] = input_length.high; - assert data[4] = input_length.low; + assert data[0] = conv_program_hash; + assert data[1] = offset; + assert data[2] = input_length; - let data_copy: felt* = data + 5; + let data_copy: Uint256* = data + 3; tempvar i = 0; @@ -111,16 +110,21 @@ func compute_tasks_hash_v2{ jmp copy_loop; end_loop: - - let (task_hash) = keccak_felts_bigend{ + let (task_hash) = keccak_uint256s_bigend{ range_check_ptr=range_check_ptr, bitwise_ptr=bitwise_ptr, keccak_ptr=keccak_ptr - }(n_elements=inputs_len+5, elements=data); + }(n_elements=inputs_len + 3, elements=data); %{ - print(hex(ids.task_hash.low)) - print(hex(ids.task_hash.high)) + print("Task hash:", ids.inputs_len) + for i in range(0, 6): + print("Task;", hex(memory[ids.data+i])) %} - + + %{ + target_hash = hex(ids.task_hash.low + ids.task_hash.high*2**128)[2:] + print(f"Task hash: 0x{target_hash}") + %} + return task_hash; } From 5da4bb0a18c6c145021387e20a53e9a717138895 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Fri, 19 Jul 2024 21:11:25 +0200 Subject: [PATCH 22/73] provider tests and fixes --- .../provider/account_key_provider.py | 16 ++++---- .../provider/evm_provider.py | 2 +- .../provider/storage_key_provider.py | 7 ++-- .../provider/test_account_key_provider.py | 40 +++++++++++++++++++ .../provider/test_header_key_provider.py | 23 +++++++++++ .../provider/test_storage_key_provider.py | 17 ++++++++ 6 files changed, 93 insertions(+), 12 deletions(-) create mode 100644 packages/contract_bootloader/provider/test_account_key_provider.py create mode 100644 packages/contract_bootloader/provider/test_header_key_provider.py create mode 100644 packages/contract_bootloader/provider/test_storage_key_provider.py diff --git a/packages/contract_bootloader/provider/account_key_provider.py b/packages/contract_bootloader/provider/account_key_provider.py index a23bdc55..ba0e5873 100644 --- a/packages/contract_bootloader/provider/account_key_provider.py +++ b/packages/contract_bootloader/provider/account_key_provider.py @@ -8,8 +8,8 @@ def __init__(self, provider_url: str): super().__init__(provider_url=provider_url) def get_nonce(self, key: MemorizerKey) -> int: - address = Web3.toChecksumAddress(hex(key.address)) - if not self.web3.isAddress(address): + address = Web3.to_checksum_address(f"0x{key.address:040x}") + if not self.web3.is_address(address): raise ValueError(f"Invalid Ethereum address: {address}") try: @@ -21,8 +21,8 @@ def get_nonce(self, key: MemorizerKey) -> int: raise Exception(f"An error occurred while fetching the nonce: {e}") def get_balance(self, key: MemorizerKey) -> int: - address = Web3.toChecksumAddress(hex(key.address)) - if not self.web3.isAddress(address): + address = Web3.to_checksum_address(f"0x{key.address:040x}") + if not self.web3.is_address(address): raise ValueError(f"Invalid Ethereum address: {address}") try: @@ -36,17 +36,17 @@ def get_balance(self, key: MemorizerKey) -> int: def get_state_root(self, key: MemorizerKey) -> int: try: block = self.web3.eth.get_block(key.block_number) - return int(block["stateRoot"], 16) + return int(block["stateRoot"].hex(), 16) except Exception as e: raise Exception(f"An error occurred while fetching the state root: {e}") def get_code_hash(self, key: MemorizerKey) -> int: - address = Web3.toChecksumAddress(hex(key.address)) - if not self.web3.isAddress(address): + address = Web3.to_checksum_address(f"0x{key.address:040x}") + if not self.web3.is_address(address): raise ValueError(f"Invalid Ethereum address: {address}") try: code = self.web3.eth.get_code(address, block_identifier=key.block_number) - return int(Web3.sha3(code).hex(), 16) + return int(Web3.keccak(code).hex(), 16) except Exception as e: raise Exception(f"An error occurred while fetching the code hash: {e}") diff --git a/packages/contract_bootloader/provider/evm_provider.py b/packages/contract_bootloader/provider/evm_provider.py index f85f3d72..6da1ae63 100644 --- a/packages/contract_bootloader/provider/evm_provider.py +++ b/packages/contract_bootloader/provider/evm_provider.py @@ -5,7 +5,7 @@ class EVMProvider(ABC): def __init__(self, provider_url: str): self.web3 = Web3(Web3.HTTPProvider(provider_url)) - if not self.web3.isConnected(): + if not self.web3.is_connected(): raise ValueError( f"Failed to connect to the Ethereum node at {provider_url}" ) diff --git a/packages/contract_bootloader/provider/storage_key_provider.py b/packages/contract_bootloader/provider/storage_key_provider.py index 1e28e62a..93393f15 100644 --- a/packages/contract_bootloader/provider/storage_key_provider.py +++ b/packages/contract_bootloader/provider/storage_key_provider.py @@ -8,8 +8,8 @@ def __init__(self, provider_url: str): super().__init__(provider_url=provider_url) def get_slot(self, key: MemorizerKey) -> int: - address = Web3.toChecksumAddress(hex(key.address)) - if not self.web3.isAddress(address): + address = Web3.to_checksum_address(f"0x{key.address:040x}") + if not self.web3.is_address(address): raise ValueError(f"Invalid Ethereum address: {address}") try: @@ -19,7 +19,8 @@ def get_slot(self, key: MemorizerKey) -> int: return int( self.web3.eth.get_storage_at( address, slot_key, block_identifier=key.block_number - ) + ).hex(), + 16, ) except Exception as e: raise Exception(f"An error occurred while fetching the parent block: {e}") diff --git a/packages/contract_bootloader/provider/test_account_key_provider.py b/packages/contract_bootloader/provider/test_account_key_provider.py new file mode 100644 index 00000000..2c7ee1b7 --- /dev/null +++ b/packages/contract_bootloader/provider/test_account_key_provider.py @@ -0,0 +1,40 @@ +from contract_bootloader.provider.account_key_provider import AccountKeyEVMProvider +from contract_bootloader.memorizer.account_memorizer import MemorizerKey + +EVM_PROVIDER_URL = "https://sepolia.ethereum.iosis.tech/" + + +def test_fetch_nonce(): + provider = AccountKeyEVMProvider(provider_url=EVM_PROVIDER_URL) + value = provider.get_nonce( + MemorizerKey( + chain_id=11155111, + block_number=1450630, + address=0x2F14582947E292A2ECD20C430B46F2D27CFE213C, + ) + ) + assert value == 7 + + +def test_fetch_balance(): + provider = AccountKeyEVMProvider(provider_url=EVM_PROVIDER_URL) + value = provider.get_balance( + MemorizerKey( + chain_id=11155111, + block_number=1450630, + address=0x2F14582947E292A2ECD20C430B46F2D27CFE213C, + ) + ) + assert value == 432838615909525980931010 + + +def test_fetch_state_root(): + provider = AccountKeyEVMProvider(provider_url=EVM_PROVIDER_URL) + value = provider.get_state_root( + MemorizerKey( + chain_id=11155111, + block_number=1450630, + address=0x2F14582947E292A2ECD20C430B46F2D27CFE213C, + ) + ) + assert value == 0xFE6DE8AD0447064B4D98632F12623FB06BBF6F31FF4718A746E371276D5F96A6 diff --git a/packages/contract_bootloader/provider/test_header_key_provider.py b/packages/contract_bootloader/provider/test_header_key_provider.py new file mode 100644 index 00000000..9ed16179 --- /dev/null +++ b/packages/contract_bootloader/provider/test_header_key_provider.py @@ -0,0 +1,23 @@ +from contract_bootloader.provider.header_key_provider import HeaderKeyEVMProvider +from contract_bootloader.memorizer.header_memorizer import MemorizerKey + +EVM_PROVIDER_URL = "https://sepolia.ethereum.iosis.tech/" + + +def test_fetch_block(): + provider = HeaderKeyEVMProvider(provider_url=EVM_PROVIDER_URL) + block = provider.get_block(MemorizerKey(chain_id=11155111, block_number=10000)) + + assert int(block["nonce"].hex(), 16) == 0xC7FAAF72B5AE7B05 + assert ( + int(block["parentHash"].hex(), 16) + == 0x1BF8C6858EF8AD67DD7EACEB34D99A3277C7B6E4A45A3C2A9135489B2586A8DB + ) + assert ( + int(block["sha3Uncles"].hex(), 16) + == 0x1DCC4DE8DEC75D7AAB85B567B6CCD41AD312451B948A7413F0A142FD40D49347 + ) + assert ( + int(block["stateRoot"].hex(), 16) + == 0x011416CBB9D766DC4FCABBB79515A1CAA4676EC62213B0EA8B346E807F8BCAEC + ) diff --git a/packages/contract_bootloader/provider/test_storage_key_provider.py b/packages/contract_bootloader/provider/test_storage_key_provider.py new file mode 100644 index 00000000..19d64c08 --- /dev/null +++ b/packages/contract_bootloader/provider/test_storage_key_provider.py @@ -0,0 +1,17 @@ +from contract_bootloader.provider.storage_key_provider import StorageKeyEVMProvider +from contract_bootloader.memorizer.storage_memorizer import MemorizerKey + +EVM_PROVIDER_URL = "https://sepolia.ethereum.iosis.tech/" + + +def test_fetch_slot(): + provider = StorageKeyEVMProvider(provider_url=EVM_PROVIDER_URL) + value = provider.get_slot( + MemorizerKey( + chain_id=11155111, + block_number=6338117, + address=0x0227628F3F023BB0B980B67D528571C95C6DAC1C, + storage_slot=(0x0, 0x0), + ) + ) + assert value == 0 From 594e12a8bef7f5f27a916ca0d513e3f2745d43fe Mon Sep 17 00:00:00 2001 From: Pia Date: Mon, 22 Jul 2024 11:56:37 +0200 Subject: [PATCH 23/73] module init --- src/hdp.cairo | 20 +- src/hdp_input.json | 920 +++++++++++++++++++++++---------------------- src/merkle.cairo | 2 +- src/module.cairo | 60 +++ src/temp.cairo | 22 ++ src/types.cairo | 6 + tools/py/schema.py | 7 +- 7 files changed, 576 insertions(+), 461 deletions(-) create mode 100644 src/module.cairo create mode 100644 src/temp.cairo diff --git a/src/hdp.cairo b/src/hdp.cairo index 1fcce044..933bc66a 100644 --- a/src/hdp.cairo +++ b/src/hdp.cairo @@ -15,7 +15,7 @@ from starkware.cairo.common.default_dict import default_dict_new, default_dict_f from starkware.cairo.common.builtin_keccak.keccak import keccak, keccak_bigend from src.verifiers.verify import run_state_verification - +from src.module import init_module from src.types import MMRMeta, ComputationalTask, ChainInfo from src.utils import write_output_ptr @@ -272,8 +272,10 @@ func compute_tasks{ } if (hdp_version == 2) { - local inputs_len: felt; - let (inputs) = alloc(); + // Task Params + local encoded_task_len: felt; + local task_bytes_len: felt; + let (encoded_task) = alloc(); %{ from tools.py.schema import CompiledClass @@ -281,11 +283,15 @@ func compute_tasks{ task = program_input["tasks"][0]["context"] compiled_class = CompiledClass.Schema().load(task["module_class"]) - ids.inputs_len = len(task["inputs"]) - segments.write_arg(ids.inputs, hex_to_int_array(task["inputs"])) + ids.task_bytes_len = task["task_bytes_len"] + ids.encoded_task_len = len(task["encoded_task"]) + + segments.write_arg(ids.encoded_task, hex_to_int_array(task["encoded_task"])) %} - let (result, program_hash) = compute_contract(inputs, inputs_len); + let (local module_task) = init_module(encoded_task, encoded_task_len); + + let (result, program_hash) = compute_contract(module_task.module_inputs, module_task.module_inputs_len); assert results[0] = result; %{ target_result = hex(ids.result.high * 2 ** 128 + ids.result.low) @@ -294,7 +300,7 @@ func compute_tasks{ let task_hash = compute_tasks_hash_v2{ range_check_ptr=range_check_ptr, bitwise_ptr=bitwise_ptr, keccak_ptr=keccak_ptr - }(program_hash=program_hash, inputs=inputs, inputs_len=inputs_len); + }(program_hash=program_hash, inputs=module_task.module_inputs, inputs_len= module_task.module_inputs_len); // %{ print("Task;", hex(ids.task_hash.high * 2 ** 128 + ids.task_hash.low)) %} diff --git a/src/hdp_input.json b/src/hdp_input.json index fb098607..f715b650 100644 --- a/src/hdp_input.json +++ b/src/hdp_input.json @@ -1,7 +1,7 @@ { "cairo_run_output_path": "cairo_run_output.json", - "task_root": "0xd5bebffa1a6bd30a791b99a7b5debe341fab1ddb9b1baa21c86828b3e60494e9", - "result_root": "0xf8d8233646456e43b3d79f8e165fd0ff8edf9eab4cf1322ae9ce4d2d0dd76ce3", + "task_root": "0xc927a9768e71948db44e0f674159298fdab90382a9d6aaf2a3631d332ae3cd4f", + "result_root": "0xf2240c14db3c2feca8ff613863720996520be1faec843e7d7a8d4006031308d3", "proofs": { "mmr_metas": [ { @@ -27,6 +27,110 @@ } ], "headers": [ + { + "rlp": [ + "0xa2c4089da03c02f9", + "0x2bce89e6d5f8587e", + "0xa15cc324f748751b", + "0x176ca7a076d396ae", + "0x4dcc1da013dc007d", + "0xb585ab7a5dc7dee8", + "0x4512d31ad4ccb667", + "0x42a1f013748a941b", + "0x609a944793d440fd", + "0xc19a4031d44cc834", + "0xdaff36dac77852a3", + "0xad707dc040a0e553", + "0xd4c2ae43a23f2bd9", + "0x38ea4bab5e8a8359", + "0x21b9d84b5bbb6b58", + "0x2880f0c3a069913c", + "0xc16c52cc54dfbd47", + "0xa962b7c9a137722b", + "0xb8e1d23facc43591", + "0x68ea09a0deff0e00", + "0xb3f740ca3f14626f", + "0xa3aca8f2b76cad43", + "0x9ef02f560f9aa7dc", + "0x1b9e1eaea0976", + "0x444b820bc4760008", + "0x5125398402549938", + "0x5209b1031090b9c0", + "0x300aaa308a21d40c", + "0x492201d024404040", + "0xda002433449a488e", + "0x10eb200e2020182", + "0x406124043398542f", + "0x19cad001ac40238", + "0x88047889db409840", + "0x15084930c1cb884", + "0x6042c34211092a63", + "0x500260822da161ca", + "0x652941842542c8c2", + "0x600082d1c8648800", + "0x435209a8a4920", + "0x4d0a5091e6020b2", + "0xc955300a040ba16c", + "0x90280c28741810", + "0x499940c420115d9c", + "0xe11a449380e0cdf", + "0x2480d60c00604248", + "0x3e8d091e12a01219", + "0x1860da066a249c24", + "0xb12180183819290", + "0xc1f0c01071003", + "0x15035a8014191614", + "0x3f7104a800a28102", + "0x606021a23082d4c9", + "0x88a000200481", + "0xda00142b20d29a8e", + "0xc9278ab440e43e1", + "0xc90184e6214f8380", + "0x84280627018480c3", + "0x183d899204eb965", + "0x8868746567840b0d", + "0x362e31322e316f67", + "0xd3a078756e696c85", + "0x923ffe54329a64ce", + "0xe664b4692332c5de", + "0xb46f6501a25537cc", + "0x882ceb57856f14eb", + "0x0", + "0x18a005d1e1490185", + "0x96ff33950e01687", + "0x52be51d588eae138", + "0xb575a1705b4e3c09", + "0x55aa60b375c9a9" + ], + "rlp_bytes_len": 575, + "proof": { + "leaf_idx": 1521897, + "mmr_path": [ + "0x09c4f998f67aeaaa13f6431812b34599dc12335897d57493c52e5cfa1183fc9", + "0x4751e9833ffe590494bd269b46391a8f474aa5224183e126f9d6ee75b4d9f26", + "0x3b508668f7d92d379884c79d9031878cbaeb3fa28f053f48b57a7502e45611c", + "0x6ae0557449080a7745c6ad43b21c6f6f57d452817b23b77b5c2ff3d8ccb3760", + "0x593ac29a8b112e2bd247cad0b7b016786ad04217bee18f5e0ea41127ba23f75", + "0x787989b47e298c397a0a6123049fb85d5bd2f962ed9149ee6df656dbc605dda", + "0x6984af357d277724980ece2c11e93d6b6e14200715769b3fd9cbc9a0eaf29c7", + "0x61bc1b0b3467541328174831626b59bcebaec7ef9fda196df6895acfaca4ace", + "0x4fa6272ed7dae6104f103fdec5b82c09f8006abfc9e8e9bc44cff298749599c", + "0x4c9f22576f8d894fd2f992221402ee2d0a703c35c9e1d114f31411b13246bfc", + "0x5b620a5f345977ec7fd3bdeba082078594768bc2fac155ba33b1eab8885a069", + "0x572b3407be5793b54c558f5a7d9d4fb194aea5b14f2b2b7e2c8f526cefbde18", + "0x716621bd5c6f555cca5badd2849633fea9f506876642b58f985f6ab1de6340c", + "0x019df1b143b7076f7c8db2d84794c5bf29be24dbcd64d6a7482c7ff5490486f", + "0x145418fa00ec0102943417073ea3015c793e55e1a11f303aef71a154b2d418c", + "0x164770888e7afc464c2c3a956cf13d2aaf4b5786baec8424357e46f8e1968b2", + "0x46034840abeb358ce87e74d2963f6fb9c655841b31df46eab6e2b784b35d82c", + "0x4b2dfec0bb9b57c4e7ac16cedcd3ff50f381f7ab2df50bcfa3596308f79135a", + "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", + "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", + "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", + "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" + ] + } + }, { "rlp": [ "0x26400d37a04102f9", @@ -132,110 +236,6 @@ ] } }, - { - "rlp": [ - "0xa2c4089da03c02f9", - "0x2bce89e6d5f8587e", - "0xa15cc324f748751b", - "0x176ca7a076d396ae", - "0x4dcc1da013dc007d", - "0xb585ab7a5dc7dee8", - "0x4512d31ad4ccb667", - "0x42a1f013748a941b", - "0x609a944793d440fd", - "0xc19a4031d44cc834", - "0xdaff36dac77852a3", - "0xad707dc040a0e553", - "0xd4c2ae43a23f2bd9", - "0x38ea4bab5e8a8359", - "0x21b9d84b5bbb6b58", - "0x2880f0c3a069913c", - "0xc16c52cc54dfbd47", - "0xa962b7c9a137722b", - "0xb8e1d23facc43591", - "0x68ea09a0deff0e00", - "0xb3f740ca3f14626f", - "0xa3aca8f2b76cad43", - "0x9ef02f560f9aa7dc", - "0x1b9e1eaea0976", - "0x444b820bc4760008", - "0x5125398402549938", - "0x5209b1031090b9c0", - "0x300aaa308a21d40c", - "0x492201d024404040", - "0xda002433449a488e", - "0x10eb200e2020182", - "0x406124043398542f", - "0x19cad001ac40238", - "0x88047889db409840", - "0x15084930c1cb884", - "0x6042c34211092a63", - "0x500260822da161ca", - "0x652941842542c8c2", - "0x600082d1c8648800", - "0x435209a8a4920", - "0x4d0a5091e6020b2", - "0xc955300a040ba16c", - "0x90280c28741810", - "0x499940c420115d9c", - "0xe11a449380e0cdf", - "0x2480d60c00604248", - "0x3e8d091e12a01219", - "0x1860da066a249c24", - "0xb12180183819290", - "0xc1f0c01071003", - "0x15035a8014191614", - "0x3f7104a800a28102", - "0x606021a23082d4c9", - "0x88a000200481", - "0xda00142b20d29a8e", - "0xc9278ab440e43e1", - "0xc90184e6214f8380", - "0x84280627018480c3", - "0x183d899204eb965", - "0x8868746567840b0d", - "0x362e31322e316f67", - "0xd3a078756e696c85", - "0x923ffe54329a64ce", - "0xe664b4692332c5de", - "0xb46f6501a25537cc", - "0x882ceb57856f14eb", - "0x0", - "0x18a005d1e1490185", - "0x96ff33950e01687", - "0x52be51d588eae138", - "0xb575a1705b4e3c09", - "0x55aa60b375c9a9" - ], - "rlp_bytes_len": 575, - "proof": { - "leaf_idx": 1521897, - "mmr_path": [ - "0x09c4f998f67aeaaa13f6431812b34599dc12335897d57493c52e5cfa1183fc9", - "0x4751e9833ffe590494bd269b46391a8f474aa5224183e126f9d6ee75b4d9f26", - "0x3b508668f7d92d379884c79d9031878cbaeb3fa28f053f48b57a7502e45611c", - "0x6ae0557449080a7745c6ad43b21c6f6f57d452817b23b77b5c2ff3d8ccb3760", - "0x593ac29a8b112e2bd247cad0b7b016786ad04217bee18f5e0ea41127ba23f75", - "0x787989b47e298c397a0a6123049fb85d5bd2f962ed9149ee6df656dbc605dda", - "0x6984af357d277724980ece2c11e93d6b6e14200715769b3fd9cbc9a0eaf29c7", - "0x61bc1b0b3467541328174831626b59bcebaec7ef9fda196df6895acfaca4ace", - "0x4fa6272ed7dae6104f103fdec5b82c09f8006abfc9e8e9bc44cff298749599c", - "0x4c9f22576f8d894fd2f992221402ee2d0a703c35c9e1d114f31411b13246bfc", - "0x5b620a5f345977ec7fd3bdeba082078594768bc2fac155ba33b1eab8885a069", - "0x572b3407be5793b54c558f5a7d9d4fb194aea5b14f2b2b7e2c8f526cefbde18", - "0x716621bd5c6f555cca5badd2849633fea9f506876642b58f985f6ab1de6340c", - "0x019df1b143b7076f7c8db2d84794c5bf29be24dbcd64d6a7482c7ff5490486f", - "0x145418fa00ec0102943417073ea3015c793e55e1a11f303aef71a154b2d418c", - "0x164770888e7afc464c2c3a956cf13d2aaf4b5786baec8424357e46f8e1968b2", - "0x46034840abeb358ce87e74d2963f6fb9c655841b31df46eab6e2b784b35d82c", - "0x4b2dfec0bb9b57c4e7ac16cedcd3ff50f381f7ab2df50bcfa3596308f79135a", - "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", - "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", - "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", - "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" - ] - } - }, { "rlp": [ "0x2a661c27a02302f9", @@ -348,7 +348,7 @@ "account_key": "0x8ad2b901594e58a241532055dfe914294630ed5c33ffc31905452799f9b4aab0", "proofs": [ { - "block_number": 5186023, + "block_number": 5186022, "proof_bytes_len": [ 532, 532, @@ -362,142 +362,142 @@ ], "proof": [ [ - "0x58444a19a01102f9", - "0x6186aa6c4bc2f7f5", - "0x6184b7400645ceb8", - "0x3432964db06ab3fa", - "0x5798e0a01aa7c11e", - "0x69c22a52bbd3da36", - "0xc193223917a9e4d5", - "0x5d16e5da8393253e", - "0xd1aea0adbb62b640", - "0x7f69eb2eae8ad843", - "0xeff40cb50c390b52", - "0xad7a89c1ae3d5a01", - "0x51a089f820fcd629", - "0xe20558b8b776455d", - "0x10f8bd05fb96d051", - "0xfb1767334c91ceed", - "0xa09fcceaf965a8a3", - "0x101d508f191dfb8e", - "0x5bb5986074297ab9", - "0x3e0bf1dd917913e0", - "0x3e36b93acd6e2eea", - "0xc88425cf6da209a0", - "0xfcb2166cd45e503e", - "0xe65bb3922725d69b", - "0x800a431934b6d1a7", - "0x8bb03acfb08ba041", - "0xcc1b0a7dc223167b", - "0xd84f206f0caa9606", - "0xb32389c0d2d6977c", - "0xf62965f9a6a0bcab", - "0xdd36c65f0faad792", - "0xead9cccb6a889923", - "0xc0dcabd20910bd4", - "0xc44f224ca034ac90", - "0x49ec9e9e2beb786d", - "0x92818730075c99b2", - "0x786ad2678143d2a1", - "0x13293ba099aa8534", - "0xfa4e5074579f71ce", - "0x742e1850d3e32270", - "0x1d2c0a57888d87ff", - "0x3166a0bff089e666", - "0x4db2002e17450b44", - "0x12e4183aab01a0ac", - "0x80035805dc8e1ab5", - "0xc3a00955c3ad3941", - "0xa63804703e4267a2", - "0x3a106468d3dc7203", - "0x9fb70db168fdc96c", - "0xa0a832ac509828fb", - "0x7ef632aa0f1cc00", - "0x5c2123aba626012a", - "0x35109a6575dbd707", - "0xe9a2d7571c0db0a3", - "0x67e9ba3837d041a0", - "0x4127470df1024135", - "0xddfd667cf6bc5239", - "0x2742eba7a44bae42", - "0x79f9db0a20fa038", - "0xbc64f3ab69c82752", - "0x9a19ce6f2f1e0b46", - "0x2f86d39b6ed70147", - "0xc2495bcb12a0aba4", - "0xb98551cad578ca95", - "0x65f799018826d439", - "0x6e588e68abc35e2b", - "0x800100d6" + "0xa56441cca01102f9", + "0x485779b9ac3e33da", + "0x45bba8cc7cab8b88", + "0x97f1a360d0fc4298", + "0xda5d4ba0cd0fee2a", + "0x4cea18af7c23d4a0", + "0x67290fdc761585b0", + "0x46c75fe72480cfcc", + "0x30dba091f5da704c", + "0xf5ffdb29cc6cdc1a", + "0xac4fb8743ce7cc12", + "0x8f093f32b732af4f", + "0xda0aa25fed40548", + "0xfd7a9beb227fe053", + "0xd570d52b2115ea5f", + "0xfe229a0827fc520f", + "0xa012454939c57e5c", + "0x21c9887e8ee3f3b1", + "0x5156b1ebfc356cf7", + "0x472d2d64d9ff9480", + "0xd98b7ec0bf9199a7", + "0xa67222f4c5bdcda0", + "0xcb44efdda2e66b74", + "0xac7624bf37444d9d", + "0xa07fca47762cdbf", + "0x2779f753784ca07e", + "0xb5696d5ba2df3e6a", + "0xe1accfc5d1c49211", + "0xea31e9b0f0cbd29b", + "0xeab1a6bca0a0f663", + "0x697d9b97b06c60b5", + "0x9c47e390d62b89a0", + "0x798dbe2cd348cdd2", + "0xf73b544fa04ca910", + "0xcc8a0d2bed50be8a", + "0x61a57b36a1879202", + "0xa73ca0ba46fd8dea", + "0x8b4bbda0c664f43b", + "0x175c3dff5bd40cb7", + "0xbd660f7dca4e90e6", + "0x22854668ebefbe42", + "0xd68a0640b490553", + "0x1c02474bce1b1166", + "0x2fb2f9451cba664a", + "0x80fe06bb9ad35e9a", + "0x5ba05f2c78048e7f", + "0xb5f31e7738ded2ba", + "0xf447594f1998bb5f", + "0x27cd80c48ed1f15d", + "0xa09bd8e385d9f9db", + "0x8ae951222b70f58d", + "0xf52b0ebec8f25e3f", + "0xfed270af9a1469e", + "0x2b3f02042fc5b693", + "0x6ae28be870b10a0", + "0x16291604b227317a", + "0x8dac0fbce38ceefd", + "0xace93a8dc1fb0612", + "0xbc530efeb3ca0fd", + "0xb450cf74a528f7cb", + "0x8d160635de93de22", + "0x442e0f173e0f2b12", + "0xf81b15653aa0471f", + "0xa7bda111d440a7e6", + "0x12e35ee20d909c5", + "0x852d8e1515ad2c3e", + "0x807d369a" ], [ - "0x9872fa8ba01102f9", - "0xebf32a01c304911b", - "0x7a90055f9401af09", - "0xc2ba94afe0afe786", - "0x2f611ca0e690fc3c", + "0x2203510a01102f9", + "0x9b6493f1eafbce8f", + "0xcab50cf7550ea03", + "0xa6166a1fc684449d", + "0x2f611ca0278a613f", "0x390432baa62b1a9c", "0xca085e0f40b93f89", "0x29c27ae3f970b810", - "0xbd61a0348697ea23", - "0xa44ae2ff8e39cb97", - "0x6fc8d2b6e578cd7c", - "0x1e826e42f9ad3011", - "0xc6a0a0f182a6676c", - "0xdb9c4dc5b4c03eb8", - "0xb2aec4fcde466b5d", - "0xca5a8a2ffb11d58", - "0xa04952eb424ede4f", + "0x4f11a0348697ea23", + "0x15fae1bdff89aae", + "0x2d379662a57f6c3e", + "0x94b9e0fa577c0bd9", + "0xeaa073b2b96e399c", + "0x7f5589bcdb15412e", + "0xdde3c93dc089245f", + "0xd8fd736ca136a614", + "0xa016f7ef94a462b8", "0xcf0538fb63aad0e9", "0xb26d3e80af58fdf5", - "0x20ca30148b2cec11", - "0x4c2fcb4df7821abf", - "0xc7f9e63f9a6e1ea0", - "0x955f28c7518cfc49", - "0xb4be12419fce2f7b", - "0x773a029286892019", - "0xfcc56c3d2015a06f", - "0x64aac5a84cae088e", - "0xfa553497f5842d68", - "0x427cb9bce0af3b1b", - "0xfe7dbdb928a0af56", - "0xb1e5b3ff64efb8e4", - "0x93ac8fc710c859e2", - "0xf428706c93752615", - "0x1487b0b4a0a1c9cc", + "0x20ca30148b2cec11", + "0x4c2fcb4df7821abf", + "0xc7f9e63f9a6e1ea0", + "0x955f28c7518cfc49", + "0xb4be12419fce2f7b", + "0x773a029286892019", + "0xd5b4924cbd96a06f", + "0x90e1fae24960eed4", + "0x898f646d618fe2da", + "0x4ffd46ba2191ffcc", + "0x23feafcdaa083d7", + "0xc1b401d92b41c162", + "0xaf55e71b1cc32c0b", + "0x295c5bfb1a52901a", + "0x1487b0b4a06896cc", "0xd44cbea352feca7a", "0x6dc058cae697e48d", "0x8659ed45c7db8c69", - "0x562c19a08db158a9", - "0xe414bdf4b7b4ea52", - "0x300d204a6a0f4698", - "0xe9b4e532fbe5297c", - "0x138ea0de0a724737", + "0x7ce74aa08db158a9", + "0x564d9a064d0d3c2", + "0xa585d9c2b3a50627", + "0x593872a183de1500", + "0x138ea0b9b7e46808", "0x16bda1dac8b25389", "0xa1dc3981db0b5286", "0x5aae51ed9b411bd4", - "0x85a0e73edf470da8", - "0xbcf54c26f2702ecb", - "0x64b9e0044cbd4c16", - "0x3328de9d25006830", - "0xa0d0c9c72af81dec", - "0x87a68bcceca88565", - "0xf87e863d3afa3ca9", - "0xa536665210fb6e0c", - "0x936f481ec643e73c", + "0x86a0e73edf470da8", + "0x4f09e70d776da168", + "0x1cbfd4c4ce386f3", + "0xaab65a74219a1a2f", + "0xa02a061e70248482", + "0x829fcd24f9eec9d4", + "0xa55445bad38a715", + "0x15844d0c36e329f", + "0x9d093fbf60fdff33", "0xd9a3d455f75fd2a0", "0xab3a7fc6a1d33828", "0xae5e998f387e2891", "0xee2b8a2c2c03186a", - "0x6663d5b55563a0e4", - "0xb041ee83b314d7a2", - "0x5745d9f896165267", - "0xb04b843caa6605fb", - "0xdccd8b7ccaa06355", - "0x4bd24db9c1106802", - "0x2be0ebdc7e9a4f28", - "0x9f42696729e380d4", - "0x80eb8545" + "0xde6ed0b1b955a0e4", + "0xfa6bdfeffedccc63", + "0x3d91aa809af2dbbf", + "0xda17eb79d5185449", + "0xc579977dea0164d", + "0x88cea7f4eec1f0ba", + "0x42a3f8b633052428", + "0x39012bdf2dbfc373", + "0x802cfb9b" ], [ "0xc40409caa01102f9", @@ -815,7 +815,7 @@ ] }, { - "block_number": 5186021, + "block_number": 5186023, "proof_bytes_len": [ 532, 532, @@ -829,92 +829,92 @@ ], "proof": [ [ - "0xe0cd1db9a01102f9", - "0xa14d3bb2862563e6", - "0x70e4db75915c9636", - "0xaec7e6a5b2c27dc2", - "0x2935f5a0e7122aca", - "0xb5b3ad19dc4eb821", - "0x3b91dcafa579fbe2", - "0x686db0215398e26d", - "0xa72aa0cf3a7a9014", - "0x6567fbd49323bc14", - "0xe34cd2f396e033f7", - "0x707532681b146e78", - "0x8ea001b8da6a97f5", - "0x5f30286d7cc0dbe4", - "0x542adf1c07d7f631", - "0x2740bf38b12d5d5a", - "0xa0e83549f281629b", - "0xf7bbc83f064b0353", - "0x2b80a96ddad69f6", - "0x9c3331ebc8f0eca3", - "0xe1d2011e616de763", - "0x1af35c190c5ff0a0", - "0x2f099b5ccfe5b09a", - "0xf5f0a02c1b627496", - "0x5df7f938afe597cc", - "0x67edec108083a00a", - "0x4e95c350254b6dee", - "0xef7bf5fd504496d1", - "0x7d1b848ce5135f0e", - "0x231549d434a0a0d7", - "0xc2f998c7f2e9a07f", - "0x4832b44b767cad58", - "0xcac3d2b7c575e109", - "0x862a4a2da0198935", - "0xf02bfde41c180bb0", - "0x9d5aabd6317198f0", - "0x4b07ebe2f6a502fd", - "0x6571c5a06e43502e", - "0x7e01d4aa20c8e6a5", - "0xf23047a7cbc87301", - "0x8117ff061405cc81", - "0xa3eba06df9cfd7d7", - "0xd826e0532db0b5d4", - "0x884b85573586c8c0", - "0x9a598f3bfb4290d7", - "0xdaa0d323fc97880a", - "0xba2b821dad75883b", - "0xcd3d26f0e81d5656", - "0x52cd6baaea88126", - "0xa0ac20f46b287d0a", - "0x7855a45ce13fc327", - "0x1d92fd6e3a34cacf", - "0x968d0982250f06e5", - "0x9bdb55a66bc067ba", - "0x9c658ec05785f4a0", - "0x3ad8be6e8daa819a", - "0x9936a22d00c8a120", - "0x826772caea15a651", - "0xfc876705be88a0ba", - "0x3a36a65ce58cebc0", - "0xe62fcacc361e0836", - "0x96a0a7092938293a", - "0x78e066810ea043ad", - "0x93b19da040839c35", - "0x432f387d0fe20dbb", - "0x197d099cd23057bc", - "0x805e72a8" + "0x58444a19a01102f9", + "0x6186aa6c4bc2f7f5", + "0x6184b7400645ceb8", + "0x3432964db06ab3fa", + "0x5798e0a01aa7c11e", + "0x69c22a52bbd3da36", + "0xc193223917a9e4d5", + "0x5d16e5da8393253e", + "0xd1aea0adbb62b640", + "0x7f69eb2eae8ad843", + "0xeff40cb50c390b52", + "0xad7a89c1ae3d5a01", + "0x51a089f820fcd629", + "0xe20558b8b776455d", + "0x10f8bd05fb96d051", + "0xfb1767334c91ceed", + "0xa09fcceaf965a8a3", + "0x101d508f191dfb8e", + "0x5bb5986074297ab9", + "0x3e0bf1dd917913e0", + "0x3e36b93acd6e2eea", + "0xc88425cf6da209a0", + "0xfcb2166cd45e503e", + "0xe65bb3922725d69b", + "0x800a431934b6d1a7", + "0x8bb03acfb08ba041", + "0xcc1b0a7dc223167b", + "0xd84f206f0caa9606", + "0xb32389c0d2d6977c", + "0xf62965f9a6a0bcab", + "0xdd36c65f0faad792", + "0xead9cccb6a889923", + "0xc0dcabd20910bd4", + "0xc44f224ca034ac90", + "0x49ec9e9e2beb786d", + "0x92818730075c99b2", + "0x786ad2678143d2a1", + "0x13293ba099aa8534", + "0xfa4e5074579f71ce", + "0x742e1850d3e32270", + "0x1d2c0a57888d87ff", + "0x3166a0bff089e666", + "0x4db2002e17450b44", + "0x12e4183aab01a0ac", + "0x80035805dc8e1ab5", + "0xc3a00955c3ad3941", + "0xa63804703e4267a2", + "0x3a106468d3dc7203", + "0x9fb70db168fdc96c", + "0xa0a832ac509828fb", + "0x7ef632aa0f1cc00", + "0x5c2123aba626012a", + "0x35109a6575dbd707", + "0xe9a2d7571c0db0a3", + "0x67e9ba3837d041a0", + "0x4127470df1024135", + "0xddfd667cf6bc5239", + "0x2742eba7a44bae42", + "0x79f9db0a20fa038", + "0xbc64f3ab69c82752", + "0x9a19ce6f2f1e0b46", + "0x2f86d39b6ed70147", + "0xc2495bcb12a0aba4", + "0xb98551cad578ca95", + "0x65f799018826d439", + "0x6e588e68abc35e2b", + "0x800100d6" ], [ - "0xb234669ca01102f9", - "0xa514acded44cdcfd", - "0xce1fc4ae557828c5", - "0x4d03d4eaefe0b5a4", - "0x5ebaa00ac42047", - "0x6d64f363db5ff755", - "0xf34c1f7346e39b13", - "0x57c795c7d9a47ec6", - "0x22bda03111568be0", - "0xe34860413e495932", - "0x3aab05ace194bcdc", - "0x74c8e078f209328d", - "0xeaa0fffbb5171935", - "0x7f5589bcdb15412e", - "0xdde3c93dc089245f", - "0xd8fd736ca136a614", - "0xa016f7ef94a462b8", + "0x9872fa8ba01102f9", + "0xebf32a01c304911b", + "0x7a90055f9401af09", + "0xc2ba94afe0afe786", + "0x2f611ca0e690fc3c", + "0x390432baa62b1a9c", + "0xca085e0f40b93f89", + "0x29c27ae3f970b810", + "0xbd61a0348697ea23", + "0xa44ae2ff8e39cb97", + "0x6fc8d2b6e578cd7c", + "0x1e826e42f9ad3011", + "0xc6a0a0f182a6676c", + "0xdb9c4dc5b4c03eb8", + "0xb2aec4fcde466b5d", + "0xca5a8a2ffb11d58", + "0xa04952eb424ede4f", "0xcf0538fb63aad0e9", "0xb26d3e80af58fdf5", "0x20ca30148b2cec11", @@ -923,48 +923,48 @@ "0x955f28c7518cfc49", "0xb4be12419fce2f7b", "0x773a029286892019", - "0xd1293be70b65a06f", - "0x30876b01f78024fa", - "0xa01ce8a717136cbc", - "0xa4343b72c435eaa2", - "0x2ea46ddcd9a07380", - "0x6895c381d439aa3e", - "0xb48f4760627d9664", - "0x7e95272413581907", - "0x1487b0b4a009cb6c", - "0xd44cbea352feca7a", - "0x6dc058cae697e48d", - "0x8659ed45c7db8c69", - "0x7ce74aa08db158a9", - "0x564d9a064d0d3c2", - "0xa585d9c2b3a50627", - "0x593872a183de1500", - "0x138ea0b9b7e46808", + "0xfcc56c3d2015a06f", + "0x64aac5a84cae088e", + "0xfa553497f5842d68", + "0x427cb9bce0af3b1b", + "0xfe7dbdb928a0af56", + "0xb1e5b3ff64efb8e4", + "0x93ac8fc710c859e2", + "0xf428706c93752615", + "0x1487b0b4a0a1c9cc", + "0xd44cbea352feca7a", + "0x6dc058cae697e48d", + "0x8659ed45c7db8c69", + "0x562c19a08db158a9", + "0xe414bdf4b7b4ea52", + "0x300d204a6a0f4698", + "0xe9b4e532fbe5297c", + "0x138ea0de0a724737", "0x16bda1dac8b25389", "0xa1dc3981db0b5286", "0x5aae51ed9b411bd4", - "0xf6a0e73edf470da8", - "0x6090d8651fa2f6ac", - "0x5a69f8785ae6c8dc", - "0xceaf9ef7b58f48d3", - "0xa0fb6044f34c4680", - "0xd3a88757f243a6a4", - "0xb75f6bcf43e90852", - "0x44c9974d979d2be8", - "0xab1d380a9d5f00e", + "0x85a0e73edf470da8", + "0xbcf54c26f2702ecb", + "0x64b9e0044cbd4c16", + "0x3328de9d25006830", + "0xa0d0c9c72af81dec", + "0x87a68bcceca88565", + "0xf87e863d3afa3ca9", + "0xa536665210fb6e0c", + "0x936f481ec643e73c", "0xd9a3d455f75fd2a0", "0xab3a7fc6a1d33828", "0xae5e998f387e2891", "0xee2b8a2c2c03186a", - "0xde6ed0b1b955a0e4", - "0xfa6bdfeffedccc63", - "0x3d91aa809af2dbbf", - "0xda17eb79d5185449", - "0xc579977dea0164d", - "0x88cea7f4eec1f0ba", - "0x42a3f8b633052428", - "0x39012bdf2dbfc373", - "0x802cfb9b" + "0x6663d5b55563a0e4", + "0xb041ee83b314d7a2", + "0x5745d9f896165267", + "0xb04b843caa6605fb", + "0xdccd8b7ccaa06355", + "0x4bd24db9c1106802", + "0x2be0ebdc7e9a4f28", + "0x9f42696729e380d4", + "0x80eb8545" ], [ "0xc40409caa01102f9", @@ -1282,7 +1282,7 @@ ] }, { - "block_number": 5186022, + "block_number": 5186021, "proof_bytes_len": [ 532, 532, @@ -1296,88 +1296,88 @@ ], "proof": [ [ - "0xa56441cca01102f9", - "0x485779b9ac3e33da", - "0x45bba8cc7cab8b88", - "0x97f1a360d0fc4298", - "0xda5d4ba0cd0fee2a", - "0x4cea18af7c23d4a0", - "0x67290fdc761585b0", - "0x46c75fe72480cfcc", - "0x30dba091f5da704c", - "0xf5ffdb29cc6cdc1a", - "0xac4fb8743ce7cc12", - "0x8f093f32b732af4f", - "0xda0aa25fed40548", - "0xfd7a9beb227fe053", - "0xd570d52b2115ea5f", - "0xfe229a0827fc520f", - "0xa012454939c57e5c", - "0x21c9887e8ee3f3b1", - "0x5156b1ebfc356cf7", - "0x472d2d64d9ff9480", - "0xd98b7ec0bf9199a7", - "0xa67222f4c5bdcda0", - "0xcb44efdda2e66b74", - "0xac7624bf37444d9d", - "0xa07fca47762cdbf", - "0x2779f753784ca07e", - "0xb5696d5ba2df3e6a", - "0xe1accfc5d1c49211", - "0xea31e9b0f0cbd29b", - "0xeab1a6bca0a0f663", - "0x697d9b97b06c60b5", - "0x9c47e390d62b89a0", - "0x798dbe2cd348cdd2", - "0xf73b544fa04ca910", - "0xcc8a0d2bed50be8a", - "0x61a57b36a1879202", - "0xa73ca0ba46fd8dea", - "0x8b4bbda0c664f43b", - "0x175c3dff5bd40cb7", - "0xbd660f7dca4e90e6", - "0x22854668ebefbe42", - "0xd68a0640b490553", - "0x1c02474bce1b1166", - "0x2fb2f9451cba664a", - "0x80fe06bb9ad35e9a", - "0x5ba05f2c78048e7f", - "0xb5f31e7738ded2ba", - "0xf447594f1998bb5f", - "0x27cd80c48ed1f15d", - "0xa09bd8e385d9f9db", - "0x8ae951222b70f58d", - "0xf52b0ebec8f25e3f", - "0xfed270af9a1469e", - "0x2b3f02042fc5b693", - "0x6ae28be870b10a0", - "0x16291604b227317a", - "0x8dac0fbce38ceefd", - "0xace93a8dc1fb0612", - "0xbc530efeb3ca0fd", - "0xb450cf74a528f7cb", - "0x8d160635de93de22", - "0x442e0f173e0f2b12", - "0xf81b15653aa0471f", - "0xa7bda111d440a7e6", - "0x12e35ee20d909c5", - "0x852d8e1515ad2c3e", - "0x807d369a" + "0xe0cd1db9a01102f9", + "0xa14d3bb2862563e6", + "0x70e4db75915c9636", + "0xaec7e6a5b2c27dc2", + "0x2935f5a0e7122aca", + "0xb5b3ad19dc4eb821", + "0x3b91dcafa579fbe2", + "0x686db0215398e26d", + "0xa72aa0cf3a7a9014", + "0x6567fbd49323bc14", + "0xe34cd2f396e033f7", + "0x707532681b146e78", + "0x8ea001b8da6a97f5", + "0x5f30286d7cc0dbe4", + "0x542adf1c07d7f631", + "0x2740bf38b12d5d5a", + "0xa0e83549f281629b", + "0xf7bbc83f064b0353", + "0x2b80a96ddad69f6", + "0x9c3331ebc8f0eca3", + "0xe1d2011e616de763", + "0x1af35c190c5ff0a0", + "0x2f099b5ccfe5b09a", + "0xf5f0a02c1b627496", + "0x5df7f938afe597cc", + "0x67edec108083a00a", + "0x4e95c350254b6dee", + "0xef7bf5fd504496d1", + "0x7d1b848ce5135f0e", + "0x231549d434a0a0d7", + "0xc2f998c7f2e9a07f", + "0x4832b44b767cad58", + "0xcac3d2b7c575e109", + "0x862a4a2da0198935", + "0xf02bfde41c180bb0", + "0x9d5aabd6317198f0", + "0x4b07ebe2f6a502fd", + "0x6571c5a06e43502e", + "0x7e01d4aa20c8e6a5", + "0xf23047a7cbc87301", + "0x8117ff061405cc81", + "0xa3eba06df9cfd7d7", + "0xd826e0532db0b5d4", + "0x884b85573586c8c0", + "0x9a598f3bfb4290d7", + "0xdaa0d323fc97880a", + "0xba2b821dad75883b", + "0xcd3d26f0e81d5656", + "0x52cd6baaea88126", + "0xa0ac20f46b287d0a", + "0x7855a45ce13fc327", + "0x1d92fd6e3a34cacf", + "0x968d0982250f06e5", + "0x9bdb55a66bc067ba", + "0x9c658ec05785f4a0", + "0x3ad8be6e8daa819a", + "0x9936a22d00c8a120", + "0x826772caea15a651", + "0xfc876705be88a0ba", + "0x3a36a65ce58cebc0", + "0xe62fcacc361e0836", + "0x96a0a7092938293a", + "0x78e066810ea043ad", + "0x93b19da040839c35", + "0x432f387d0fe20dbb", + "0x197d099cd23057bc", + "0x805e72a8" ], [ - "0x2203510a01102f9", - "0x9b6493f1eafbce8f", - "0xcab50cf7550ea03", - "0xa6166a1fc684449d", - "0x2f611ca0278a613f", - "0x390432baa62b1a9c", - "0xca085e0f40b93f89", - "0x29c27ae3f970b810", - "0x4f11a0348697ea23", - "0x15fae1bdff89aae", - "0x2d379662a57f6c3e", - "0x94b9e0fa577c0bd9", - "0xeaa073b2b96e399c", + "0xb234669ca01102f9", + "0xa514acded44cdcfd", + "0xce1fc4ae557828c5", + "0x4d03d4eaefe0b5a4", + "0x5ebaa00ac42047", + "0x6d64f363db5ff755", + "0xf34c1f7346e39b13", + "0x57c795c7d9a47ec6", + "0x22bda03111568be0", + "0xe34860413e495932", + "0x3aab05ace194bcdc", + "0x74c8e078f209328d", + "0xeaa0fffbb5171935", "0x7f5589bcdb15412e", "0xdde3c93dc089245f", "0xd8fd736ca136a614", @@ -1390,15 +1390,15 @@ "0x955f28c7518cfc49", "0xb4be12419fce2f7b", "0x773a029286892019", - "0xd5b4924cbd96a06f", - "0x90e1fae24960eed4", - "0x898f646d618fe2da", - "0x4ffd46ba2191ffcc", - "0x23feafcdaa083d7", - "0xc1b401d92b41c162", - "0xaf55e71b1cc32c0b", - "0x295c5bfb1a52901a", - "0x1487b0b4a06896cc", + "0xd1293be70b65a06f", + "0x30876b01f78024fa", + "0xa01ce8a717136cbc", + "0xa4343b72c435eaa2", + "0x2ea46ddcd9a07380", + "0x6895c381d439aa3e", + "0xb48f4760627d9664", + "0x7e95272413581907", + "0x1487b0b4a009cb6c", "0xd44cbea352feca7a", "0x6dc058cae697e48d", "0x8659ed45c7db8c69", @@ -1410,15 +1410,15 @@ "0x16bda1dac8b25389", "0xa1dc3981db0b5286", "0x5aae51ed9b411bd4", - "0x86a0e73edf470da8", - "0x4f09e70d776da168", - "0x1cbfd4c4ce386f3", - "0xaab65a74219a1a2f", - "0xa02a061e70248482", - "0x829fcd24f9eec9d4", - "0xa55445bad38a715", - "0x15844d0c36e329f", - "0x9d093fbf60fdff33", + "0xf6a0e73edf470da8", + "0x6090d8651fa2f6ac", + "0x5a69f8785ae6c8dc", + "0xceaf9ef7b58f48d3", + "0xa0fb6044f34c4680", + "0xd3a88757f243a6a4", + "0xb75f6bcf43e90852", + "0x44c9974d979d2be8", + "0xab1d380a9d5f00e", "0xd9a3d455f75fd2a0", "0xab3a7fc6a1d33828", "0xae5e998f387e2891", @@ -1759,11 +1759,33 @@ { "type": "module", "context": { - "inputs": [ - "0x4f21e5", - "0x4f21e8", - "0x13cb6ae34a13a0977f4d7101ebc24b87bb23f0d5" + "encoded_task": [ + "0x1a6c34b83313af00", + "0x2a12f380e3ef41c9", + "0x153019adcbf7c171", + "0xcabf65f7742e7143", + "0x0", + "0x0", + "0x0", + "0x4000000000000000", + "0x0", + "0x0", + "0x0", + "0x300000000000000", + "0x0", + "0x0", + "0x0", + "0xe5214f0000000000", + "0x0", + "0x0", + "0x0", + "0xe8214f0000000000", + "0x0", + "0xe36acb1300000000", + "0x1714d7f97a0134a", + "0xd5f023bb874bc2eb" ], + "task_bytes_len": 192, "module_class": { "prime": "0x800000000000011000000000000000000000000000000000000000000000001", "compiler_version": "2.6.4", diff --git a/src/merkle.cairo b/src/merkle.cairo index 8a744050..9eefb016 100644 --- a/src/merkle.cairo +++ b/src/merkle.cairo @@ -105,7 +105,7 @@ func compute_tasks_hash_v2{ jmp end_loop; } - assert data_copy[i] = inputs[i]; + assert data_copy[i] = Uint256(low=inputs[i], high=0x0); [ap] = i + 1, ap++; jmp copy_loop; diff --git a/src/module.cairo b/src/module.cairo new file mode 100644 index 00000000..0d8c2089 --- /dev/null +++ b/src/module.cairo @@ -0,0 +1,60 @@ +from starkware.cairo.common.cairo_builtins import BitwiseBuiltin, KeccakBuiltin +from src.types import ModuleTask +from starkware.cairo.common.alloc import alloc +from src.utils import word_reverse_endian_64 + +// Creates a Module from the input bytes +func init_module{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, keccak_ptr: KeccakBuiltin*, pow2_array: felt* +}(input: felt*, input_bytes_len: felt) -> (res: ModuleTask) { + alloc_locals; + let (class_hash, module_inputs_len) = extract_constant_params{ + range_check_ptr=range_check_ptr + }(input=input); + + let (module_inputs) = alloc(); + + return ( + res=ModuleTask( + class_hash=class_hash, + module_inputs_len=module_inputs_len, + module_inputs=module_inputs, + ), + ); +} + +// Decodes the constant parameters of the Module +// Inputs: +// input: le 8-byte chunks +// Outputs: +// class_hash, module_inputs_len +func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(input: felt*) -> ( + class_hash: felt, module_inputs_len: felt +) { + alloc_locals; + // ModuleTask Layout: + // 0-3: class_hash + // 4-7: dynamic_input_offset + // 8-11: module_inputs_len + + // Copy class_hash + let (class_hash_low_first) = word_reverse_endian_64([input]); + let (class_hash_low_second) = word_reverse_endian_64([input + 1]); + let (class_hash_high_first) = word_reverse_endian_64([input + 2]); + let (class_hash_high_second) = word_reverse_endian_64([input + 3]); + let class_hash_low = class_hash_low_first + class_hash_low_second * 0x10000000000000000; + let class_hash_high = class_hash_high_first + class_hash_high_second * 0x10000000000000000; + local class_hash: felt; + %{ + class_hash = ids.class_hash_low * 2**128 + ids.class_hash_high + print(f"class_hash = {class_hash}") + ids.class_hash = class_hash + %} + + assert [input + 8] = 0; // first 3 chunks of increment should be 0 + let (module_inputs_len) = word_reverse_endian_64([input + 9]); + + return ( + class_hash=class_hash, module_inputs_len=module_inputs_len + ); +} \ No newline at end of file diff --git a/src/temp.cairo b/src/temp.cairo new file mode 100644 index 00000000..e4cf20aa --- /dev/null +++ b/src/temp.cairo @@ -0,0 +1,22 @@ +from starkware.cairo.common.cairo_builtins import BitwiseBuiltin, KeccakBuiltin +from starkware.cairo.common.alloc import alloc +from src.rlp import le_chunks_to_uint256 + +func main{output_ptr: felt*, range_check_ptr, bitwise_ptr: BitwiseBuiltin*}() { + alloc_locals; + + local program_hash: felt = 0xaf1333b8346c1ac941efe380f3122a71c1f7cbad19301543712e74f765bfca; + let (local inputs: felt*) = alloc(); + local inputs_len: felt = 3; + assert inputs[0] = 5186021; + assert inputs[1] = 5186024; + assert inputs[2] = 113007187165825507614120510246167695609561346261; + + local program_hash_bit_len; + %{ + program_hash_bit_len = len(hex(ids.program_hash)) * 4 + print(f"Program hash: {program_hash_bit_len}") + %} + + return (); +} diff --git a/src/types.cairo b/src/types.cairo index 6079c82c..64f9a25a 100644 --- a/src/types.cairo +++ b/src/types.cairo @@ -42,3 +42,9 @@ struct ComputationalTask { ctx_operator: felt, ctx_value: Uint256, } + +struct ModuleTask { + class_hash: felt, + module_inputs_len: felt, + module_inputs: felt*, +} \ No newline at end of file diff --git a/tools/py/schema.py b/tools/py/schema.py index 34f960e3..973c9cd0 100644 --- a/tools/py/schema.py +++ b/tools/py/schema.py @@ -97,11 +97,10 @@ class Datalake: @marshmallow_dataclass.dataclass(frozen=True) class Module(ValidatedMarshmallowDataclass): - inputs: List[int] = field( - metadata=additional_metadata( - marshmallow_field=mfields.List(IntAsHex(), required=True) - ) + encoded_task: List[int] = field( + metadata=additional_metadata(marshmallow_field=mfields.List(IntAsHex())) ) + task_bytes_len: int module_class: CompiledClass From ccd38f3e913f92de928078da48617a3d8e67140d Mon Sep 17 00:00:00 2001 From: Pia Date: Mon, 22 Jul 2024 12:08:22 +0200 Subject: [PATCH 24/73] i got hash --- src/module.cairo | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/module.cairo b/src/module.cairo index 0d8c2089..d723b98b 100644 --- a/src/module.cairo +++ b/src/module.cairo @@ -39,11 +39,29 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu // Copy class_hash let (class_hash_low_first) = word_reverse_endian_64([input]); + %{ + print(f"class_hash_low_first = {ids.class_hash_low_first}") + %} let (class_hash_low_second) = word_reverse_endian_64([input + 1]); + %{ + print(f"class_hash_low_second = {ids.class_hash_low_second}") + %} let (class_hash_high_first) = word_reverse_endian_64([input + 2]); + %{ + print(f"class_hash_high_first = {ids.class_hash_high_first}") + %} let (class_hash_high_second) = word_reverse_endian_64([input + 3]); - let class_hash_low = class_hash_low_first + class_hash_low_second * 0x10000000000000000; - let class_hash_high = class_hash_high_first + class_hash_high_second * 0x10000000000000000; + %{ + print(f"class_hash_high_second = {ids.class_hash_high_second}") + %} + let class_hash_low = class_hash_low_first * 0x10000000000000000 + class_hash_low_second; + %{ + print(f"class_hash_low = {ids.class_hash_low}") + %} + let class_hash_high = class_hash_high_first * 0x10000000000000000 + class_hash_high_second ; + %{ + print(f"class_hash_low = {ids.class_hash_high}") + %} local class_hash: felt; %{ class_hash = ids.class_hash_low * 2**128 + ids.class_hash_high From ea7b34698b6c2781d399ff35cf13338aa6bb60a9 Mon Sep 17 00:00:00 2001 From: Pia Date: Mon, 22 Jul 2024 12:09:28 +0200 Subject: [PATCH 25/73] chore: rm hint --- src/module.cairo | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/module.cairo b/src/module.cairo index d723b98b..8ab072c1 100644 --- a/src/module.cairo +++ b/src/module.cairo @@ -39,29 +39,11 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu // Copy class_hash let (class_hash_low_first) = word_reverse_endian_64([input]); - %{ - print(f"class_hash_low_first = {ids.class_hash_low_first}") - %} let (class_hash_low_second) = word_reverse_endian_64([input + 1]); - %{ - print(f"class_hash_low_second = {ids.class_hash_low_second}") - %} let (class_hash_high_first) = word_reverse_endian_64([input + 2]); - %{ - print(f"class_hash_high_first = {ids.class_hash_high_first}") - %} let (class_hash_high_second) = word_reverse_endian_64([input + 3]); - %{ - print(f"class_hash_high_second = {ids.class_hash_high_second}") - %} let class_hash_low = class_hash_low_first * 0x10000000000000000 + class_hash_low_second; - %{ - print(f"class_hash_low = {ids.class_hash_low}") - %} let class_hash_high = class_hash_high_first * 0x10000000000000000 + class_hash_high_second ; - %{ - print(f"class_hash_low = {ids.class_hash_high}") - %} local class_hash: felt; %{ class_hash = ids.class_hash_low * 2**128 + ids.class_hash_high From 86ada7316871069721040ab193b17d84cede7dff Mon Sep 17 00:00:00 2001 From: Pia Date: Mon, 22 Jul 2024 12:32:35 +0200 Subject: [PATCH 26/73] todo --- src/module.cairo | 1 + 1 file changed, 1 insertion(+) diff --git a/src/module.cairo b/src/module.cairo index 8ab072c1..1f5094ad 100644 --- a/src/module.cairo +++ b/src/module.cairo @@ -12,6 +12,7 @@ func init_module{ range_check_ptr=range_check_ptr }(input=input); + // TODO get input dynamically base on module_inputs_len let (module_inputs) = alloc(); return ( From d0fdb3727c2a0a496f907e10e579e881625d5f98 Mon Sep 17 00:00:00 2001 From: Pia Date: Mon, 22 Jul 2024 13:55:11 +0200 Subject: [PATCH 27/73] wip dynamic input --- src/module.cairo | 84 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 78 insertions(+), 6 deletions(-) diff --git a/src/module.cairo b/src/module.cairo index 1f5094ad..d7ec352d 100644 --- a/src/module.cairo +++ b/src/module.cairo @@ -12,16 +12,33 @@ func init_module{ range_check_ptr=range_check_ptr }(input=input); - // TODO get input dynamically base on module_inputs_len - let (module_inputs) = alloc(); + %{ + print(f"module_inputs_len = {ids.module_inputs_len}") + %} - return ( + if (module_inputs_len == 0) { + let (module_inputs) = alloc(); + return ( res=ModuleTask( class_hash=class_hash, module_inputs_len=module_inputs_len, module_inputs=module_inputs, ), - ); + ); + }else { + let (module_inputs) = extract_dynamic_params{ + range_check_ptr=range_check_ptr + }(encoded_module=input,module_inputs_len=module_inputs_len); + + return ( + res=ModuleTask( + class_hash=class_hash, + module_inputs_len=module_inputs_len, + module_inputs=module_inputs, + ), + ); + } + } // Decodes the constant parameters of the Module @@ -52,10 +69,65 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu ids.class_hash = class_hash %} - assert [input + 8] = 0; // first 3 chunks of increment should be 0 - let (module_inputs_len) = word_reverse_endian_64([input + 9]); + assert [input + 10] = 0; // first 3 chunks of increment should be 0 + let (module_inputs_len) = word_reverse_endian_64([input + 11]); return ( class_hash=class_hash, module_inputs_len=module_inputs_len ); +} + +// Decodes the dynamic parameters of the Module +// Inputs: +// input: le 8-byte chunks, +// Outputs: +// module_inputs +func extract_dynamic_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(encoded_module: felt*, module_inputs_len: felt) -> ( + module_inputs: felt* +) { + alloc_locals; + // ModuleTask Layout: + // 0-3: class_hash + // 4-7: dynamic_input_offset + // 8-11: module_inputs_len + // 12-15: input 1 ... + // ... + + let (module_inputs) = alloc(); + + // copy the leafs to a new array. + tempvar i = 0; + + copy_loop: + let i = [ap - 1]; + if (i == module_inputs_len) { + jmp end_loop; + } + + let offset = i * 4; + %{ + print(f"offset = {ids.offset}") + print(f"offset2 = {12+ ids.offset}") + %} + let (target_input_low_first) = word_reverse_endian_64([encoded_module + 12 + offset]); + let (target_input_low_second) = word_reverse_endian_64([encoded_module + 13 + offset]); + let (target_input_high_first) = word_reverse_endian_64([encoded_module + 14 + offset]); + let (target_input_high_second) = word_reverse_endian_64([encoded_module + 15 + offset]); + let target_input_low = target_input_low_first * 0x10000000000000000 + target_input_low_second; + let target_input_high = target_input_high_first * 0x10000000000000000 + target_input_high_second ; + local target_input: felt; + %{ + target_input = ids.target_input_low * 2**128 + ids.target_input_high + print(f"target_input = {target_input}") + ids.target_input = target_input + %} + assert module_inputs[i] = target_input; + [ap] = i + 1, ap++; + jmp copy_loop; + + end_loop: + + return ( + module_inputs=module_inputs + ); } \ No newline at end of file From fc0bb34bad76d262870720db30864332f59755f5 Mon Sep 17 00:00:00 2001 From: Pia Date: Mon, 22 Jul 2024 17:18:45 +0200 Subject: [PATCH 28/73] feat: compute tasks hash v2 --- src/hdp.cairo | 2 +- src/merkle.cairo | 40 ++++------------------------------------ src/module.cairo | 13 +++++++++---- 3 files changed, 14 insertions(+), 41 deletions(-) diff --git a/src/hdp.cairo b/src/hdp.cairo index 933bc66a..d9b6c4f8 100644 --- a/src/hdp.cairo +++ b/src/hdp.cairo @@ -300,7 +300,7 @@ func compute_tasks{ let task_hash = compute_tasks_hash_v2{ range_check_ptr=range_check_ptr, bitwise_ptr=bitwise_ptr, keccak_ptr=keccak_ptr - }(program_hash=program_hash, inputs=module_task.module_inputs, inputs_len= module_task.module_inputs_len); + }(encoded_task=encoded_task, task_bytes_len=task_bytes_len); // %{ print("Task;", hex(ids.task_hash.high * 2 ** 128 + ids.task_hash.low)) %} diff --git a/src/merkle.cairo b/src/merkle.cairo index 9eefb016..e5efb6db 100644 --- a/src/merkle.cairo +++ b/src/merkle.cairo @@ -81,48 +81,16 @@ func compute_tasks_root_v1{ } // Computes the tasks merkle root for v2 flow +// TODO: it is single task for now func compute_tasks_hash_v2{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, keccak_ptr: KeccakBuiltin* -}(program_hash: felt, inputs: felt*, inputs_len: felt) -> Uint256 { +}(encoded_task: felt*, task_bytes_len: felt) -> Uint256 { alloc_locals; - let (local data: Uint256*) = alloc(); - local offset: Uint256 = Uint256(low=0x40, high=0x0); - local input_length: Uint256 = Uint256(low=inputs_len, high=0x0); - let conv_program_hash: Uint256 = felt_to_uint256(program_hash); - - assert data[0] = conv_program_hash; - assert data[1] = offset; - assert data[2] = input_length; - - let data_copy: Uint256* = data + 3; - - tempvar i = 0; - - copy_loop: - let i = [ap - 1]; - if (i == inputs_len) { - jmp end_loop; - } - - assert data_copy[i] = Uint256(low=inputs[i], high=0x0); - [ap] = i + 1, ap++; - jmp copy_loop; - - end_loop: - let (task_hash) = keccak_uint256s_bigend{ - range_check_ptr=range_check_ptr, bitwise_ptr=bitwise_ptr, keccak_ptr=keccak_ptr - }(n_elements=inputs_len + 3, elements=data); - - %{ - print("Task hash:", ids.inputs_len) - for i in range(0, 6): - print("Task;", hex(memory[ids.data+i])) - %} + let (task_hash) = keccak(encoded_task, task_bytes_len); %{ - target_hash = hex(ids.task_hash.low + ids.task_hash.high*2**128)[2:] - print(f"Task hash: 0x{target_hash}") + print(f"Task hash: {ids.task_hash}") %} return task_hash; diff --git a/src/module.cairo b/src/module.cairo index d7ec352d..0dc6a49d 100644 --- a/src/module.cairo +++ b/src/module.cairo @@ -25,7 +25,7 @@ func init_module{ module_inputs=module_inputs, ), ); - }else { + } else { let (module_inputs) = extract_dynamic_params{ range_check_ptr=range_check_ptr }(encoded_module=input,module_inputs_len=module_inputs_len); @@ -79,7 +79,7 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu // Decodes the dynamic parameters of the Module // Inputs: -// input: le 8-byte chunks, +// input: encoded_module, module_inputs_len // Outputs: // module_inputs func extract_dynamic_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(encoded_module: felt*, module_inputs_len: felt) -> ( @@ -95,7 +95,6 @@ func extract_dynamic_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(encod let (module_inputs) = alloc(); - // copy the leafs to a new array. tempvar i = 0; copy_loop: @@ -110,9 +109,13 @@ func extract_dynamic_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(encod print(f"offset2 = {12+ ids.offset}") %} let (target_input_low_first) = word_reverse_endian_64([encoded_module + 12 + offset]); + tempvar bitwise_ptr = bitwise_ptr + 3; let (target_input_low_second) = word_reverse_endian_64([encoded_module + 13 + offset]); + tempvar bitwise_ptr = bitwise_ptr + 3; let (target_input_high_first) = word_reverse_endian_64([encoded_module + 14 + offset]); + tempvar bitwise_ptr = bitwise_ptr + 3; let (target_input_high_second) = word_reverse_endian_64([encoded_module + 15 + offset]); + let target_input_low = target_input_low_first * 0x10000000000000000 + target_input_low_second; let target_input_high = target_input_high_first * 0x10000000000000000 + target_input_high_second ; local target_input: felt; @@ -123,6 +126,7 @@ func extract_dynamic_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(encod %} assert module_inputs[i] = target_input; [ap] = i + 1, ap++; + jmp copy_loop; end_loop: @@ -130,4 +134,5 @@ func extract_dynamic_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(encod return ( module_inputs=module_inputs ); -} \ No newline at end of file +} + From 08b963e694be5b539197b9788a14e126f6af007b Mon Sep 17 00:00:00 2001 From: petscheit Date: Mon, 22 Jul 2024 17:34:13 +0200 Subject: [PATCH 29/73] chore: adds chain id to datalake --- src/datalakes/block_sampled_datalake.cairo | 43 ++++++++++-------- src/datalakes/txs_in_block_datalake.cairo | 52 ++++++++++++---------- src/types.cairo | 2 + 3 files changed, 56 insertions(+), 41 deletions(-) diff --git a/src/datalakes/block_sampled_datalake.cairo b/src/datalakes/block_sampled_datalake.cairo index 05047b59..d0dc7c54 100644 --- a/src/datalakes/block_sampled_datalake.cairo +++ b/src/datalakes/block_sampled_datalake.cairo @@ -30,9 +30,9 @@ func init_block_sampled{ }(input: felt*, input_bytes_len: felt) -> (res: BlockSampledDataLake) { alloc_locals; - let property_type = extract_byte_at_pos([input + 24], 0, pow2_array); + let property_type = extract_byte_at_pos([input + 28], 0, pow2_array); - let (block_range_start, block_range_end, increment) = extract_constant_params{ + let (chain_id, block_range_start, block_range_end, increment) = extract_constant_params{ range_check_ptr=range_check_ptr }(input=input); @@ -40,7 +40,7 @@ func init_block_sampled{ // Decode properties if (property_type == BlockSampledProperty.HEADER) { // Header Input Layout: - let chunk_one = word_reverse_endian_16_RC([input + 24]); + let chunk_one = word_reverse_endian_16_RC([input + 28]); assert [range_check_ptr] = 0x01ff - chunk_one; // assert selected property_type matches input tempvar range_check_ptr = range_check_ptr + 1; @@ -50,6 +50,7 @@ func init_block_sampled{ return ( res=BlockSampledDataLake( + chain_id=chain_id, block_range_start=block_range_start, block_range_end=block_range_end, increment=increment, @@ -76,6 +77,7 @@ func init_block_sampled{ return ( res=BlockSampledDataLake( + chain_id=chain_id, block_range_start=block_range_start, block_range_end=block_range_end, increment=increment, @@ -101,6 +103,7 @@ func init_block_sampled{ return ( res=BlockSampledDataLake( + chain_id=chain_id, block_range_start=block_range_start, block_range_end=block_range_end, increment=increment, @@ -112,7 +115,7 @@ func init_block_sampled{ assert 0 = 1; // Invalid property_type let (prop) = alloc(); - return (res=BlockSampledDataLake(0, 0, 0, 0, prop)); + return (res=BlockSampledDataLake(0, 0, 0, 0, 0, prop)); } // Decodes slot from datalake definition and writes it to the properties array @@ -306,30 +309,34 @@ func extract_address{bitwise_ptr: BitwiseBuiltin*}( // Outputs: // block_range_start, block_range_end, increment func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(input: felt*) -> ( - block_range_start: felt, block_range_end: felt, increment: felt + chain_id: felt, block_range_start: felt, block_range_end: felt, increment: felt ) { alloc_locals; // HeaderProp Input Layout: // 0-3: DatalakeCode.BlockSampled - // 4-7: block_range_start - // 8-11: block_range_end - // 12-15: increment - // 16-19: dynamic data offset - // 20-23: dynamic data element count - // 24-25: 01 + headerPropId + // 4-7: chain_id + // 8-11: block_range_start + // 12-15: block_range_end + // 16-19: increment + // 20-23: dynamic data offset + // 24-27: dynamic data element count + // 28-29: 01 + headerPropId assert [input + 3] = 0; // DatalakeCode.BlockSampled == 0 assert [input + 6] = 0; // first 3 chunks of block_range_start should be 0 - let (block_range_start) = word_reverse_endian_64([input + 7]); + let (chain_id) = word_reverse_endian_64([input + 7]); - assert [input + 10] = 0; // first 3 chunks of block_range_end should be 0 - let (block_range_end) = word_reverse_endian_64([input + 11]); + assert [input + 10] = 0; // first 3 chunks of block_range_start should be 0 + let (block_range_start) = word_reverse_endian_64([input + 11]); - assert [input + 14] = 0; // first 3 chunks of increment should be 0 - let (increment) = word_reverse_endian_64([input + 15]); + assert [input + 14] = 0; // first 3 chunks of block_range_end should be 0 + let (block_range_end) = word_reverse_endian_64([input + 15]); + + assert [input + 18] = 0; // first 3 chunks of increment should be 0 + let (increment) = word_reverse_endian_64([input + 19]); return ( - block_range_start=block_range_start, block_range_end=block_range_end, increment=increment + chain_id=chain_id, block_range_start=block_range_start, block_range_end=block_range_end, increment=increment ); } @@ -472,4 +479,4 @@ func fetch_header_data_points{ return fetch_header_data_points( chain_id=chain_id, datalake=datalake, index=index + 1, data_points=data_points ); -} +} \ No newline at end of file diff --git a/src/datalakes/txs_in_block_datalake.cairo b/src/datalakes/txs_in_block_datalake.cairo index 7cc9220c..ddca5e49 100644 --- a/src/datalakes/txs_in_block_datalake.cairo +++ b/src/datalakes/txs_in_block_datalake.cairo @@ -26,46 +26,52 @@ func init_txs_in_block{ // HeaderProp Input Layout: // 0-3: DatalakeCode.BlockSampled - // 4-7: target_block - // 8-11: start_index - // 12-15: end_index - // 16-19: increment - // 20-23: included_types - // 24-27: dynamic data offset - // 28-31: dynamic data element count - // 32-35: sampled_property (type, field) + // 4-7: chain_id + // 8-11: target_block + // 12-15: start_index + // 16-19: end_index + // 20-23: increment + // 24-27: included_types + // 28-31: dynamic data offset + // 32-35: dynamic data element count + // 36-39: sampled_property (type, field) + assert [input + 3] = 0x100000000000000; // DatalakeCode.TxsInBlock == 1 - assert [input + 6] = 0; // first 3 chunks of target_block should be 0 - let (target_block) = word_reverse_endian_64([input + 7]); + assert [input + 6] = 0; // first 3 chunks of chain_id should be 0 + let (chain_id) = word_reverse_endian_64([input + 7]); + + assert [input + 10] = 0; // first 3 chunks of target_block should be 0 + let (target_block) = word_reverse_endian_64([input + 11]); - assert [input + 10] = 0; // first 3 chunks of start_index should be 0 - let (start_index) = word_reverse_endian_64([input + 11]); + assert [input + 14] = 0; // first 3 chunks of start_index should be 0 + let (start_index) = word_reverse_endian_64([input + 15]); - assert [input + 14] = 0; // first 3 chunks of end_index should be 0 - let (end_index) = word_reverse_endian_64([input + 15]); + assert [input + 18] = 0; // first 3 chunks of end_index should be 0 + let (end_index) = word_reverse_endian_64([input + 19]); - assert [input + 18] = 0; // first 3 chunks of increment should be 0 - let (increment) = word_reverse_endian_64([input + 19]); + assert [input + 22] = 0; // first 3 chunks of increment should be 0 + let (increment) = word_reverse_endian_64([input + 23]); // Extract and add filter flags let (included_types) = alloc(); - let legacy = extract_byte_at_pos([input + 23], 4, pow2_array); + let legacy = extract_byte_at_pos([input + 27], 4, pow2_array); assert included_types[TransactionType.LEGACY] = legacy; - let eip2930 = extract_byte_at_pos([input + 23], 5, pow2_array); + let eip2930 = extract_byte_at_pos([input + 27], 5, pow2_array); assert included_types[TransactionType.EIP2930] = eip2930; - let eip1559 = extract_byte_at_pos([input + 23], 6, pow2_array); + let eip1559 = extract_byte_at_pos([input + 27], 6, pow2_array); assert included_types[TransactionType.EIP1559] = eip1559; - let eip4844 = extract_byte_at_pos([input + 23], 7, pow2_array); + let eip4844 = extract_byte_at_pos([input + 27], 7, pow2_array); assert included_types[TransactionType.EIP4844] = eip4844; - let type = extract_byte_at_pos([input + 32], 0, pow2_array); - let property = extract_byte_at_pos([input + 32], 1, pow2_array); + let type = extract_byte_at_pos([input + 36], 0, pow2_array); + let property = extract_byte_at_pos([input + 36], 1, pow2_array); - assert [input + 33] = 0; // remaining chunks should be 0 + assert [input + 37] = 0; // remaining chunks should be 0 return ( res=TransactionsInBlockDatalake( + chain_id=chain_id, target_block=target_block, start_index=start_index, end_index=end_index, diff --git a/src/types.cairo b/src/types.cairo index 6079c82c..b83a9f55 100644 --- a/src/types.cairo +++ b/src/types.cairo @@ -16,6 +16,7 @@ struct MMRMeta { } struct BlockSampledDataLake { + chain_id: felt, block_range_start: felt, block_range_end: felt, increment: felt, @@ -24,6 +25,7 @@ struct BlockSampledDataLake { } struct TransactionsInBlockDatalake { + chain_id: felt, target_block: felt, start_index: felt, end_index: felt, From 1c3df24d46ae4ab7c99c4736c69539ec8b01ddfc Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Mon, 22 Jul 2024 17:22:23 +0200 Subject: [PATCH 30/73] sound class_hash --- src/module.cairo | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/module.cairo b/src/module.cairo index 0dc6a49d..57887e2f 100644 --- a/src/module.cairo +++ b/src/module.cairo @@ -51,8 +51,8 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu ) { alloc_locals; // ModuleTask Layout: - // 0-3: class_hash - // 4-7: dynamic_input_offset + // 0-4: class_hash + // 4-8: dynamic_input_offset // 8-11: module_inputs_len // Copy class_hash @@ -61,15 +61,13 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu let (class_hash_high_first) = word_reverse_endian_64([input + 2]); let (class_hash_high_second) = word_reverse_endian_64([input + 3]); let class_hash_low = class_hash_low_first * 0x10000000000000000 + class_hash_low_second; - let class_hash_high = class_hash_high_first * 0x10000000000000000 + class_hash_high_second ; - local class_hash: felt; - %{ - class_hash = ids.class_hash_low * 2**128 + ids.class_hash_high - print(f"class_hash = {class_hash}") - ids.class_hash = class_hash - %} + let class_hash_high = class_hash_high_first * 0x10000000000000000 + class_hash_high_second; + let class_hash = class_hash_high * 0x100000000000000000000000000000000 + class_hash_high; - assert [input + 10] = 0; // first 3 chunks of increment should be 0 + // first 3 chunks of module_inputs_len should be 0 + assert [input + 8] = 0x0; + assert [input + 9] = 0x0; + assert [input + 10] = 0x0; let (module_inputs_len) = word_reverse_endian_64([input + 11]); return ( From 056ddbe4a1cd810e8f9f2c357987702dd31ea243 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Mon, 22 Jul 2024 17:38:42 +0200 Subject: [PATCH 31/73] wip --- src/module.cairo | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/module.cairo b/src/module.cairo index 57887e2f..b8e0cce5 100644 --- a/src/module.cairo +++ b/src/module.cairo @@ -85,11 +85,13 @@ func extract_dynamic_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(encod ) { alloc_locals; // ModuleTask Layout: - // 0-3: class_hash - // 4-7: dynamic_input_offset - // 8-11: module_inputs_len - // 12-15: input 1 ... - // ... + // 0-4: class_hash + // 4-8: dynamic_input_offset + // 8-12: module_inputs_len + // 12-16: input 1 + // . + // . + // . let (module_inputs) = alloc(); @@ -107,21 +109,14 @@ func extract_dynamic_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(encod print(f"offset2 = {12+ ids.offset}") %} let (target_input_low_first) = word_reverse_endian_64([encoded_module + 12 + offset]); - tempvar bitwise_ptr = bitwise_ptr + 3; let (target_input_low_second) = word_reverse_endian_64([encoded_module + 13 + offset]); - tempvar bitwise_ptr = bitwise_ptr + 3; let (target_input_high_first) = word_reverse_endian_64([encoded_module + 14 + offset]); - tempvar bitwise_ptr = bitwise_ptr + 3; let (target_input_high_second) = word_reverse_endian_64([encoded_module + 15 + offset]); let target_input_low = target_input_low_first * 0x10000000000000000 + target_input_low_second; - let target_input_high = target_input_high_first * 0x10000000000000000 + target_input_high_second ; - local target_input: felt; - %{ - target_input = ids.target_input_low * 2**128 + ids.target_input_high - print(f"target_input = {target_input}") - ids.target_input = target_input - %} + let target_input_high = target_input_high_first * 0x10000000000000000 + target_input_high_second; + let target_input = target_input_high * 0x100000000000000000000000000000000 + target_input_low; + assert module_inputs[i] = target_input; [ap] = i + 1, ap++; From 062b2051ef9056f32d6b07cbadb9313eebcfdee9 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Mon, 22 Jul 2024 18:15:16 +0200 Subject: [PATCH 32/73] recursive extract_dynamic_params --- src/module.cairo | 51 ++++++++++++++---------------------------------- 1 file changed, 15 insertions(+), 36 deletions(-) diff --git a/src/module.cairo b/src/module.cairo index b8e0cce5..249a169a 100644 --- a/src/module.cairo +++ b/src/module.cairo @@ -26,9 +26,10 @@ func init_module{ ), ); } else { - let (module_inputs) = extract_dynamic_params{ + let (module_inputs) = alloc(); + extract_dynamic_params{ range_check_ptr=range_check_ptr - }(encoded_module=input,module_inputs_len=module_inputs_len); + }(encoded_module=input, module_inputs_len=module_inputs_len, index=0, extracted_inputs=module_inputs); return ( res=ModuleTask( @@ -80,52 +81,30 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu // input: encoded_module, module_inputs_len // Outputs: // module_inputs -func extract_dynamic_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(encoded_module: felt*, module_inputs_len: felt) -> ( - module_inputs: felt* -) { +func extract_dynamic_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(encoded_module: felt*, module_inputs_len: felt, index: felt, extracted_inputs: felt*) -> () { alloc_locals; // ModuleTask Layout: // 0-4: class_hash // 4-8: dynamic_input_offset // 8-12: module_inputs_len - // 12-16: input 1 - // . - // . - // . - - let (module_inputs) = alloc(); + // 12-16: input 1... + // ... - tempvar i = 0; - - copy_loop: - let i = [ap - 1]; - if (i == module_inputs_len) { - jmp end_loop; + if (module_inputs_len == index) { + return(); } - - let offset = i * 4; - %{ - print(f"offset = {ids.offset}") - print(f"offset2 = {12+ ids.offset}") - %} - let (target_input_low_first) = word_reverse_endian_64([encoded_module + 12 + offset]); - let (target_input_low_second) = word_reverse_endian_64([encoded_module + 13 + offset]); - let (target_input_high_first) = word_reverse_endian_64([encoded_module + 14 + offset]); - let (target_input_high_second) = word_reverse_endian_64([encoded_module + 15 + offset]); + + let (target_input_low_first) = word_reverse_endian_64([encoded_module + 12 + index*4]); + let (target_input_low_second) = word_reverse_endian_64([encoded_module + 13 + index*4]); + let (target_input_high_first) = word_reverse_endian_64([encoded_module + 14 + index*4]); + let (target_input_high_second) = word_reverse_endian_64([encoded_module + 15 + index*4]); let target_input_low = target_input_low_first * 0x10000000000000000 + target_input_low_second; let target_input_high = target_input_high_first * 0x10000000000000000 + target_input_high_second; let target_input = target_input_high * 0x100000000000000000000000000000000 + target_input_low; - assert module_inputs[i] = target_input; - [ap] = i + 1, ap++; - - jmp copy_loop; - - end_loop: + assert extracted_inputs[0] = target_input; - return ( - module_inputs=module_inputs - ); + return extract_dynamic_params(encoded_module=encoded_module, module_inputs_len=module_inputs_len, index=index+1, extracted_inputs=extracted_inputs+1); } From e0714b531cfdd4707c9c4991b9686fbb4b51f997 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Mon, 22 Jul 2024 18:25:57 +0200 Subject: [PATCH 33/73] v2 task decoding finished --- src/datalakes/block_sampled_datalake.cairo | 7 +- src/hdp.cairo | 4 +- src/merkle.cairo | 4 +- src/module.cairo | 92 +++++++++++----------- src/types.cairo | 8 +- 5 files changed, 60 insertions(+), 55 deletions(-) diff --git a/src/datalakes/block_sampled_datalake.cairo b/src/datalakes/block_sampled_datalake.cairo index d0dc7c54..17995bb1 100644 --- a/src/datalakes/block_sampled_datalake.cairo +++ b/src/datalakes/block_sampled_datalake.cairo @@ -336,7 +336,10 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu let (increment) = word_reverse_endian_64([input + 19]); return ( - chain_id=chain_id, block_range_start=block_range_start, block_range_end=block_range_end, increment=increment + chain_id=chain_id, + block_range_start=block_range_start, + block_range_end=block_range_end, + increment=increment, ); } @@ -479,4 +482,4 @@ func fetch_header_data_points{ return fetch_header_data_points( chain_id=chain_id, datalake=datalake, index=index + 1, data_points=data_points ); -} \ No newline at end of file +} diff --git a/src/hdp.cairo b/src/hdp.cairo index d9b6c4f8..1e795f0c 100644 --- a/src/hdp.cairo +++ b/src/hdp.cairo @@ -291,7 +291,9 @@ func compute_tasks{ let (local module_task) = init_module(encoded_task, encoded_task_len); - let (result, program_hash) = compute_contract(module_task.module_inputs, module_task.module_inputs_len); + let (result, program_hash) = compute_contract( + module_task.module_inputs, module_task.module_inputs_len + ); assert results[0] = result; %{ target_result = hex(ids.result.high * 2 ** 128 + ids.result.low) diff --git a/src/merkle.cairo b/src/merkle.cairo index e5efb6db..e828e505 100644 --- a/src/merkle.cairo +++ b/src/merkle.cairo @@ -89,9 +89,7 @@ func compute_tasks_hash_v2{ let (task_hash) = keccak(encoded_task, task_bytes_len); - %{ - print(f"Task hash: {ids.task_hash}") - %} + %{ print(f"Task hash: {ids.task_hash}") %} return task_hash; } diff --git a/src/module.cairo b/src/module.cairo index 249a169a..c405bc23 100644 --- a/src/module.cairo +++ b/src/module.cairo @@ -8,38 +8,33 @@ func init_module{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, keccak_ptr: KeccakBuiltin*, pow2_array: felt* }(input: felt*, input_bytes_len: felt) -> (res: ModuleTask) { alloc_locals; - let (class_hash, module_inputs_len) = extract_constant_params{ - range_check_ptr=range_check_ptr - }(input=input); + let (class_hash, module_inputs_len) = extract_constant_params{range_check_ptr=range_check_ptr}( + input=input + ); + + %{ print(f"module_inputs_len = {ids.module_inputs_len}") %} + + let (module_inputs) = alloc(); + + extract_dynamic_params{range_check_ptr=range_check_ptr}( + encoded_module=input, + module_inputs_len=module_inputs_len, + index=0, + extracted_inputs=module_inputs, + ); %{ - print(f"module_inputs_len = {ids.module_inputs_len}") - %} + print(ids.module_inputs_len) - if (module_inputs_len == 0) { - let (module_inputs) = alloc(); - return ( - res=ModuleTask( - class_hash=class_hash, - module_inputs_len=module_inputs_len, - module_inputs=module_inputs, - ), - ); - } else { - let (module_inputs) = alloc(); - extract_dynamic_params{ - range_check_ptr=range_check_ptr - }(encoded_module=input, module_inputs_len=module_inputs_len, index=0, extracted_inputs=module_inputs); - - return ( - res=ModuleTask( - class_hash=class_hash, - module_inputs_len=module_inputs_len, - module_inputs=module_inputs, - ), - ); - } + for i in range(ids.module_inputs_len): + print(memory[ids.module_inputs + i]) + %} + return ( + res=ModuleTask( + class_hash=class_hash, module_inputs_len=module_inputs_len, module_inputs=module_inputs + ), + ); } // Decodes the constant parameters of the Module @@ -61,9 +56,9 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu let (class_hash_low_second) = word_reverse_endian_64([input + 1]); let (class_hash_high_first) = word_reverse_endian_64([input + 2]); let (class_hash_high_second) = word_reverse_endian_64([input + 3]); - let class_hash_low = class_hash_low_first * 0x10000000000000000 + class_hash_low_second; - let class_hash_high = class_hash_high_first * 0x10000000000000000 + class_hash_high_second; - let class_hash = class_hash_high * 0x100000000000000000000000000000000 + class_hash_high; + let class_hash_first = class_hash_low_first * 0x10000000000000000 + class_hash_low_second; + let class_hash_second = class_hash_high_first * 0x10000000000000000 + class_hash_high_second; + let class_hash = class_hash_first * 0x100000000000000000000000000000000 + class_hash_second; // first 3 chunks of module_inputs_len should be 0 assert [input + 8] = 0x0; @@ -71,9 +66,7 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu assert [input + 10] = 0x0; let (module_inputs_len) = word_reverse_endian_64([input + 11]); - return ( - class_hash=class_hash, module_inputs_len=module_inputs_len - ); + return (class_hash=class_hash, module_inputs_len=module_inputs_len); } // Decodes the dynamic parameters of the Module @@ -81,30 +74,39 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu // input: encoded_module, module_inputs_len // Outputs: // module_inputs -func extract_dynamic_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(encoded_module: felt*, module_inputs_len: felt, index: felt, extracted_inputs: felt*) -> () { +func extract_dynamic_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}( + encoded_module: felt*, module_inputs_len: felt, index: felt, extracted_inputs: felt* +) -> () { alloc_locals; // ModuleTask Layout: // 0-4: class_hash // 4-8: dynamic_input_offset // 8-12: module_inputs_len // 12-16: input 1... + // 16-20: ... // ... if (module_inputs_len == index) { - return(); + return (); } - let (target_input_low_first) = word_reverse_endian_64([encoded_module + 12 + index*4]); - let (target_input_low_second) = word_reverse_endian_64([encoded_module + 13 + index*4]); - let (target_input_high_first) = word_reverse_endian_64([encoded_module + 14 + index*4]); - let (target_input_high_second) = word_reverse_endian_64([encoded_module + 15 + index*4]); + let (target_input_low_first) = word_reverse_endian_64([encoded_module + 12 + index * 4]); + let (target_input_low_second) = word_reverse_endian_64([encoded_module + 13 + index * 4]); + let (target_input_high_first) = word_reverse_endian_64([encoded_module + 14 + index * 4]); + let (target_input_high_second) = word_reverse_endian_64([encoded_module + 15 + index * 4]); - let target_input_low = target_input_low_first * 0x10000000000000000 + target_input_low_second; - let target_input_high = target_input_high_first * 0x10000000000000000 + target_input_high_second; - let target_input = target_input_high * 0x100000000000000000000000000000000 + target_input_low; + let target_input_first = target_input_low_first * 0x10000000000000000 + target_input_low_second; + let target_input_second = target_input_high_first * 0x10000000000000000 + + target_input_high_second; + let target_input = target_input_first * 0x100000000000000000000000000000000 + + target_input_second; assert extracted_inputs[0] = target_input; - return extract_dynamic_params(encoded_module=encoded_module, module_inputs_len=module_inputs_len, index=index+1, extracted_inputs=extracted_inputs+1); + return extract_dynamic_params( + encoded_module=encoded_module, + module_inputs_len=module_inputs_len, + index=index + 1, + extracted_inputs=extracted_inputs + 1, + ); } - diff --git a/src/types.cairo b/src/types.cairo index 6a45d82c..322aae5f 100644 --- a/src/types.cairo +++ b/src/types.cairo @@ -46,7 +46,7 @@ struct ComputationalTask { } struct ModuleTask { - class_hash: felt, - module_inputs_len: felt, - module_inputs: felt*, -} \ No newline at end of file + class_hash: felt, + module_inputs_len: felt, + module_inputs: felt*, +} From a91e96db3575e51ff9beacd3597ad53e484b6eda Mon Sep 17 00:00:00 2001 From: Pia Date: Mon, 22 Jul 2024 18:58:35 +0200 Subject: [PATCH 34/73] chore: comments index --- src/module.cairo | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/module.cairo b/src/module.cairo index c405bc23..53513f09 100644 --- a/src/module.cairo +++ b/src/module.cairo @@ -47,8 +47,8 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu ) { alloc_locals; // ModuleTask Layout: - // 0-4: class_hash - // 4-8: dynamic_input_offset + // 0-3: class_hash + // 4-7: dynamic_input_offset // 8-11: module_inputs_len // Copy class_hash @@ -79,11 +79,11 @@ func extract_dynamic_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}( ) -> () { alloc_locals; // ModuleTask Layout: - // 0-4: class_hash - // 4-8: dynamic_input_offset - // 8-12: module_inputs_len - // 12-16: input 1... - // 16-20: ... + // 0-3: class_hash + // 4-7: dynamic_input_offset + // 8-11: module_inputs_len + // 12-15: input 1... + // 16-19: ... // ... if (module_inputs_len == index) { From fd9d6818e43a79d75e5d0db7f39e0a3ce50da4db Mon Sep 17 00:00:00 2001 From: Pia Date: Mon, 22 Jul 2024 19:11:54 +0200 Subject: [PATCH 35/73] fix: compute task hash --- src/merkle.cairo | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/merkle.cairo b/src/merkle.cairo index e828e505..f96e443b 100644 --- a/src/merkle.cairo +++ b/src/merkle.cairo @@ -87,9 +87,12 @@ func compute_tasks_hash_v2{ }(encoded_task: felt*, task_bytes_len: felt) -> Uint256 { alloc_locals; - let (task_hash) = keccak(encoded_task, task_bytes_len); - - %{ print(f"Task hash: {ids.task_hash}") %} + let (task_hash: Uint256) = keccak(encoded_task, task_bytes_len); + let (task_hash) = uint256_reverse_endian(task_hash); + %{ + target_task_hash = hex(ids.task_hash.low + ids.task_hash.high*2**128)[2:] + print(f"Task Hash: 0x{target_task_hash}") + %} return task_hash; } From e1c6c2c1cbe96e23a83812706fe0e83ea0b3d3cd Mon Sep 17 00:00:00 2001 From: Pia Date: Mon, 22 Jul 2024 19:19:08 +0200 Subject: [PATCH 36/73] fix: dryrun --- tools/py/schema.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/py/schema.py b/tools/py/schema.py index 973c9cd0..90ebe536 100644 --- a/tools/py/schema.py +++ b/tools/py/schema.py @@ -104,6 +104,16 @@ class Module(ValidatedMarshmallowDataclass): module_class: CompiledClass +@marshmallow_dataclass.dataclass(frozen=True) +class DryRunModule(ValidatedMarshmallowDataclass): + inputs: List[int] = field( + metadata=additional_metadata( + marshmallow_field=mfields.List(IntAsHex(), required=True) + ) + ) + module_class: CompiledClass + + @marshmallow_dataclass.dataclass(frozen=True) class DatalakeTask: datalake: Datalake @@ -139,8 +149,8 @@ class HDPInput(ValidatedMarshmallowDataclass): @marshmallow_dataclass.dataclass(frozen=True) class HDPDryRunInput(ValidatedMarshmallowDataclass): dry_run_output_path: str - modules: List[Module] = field( + modules: List[DryRunModule] = field( metadata=additional_metadata( - marshmallow_field=mfields.List(mfields.Nested(Module.Schema)) + marshmallow_field=mfields.List(mfields.Nested(DryRunModule.Schema)) ) ) From de23593f503b561f9be755a0cae611448f43dd69 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 23 Jul 2024 11:34:19 +0200 Subject: [PATCH 37/73] syscall handlers minor refactor --- .../dryrun_syscall_handler.py | 2 + .../header_memorizer_handler.py | 70 +- .../storage_memorizer_handler.py | 2 +- .../provider/header_key_provider.py | 60 + .../contract_bootloader/syscall_handler.py | 2 + .../header_memorizer_handler.py | 18 +- src/hdp_input.json | 2708 ++--------------- 7 files changed, 349 insertions(+), 2513 deletions(-) diff --git a/packages/contract_bootloader/dryrun_syscall_handler.py b/packages/contract_bootloader/dryrun_syscall_handler.py index b424007e..db068a6f 100644 --- a/packages/contract_bootloader/dryrun_syscall_handler.py +++ b/packages/contract_bootloader/dryrun_syscall_handler.py @@ -71,6 +71,8 @@ def _call_contract_helper( start_addr=request.calldata_start, end_addr=request.calldata_end ) + retdata = [] + memorizerId = MemorizerId.from_int(request.contract_address) if memorizerId == MemorizerId.Header: total_size = Memorizer.size() + HeaderMemorizerKey.size() diff --git a/packages/contract_bootloader/dryrun_syscall_memorizer_handler/header_memorizer_handler.py b/packages/contract_bootloader/dryrun_syscall_memorizer_handler/header_memorizer_handler.py index 4f849739..b3ab5e45 100644 --- a/packages/contract_bootloader/dryrun_syscall_memorizer_handler/header_memorizer_handler.py +++ b/packages/contract_bootloader/dryrun_syscall_memorizer_handler/header_memorizer_handler.py @@ -15,7 +15,7 @@ def __init__(self, memorizer: Memorizer, evm_provider_url: str): def get_parent(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = int(self.evm_provider.get_block(key=key)["parentHash"]) + value = self.evm_provider.get_parent(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, @@ -23,7 +23,7 @@ def get_parent(self, key: MemorizerKey) -> Tuple[int, int]: def get_uncle(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = int(self.evm_provider.get_block(key=key)["sha3Uncles"]) + value = self.evm_provider.get_uncle(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, @@ -31,7 +31,7 @@ def get_uncle(self, key: MemorizerKey) -> Tuple[int, int]: def get_coinbase(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = int(self.evm_provider.get_block(key=key)["miner"]) + value = self.evm_provider.get_coinbase(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, @@ -39,7 +39,7 @@ def get_coinbase(self, key: MemorizerKey) -> Tuple[int, int]: def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = int(self.evm_provider.get_block(key=key)["stateRoot"]) + value = self.evm_provider.get_state_root(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, @@ -47,7 +47,7 @@ def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: def get_transaction_root(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = int(self.evm_provider.get_block(key=key)["transactionsRoot"]) + value = self.evm_provider.get_transaction_root(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, @@ -55,18 +55,23 @@ def get_transaction_root(self, key: MemorizerKey) -> Tuple[int, int]: def get_receipt_root(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = int(self.evm_provider.get_block(key=key)["receiptRoot"]) + value = self.evm_provider.get_receipt_root(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, ) def get_bloom(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = self.evm_provider.get_bloom(key=key) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_difficulty(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = int(self.evm_provider.get_block(key=key)["difficulty"]) + value = self.evm_provider.get_difficulty(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, @@ -74,7 +79,7 @@ def get_difficulty(self, key: MemorizerKey) -> Tuple[int, int]: def get_number(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = int(self.evm_provider.get_block(key=key)["number"]) + value = self.evm_provider.get_number(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, @@ -82,7 +87,7 @@ def get_number(self, key: MemorizerKey) -> Tuple[int, int]: def get_gas_limit(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = int(self.evm_provider.get_block(key=key)["gasLimit"]) + value = self.evm_provider.get_gas_limit(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, @@ -90,7 +95,7 @@ def get_gas_limit(self, key: MemorizerKey) -> Tuple[int, int]: def get_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = int(self.evm_provider.get_block(key=key)["gasUsed"]) + value = self.evm_provider.get_gas_used(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, @@ -98,18 +103,23 @@ def get_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: def get_timestamp(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = int(self.evm_provider.get_block(key=key)["timestamp"]) + value = self.evm_provider.get_timestamp(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, ) def get_extra_data(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = self.evm_provider.get_extra_data(key=key) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_mix_hash(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = int(self.evm_provider.get_block(key=key)["mixHash"]) + value = self.evm_provider.get_mix_hash(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, @@ -117,7 +127,7 @@ def get_mix_hash(self, key: MemorizerKey) -> Tuple[int, int]: def get_nonce(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = int(self.evm_provider.get_block(key=key)["nonce"]) + value = self.evm_provider.get_nonce(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, @@ -125,23 +135,43 @@ def get_nonce(self, key: MemorizerKey) -> Tuple[int, int]: def get_base_fee_per_gas(self, key: MemorizerKey) -> Tuple[int, int]: self.fetch_keys_registry.add(key) - value = int(self.evm_provider.get_block(key=key)["baseFeePerGas"]) + value = self.evm_provider.get_base_fee_per_gas(key=key) return ( value % 0x100000000000000000000000000000000, value // 0x100000000000000000000000000000000, ) def get_withdrawals_root(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = self.evm_provider.get_withdrawals_root(key=key) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_blob_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = self.evm_provider.get_blob_gas_used(key=key) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_excess_blob_gas(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = self.evm_provider.get_excess_blob_gas(key=key) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def get_parent_beacon_block_root(self, key: MemorizerKey) -> Tuple[int, int]: - pass + self.fetch_keys_registry.add(key) + value = self.evm_provider.get_parent_beacon_block_root(key=key) + return ( + value % 0x100000000000000000000000000000000, + value // 0x100000000000000000000000000000000, + ) def fetch_keys_dict(self) -> set: def create_dict(key: MemorizerKey): diff --git a/packages/contract_bootloader/dryrun_syscall_memorizer_handler/storage_memorizer_handler.py b/packages/contract_bootloader/dryrun_syscall_memorizer_handler/storage_memorizer_handler.py index 32f80ebf..1e87101b 100644 --- a/packages/contract_bootloader/dryrun_syscall_memorizer_handler/storage_memorizer_handler.py +++ b/packages/contract_bootloader/dryrun_syscall_memorizer_handler/storage_memorizer_handler.py @@ -24,7 +24,7 @@ def get_slot(self, key: MemorizerKey) -> Tuple[int, int]: def fetch_keys_dict(self) -> set: def create_dict(key: MemorizerKey): data = dict() - data["type"] = "AccountMemorizerKey" + data["type"] = "StorageMemorizerKey" data["key"] = key.to_dict() return data diff --git a/packages/contract_bootloader/provider/header_key_provider.py b/packages/contract_bootloader/provider/header_key_provider.py index 46344415..4d12faa7 100644 --- a/packages/contract_bootloader/provider/header_key_provider.py +++ b/packages/contract_bootloader/provider/header_key_provider.py @@ -13,3 +13,63 @@ def get_block(self, key: MemorizerKey) -> BlockData: return self.web3.eth.get_block(key.block_number) except Exception as e: raise Exception(f"An error occurred while fetching the parent block: {e}") + + def get_parent(self, key: MemorizerKey) -> int: + return int(self.get_block(key=key)["parentHash"].hex(), 16) + + def get_uncle(self, key: MemorizerKey) -> int: + return int(self.get_block(key=key)["sha3Uncles"].hex(), 16) + + def get_coinbase(self, key: MemorizerKey) -> int: + return int(self.get_block(key=key)["miner"]) + + def get_state_root(self, key: MemorizerKey) -> int: + return int(self.get_block(key=key)["stateRoot"].hex(), 16) + + def get_transaction_root(self, key: MemorizerKey) -> int: + return int(self.get_block(key=key)["transactionsRoot"].hex(), 16) + + def get_receipt_root(self, key: MemorizerKey) -> int: + return int(self.get_block(key=key)["receiptRoot"].hex(), 16) + + def get_bloom(self, key: MemorizerKey) -> int: + pass + + def get_difficulty(self, key: MemorizerKey) -> int: + return int(self.get_block(key=key)["difficulty"]) + + def get_number(self, key: MemorizerKey) -> int: + return int(self.get_block(key=key)["number"]) + + def get_gas_limit(self, key: MemorizerKey) -> int: + return int(self.get_block(key=key)["gasLimit"]) + + def get_gas_used(self, key: MemorizerKey) -> int: + return int(self.get_block(key=key)["gasUsed"]) + + def get_timestamp(self, key: MemorizerKey) -> int: + return int(self.get_block(key=key)["timestamp"]) + + def get_extra_data(self, key: MemorizerKey) -> int: + pass + + def get_mix_hash(self, key: MemorizerKey) -> int: + return int(self.get_block(key=key)["mixHash"].hex(), 16) + + def get_nonce(self, key: MemorizerKey) -> int: + return int(self.get_block(key=key)["nonce"].hex(), 16) + + def get_base_fee_per_gas(self, key: MemorizerKey) -> int: + return int(self.get_block(key=key)["baseFeePerGas"]) + + def get_withdrawals_root(self, key: MemorizerKey) -> int: + pass + + def get_blob_gas_used(self, key: MemorizerKey) -> int: + pass + + def get_excess_blob_gas(self, key: MemorizerKey) -> int: + pass + + def get_parent_beacon_block_root(self, key: MemorizerKey) -> int: + pass diff --git a/packages/contract_bootloader/syscall_handler.py b/packages/contract_bootloader/syscall_handler.py index fb00bb55..86bc831d 100644 --- a/packages/contract_bootloader/syscall_handler.py +++ b/packages/contract_bootloader/syscall_handler.py @@ -65,6 +65,8 @@ def _call_contract_helper( start_addr=request.calldata_start, end_addr=request.calldata_end ) + retdata = [] + memorizerId = MemorizerId.from_int(request.contract_address) functionId = AccountMemorizerFunctionId.from_int(request.selector) if memorizerId == MemorizerId.Header: diff --git a/packages/contract_bootloader/syscall_memorizer_handler/header_memorizer_handler.py b/packages/contract_bootloader/syscall_memorizer_handler/header_memorizer_handler.py index eb1cd381..ac849558 100644 --- a/packages/contract_bootloader/syscall_memorizer_handler/header_memorizer_handler.py +++ b/packages/contract_bootloader/syscall_memorizer_handler/header_memorizer_handler.py @@ -27,9 +27,12 @@ def get_parent(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["parentHash"] + value = int( + decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun) + .as_dict()["parentHash"] + .hex(), + 16, + ) return ( value % 0x100000000000000000000000000000000, @@ -47,9 +50,12 @@ def get_uncle(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["unclesHash"] + value = int( + decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun) + .as_dict()["unclesHash"] + .hex(), + 16, + ) return ( value % 0x100000000000000000000000000000000, diff --git a/src/hdp_input.json b/src/hdp_input.json index da854bc2..20bf4a2e 100644 --- a/src/hdp_input.json +++ b/src/hdp_input.json @@ -1,7 +1,7 @@ { "cairo_run_output_path": "cairo_run_output.json", - "task_root": "0x5ce564b894328395542088257ba161b16f5b86f87e76dcabe0f403bd02192ec2", - "result_root": "0xedaa74e295a7534bbc08da06efb1300d30265da914c4908adfe7894cba8ffc9a", + "task_root": "0xbababda806a39052318e643bdb1eff6af2a633721c0d36ef9a4280a5986b605e", + "result_root": "0x8f06b439efd884098a3d193a8339bf4f4458779e99cbdf38cfe87f35e47d3628", "proofs": { "mmr_metas": [ { @@ -29,307 +29,106 @@ "headers": [ { "rlp": [ - "0x2a661c27a02302f9", - "0x55599ca3ef044c21", - "0x7f4f6425b632d127", - "0x3bd25b345f2626d7", - "0x4dcc1da00079af17", + "0x2e8d3af9a06502f9", + "0x7af2d3b2542aea7b", + "0x75f079981b05a875", + "0xb8b303369fed198f", + "0x4dcc1da0e0b17427", "0xb585ab7a5dc7dee8", "0x4512d31ad4ccb667", "0x42a1f013748a941b", - "0x2638944793d440fd", - "0x19f1dc688dbd9c53", - "0x8c27b45745990be8", - "0x44ecee1ef0a09fec", - "0x31ef5fc8b35f9240", - "0x5cff3221a63c3ff9", - "0x3a1b50acab9f2849", - "0x7b399c9ea0c9300c", - "0x928ab55d3c647fd8", - "0x75a98e7503cfb543", - "0xad77b5f16bbe83fb", - "0x46332fa029c561eb", - "0x3235cf0e42cc5876", - "0xafa351e8b25fdefb", - "0xdc2a3effd032bc5d", - "0x1b9525359b820", - "0x894220490e02024e", - "0x4629522101940", - "0x4140010320402180", - "0x3002ba00680310c2", - "0x8907908001000040", - "0xd30004402c884faa", - "0x6003a010f3068880", - "0x800024a004983085", - "0x4052070801e408c0", - "0x30000080a004a40", - "0xf8420c0504184085", - "0x111008300004000", - "0x124240030a08a048", - "0x440b5006054201c4", - "0x30004086c1265900", - "0x140c3b0090c40401", - "0x441884101a202002", - "0xc078801820130030", - "0x4d2200922018904", - "0x4118404d80f01198", - "0x220444880500a96", - "0x284548340004038", - "0x40800020262003b", - "0x80b20005020490a4", - "0x200084302098083", - "0x140470b11212c00", - "0x110428032523000", - "0xc73002400ad1102", - "0x344921862c929198", - "0x400902102100820", - "0x8210b13046004", - "0x90a6080080302c0", - "0xc90184e7214f8380", - "0x84c2f66c018480c3", - "0x43e8a0802c4eb965", - "0xbe857c88f0776672", - "0xb0e4fb3cb43479f4", - "0xdf1c5b163586f8b7", - "0x88895e9a10b91e", + "0x7a6a944793d440fd", + "0x5dbcb70bd582b8a9", + "0x2ff1999c7144a2a1", + "0x85c55063d9a0a306", + "0xbfd0cb7565b86954", + "0xd7c7acfd7f88881a", + "0x97e5d47e42631e2b", + "0x773a16cca0bc28e6", + "0xa157a5c6e62f7d7c", + "0xf7d80c902e33759a", + "0xb5f417f8aab99a4b", + "0xb34b66a014a5d63d", + "0xceb30e687cb36ada", + "0x1d99ed3a1e047fb4", + "0x5099e20e5bfaa9e8", + "0x1b9be0138a3b8", + "0x807a00014e902eae", + "0x584c089132629081", + "0x5018193080b8d0", + "0x908068232863a00e", + "0x112010a421000805", + "0x83c0040104b9248a", + "0x13ee0806100401", + "0xc00240620900405", + "0x4826050812e00110", + "0xa10160040a0002c8", + "0x124fe801c202086", + "0x226480c244059110", + "0x504649860a406408", + "0xa72904104540cc80", + "0x20401122c28d8806", + "0xd08d01cc88804", + "0x204000810c0942a2", + "0xa1432898241f0164", + "0x684420900942a010", + "0x38404c40b06110", + "0x670ca4888891286f", + "0xc4750010131006c", + "0x6c8200483200000", + "0xa18148102136d124", + "0x42c80263578502", + "0x30002db21402102", + "0x5400601435d0300e", + "0x49e0818800890401", + "0x81620cb14015f39", + "0x42040e0542e7000", + "0x4100b06c112e0846", + "0xa213214a44d20288", + "0xc90184b8cd518380", + "0x65840282bc8380c3", + "0xd0183d899a45cdb", + "0x678868746567840c", + "0x85312e30322e316f", + "0x3c30a078756e696c", + "0xeb108dad0a8b074d", + "0x3aedf7ad39285187", + "0xa348af6bc1b570a2", + "0x885ec1d72607df", "0x8500000000000000", - "0x6d90a0275acc5501", - "0xa9a52bfadf2cd5ff", - "0xd313639d4cc9140b", - "0xece5fda22a1d5a16", - "0x39b6181c72ba" + "0xa253a07bc054fa01", + "0x72236e89438fc395", + "0x3549c5cec5b604b1", + "0x94d70ecf9fe99a7a", + "0x28337dbccaa0383", + "0xa00000d004840000", + "0x96a39fda54a4ed1f", + "0x1d1ad9d3eb7004fa", + "0x1e12f396750a4bac", + "0x2253017aba91d3f2" ], - "rlp_bytes_len": 550, + "rlp_bytes_len": 616, "proof": { - "leaf_idx": 1521895, + "leaf_idx": 1171785, "mmr_path": [ - "0x598955397f4891983bce4886d22fa19c0d22255f94bb8aaa1faa7aec92cfc7f", - "0x2f91fb12566af84978eb5b8694abba5b6d23d0c57ca791fd3bfd01ecd3a0c8c", - "0x3b508668f7d92d379884c79d9031878cbaeb3fa28f053f48b57a7502e45611c", - "0x6ae0557449080a7745c6ad43b21c6f6f57d452817b23b77b5c2ff3d8ccb3760", - "0x593ac29a8b112e2bd247cad0b7b016786ad04217bee18f5e0ea41127ba23f75", - "0x787989b47e298c397a0a6123049fb85d5bd2f962ed9149ee6df656dbc605dda", - "0x6984af357d277724980ece2c11e93d6b6e14200715769b3fd9cbc9a0eaf29c7", - "0x61bc1b0b3467541328174831626b59bcebaec7ef9fda196df6895acfaca4ace", - "0x4fa6272ed7dae6104f103fdec5b82c09f8006abfc9e8e9bc44cff298749599c", - "0x4c9f22576f8d894fd2f992221402ee2d0a703c35c9e1d114f31411b13246bfc", - "0x5b620a5f345977ec7fd3bdeba082078594768bc2fac155ba33b1eab8885a069", - "0x572b3407be5793b54c558f5a7d9d4fb194aea5b14f2b2b7e2c8f526cefbde18", - "0x716621bd5c6f555cca5badd2849633fea9f506876642b58f985f6ab1de6340c", - "0x019df1b143b7076f7c8db2d84794c5bf29be24dbcd64d6a7482c7ff5490486f", - "0x145418fa00ec0102943417073ea3015c793e55e1a11f303aef71a154b2d418c", - "0x164770888e7afc464c2c3a956cf13d2aaf4b5786baec8424357e46f8e1968b2", - "0x46034840abeb358ce87e74d2963f6fb9c655841b31df46eab6e2b784b35d82c", - "0x4b2dfec0bb9b57c4e7ac16cedcd3ff50f381f7ab2df50bcfa3596308f79135a", - "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", - "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", - "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", - "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" - ] - } - }, - { - "rlp": [ - "0x26400d37a04102f9", - "0x2051c2b236035188", - "0x684242b9dff023b", - "0x1df35e94dc7e86ae", - "0x4dcc1da0085b324d", - "0xb585ab7a5dc7dee8", - "0x4512d31ad4ccb667", - "0x42a1f013748a941b", - "0xcb13944793d440fd", - "0x4d7f97a0134ae36a", - "0x23bb874bc2eb0171", - "0xf5c2968698a0d5f0", - "0xa9546b27ed06b52b", - "0x94ab3ffc793e2add", - "0xe841e932753ab1d8", - "0xe001926ba07e7c2e", - "0xc27d5a64d86dd96a", - "0x1c030189615b4daa", - "0x8b3c9ecd562c85a", - "0x3c0c71a05e60ba16", - "0xedf338f821750595", - "0x6e5cc3fb4ab8e7a8", - "0x98c57d0650e5f7b7", - "0x1b9ba32d98671", - "0x48522109c65227e8", - "0x384640112295d925", - "0x504a301e34011905", - "0x1803acd54e009405", - "0x8944448004440562", - "0xca241500008824aa", - "0x6092a34686135ace", - "0x820164a00090c085", - "0x802245202450090", - "0xab00a18a4a00b852", - "0x24a8504541c0585", - "0x4a4000c20105401a", - "0x1a42490e0c406088", - "0x8e284916454a82c6", - "0x4080608ad0a44984", - "0x508c4a0012880281", - "0x64a210989020b602", - "0xc1523008256b2934", - "0x4dc204905518000", - "0x41104c8490e02128", - "0x7e89a4e81600089e", - "0x2884488102284168", - "0x2b99009f1220409a", - "0xc5a0c21f22299164", - "0xb8084207108350", - "0x1018132a81008803", - "0x44a400454303010", - "0x8ff2709800b80140", - "0x528821e34bc2d08a", - "0xca8a0a800900009", - "0xc001244a288c5826", - "0x16260004d466281", - "0xc90184e5214f8380", - "0x658457d1f68380c3", - "0x756c6c499f144eb9", - "0x44206574616e696d", - "0x7a69746172636f6d", - "0x6269727473442065", - "0xe9c3dc64a0657475", - "0xfb66a396cc302611", - "0x32c1ff3ed429a6ed", - "0x1523a487d871bf30", - "0x88a9c52c1e", - "0x4601850000000000", - "0xa6b809f0a02e9fae", - "0xfc4ad77783d05270", - "0x3b4c65ca7a376705", - "0x7815fdbd4a25c9cc", - "0x3b801f32" - ], - "rlp_bytes_len": 580, - "proof": { - "leaf_idx": 1521898, - "mmr_path": [ - "0x5b5df03578b03a53f15245e98dc34fabd51e5e349ce852738bad940e641266a", - "0x4751e9833ffe590494bd269b46391a8f474aa5224183e126f9d6ee75b4d9f26", - "0x3b508668f7d92d379884c79d9031878cbaeb3fa28f053f48b57a7502e45611c", - "0x6ae0557449080a7745c6ad43b21c6f6f57d452817b23b77b5c2ff3d8ccb3760", - "0x593ac29a8b112e2bd247cad0b7b016786ad04217bee18f5e0ea41127ba23f75", - "0x787989b47e298c397a0a6123049fb85d5bd2f962ed9149ee6df656dbc605dda", - "0x6984af357d277724980ece2c11e93d6b6e14200715769b3fd9cbc9a0eaf29c7", - "0x61bc1b0b3467541328174831626b59bcebaec7ef9fda196df6895acfaca4ace", - "0x4fa6272ed7dae6104f103fdec5b82c09f8006abfc9e8e9bc44cff298749599c", - "0x4c9f22576f8d894fd2f992221402ee2d0a703c35c9e1d114f31411b13246bfc", - "0x5b620a5f345977ec7fd3bdeba082078594768bc2fac155ba33b1eab8885a069", - "0x572b3407be5793b54c558f5a7d9d4fb194aea5b14f2b2b7e2c8f526cefbde18", - "0x716621bd5c6f555cca5badd2849633fea9f506876642b58f985f6ab1de6340c", - "0x019df1b143b7076f7c8db2d84794c5bf29be24dbcd64d6a7482c7ff5490486f", - "0x145418fa00ec0102943417073ea3015c793e55e1a11f303aef71a154b2d418c", - "0x164770888e7afc464c2c3a956cf13d2aaf4b5786baec8424357e46f8e1968b2", - "0x46034840abeb358ce87e74d2963f6fb9c655841b31df46eab6e2b784b35d82c", - "0x4b2dfec0bb9b57c4e7ac16cedcd3ff50f381f7ab2df50bcfa3596308f79135a", - "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", - "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", - "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", - "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" - ] - } - }, - { - "rlp": [ - "0xa2c4089da03c02f9", - "0x2bce89e6d5f8587e", - "0xa15cc324f748751b", - "0x176ca7a076d396ae", - "0x4dcc1da013dc007d", - "0xb585ab7a5dc7dee8", - "0x4512d31ad4ccb667", - "0x42a1f013748a941b", - "0x609a944793d440fd", - "0xc19a4031d44cc834", - "0xdaff36dac77852a3", - "0xad707dc040a0e553", - "0xd4c2ae43a23f2bd9", - "0x38ea4bab5e8a8359", - "0x21b9d84b5bbb6b58", - "0x2880f0c3a069913c", - "0xc16c52cc54dfbd47", - "0xa962b7c9a137722b", - "0xb8e1d23facc43591", - "0x68ea09a0deff0e00", - "0xb3f740ca3f14626f", - "0xa3aca8f2b76cad43", - "0x9ef02f560f9aa7dc", - "0x1b9e1eaea0976", - "0x444b820bc4760008", - "0x5125398402549938", - "0x5209b1031090b9c0", - "0x300aaa308a21d40c", - "0x492201d024404040", - "0xda002433449a488e", - "0x10eb200e2020182", - "0x406124043398542f", - "0x19cad001ac40238", - "0x88047889db409840", - "0x15084930c1cb884", - "0x6042c34211092a63", - "0x500260822da161ca", - "0x652941842542c8c2", - "0x600082d1c8648800", - "0x435209a8a4920", - "0x4d0a5091e6020b2", - "0xc955300a040ba16c", - "0x90280c28741810", - "0x499940c420115d9c", - "0xe11a449380e0cdf", - "0x2480d60c00604248", - "0x3e8d091e12a01219", - "0x1860da066a249c24", - "0xb12180183819290", - "0xc1f0c01071003", - "0x15035a8014191614", - "0x3f7104a800a28102", - "0x606021a23082d4c9", - "0x88a000200481", - "0xda00142b20d29a8e", - "0xc9278ab440e43e1", - "0xc90184e6214f8380", - "0x84280627018480c3", - "0x183d899204eb965", - "0x8868746567840b0d", - "0x362e31322e316f67", - "0xd3a078756e696c85", - "0x923ffe54329a64ce", - "0xe664b4692332c5de", - "0xb46f6501a25537cc", - "0x882ceb57856f14eb", - "0x0", - "0x18a005d1e1490185", - "0x96ff33950e01687", - "0x52be51d588eae138", - "0xb575a1705b4e3c09", - "0x55aa60b375c9a9" - ], - "rlp_bytes_len": 575, - "proof": { - "leaf_idx": 1521897, - "mmr_path": [ - "0x09c4f998f67aeaaa13f6431812b34599dc12335897d57493c52e5cfa1183fc9", - "0x4751e9833ffe590494bd269b46391a8f474aa5224183e126f9d6ee75b4d9f26", - "0x3b508668f7d92d379884c79d9031878cbaeb3fa28f053f48b57a7502e45611c", - "0x6ae0557449080a7745c6ad43b21c6f6f57d452817b23b77b5c2ff3d8ccb3760", - "0x593ac29a8b112e2bd247cad0b7b016786ad04217bee18f5e0ea41127ba23f75", - "0x787989b47e298c397a0a6123049fb85d5bd2f962ed9149ee6df656dbc605dda", - "0x6984af357d277724980ece2c11e93d6b6e14200715769b3fd9cbc9a0eaf29c7", - "0x61bc1b0b3467541328174831626b59bcebaec7ef9fda196df6895acfaca4ace", - "0x4fa6272ed7dae6104f103fdec5b82c09f8006abfc9e8e9bc44cff298749599c", - "0x4c9f22576f8d894fd2f992221402ee2d0a703c35c9e1d114f31411b13246bfc", - "0x5b620a5f345977ec7fd3bdeba082078594768bc2fac155ba33b1eab8885a069", - "0x572b3407be5793b54c558f5a7d9d4fb194aea5b14f2b2b7e2c8f526cefbde18", - "0x716621bd5c6f555cca5badd2849633fea9f506876642b58f985f6ab1de6340c", - "0x019df1b143b7076f7c8db2d84794c5bf29be24dbcd64d6a7482c7ff5490486f", - "0x145418fa00ec0102943417073ea3015c793e55e1a11f303aef71a154b2d418c", - "0x164770888e7afc464c2c3a956cf13d2aaf4b5786baec8424357e46f8e1968b2", - "0x46034840abeb358ce87e74d2963f6fb9c655841b31df46eab6e2b784b35d82c", - "0x4b2dfec0bb9b57c4e7ac16cedcd3ff50f381f7ab2df50bcfa3596308f79135a", + "0x078aa9ab084541b50c4fd18e620a6842f690f25adb80ef42e308e42ffc9aa02", + "0x787baed1b5e5643ed87a39b0d3afa2f6ea423e961e4cedca920ef7a42ef0b6a", + "0x3c3232b1f45be7df4f28abed027e69143370eada11be07a1a4c31942bfa1fe5", + "0x0c95a53ceccebbad610d2c6a4690448999bc2856398627d90ffac4e60a6bfb6", + "0x5fec4665ee76fa515ff5628482daff91b20e4f54622de8ef75d2dccf27bbfdf", + "0x7f0829c96bb6b4442955b449db044f8fc402b675e1c390d05de0c0848ee91fa", + "0x6c0cc2647d2438f83ca6cc6afba68d24148369e5a421f687bea60e6bcf46fb3", + "0x7343f6841bc0c73a74726c35c8fd50f7ce609cf56f49ed77b30d1736052797a", + "0x7e480f1dd8667e052b75cb10f1d842de1e42bf46526582d65943906b83ef7a7", + "0x25f1d39c524c0120f94751556ca190e710886e26a0be682177640ea053b7c64", + "0x7dde31504e89131c4ddc7645cac85fccc20a4d4230eabfd0bcf311075413bf8", + "0x7273550997a142ea6dcc870be7e10912133a4bfc9904ed30bede306a151704d", + "0x235b43cbee714a34855435a48846a751def3280ac249b39b075858ed2ecb47e", + "0x6d366ebc609ed8f579834208ccab5fe62611848eadf93312ba31faacb4b702f", + "0x0b2fa755643acbb90d31fe81530a6d842443b6e9d62233d7e3e01963d7756e4", + "0x630e360de1c802bdc77459d550ac2c22f8ec261c02815363ae0ef7fbb6eea67", + "0x4d0aa5617b21c9d6acdf01d8ff55ec9b703373d958b7cdee74dddf6b2dcb097", + "0x23ed0242eb2a6f9c4bc66161745cbebb45fe5886f685dc28bf2f1aeaf91e627", "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", @@ -338,1419 +137,7 @@ } } ], - "accounts": [ - { - "address": [ - "0x97a0134ae36acb13", - "0x874bc2eb01714d7f", - "0xd5f023bb" - ], - "account_key": "0x8ad2b901594e58a241532055dfe914294630ed5c33ffc31905452799f9b4aab0", - "proofs": [ - { - "block_number": 5186022, - "proof_bytes_len": [ - 532, - 532, - 532, - 532, - 532, - 436, - 147, - 83, - 104 - ], - "proof": [ - [ - "0xa56441cca01102f9", - "0x485779b9ac3e33da", - "0x45bba8cc7cab8b88", - "0x97f1a360d0fc4298", - "0xda5d4ba0cd0fee2a", - "0x4cea18af7c23d4a0", - "0x67290fdc761585b0", - "0x46c75fe72480cfcc", - "0x30dba091f5da704c", - "0xf5ffdb29cc6cdc1a", - "0xac4fb8743ce7cc12", - "0x8f093f32b732af4f", - "0xda0aa25fed40548", - "0xfd7a9beb227fe053", - "0xd570d52b2115ea5f", - "0xfe229a0827fc520f", - "0xa012454939c57e5c", - "0x21c9887e8ee3f3b1", - "0x5156b1ebfc356cf7", - "0x472d2d64d9ff9480", - "0xd98b7ec0bf9199a7", - "0xa67222f4c5bdcda0", - "0xcb44efdda2e66b74", - "0xac7624bf37444d9d", - "0xa07fca47762cdbf", - "0x2779f753784ca07e", - "0xb5696d5ba2df3e6a", - "0xe1accfc5d1c49211", - "0xea31e9b0f0cbd29b", - "0xeab1a6bca0a0f663", - "0x697d9b97b06c60b5", - "0x9c47e390d62b89a0", - "0x798dbe2cd348cdd2", - "0xf73b544fa04ca910", - "0xcc8a0d2bed50be8a", - "0x61a57b36a1879202", - "0xa73ca0ba46fd8dea", - "0x8b4bbda0c664f43b", - "0x175c3dff5bd40cb7", - "0xbd660f7dca4e90e6", - "0x22854668ebefbe42", - "0xd68a0640b490553", - "0x1c02474bce1b1166", - "0x2fb2f9451cba664a", - "0x80fe06bb9ad35e9a", - "0x5ba05f2c78048e7f", - "0xb5f31e7738ded2ba", - "0xf447594f1998bb5f", - "0x27cd80c48ed1f15d", - "0xa09bd8e385d9f9db", - "0x8ae951222b70f58d", - "0xf52b0ebec8f25e3f", - "0xfed270af9a1469e", - "0x2b3f02042fc5b693", - "0x6ae28be870b10a0", - "0x16291604b227317a", - "0x8dac0fbce38ceefd", - "0xace93a8dc1fb0612", - "0xbc530efeb3ca0fd", - "0xb450cf74a528f7cb", - "0x8d160635de93de22", - "0x442e0f173e0f2b12", - "0xf81b15653aa0471f", - "0xa7bda111d440a7e6", - "0x12e35ee20d909c5", - "0x852d8e1515ad2c3e", - "0x807d369a" - ], - [ - "0x2203510a01102f9", - "0x9b6493f1eafbce8f", - "0xcab50cf7550ea03", - "0xa6166a1fc684449d", - "0x2f611ca0278a613f", - "0x390432baa62b1a9c", - "0xca085e0f40b93f89", - "0x29c27ae3f970b810", - "0x4f11a0348697ea23", - "0x15fae1bdff89aae", - "0x2d379662a57f6c3e", - "0x94b9e0fa577c0bd9", - "0xeaa073b2b96e399c", - "0x7f5589bcdb15412e", - "0xdde3c93dc089245f", - "0xd8fd736ca136a614", - "0xa016f7ef94a462b8", - "0xcf0538fb63aad0e9", - "0xb26d3e80af58fdf5", - "0x20ca30148b2cec11", - "0x4c2fcb4df7821abf", - "0xc7f9e63f9a6e1ea0", - "0x955f28c7518cfc49", - "0xb4be12419fce2f7b", - "0x773a029286892019", - "0xd5b4924cbd96a06f", - "0x90e1fae24960eed4", - "0x898f646d618fe2da", - "0x4ffd46ba2191ffcc", - "0x23feafcdaa083d7", - "0xc1b401d92b41c162", - "0xaf55e71b1cc32c0b", - "0x295c5bfb1a52901a", - "0x1487b0b4a06896cc", - "0xd44cbea352feca7a", - "0x6dc058cae697e48d", - "0x8659ed45c7db8c69", - "0x7ce74aa08db158a9", - "0x564d9a064d0d3c2", - "0xa585d9c2b3a50627", - "0x593872a183de1500", - "0x138ea0b9b7e46808", - "0x16bda1dac8b25389", - "0xa1dc3981db0b5286", - "0x5aae51ed9b411bd4", - "0x86a0e73edf470da8", - "0x4f09e70d776da168", - "0x1cbfd4c4ce386f3", - "0xaab65a74219a1a2f", - "0xa02a061e70248482", - "0x829fcd24f9eec9d4", - "0xa55445bad38a715", - "0x15844d0c36e329f", - "0x9d093fbf60fdff33", - "0xd9a3d455f75fd2a0", - "0xab3a7fc6a1d33828", - "0xae5e998f387e2891", - "0xee2b8a2c2c03186a", - "0xde6ed0b1b955a0e4", - "0xfa6bdfeffedccc63", - "0x3d91aa809af2dbbf", - "0xda17eb79d5185449", - "0xc579977dea0164d", - "0x88cea7f4eec1f0ba", - "0x42a3f8b633052428", - "0x39012bdf2dbfc373", - "0x802cfb9b" - ], - [ - "0xc40409caa01102f9", - "0xe37966a7bdbe7d04", - "0x353cc8aaa27cb1e1", - "0x77c8720822e8f9a0", - "0xf62d8aa0dfd9f3b6", - "0xd755e3ba3a7cb797", - "0xb3e04cdd05ad2700", - "0x8aeb98fb4bba5d0c", - "0xfdd7a0150e57d76a", - "0x45839b15fa97c528", - "0xd63d2446eea54918", - "0x6ce1632f9957b65e", - "0xd1a009cd49302960", - "0xe4dca9270a7a43f5", - "0x12887aacb4484fff", - "0x95dce4aff17cb12b", - "0xa0c04c210384c3d1", - "0xc6942b45369a35b7", - "0xe8ca76433115e3ff", - "0x2aab5a8034993e20", - "0x91e1e7f7eee4d10f", - "0x27fa2b66d38f82a0", - "0xf8332ecfdb7bec88", - "0x6610809b6842c470", - "0xe767cdd170c80078", - "0x7903c5be7adca01b", - "0xe74ac0d10274a4b0", - "0xcdd6c30e1a314fea", - "0x72b8ad6d102eb7e4", - "0x55c32c5feca0cee4", - "0x87369b3e0a1f203a", - "0x32a9d0ba8c36deb4", - "0xf7602f67b08451ea", - "0xf97b89f1a03e2d26", - "0x56934aa308f950bf", - "0xffb4db751859ad25", - "0x7acca8650987bf69", - "0xc87aafa0b142e286", - "0x273b2fadab723492", - "0x8dcc1b7dd46e5d31", - "0x18be1d3a404eb862", - "0xa02ca00a63690851", - "0xd5e9f4aeb4d7a118", - "0xbbbfb9b20f730404", - "0x545092e0230f0373", - "0x91a01ebc3bac3503", - "0x9c64330e16855575", - "0x522345eefd57923e", - "0x6188da6a43deffb4", - "0xa0fec1ff9f8cec1d", - "0x884d9b15cda6e6c7", - "0xcfe7333a96b73ed5", - "0x8d23e4736907b4", - "0xfbc0176cb096e04", - "0xdd9164ba10d6faa0", - "0x849332f2567d84df", - "0x4093aee6050b44f", - "0xe5259c89e6bab006", - "0xaa375e3afdfaa06a", - "0xbb419d5632a791f1", - "0xbbd8778ed10ff16", - "0xb5dded3791de792f", - "0x53ea51625aa08218", - "0xb90c2f66a075fb6b", - "0x3e5faf67ed5f1b63", - "0xf56c48e27dfbf998", - "0x80c08ea7" - ], - [ - "0x4ea1d78aa01102f9", - "0xef56a843a8bfddfa", - "0x9b6c4f7c02d2e804", - "0xddde39277722ac1d", - "0x8d7d3ea08940a0f8", - "0x77f009efd82e57d7", - "0x1e941b39d1f71793", - "0x1810a858df6bcb1c", - "0xd904a0a7dd474312", - "0x6d6cf792f32b73a6", - "0xa8461ce6822cf03b", - "0xc51287bf3e1fe372", - "0xc8a068eafc67710e", - "0x14773ba06774cfe3", - "0x42489002368f960c", - "0xada6b8b1b5839cc2", - "0xa0b4c29bcd9ae1b3", - "0x4c74f0e85ae5e516", - "0x9d2b063a198b6131", - "0xfb5e06d89e8c49cc", - "0xc60346ec1c560738", - "0x5da59c1fd75bbea0", - "0x1bd7ee6b5541f75d", - "0xcc48d2ef76045c7a", - "0x9b20fef4df8858fb", - "0xe9c16ef25786a00c", - "0x7aaf443beecb005a", - "0x7c892e1223e710cb", - "0x545cb4159af46a9c", - "0x5ee90d0de3a0ddd6", - "0x9f3a6bb833cf07c0", - "0xa3cd32a767434213", - "0x48dfef1bcb3b0a6e", - "0xe73a7a10a0c64607", - "0x60c4fb03a93d1b24", - "0xa703abd52ddc888b", - "0x4d0d2090b34e5863", - "0x776ee4a0cfb1250e", - "0x66594e46117f618a", - "0x4b33fceaad7396ca", - "0xeef873fbfdede72c", - "0x2e02a08bde299a28", - "0x1c09c9e37472dd9f", - "0x3ba8de43b97b7070", - "0x1fd629b4e4a9f59c", - "0xcaa00a350d451b0d", - "0xed1e610ea78b3103", - "0x397ef65ef24c3a5c", - "0x8a1e0d9f73a4797f", - "0xa0abdeee5aefd8b4", - "0xdbbca55cd52d1213", - "0xb1d0906de8fd74af", - "0xf30d36d2a1db71a0", - "0x4fedfe7379b3b179", - "0xfd1be58c5e5158a0", - "0xae0e46b731e6537e", - "0xc55bbb934248e47f", - "0x8cf10b4b6257bbc5", - "0x5c717a6705dba06c", - "0xf8df30e34e753388", - "0xa5a48ec67ae93f57", - "0x919b0886a8ac6d98", - "0xecb36fcf0aa0ab89", - "0xc0383082ef6de966", - "0x9066b41a6a986d11", - "0x4f10a39b8cbab5b6", - "0x80580f18" - ], - [ - "0x4dc9b0eda01102f9", - "0x90ab04264499acdf", - "0xca622fbfcdd60f43", - "0x358cc248833e4ba0", - "0x480366a0f4f3c6e4", - "0x1651cbdb3051a1a5", - "0x13a9f79460b025cd", - "0x6165646df5bed5c1", - "0x59cda0756fbac66e", - "0x6f9c8c8184c459c6", - "0x45b5a2424c0ca860", - "0x15b5409e195e13d6", - "0x87a08ac215c424f1", - "0x4127de0d3fb8609f", - "0xe21317f1c6504508", - "0x7cbbe1bb95e8a6d4", - "0xa075f0d3e3dbbf46", - "0x128888be6d275907", - "0xcbf07e937547de7a", - "0xedea6891d513a54", - "0xd7833969b2471f9", - "0x7877e95d9613f1a0", - "0x2d69bdf83885648e", - "0xf85735b62c66a055", - "0xd4879229d5c47d7b", - "0x2a97805a445da0e9", - "0x5f0071c674bedf56", - "0xb5c8553b7230f912", - "0x7e3e05d1c677a33a", - "0x6fc78bdc06a0bacd", - "0xeca5585cb01b05a6", - "0xa8bcc5bbe6589f37", - "0xe57766c6af0f2600", - "0x7db3d42ea06102b2", - "0xb78aade55e6834dc", - "0x8fd06f9ccafcdf66", - "0xcd8268905915532c", - "0x929bc3a0f97da7b7", - "0x6cb5f10fde756e43", - "0x1311c79aa2bfa2f3", - "0xa99ec1ef7c93591d", - "0x6d26a0379eef1f41", - "0xd27bd92422507f46", - "0x6d45d7be07aef53d", - "0x2c2ebeeb6aefa16c", - "0x57a0f99a5fc44c58", - "0x3871e5b47347fe9c", - "0xaa50e5bd6883eef9", - "0x7e647edafc8f4ed2", - "0xa01aedf686e1c453", - "0x6d32fcb312c213ee", - "0x4ecf74e4ebd159a6", - "0x1fd51a0359aef3c0", - "0xcea568255c6d2b0", - "0xe040680cd4ffdea0", - "0x9dd9256eeae1e9e0", - "0x549a07a6d8edff4f", - "0xa8f602265fd07c29", - "0x353f7dc048f0a02e", - "0x78696413d246975d", - "0x3e7f5da67a71de8a", - "0x423b12a7be91aece", - "0x76c6f168d9a0911c", - "0xf3dc6729f892a054", - "0x773ce2d1fa200a98", - "0xa005ac1ca6ec811f", - "0x805a0d98" - ], - [ - "0x8a169437a0b101f9", - "0xfa3ced185956309b", - "0x8db06f289f3afe2f", - "0x52035bc077222d8", - "0x961eefa08e33e3ff", - "0xeb1d326c4877b7eb", - "0xf8933b224f3d9956", - "0x299a9b900f8feed5", - "0xd445a0d5ba8b0d34", - "0x91e7d43fe3377371", - "0x5502931ba59fddb3", - "0x1850b91b288e1685", - "0x64a0a630c8207acf", - "0x58160f099ed6023", - "0x4198238ff4613e16", - "0x77a336c10e03830d", - "0xa0eee1cea4502c76", - "0xf03b6b2a60a90439", - "0xa6ae0795e51d73f7", - "0x50143ee9c95b716b", - "0x108687f67e7a94fb", - "0x58a794ef43a86a0", - "0xc1986d93e1ffa5e8", - "0x3a6b225e2fa63a9", - "0x8201578fff902e02", - "0xcbff41e7a0808008", - "0x7262a4626784226e", - "0xd766f80aea9d6f9c", - "0x475d36ab0542fd41", - "0xc48fd0a0932ea0db", - "0xba8e83f0b9eaa6e", - "0x6d93166fa51661d9", - "0x5552d439aac196b8", - "0xc352a00c258ff0f3", - "0xcfa1c1d55e281237", - "0x9e50c506df0c6d92", - "0x177117b78c273ad0", - "0x87a0655a2b1444ee", - "0x567ba6fb34252d22", - "0xb27c861900096e61", - "0x686c7e2d0bd66e7b", - "0xa0846bfab63b51ea", - "0x1e39aabd1f6c0ce", - "0x5ce4a342829f8a79", - "0x4026f4b597d7f5c9", - "0x648bbbe0a44e7008", - "0xeb2ffc0b3bada080", - "0xfb0ce4681f014362", - "0xdb652a8479658ab", - "0xa97981f94427c1f7", - "0xf0bae61277a09248", - "0x35e03e67ca2824ee", - "0x715f902a6a8d4f52", - "0x7f942bfd1917df67", - "0x802efe51" - ], - [ - "0xcac23a303a091f8", - "0xab8ebcb5940e77b", - "0x42ca9f16be72ff45", - "0x36dd79fc30c4e04", - "0xfba0808080cb3df2", - "0x509c2d93079b239b", - "0x46e6084a232eaa65", - "0xec96e29bb96af360", - "0x808e4d79fd0a01f7", - "0x10c4332e32a08080", - "0x3c58ad19246301dc", - "0x7ee9d2dc08f00328", - "0xda7a7eb1fb996a6f", - "0x4512a3da05a6b0e", - "0xf29247e223c0b2bd", - "0x68af6edd3da39a07", - "0x821ee0c83ce615ae", - "0x808080804b366c8e", - "0x808080" - ], - [ - "0x604bf2c5a08051f8", - "0x55a37806ec5494a9", - "0x1e286c99751d4767", - "0x12d7fb7e1eb3baac", - "0x80808080d16c4da8", - "0xda5d26326c8ba080", - "0xfa0d187d28e2397a", - "0x4eb95b8e08b4e0bc", - "0x7f323b88311b42cc", - "0x8080808080803c90", - "0x808080" - ], - [ - "0xa2584e59209d66f8", - "0x2914e9df55205341", - "0x19c3ff335ced3046", - "0xb0aab4f999274505", - "0x56a0800144f846b8", - "0xffa655cc1b171fe8", - "0x5b6ef8c092e64583", - "0x1c0ad6c991be048", - "0xa021b463e3b52f62", - "0x3c23f7860146d2c5", - "0xc003c7dcb27d7e92", - "0x3b2782ca53b600e5", - "0x70a4855d04d8fa7b" - ] - ] - }, - { - "block_number": 5186023, - "proof_bytes_len": [ - 532, - 532, - 532, - 532, - 532, - 436, - 147, - 83, - 104 - ], - "proof": [ - [ - "0x58444a19a01102f9", - "0x6186aa6c4bc2f7f5", - "0x6184b7400645ceb8", - "0x3432964db06ab3fa", - "0x5798e0a01aa7c11e", - "0x69c22a52bbd3da36", - "0xc193223917a9e4d5", - "0x5d16e5da8393253e", - "0xd1aea0adbb62b640", - "0x7f69eb2eae8ad843", - "0xeff40cb50c390b52", - "0xad7a89c1ae3d5a01", - "0x51a089f820fcd629", - "0xe20558b8b776455d", - "0x10f8bd05fb96d051", - "0xfb1767334c91ceed", - "0xa09fcceaf965a8a3", - "0x101d508f191dfb8e", - "0x5bb5986074297ab9", - "0x3e0bf1dd917913e0", - "0x3e36b93acd6e2eea", - "0xc88425cf6da209a0", - "0xfcb2166cd45e503e", - "0xe65bb3922725d69b", - "0x800a431934b6d1a7", - "0x8bb03acfb08ba041", - "0xcc1b0a7dc223167b", - "0xd84f206f0caa9606", - "0xb32389c0d2d6977c", - "0xf62965f9a6a0bcab", - "0xdd36c65f0faad792", - "0xead9cccb6a889923", - "0xc0dcabd20910bd4", - "0xc44f224ca034ac90", - "0x49ec9e9e2beb786d", - "0x92818730075c99b2", - "0x786ad2678143d2a1", - "0x13293ba099aa8534", - "0xfa4e5074579f71ce", - "0x742e1850d3e32270", - "0x1d2c0a57888d87ff", - "0x3166a0bff089e666", - "0x4db2002e17450b44", - "0x12e4183aab01a0ac", - "0x80035805dc8e1ab5", - "0xc3a00955c3ad3941", - "0xa63804703e4267a2", - "0x3a106468d3dc7203", - "0x9fb70db168fdc96c", - "0xa0a832ac509828fb", - "0x7ef632aa0f1cc00", - "0x5c2123aba626012a", - "0x35109a6575dbd707", - "0xe9a2d7571c0db0a3", - "0x67e9ba3837d041a0", - "0x4127470df1024135", - "0xddfd667cf6bc5239", - "0x2742eba7a44bae42", - "0x79f9db0a20fa038", - "0xbc64f3ab69c82752", - "0x9a19ce6f2f1e0b46", - "0x2f86d39b6ed70147", - "0xc2495bcb12a0aba4", - "0xb98551cad578ca95", - "0x65f799018826d439", - "0x6e588e68abc35e2b", - "0x800100d6" - ], - [ - "0x9872fa8ba01102f9", - "0xebf32a01c304911b", - "0x7a90055f9401af09", - "0xc2ba94afe0afe786", - "0x2f611ca0e690fc3c", - "0x390432baa62b1a9c", - "0xca085e0f40b93f89", - "0x29c27ae3f970b810", - "0xbd61a0348697ea23", - "0xa44ae2ff8e39cb97", - "0x6fc8d2b6e578cd7c", - "0x1e826e42f9ad3011", - "0xc6a0a0f182a6676c", - "0xdb9c4dc5b4c03eb8", - "0xb2aec4fcde466b5d", - "0xca5a8a2ffb11d58", - "0xa04952eb424ede4f", - "0xcf0538fb63aad0e9", - "0xb26d3e80af58fdf5", - "0x20ca30148b2cec11", - "0x4c2fcb4df7821abf", - "0xc7f9e63f9a6e1ea0", - "0x955f28c7518cfc49", - "0xb4be12419fce2f7b", - "0x773a029286892019", - "0xfcc56c3d2015a06f", - "0x64aac5a84cae088e", - "0xfa553497f5842d68", - "0x427cb9bce0af3b1b", - "0xfe7dbdb928a0af56", - "0xb1e5b3ff64efb8e4", - "0x93ac8fc710c859e2", - "0xf428706c93752615", - "0x1487b0b4a0a1c9cc", - "0xd44cbea352feca7a", - "0x6dc058cae697e48d", - "0x8659ed45c7db8c69", - "0x562c19a08db158a9", - "0xe414bdf4b7b4ea52", - "0x300d204a6a0f4698", - "0xe9b4e532fbe5297c", - "0x138ea0de0a724737", - "0x16bda1dac8b25389", - "0xa1dc3981db0b5286", - "0x5aae51ed9b411bd4", - "0x85a0e73edf470da8", - "0xbcf54c26f2702ecb", - "0x64b9e0044cbd4c16", - "0x3328de9d25006830", - "0xa0d0c9c72af81dec", - "0x87a68bcceca88565", - "0xf87e863d3afa3ca9", - "0xa536665210fb6e0c", - "0x936f481ec643e73c", - "0xd9a3d455f75fd2a0", - "0xab3a7fc6a1d33828", - "0xae5e998f387e2891", - "0xee2b8a2c2c03186a", - "0x6663d5b55563a0e4", - "0xb041ee83b314d7a2", - "0x5745d9f896165267", - "0xb04b843caa6605fb", - "0xdccd8b7ccaa06355", - "0x4bd24db9c1106802", - "0x2be0ebdc7e9a4f28", - "0x9f42696729e380d4", - "0x80eb8545" - ], - [ - "0xc40409caa01102f9", - "0xe37966a7bdbe7d04", - "0x353cc8aaa27cb1e1", - "0x77c8720822e8f9a0", - "0xf62d8aa0dfd9f3b6", - "0xd755e3ba3a7cb797", - "0xb3e04cdd05ad2700", - "0x8aeb98fb4bba5d0c", - "0xfdd7a0150e57d76a", - "0x45839b15fa97c528", - "0xd63d2446eea54918", - "0x6ce1632f9957b65e", - "0xd1a009cd49302960", - "0xe4dca9270a7a43f5", - "0x12887aacb4484fff", - "0x95dce4aff17cb12b", - "0xa0c04c210384c3d1", - "0xc6942b45369a35b7", - "0xe8ca76433115e3ff", - "0x2aab5a8034993e20", - "0x91e1e7f7eee4d10f", - "0x27fa2b66d38f82a0", - "0xf8332ecfdb7bec88", - "0x6610809b6842c470", - "0xe767cdd170c80078", - "0x7903c5be7adca01b", - "0xe74ac0d10274a4b0", - "0xcdd6c30e1a314fea", - "0x72b8ad6d102eb7e4", - "0x55c32c5feca0cee4", - "0x87369b3e0a1f203a", - "0x32a9d0ba8c36deb4", - "0xf7602f67b08451ea", - "0xf97b89f1a03e2d26", - "0x56934aa308f950bf", - "0xffb4db751859ad25", - "0x7acca8650987bf69", - "0xc87aafa0b142e286", - "0x273b2fadab723492", - "0x8dcc1b7dd46e5d31", - "0x18be1d3a404eb862", - "0xa02ca00a63690851", - "0xd5e9f4aeb4d7a118", - "0xbbbfb9b20f730404", - "0x545092e0230f0373", - "0x91a01ebc3bac3503", - "0x9c64330e16855575", - "0x522345eefd57923e", - "0x6188da6a43deffb4", - "0xa0fec1ff9f8cec1d", - "0x884d9b15cda6e6c7", - "0xcfe7333a96b73ed5", - "0x8d23e4736907b4", - "0xfbc0176cb096e04", - "0xdd9164ba10d6faa0", - "0x849332f2567d84df", - "0x4093aee6050b44f", - "0xe5259c89e6bab006", - "0xaa375e3afdfaa06a", - "0xbb419d5632a791f1", - "0xbbd8778ed10ff16", - "0xb5dded3791de792f", - "0x53ea51625aa08218", - "0xb90c2f66a075fb6b", - "0x3e5faf67ed5f1b63", - "0xf56c48e27dfbf998", - "0x80c08ea7" - ], - [ - "0x4ea1d78aa01102f9", - "0xef56a843a8bfddfa", - "0x9b6c4f7c02d2e804", - "0xddde39277722ac1d", - "0x8d7d3ea08940a0f8", - "0x77f009efd82e57d7", - "0x1e941b39d1f71793", - "0x1810a858df6bcb1c", - "0xd904a0a7dd474312", - "0x6d6cf792f32b73a6", - "0xa8461ce6822cf03b", - "0xc51287bf3e1fe372", - "0xc8a068eafc67710e", - "0x14773ba06774cfe3", - "0x42489002368f960c", - "0xada6b8b1b5839cc2", - "0xa0b4c29bcd9ae1b3", - "0x4c74f0e85ae5e516", - "0x9d2b063a198b6131", - "0xfb5e06d89e8c49cc", - "0xc60346ec1c560738", - "0x5da59c1fd75bbea0", - "0x1bd7ee6b5541f75d", - "0xcc48d2ef76045c7a", - "0x9b20fef4df8858fb", - "0xe9c16ef25786a00c", - "0x7aaf443beecb005a", - "0x7c892e1223e710cb", - "0x545cb4159af46a9c", - "0x5ee90d0de3a0ddd6", - "0x9f3a6bb833cf07c0", - "0xa3cd32a767434213", - "0x48dfef1bcb3b0a6e", - "0xe73a7a10a0c64607", - "0x60c4fb03a93d1b24", - "0xa703abd52ddc888b", - "0x4d0d2090b34e5863", - "0x776ee4a0cfb1250e", - "0x66594e46117f618a", - "0x4b33fceaad7396ca", - "0xeef873fbfdede72c", - "0x2e02a08bde299a28", - "0x1c09c9e37472dd9f", - "0x3ba8de43b97b7070", - "0x1fd629b4e4a9f59c", - "0xcaa00a350d451b0d", - "0xed1e610ea78b3103", - "0x397ef65ef24c3a5c", - "0x8a1e0d9f73a4797f", - "0xa0abdeee5aefd8b4", - "0xdbbca55cd52d1213", - "0xb1d0906de8fd74af", - "0xf30d36d2a1db71a0", - "0x4fedfe7379b3b179", - "0xfd1be58c5e5158a0", - "0xae0e46b731e6537e", - "0xc55bbb934248e47f", - "0x8cf10b4b6257bbc5", - "0x5c717a6705dba06c", - "0xf8df30e34e753388", - "0xa5a48ec67ae93f57", - "0x919b0886a8ac6d98", - "0xecb36fcf0aa0ab89", - "0xc0383082ef6de966", - "0x9066b41a6a986d11", - "0x4f10a39b8cbab5b6", - "0x80580f18" - ], - [ - "0x4dc9b0eda01102f9", - "0x90ab04264499acdf", - "0xca622fbfcdd60f43", - "0x358cc248833e4ba0", - "0x480366a0f4f3c6e4", - "0x1651cbdb3051a1a5", - "0x13a9f79460b025cd", - "0x6165646df5bed5c1", - "0x59cda0756fbac66e", - "0x6f9c8c8184c459c6", - "0x45b5a2424c0ca860", - "0x15b5409e195e13d6", - "0x87a08ac215c424f1", - "0x4127de0d3fb8609f", - "0xe21317f1c6504508", - "0x7cbbe1bb95e8a6d4", - "0xa075f0d3e3dbbf46", - "0x128888be6d275907", - "0xcbf07e937547de7a", - "0xedea6891d513a54", - "0xd7833969b2471f9", - "0x7877e95d9613f1a0", - "0x2d69bdf83885648e", - "0xf85735b62c66a055", - "0xd4879229d5c47d7b", - "0x2a97805a445da0e9", - "0x5f0071c674bedf56", - "0xb5c8553b7230f912", - "0x7e3e05d1c677a33a", - "0x6fc78bdc06a0bacd", - "0xeca5585cb01b05a6", - "0xa8bcc5bbe6589f37", - "0xe57766c6af0f2600", - "0x7db3d42ea06102b2", - "0xb78aade55e6834dc", - "0x8fd06f9ccafcdf66", - "0xcd8268905915532c", - "0x929bc3a0f97da7b7", - "0x6cb5f10fde756e43", - "0x1311c79aa2bfa2f3", - "0xa99ec1ef7c93591d", - "0x6d26a0379eef1f41", - "0xd27bd92422507f46", - "0x6d45d7be07aef53d", - "0x2c2ebeeb6aefa16c", - "0x57a0f99a5fc44c58", - "0x3871e5b47347fe9c", - "0xaa50e5bd6883eef9", - "0x7e647edafc8f4ed2", - "0xa01aedf686e1c453", - "0x6d32fcb312c213ee", - "0x4ecf74e4ebd159a6", - "0x1fd51a0359aef3c0", - "0xcea568255c6d2b0", - "0xe040680cd4ffdea0", - "0x9dd9256eeae1e9e0", - "0x549a07a6d8edff4f", - "0xa8f602265fd07c29", - "0x353f7dc048f0a02e", - "0x78696413d246975d", - "0x3e7f5da67a71de8a", - "0x423b12a7be91aece", - "0x76c6f168d9a0911c", - "0xf3dc6729f892a054", - "0x773ce2d1fa200a98", - "0xa005ac1ca6ec811f", - "0x805a0d98" - ], - [ - "0x8a169437a0b101f9", - "0xfa3ced185956309b", - "0x8db06f289f3afe2f", - "0x52035bc077222d8", - "0x961eefa08e33e3ff", - "0xeb1d326c4877b7eb", - "0xf8933b224f3d9956", - "0x299a9b900f8feed5", - "0xd445a0d5ba8b0d34", - "0x91e7d43fe3377371", - "0x5502931ba59fddb3", - "0x1850b91b288e1685", - "0x64a0a630c8207acf", - "0x58160f099ed6023", - "0x4198238ff4613e16", - "0x77a336c10e03830d", - "0xa0eee1cea4502c76", - "0xf03b6b2a60a90439", - "0xa6ae0795e51d73f7", - "0x50143ee9c95b716b", - "0x108687f67e7a94fb", - "0x58a794ef43a86a0", - "0xc1986d93e1ffa5e8", - "0x3a6b225e2fa63a9", - "0x8201578fff902e02", - "0xcbff41e7a0808008", - "0x7262a4626784226e", - "0xd766f80aea9d6f9c", - "0x475d36ab0542fd41", - "0xc48fd0a0932ea0db", - "0xba8e83f0b9eaa6e", - "0x6d93166fa51661d9", - "0x5552d439aac196b8", - "0xc352a00c258ff0f3", - "0xcfa1c1d55e281237", - "0x9e50c506df0c6d92", - "0x177117b78c273ad0", - "0x87a0655a2b1444ee", - "0x567ba6fb34252d22", - "0xb27c861900096e61", - "0x686c7e2d0bd66e7b", - "0xa0846bfab63b51ea", - "0x1e39aabd1f6c0ce", - "0x5ce4a342829f8a79", - "0x4026f4b597d7f5c9", - "0x648bbbe0a44e7008", - "0xeb2ffc0b3bada080", - "0xfb0ce4681f014362", - "0xdb652a8479658ab", - "0xa97981f94427c1f7", - "0xf0bae61277a09248", - "0x35e03e67ca2824ee", - "0x715f902a6a8d4f52", - "0x7f942bfd1917df67", - "0x802efe51" - ], - [ - "0xcac23a303a091f8", - "0xab8ebcb5940e77b", - "0x42ca9f16be72ff45", - "0x36dd79fc30c4e04", - "0xfba0808080cb3df2", - "0x509c2d93079b239b", - "0x46e6084a232eaa65", - "0xec96e29bb96af360", - "0x808e4d79fd0a01f7", - "0x10c4332e32a08080", - "0x3c58ad19246301dc", - "0x7ee9d2dc08f00328", - "0xda7a7eb1fb996a6f", - "0x4512a3da05a6b0e", - "0xf29247e223c0b2bd", - "0x68af6edd3da39a07", - "0x821ee0c83ce615ae", - "0x808080804b366c8e", - "0x808080" - ], - [ - "0x604bf2c5a08051f8", - "0x55a37806ec5494a9", - "0x1e286c99751d4767", - "0x12d7fb7e1eb3baac", - "0x80808080d16c4da8", - "0xda5d26326c8ba080", - "0xfa0d187d28e2397a", - "0x4eb95b8e08b4e0bc", - "0x7f323b88311b42cc", - "0x8080808080803c90", - "0x808080" - ], - [ - "0xa2584e59209d66f8", - "0x2914e9df55205341", - "0x19c3ff335ced3046", - "0xb0aab4f999274505", - "0x56a0800144f846b8", - "0xffa655cc1b171fe8", - "0x5b6ef8c092e64583", - "0x1c0ad6c991be048", - "0xa021b463e3b52f62", - "0x3c23f7860146d2c5", - "0xc003c7dcb27d7e92", - "0x3b2782ca53b600e5", - "0x70a4855d04d8fa7b" - ] - ] - }, - { - "block_number": 5186021, - "proof_bytes_len": [ - 532, - 532, - 532, - 532, - 532, - 436, - 147, - 83, - 104 - ], - "proof": [ - [ - "0xe0cd1db9a01102f9", - "0xa14d3bb2862563e6", - "0x70e4db75915c9636", - "0xaec7e6a5b2c27dc2", - "0x2935f5a0e7122aca", - "0xb5b3ad19dc4eb821", - "0x3b91dcafa579fbe2", - "0x686db0215398e26d", - "0xa72aa0cf3a7a9014", - "0x6567fbd49323bc14", - "0xe34cd2f396e033f7", - "0x707532681b146e78", - "0x8ea001b8da6a97f5", - "0x5f30286d7cc0dbe4", - "0x542adf1c07d7f631", - "0x2740bf38b12d5d5a", - "0xa0e83549f281629b", - "0xf7bbc83f064b0353", - "0x2b80a96ddad69f6", - "0x9c3331ebc8f0eca3", - "0xe1d2011e616de763", - "0x1af35c190c5ff0a0", - "0x2f099b5ccfe5b09a", - "0xf5f0a02c1b627496", - "0x5df7f938afe597cc", - "0x67edec108083a00a", - "0x4e95c350254b6dee", - "0xef7bf5fd504496d1", - "0x7d1b848ce5135f0e", - "0x231549d434a0a0d7", - "0xc2f998c7f2e9a07f", - "0x4832b44b767cad58", - "0xcac3d2b7c575e109", - "0x862a4a2da0198935", - "0xf02bfde41c180bb0", - "0x9d5aabd6317198f0", - "0x4b07ebe2f6a502fd", - "0x6571c5a06e43502e", - "0x7e01d4aa20c8e6a5", - "0xf23047a7cbc87301", - "0x8117ff061405cc81", - "0xa3eba06df9cfd7d7", - "0xd826e0532db0b5d4", - "0x884b85573586c8c0", - "0x9a598f3bfb4290d7", - "0xdaa0d323fc97880a", - "0xba2b821dad75883b", - "0xcd3d26f0e81d5656", - "0x52cd6baaea88126", - "0xa0ac20f46b287d0a", - "0x7855a45ce13fc327", - "0x1d92fd6e3a34cacf", - "0x968d0982250f06e5", - "0x9bdb55a66bc067ba", - "0x9c658ec05785f4a0", - "0x3ad8be6e8daa819a", - "0x9936a22d00c8a120", - "0x826772caea15a651", - "0xfc876705be88a0ba", - "0x3a36a65ce58cebc0", - "0xe62fcacc361e0836", - "0x96a0a7092938293a", - "0x78e066810ea043ad", - "0x93b19da040839c35", - "0x432f387d0fe20dbb", - "0x197d099cd23057bc", - "0x805e72a8" - ], - [ - "0xb234669ca01102f9", - "0xa514acded44cdcfd", - "0xce1fc4ae557828c5", - "0x4d03d4eaefe0b5a4", - "0x5ebaa00ac42047", - "0x6d64f363db5ff755", - "0xf34c1f7346e39b13", - "0x57c795c7d9a47ec6", - "0x22bda03111568be0", - "0xe34860413e495932", - "0x3aab05ace194bcdc", - "0x74c8e078f209328d", - "0xeaa0fffbb5171935", - "0x7f5589bcdb15412e", - "0xdde3c93dc089245f", - "0xd8fd736ca136a614", - "0xa016f7ef94a462b8", - "0xcf0538fb63aad0e9", - "0xb26d3e80af58fdf5", - "0x20ca30148b2cec11", - "0x4c2fcb4df7821abf", - "0xc7f9e63f9a6e1ea0", - "0x955f28c7518cfc49", - "0xb4be12419fce2f7b", - "0x773a029286892019", - "0xd1293be70b65a06f", - "0x30876b01f78024fa", - "0xa01ce8a717136cbc", - "0xa4343b72c435eaa2", - "0x2ea46ddcd9a07380", - "0x6895c381d439aa3e", - "0xb48f4760627d9664", - "0x7e95272413581907", - "0x1487b0b4a009cb6c", - "0xd44cbea352feca7a", - "0x6dc058cae697e48d", - "0x8659ed45c7db8c69", - "0x7ce74aa08db158a9", - "0x564d9a064d0d3c2", - "0xa585d9c2b3a50627", - "0x593872a183de1500", - "0x138ea0b9b7e46808", - "0x16bda1dac8b25389", - "0xa1dc3981db0b5286", - "0x5aae51ed9b411bd4", - "0xf6a0e73edf470da8", - "0x6090d8651fa2f6ac", - "0x5a69f8785ae6c8dc", - "0xceaf9ef7b58f48d3", - "0xa0fb6044f34c4680", - "0xd3a88757f243a6a4", - "0xb75f6bcf43e90852", - "0x44c9974d979d2be8", - "0xab1d380a9d5f00e", - "0xd9a3d455f75fd2a0", - "0xab3a7fc6a1d33828", - "0xae5e998f387e2891", - "0xee2b8a2c2c03186a", - "0xde6ed0b1b955a0e4", - "0xfa6bdfeffedccc63", - "0x3d91aa809af2dbbf", - "0xda17eb79d5185449", - "0xc579977dea0164d", - "0x88cea7f4eec1f0ba", - "0x42a3f8b633052428", - "0x39012bdf2dbfc373", - "0x802cfb9b" - ], - [ - "0xc40409caa01102f9", - "0xe37966a7bdbe7d04", - "0x353cc8aaa27cb1e1", - "0x77c8720822e8f9a0", - "0xf62d8aa0dfd9f3b6", - "0xd755e3ba3a7cb797", - "0xb3e04cdd05ad2700", - "0x8aeb98fb4bba5d0c", - "0xfdd7a0150e57d76a", - "0x45839b15fa97c528", - "0xd63d2446eea54918", - "0x6ce1632f9957b65e", - "0xd1a009cd49302960", - "0xe4dca9270a7a43f5", - "0x12887aacb4484fff", - "0x95dce4aff17cb12b", - "0xa0c04c210384c3d1", - "0xc6942b45369a35b7", - "0xe8ca76433115e3ff", - "0x2aab5a8034993e20", - "0x91e1e7f7eee4d10f", - "0x27fa2b66d38f82a0", - "0xf8332ecfdb7bec88", - "0x6610809b6842c470", - "0xe767cdd170c80078", - "0x7903c5be7adca01b", - "0xe74ac0d10274a4b0", - "0xcdd6c30e1a314fea", - "0x72b8ad6d102eb7e4", - "0x55c32c5feca0cee4", - "0x87369b3e0a1f203a", - "0x32a9d0ba8c36deb4", - "0xf7602f67b08451ea", - "0xf97b89f1a03e2d26", - "0x56934aa308f950bf", - "0xffb4db751859ad25", - "0x7acca8650987bf69", - "0xc87aafa0b142e286", - "0x273b2fadab723492", - "0x8dcc1b7dd46e5d31", - "0x18be1d3a404eb862", - "0xa02ca00a63690851", - "0xd5e9f4aeb4d7a118", - "0xbbbfb9b20f730404", - "0x545092e0230f0373", - "0x91a01ebc3bac3503", - "0x9c64330e16855575", - "0x522345eefd57923e", - "0x6188da6a43deffb4", - "0xa0fec1ff9f8cec1d", - "0x884d9b15cda6e6c7", - "0xcfe7333a96b73ed5", - "0x8d23e4736907b4", - "0xfbc0176cb096e04", - "0xdd9164ba10d6faa0", - "0x849332f2567d84df", - "0x4093aee6050b44f", - "0xe5259c89e6bab006", - "0xaa375e3afdfaa06a", - "0xbb419d5632a791f1", - "0xbbd8778ed10ff16", - "0xb5dded3791de792f", - "0x53ea51625aa08218", - "0xb90c2f66a075fb6b", - "0x3e5faf67ed5f1b63", - "0xf56c48e27dfbf998", - "0x80c08ea7" - ], - [ - "0x4ea1d78aa01102f9", - "0xef56a843a8bfddfa", - "0x9b6c4f7c02d2e804", - "0xddde39277722ac1d", - "0x8d7d3ea08940a0f8", - "0x77f009efd82e57d7", - "0x1e941b39d1f71793", - "0x1810a858df6bcb1c", - "0xd904a0a7dd474312", - "0x6d6cf792f32b73a6", - "0xa8461ce6822cf03b", - "0xc51287bf3e1fe372", - "0xc8a068eafc67710e", - "0x14773ba06774cfe3", - "0x42489002368f960c", - "0xada6b8b1b5839cc2", - "0xa0b4c29bcd9ae1b3", - "0x4c74f0e85ae5e516", - "0x9d2b063a198b6131", - "0xfb5e06d89e8c49cc", - "0xc60346ec1c560738", - "0x5da59c1fd75bbea0", - "0x1bd7ee6b5541f75d", - "0xcc48d2ef76045c7a", - "0x9b20fef4df8858fb", - "0xe9c16ef25786a00c", - "0x7aaf443beecb005a", - "0x7c892e1223e710cb", - "0x545cb4159af46a9c", - "0x5ee90d0de3a0ddd6", - "0x9f3a6bb833cf07c0", - "0xa3cd32a767434213", - "0x48dfef1bcb3b0a6e", - "0xe73a7a10a0c64607", - "0x60c4fb03a93d1b24", - "0xa703abd52ddc888b", - "0x4d0d2090b34e5863", - "0x776ee4a0cfb1250e", - "0x66594e46117f618a", - "0x4b33fceaad7396ca", - "0xeef873fbfdede72c", - "0x2e02a08bde299a28", - "0x1c09c9e37472dd9f", - "0x3ba8de43b97b7070", - "0x1fd629b4e4a9f59c", - "0xcaa00a350d451b0d", - "0xed1e610ea78b3103", - "0x397ef65ef24c3a5c", - "0x8a1e0d9f73a4797f", - "0xa0abdeee5aefd8b4", - "0xdbbca55cd52d1213", - "0xb1d0906de8fd74af", - "0xf30d36d2a1db71a0", - "0x4fedfe7379b3b179", - "0xfd1be58c5e5158a0", - "0xae0e46b731e6537e", - "0xc55bbb934248e47f", - "0x8cf10b4b6257bbc5", - "0x5c717a6705dba06c", - "0xf8df30e34e753388", - "0xa5a48ec67ae93f57", - "0x919b0886a8ac6d98", - "0xecb36fcf0aa0ab89", - "0xc0383082ef6de966", - "0x9066b41a6a986d11", - "0x4f10a39b8cbab5b6", - "0x80580f18" - ], - [ - "0x4dc9b0eda01102f9", - "0x90ab04264499acdf", - "0xca622fbfcdd60f43", - "0x358cc248833e4ba0", - "0x480366a0f4f3c6e4", - "0x1651cbdb3051a1a5", - "0x13a9f79460b025cd", - "0x6165646df5bed5c1", - "0x59cda0756fbac66e", - "0x6f9c8c8184c459c6", - "0x45b5a2424c0ca860", - "0x15b5409e195e13d6", - "0x87a08ac215c424f1", - "0x4127de0d3fb8609f", - "0xe21317f1c6504508", - "0x7cbbe1bb95e8a6d4", - "0xa075f0d3e3dbbf46", - "0x128888be6d275907", - "0xcbf07e937547de7a", - "0xedea6891d513a54", - "0xd7833969b2471f9", - "0x7877e95d9613f1a0", - "0x2d69bdf83885648e", - "0xf85735b62c66a055", - "0xd4879229d5c47d7b", - "0x2a97805a445da0e9", - "0x5f0071c674bedf56", - "0xb5c8553b7230f912", - "0x7e3e05d1c677a33a", - "0x6fc78bdc06a0bacd", - "0xeca5585cb01b05a6", - "0xa8bcc5bbe6589f37", - "0xe57766c6af0f2600", - "0x7db3d42ea06102b2", - "0xb78aade55e6834dc", - "0x8fd06f9ccafcdf66", - "0xcd8268905915532c", - "0x929bc3a0f97da7b7", - "0x6cb5f10fde756e43", - "0x1311c79aa2bfa2f3", - "0xa99ec1ef7c93591d", - "0x6d26a0379eef1f41", - "0xd27bd92422507f46", - "0x6d45d7be07aef53d", - "0x2c2ebeeb6aefa16c", - "0x57a0f99a5fc44c58", - "0x3871e5b47347fe9c", - "0xaa50e5bd6883eef9", - "0x7e647edafc8f4ed2", - "0xa01aedf686e1c453", - "0x6d32fcb312c213ee", - "0x4ecf74e4ebd159a6", - "0x1fd51a0359aef3c0", - "0xcea568255c6d2b0", - "0xe040680cd4ffdea0", - "0x9dd9256eeae1e9e0", - "0x549a07a6d8edff4f", - "0xa8f602265fd07c29", - "0x353f7dc048f0a02e", - "0x78696413d246975d", - "0x3e7f5da67a71de8a", - "0x423b12a7be91aece", - "0x76c6f168d9a0911c", - "0xf3dc6729f892a054", - "0x773ce2d1fa200a98", - "0xa005ac1ca6ec811f", - "0x805a0d98" - ], - [ - "0x8a169437a0b101f9", - "0xfa3ced185956309b", - "0x8db06f289f3afe2f", - "0x52035bc077222d8", - "0x961eefa08e33e3ff", - "0xeb1d326c4877b7eb", - "0xf8933b224f3d9956", - "0x299a9b900f8feed5", - "0xd445a0d5ba8b0d34", - "0x91e7d43fe3377371", - "0x5502931ba59fddb3", - "0x1850b91b288e1685", - "0x64a0a630c8207acf", - "0x58160f099ed6023", - "0x4198238ff4613e16", - "0x77a336c10e03830d", - "0xa0eee1cea4502c76", - "0xf03b6b2a60a90439", - "0xa6ae0795e51d73f7", - "0x50143ee9c95b716b", - "0x108687f67e7a94fb", - "0x58a794ef43a86a0", - "0xc1986d93e1ffa5e8", - "0x3a6b225e2fa63a9", - "0x8201578fff902e02", - "0xcbff41e7a0808008", - "0x7262a4626784226e", - "0xd766f80aea9d6f9c", - "0x475d36ab0542fd41", - "0xc48fd0a0932ea0db", - "0xba8e83f0b9eaa6e", - "0x6d93166fa51661d9", - "0x5552d439aac196b8", - "0xc352a00c258ff0f3", - "0xcfa1c1d55e281237", - "0x9e50c506df0c6d92", - "0x177117b78c273ad0", - "0x87a0655a2b1444ee", - "0x567ba6fb34252d22", - "0xb27c861900096e61", - "0x686c7e2d0bd66e7b", - "0xa0846bfab63b51ea", - "0x1e39aabd1f6c0ce", - "0x5ce4a342829f8a79", - "0x4026f4b597d7f5c9", - "0x648bbbe0a44e7008", - "0xeb2ffc0b3bada080", - "0xfb0ce4681f014362", - "0xdb652a8479658ab", - "0xa97981f94427c1f7", - "0xf0bae61277a09248", - "0x35e03e67ca2824ee", - "0x715f902a6a8d4f52", - "0x7f942bfd1917df67", - "0x802efe51" - ], - [ - "0xcac23a303a091f8", - "0xab8ebcb5940e77b", - "0x42ca9f16be72ff45", - "0x36dd79fc30c4e04", - "0xfba0808080cb3df2", - "0x509c2d93079b239b", - "0x46e6084a232eaa65", - "0xec96e29bb96af360", - "0x808e4d79fd0a01f7", - "0x10c4332e32a08080", - "0x3c58ad19246301dc", - "0x7ee9d2dc08f00328", - "0xda7a7eb1fb996a6f", - "0x4512a3da05a6b0e", - "0xf29247e223c0b2bd", - "0x68af6edd3da39a07", - "0x821ee0c83ce615ae", - "0x808080804b366c8e", - "0x808080" - ], - [ - "0x604bf2c5a08051f8", - "0x55a37806ec5494a9", - "0x1e286c99751d4767", - "0x12d7fb7e1eb3baac", - "0x80808080d16c4da8", - "0xda5d26326c8ba080", - "0xfa0d187d28e2397a", - "0x4eb95b8e08b4e0bc", - "0x7f323b88311b42cc", - "0x8080808080803c90", - "0x808080" - ], - [ - "0xa2584e59209d66f8", - "0x2914e9df55205341", - "0x19c3ff335ced3046", - "0xb0aab4f999274505", - "0x56a0800144f846b8", - "0xffa655cc1b171fe8", - "0x5b6ef8c092e64583", - "0x1c0ad6c991be048", - "0xa021b463e3b52f62", - "0x3c23f7860146d2c5", - "0xc003c7dcb27d7e92", - "0x3b2782ca53b600e5", - "0x70a4855d04d8fa7b" - ] - ] - } - ] - } - ], + "accounts": [], "storages": [], "transactions": [], "transaction_receipts": [] @@ -1760,9 +147,7 @@ "type": "module", "context": { "inputs": [ - "0x4f21e5", - "0x4f21e8", - "0x13cb6ae34a13a0977f4d7101ebc24b87bb23f0d5" + "0x51cdb8" ], "module_class": { "prime": "0x800000000000011000000000000000000000000000000000000000000000001", @@ -1771,21 +156,21 @@ "0xa0680017fff8000", "0x7", "0x482680017ffa8000", - "0xffffffffffffffffffffffffffffed2c", + "0xfffffffffffffffffffffffffffff650", "0x400280007ff97fff", "0x10780017fff7fff", - "0x11d", + "0xb3", "0x4825800180007ffa", - "0x12d4", + "0x9b0", "0x400280007ff97fff", "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x125", + "0xbb", "0x482680017ff98000", "0x1", "0x20680017fff7ff8", - "0x104", + "0x9a", "0x48307ff680007ff7", "0x20680017fff7fff", "0x4", @@ -1806,7 +191,7 @@ "0x480680017fff8000", "0x0", "0x20680017fff7ffe", - "0xde", + "0x74", "0x480080007fff8000", "0xa0680017fff8000", "0x12", @@ -1823,7 +208,7 @@ "0x402480017fff7ffb", "0xffffffffffffffffffffffffffffffff", "0x20680017fff7fff", - "0xc9", + "0x5f", "0x402780017fff7fff", "0x1", "0x400080007ff87ffe", @@ -1836,81 +221,14 @@ "0x20680017fff7fff", "0x4", "0x10780017fff7fff", - "0xa", - "0x482480017ff78000", - "0x1", - "0x48127ff77fff8000", - "0x480680017fff8000", - "0x0", - "0x48127ff47fff8000", - "0x10780017fff7fff", - "0x8", - "0x48127ff77fff8000", - "0x48127ff77fff8000", - "0x480680017fff8000", - "0x1", - "0x480680017fff8000", - "0x0", - "0x20680017fff7ffe", - "0x9b", - "0x480080007fff8000", - "0xa0680017fff8000", - "0x12", - "0x4824800180007ffe", - "0x100000000", - "0x4844800180008002", - "0x8000000000000110000000000000000", - "0x4830800080017ffe", - "0x480080007ff57fff", - "0x482480017ffe8000", - "0xefffffffffffffde00000000ffffffff", - "0x480080017ff37fff", - "0x400080027ff27ffb", - "0x402480017fff7ffb", - "0xffffffffffffffffffffffffffffffff", - "0x20680017fff7fff", - "0x86", - "0x402780017fff7fff", - "0x1", - "0x400080007ff87ffe", - "0x482480017ffe8000", - "0xffffffffffffffffffffffff00000000", - "0x400080017ff77fff", - "0x482480017ff78000", - "0x2", - "0x48307ff880007ff9", - "0x20680017fff7fff", - "0x4", - "0x10780017fff7fff", - "0xa", - "0x482480017ff78000", - "0x1", - "0x48127ff77fff8000", - "0x480680017fff8000", - "0x0", - "0x480080007ff48000", - "0x10780017fff7fff", - "0x8", - "0x48127ff77fff8000", - "0x48127ff77fff8000", - "0x480680017fff8000", - "0x1", - "0x480680017fff8000", - "0x0", - "0x20680017fff7ffe", - "0x5b", - "0x48307ffc80007ffd", - "0x20680017fff7fff", - "0x4", - "0x10780017fff7fff", "0x10", "0x40780017fff7fff", "0x1", "0x480680017fff8000", "0x496e70757420746f6f206c6f6e6720666f7220617267756d656e7473", "0x400080007ffe7fff", - "0x48127ff77fff8000", - "0x48127fa97fff8000", + "0x48127ffc7fff8000", + "0x48127fb77fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -1919,103 +237,64 @@ "0x1", "0x208b7fff7fff7ffe", "0x1104800180018000", - "0x36a", + "0x27a", "0x482480017fff8000", - "0x369", + "0x279", "0x480080007fff8000", "0xa0680017fff8000", "0x9", - "0x4824800180007fa7", - "0xa0a", + "0x4824800180007fb5", + "0x47fe", "0x482480017fff8000", "0x100000000000000000000000000000000", - "0x400080007ff27fff", + "0x400080007ff77fff", "0x10780017fff7fff", - "0x2b", - "0x4824800180007fa7", - "0xa0a", - "0x400080007ff37fff", - "0x482480017ff38000", + "0x27", + "0x4824800180007fb5", + "0x47fe", + "0x400080007ff87fff", + "0x482480017ff88000", "0x1", "0x48127ffe7fff8000", "0x480a7ffb7fff8000", - "0x48127fe47fff8000", - "0x48127fec7fff8000", + "0x48127fe67fff8000", + "0x48127fe67fff8000", "0x480680017fff8000", - "0x0", - "0x480680017fff8000", - "0x0", - "0x48127fd67fff8000", - "0x48127fd67fff8000", + "0xaa36a7", "0x48127fef7fff8000", "0x1104800180018000", - "0x197", - "0x20680017fff7ffc", + "0x174", + "0x20680017fff7ffd", "0xf", "0x40780017fff7fff", "0x1", - "0x400080007fff7ffc", - "0x400080017fff7ffd", - "0x48127ff87fff8000", - "0x48127ff87fff8000", - "0x48127ff87fff8000", + "0x400080007fff7ffd", + "0x400080017fff7ffe", + "0x48127ff97fff8000", + "0x48127ff97fff8000", + "0x48127ff97fff8000", "0x480680017fff8000", "0x0", "0x48127ffb7fff8000", "0x482480017ffa8000", "0x2", "0x208b7fff7fff7ffe", - "0x48127ff97fff8000", - "0x48127ff97fff8000", - "0x48127ff97fff8000", - "0x480680017fff8000", - "0x1", "0x48127ffa7fff8000", "0x48127ffa7fff8000", - "0x208b7fff7fff7ffe", - "0x40780017fff7fff", - "0x1", - "0x480680017fff8000", - "0x4f7574206f6620676173", - "0x400080007ffe7fff", - "0x482480017ff08000", - "0x1", - "0x48127fa27fff8000", - "0x480a7ffb7fff8000", - "0x480680017fff8000", - "0x1", "0x48127ffa7fff8000", - "0x482480017ff98000", - "0x1", - "0x208b7fff7fff7ffe", - "0x40780017fff7fff", - "0x1", - "0x480680017fff8000", - "0x4661696c656420746f20646573657269616c697a6520706172616d202334", - "0x400080007ffe7fff", - "0x48127ff87fff8000", - "0x48127faa7fff8000", - "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", "0x48127ffa7fff8000", - "0x482480017ff98000", - "0x1", + "0x48127ffa7fff8000", "0x208b7fff7fff7ffe", - "0x482480017ff28000", - "0x3", - "0x10780017fff7fff", - "0x5", - "0x40780017fff7fff", - "0x8", - "0x48127ff27fff8000", "0x40780017fff7fff", "0x1", "0x480680017fff8000", - "0x4661696c656420746f20646573657269616c697a6520706172616d202333", + "0x4f7574206f6620676173", "0x400080007ffe7fff", - "0x48127ffd7fff8000", - "0x48127faa7fff8000", + "0x482480017ff58000", + "0x1", + "0x48127fb07fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -2355,208 +634,8 @@ "0x480680017fff8000", "0x0", "0x208b7fff7fff7ffe", - "0xa0680017fff8000", - "0x7", - "0x482680017ff58000", - "0xffffffffffffffffffffffffffffa196", - "0x400280007ff47fff", - "0x10780017fff7fff", - "0xb2", - "0x4825800180007ff5", - "0x5e6a", - "0x400280007ff47fff", - "0x48297ff880017ff7", - "0xa0680017fff7fff", - "0x7", - "0x482480017fff8000", - "0x100000000000000000000000000000000", - "0x400280017ff47fff", - "0x10780017fff7fff", - "0xd", - "0x400280017ff47fff", - "0x482680017ff48000", - "0x2", - "0x48127ffc7fff8000", - "0x480a7ff67fff8000", - "0x480680017fff8000", - "0x0", - "0x480a7ff97fff8000", - "0x480a7ffa7fff8000", - "0x480a7ff77fff8000", - "0x208b7fff7fff7ffe", - "0x482680017ff48000", - "0x2", - "0x48127ffb7fff8000", - "0x480a7ff67fff8000", - "0x480a7ffb7fff8000", - "0x480a7ffc7fff8000", - "0x480680017fff8000", - "0xaa36a7", - "0x480a7ff77fff8000", - "0x480a7ffd7fff8000", - "0x1104800180018000", - "0xa1", - "0x20680017fff7ffd", - "0x84", - "0x48327fff7ffa8001", - "0xa0680017fff7fff", - "0x7", - "0x4824800180007fff", - "0x100000000000000000000000000000000", - "0x400080007ff77fff", - "0x10780017fff7fff", - "0xc", - "0x400080007ff87fff", - "0x40780017fff7fff", - "0x1", - "0x482480017ff78000", - "0x1", - "0x48127ffd7fff8000", - "0x480680017fff8000", - "0x0", - "0x10780017fff7fff", - "0x7", - "0x482480017ff78000", - "0x1", - "0x48127ffe7fff8000", - "0x480680017fff8000", - "0x1", - "0x48327ff87ff98001", - "0xa0680017fff7fff", - "0x7", - "0x4824800180007fff", - "0x100000000000000000000000000000000", - "0x400080007ffa7fff", - "0x10780017fff7fff", - "0xc", - "0x400080007ffb7fff", - "0x40780017fff7fff", - "0x5", - "0x482480017ff68000", - "0x1", - "0x48127ff97fff8000", - "0x48127ff57fff8000", - "0x48127ff57fff8000", - "0x10780017fff7fff", - "0x1c", - "0x480680017fff8000", - "0x1", - "0x48307fff7ffa8001", - "0xa0680017fff7fff", - "0x7", - "0x4824800180007fff", - "0x100000000000000000000000000000000", - "0x400080017ff67fff", - "0x10780017fff7fff", - "0xc", - "0x400080017ff77fff", - "0x40780017fff7fff", - "0x1", - "0x482480017ff68000", - "0x2", - "0x48127ffa7fff8000", - "0x48127ffc7fff8000", - "0x48127ff57fff8000", - "0x10780017fff7fff", - "0x8", - "0x482480017ff68000", - "0x2", - "0x48127ffa7fff8000", - "0x48127ffd7fff8000", - "0x480680017fff8000", - "0x1", - "0x20680017fff7fff", - "0x2f", - "0x480680017fff8000", - "0x1", - "0xa0680017fff8000", - "0x8", - "0x48327ffe7ff78000", - "0x4824800180007fff", - "0x100000000", - "0x400080007ff87fff", - "0x10780017fff7fff", - "0x14", - "0x48327ffe7ff78001", - "0x4824800180007fff", - "0xffffffffffffffffffffffff00000000", - "0x400080007ff87ffe", - "0x482480017ff88000", - "0x1", - "0x48127fe57fff8000", - "0x48127fe57fff8000", - "0x48127ffc7fff8000", - "0x480a7ff87fff8000", - "0x48127ff47fff8000", - "0x48127ff47fff8000", - "0x480a7ffb7fff8000", - "0x480a7ffc7fff8000", - "0x480a7ffd7fff8000", - "0x1104800180018000", - "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff78", - "0x208b7fff7fff7ffe", - "0x40780017fff7fff", - "0x1", - "0x480680017fff8000", - "0x7533325f616464204f766572666c6f77", - "0x400080007ffe7fff", - "0x482480017ff68000", - "0x1", - "0x48127fe37fff8000", - "0x48127fe37fff8000", - "0x480680017fff8000", - "0x1", - "0x480680017fff8000", - "0x0", - "0x48127ff97fff8000", - "0x482480017ff88000", - "0x1", - "0x208b7fff7fff7ffe", - "0x40780017fff7fff", - "0x1", - "0x480680017fff8000", - "0x753235365f616464204f766572666c6f77", - "0x400080007ffe7fff", - "0x48127ffa7fff8000", - "0x48127fe77fff8000", - "0x48127fe77fff8000", - "0x480680017fff8000", - "0x1", - "0x480680017fff8000", - "0x0", - "0x48127ff97fff8000", - "0x482480017ff88000", - "0x1", - "0x208b7fff7fff7ffe", - "0x48127ffa7fff8000", - "0x48127ffa7fff8000", - "0x48127ffa7fff8000", - "0x480680017fff8000", - "0x1", - "0x480680017fff8000", - "0x0", - "0x48127ff97fff8000", - "0x48127ff97fff8000", - "0x208b7fff7fff7ffe", - "0x40780017fff7fff", - "0x1", - "0x480680017fff8000", - "0x4f7574206f6620676173", - "0x400080007ffe7fff", - "0x482680017ff48000", - "0x1", - "0x480a7ff57fff8000", - "0x480a7ff67fff8000", - "0x480680017fff8000", - "0x1", "0x480680017fff8000", "0x0", - "0x48127ff97fff8000", - "0x482480017ff88000", - "0x1", - "0x208b7fff7fff7ffe", - "0x480680017fff8000", - "0x1", "0xa0680017fff8004", "0xe", "0x4824800180047ffe", @@ -2564,55 +643,54 @@ "0x484480017ffe8000", "0x110000000000000000", "0x48307ffe7fff8002", - "0x480280007ff67ffc", - "0x480280017ff67ffc", + "0x480280007ff77ffc", + "0x480280017ff77ffc", "0x402480017ffb7ffd", "0xffffffffffffffeeffffffffffffffff", - "0x400280027ff67ffd", + "0x400280027ff77ffd", "0x10780017fff7fff", - "0xce", + "0xcd", "0x484480017fff8001", "0x8000000000000000000000000000000", "0x48307fff80007ffd", - "0x480280007ff67ffd", - "0x480280017ff67ffd", + "0x480280007ff77ffd", + "0x480280017ff77ffd", "0x402480017ffc7ffe", "0xf8000000000000000000000000000000", - "0x400280027ff67ffe", + "0x400280027ff77ffe", "0x40780017fff7fff", "0x1", - "0x400180007fff7ff9", - "0x400180017fff7ffa", - "0x400180027fff7ffb", - "0x400180037fff7ffc", - "0x400180047fff7ffd", + "0x400180007fff7ffa", + "0x400180017fff7ffb", + "0x400180027fff7ffc", + "0x400180037fff7ffd", "0x480680017fff8000", "0x1", "0x48127ffe7fff8000", "0x482480017ffd8000", - "0x5", - "0x482680017ff68000", + "0x4", + "0x482680017ff78000", "0x3", "0x480680017fff8000", "0x43616c6c436f6e7472616374", - "0x400280007ff87fff", - "0x400380017ff87ff7", - "0x400280027ff87ff4", - "0x400280037ff87ffb", - "0x400280047ff87ffc", - "0x400280057ff87ffd", - "0x480280077ff88000", + "0x400280007ff97fff", + "0x400380017ff97ff8", + "0x400280027ff97ff4", + "0x400280037ff97ffb", + "0x400280047ff97ffc", + "0x400280057ff97ffd", + "0x480280077ff98000", "0x20680017fff7fff", "0xa2", - "0x480280087ff88000", - "0x480280097ff88000", + "0x480280087ff98000", + "0x480280097ff98000", "0x480680017fff8000", "0x0", - "0x480280067ff88000", - "0x482680017ff88000", + "0x480280067ff98000", + "0x482680017ff98000", "0xa", - "0x480280087ff88000", - "0x480280097ff88000", + "0x480280087ff98000", + "0x480280097ff98000", "0x48307ff980007ffa", "0xa0680017fff8000", "0x6", @@ -2767,13 +845,13 @@ "0x40780017fff7fff", "0x1d", "0x48127fe07fff8000", - "0x480280067ff88000", - "0x482680017ff88000", + "0x480280067ff98000", + "0x482680017ff98000", "0xa", "0x480680017fff8000", "0x1", - "0x480280087ff88000", - "0x480280097ff88000", + "0x480280087ff98000", + "0x480280097ff98000", "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0x21", @@ -2782,10 +860,10 @@ "0x480680017fff8000", "0x4f7074696f6e3a3a756e77726170206661696c65642e", "0x400080007ffe7fff", - "0x482680017ff68000", + "0x482680017ff78000", "0x3", - "0x480a7ff77fff8000", "0x480a7ff87fff8000", + "0x480a7ff97fff8000", "0x480680017fff8000", "0x1", "0x48127ffa7fff8000", @@ -2794,10 +872,9 @@ "0x208b7fff7fff7ffe" ], "bytecode_segment_lengths": [ - 305, + 199, 282, - 200, - 237 + 236 ], "hints": [ [ @@ -2806,7 +883,7 @@ { "TestLessThanOrEqual": { "lhs": { - "Immediate": "0x12d4" + "Immediate": "0x9b0" }, "rhs": { "Deref": { @@ -2814,73 +891,16 @@ "offset": -6 } }, - "dst": { - "register": "AP", - "offset": 0 - } - } - } - ] - ], - [ - 40, - [ - { - "TestLessThan": { - "lhs": { - "BinOp": { - "op": "Add", - "a": { - "register": "AP", - "offset": -1 - }, - "b": { - "Immediate": "0x0" - } - } - }, - "rhs": { - "Immediate": "0x100000000" - }, - "dst": { - "register": "AP", - "offset": 0 - } - } - } - ] - ], - [ - 44, - [ - { - "LinearSplit": { - "value": { - "Deref": { - "register": "AP", - "offset": -1 - } - }, - "scalar": { - "Immediate": "0x8000000000000110000000000000000" - }, - "max_x": { - "Immediate": "0xfffffffffffffffffffffffffffffffe" - }, - "x": { - "register": "AP", - "offset": 0 - }, - "y": { + "dst": { "register": "AP", - "offset": 1 + "offset": 0 } } } ] ], [ - 86, + 40, [ { "TestLessThan": { @@ -2908,7 +928,7 @@ ] ], [ - 90, + 44, [ { "LinearSplit": { @@ -2937,7 +957,7 @@ ] ], [ - 136, + 69, [ { "AllocSegment": { @@ -2950,17 +970,17 @@ ] ], [ - 155, + 88, [ { "TestLessThanOrEqual": { "lhs": { - "Immediate": "0xa0a" + "Immediate": "0x47fe" }, "rhs": { "Deref": { "register": "AP", - "offset": -88 + "offset": -74 } }, "dst": { @@ -2972,72 +992,7 @@ ] ], [ - 184, - [ - { - "AllocSegment": { - "dst": { - "register": "AP", - "offset": 0 - } - } - } - ] - ], - [ - 205, - [ - { - "AllocSegment": { - "dst": { - "register": "AP", - "offset": 0 - } - } - } - ] - ], - [ - 220, - [ - { - "AllocSegment": { - "dst": { - "register": "AP", - "offset": 0 - } - } - } - ] - ], - [ - 241, - [ - { - "AllocSegment": { - "dst": { - "register": "AP", - "offset": 0 - } - } - } - ] - ], - [ - 262, - [ - { - "AllocSegment": { - "dst": { - "register": "AP", - "offset": 0 - } - } - } - ] - ], - [ - 276, + 113, [ { "AllocSegment": { @@ -3050,7 +1005,7 @@ ] ], [ - 290, + 134, [ { "AllocSegment": { @@ -3063,148 +1018,7 @@ ] ], [ - 587, - [ - { - "TestLessThanOrEqual": { - "lhs": { - "Immediate": "0x5e6a" - }, - "rhs": { - "Deref": { - "register": "FP", - "offset": -11 - } - }, - "dst": { - "register": "AP", - "offset": 0 - } - } - } - ] - ], - [ - 598, - [ - { - "TestLessThan": { - "lhs": { - "Deref": { - "register": "AP", - "offset": 0 - } - }, - "rhs": { - "Immediate": "0x100000000" - }, - "dst": { - "register": "AP", - "offset": -1 - } - } - } - ] - ], - [ - 631, - [ - { - "TestLessThan": { - "lhs": { - "Deref": { - "register": "AP", - "offset": 0 - } - }, - "rhs": { - "Immediate": "0x100000000000000000000000000000000" - }, - "dst": { - "register": "AP", - "offset": -1 - } - } - } - ] - ], - [ - 654, - [ - { - "TestLessThan": { - "lhs": { - "Deref": { - "register": "AP", - "offset": 0 - } - }, - "rhs": { - "Immediate": "0x100000000000000000000000000000000" - }, - "dst": { - "register": "AP", - "offset": -1 - } - } - } - ] - ], - [ - 674, - [ - { - "TestLessThan": { - "lhs": { - "Deref": { - "register": "AP", - "offset": 0 - } - }, - "rhs": { - "Immediate": "0x100000000000000000000000000000000" - }, - "dst": { - "register": "AP", - "offset": -1 - } - } - } - ] - ], - [ - 701, - [ - { - "TestLessThan": { - "lhs": { - "BinOp": { - "op": "Add", - "a": { - "register": "FP", - "offset": -9 - }, - "b": { - "Deref": { - "register": "AP", - "offset": -1 - } - } - } - }, - "rhs": { - "Immediate": "0x100000000" - }, - "dst": { - "register": "AP", - "offset": 0 - } - } - } - ] - ], - [ - 727, + 156, [ { "AllocSegment": { @@ -3217,7 +1031,7 @@ ] ], [ - 744, + 170, [ { "AllocSegment": { @@ -3230,7 +1044,7 @@ ] ], [ - 770, + 184, [ { "AllocSegment": { @@ -3243,7 +1057,7 @@ ] ], [ - 789, + 483, [ { "TestLessThan": { @@ -3265,7 +1079,7 @@ ] ], [ - 793, + 487, [ { "LinearSplit": { @@ -3294,7 +1108,7 @@ ] ], [ - 803, + 497, [ { "LinearSplit": { @@ -3323,7 +1137,7 @@ ] ], [ - 811, + 505, [ { "AllocSegment": { @@ -3336,14 +1150,14 @@ ] ], [ - 833, + 526, [ { "SystemCall": { "system": { "Deref": { "register": "FP", - "offset": -8 + "offset": -7 } } } @@ -3351,7 +1165,7 @@ ] ], [ - 846, + 539, [ { "TestLessThan": { @@ -3376,7 +1190,7 @@ ] ], [ - 858, + 551, [ { "TestLessThan": { @@ -3398,7 +1212,7 @@ ] ], [ - 860, + 553, [ { "DivMod": { @@ -3424,7 +1238,7 @@ ] ], [ - 884, + 577, [ { "TestLessThan": { @@ -3449,7 +1263,7 @@ ] ], [ - 896, + 589, [ { "TestLessThan": { @@ -3471,7 +1285,7 @@ ] ], [ - 898, + 591, [ { "DivMod": { @@ -3497,7 +1311,7 @@ ] ], [ - 930, + 623, [ { "AllocSegment": { @@ -3510,7 +1324,7 @@ ] ], [ - 947, + 640, [ { "AllocSegment": { @@ -3523,7 +1337,7 @@ ] ], [ - 964, + 657, [ { "AllocSegment": { @@ -3536,7 +1350,7 @@ ] ], [ - 981, + 674, [ { "AllocSegment": { @@ -3549,7 +1363,7 @@ ] ], [ - 1009, + 702, [ { "AllocSegment": { @@ -3566,7 +1380,7 @@ [ 0, [ - "memory[ap + 0] = 4820 <= memory[fp + -6]" + "memory[ap + 0] = 2480 <= memory[fp + -6]" ] ], [ @@ -3582,217 +1396,139 @@ ] ], [ - 86, - [ - "memory[ap + 0] = (memory[ap + -1] + 0) % PRIME < 4294967296" - ] - ], - [ - 90, - [ - "\n(value, scalar) = (memory[ap + -1], 10633823966279327296825105735305134080)\nx = min(value // scalar, 340282366920938463463374607431768211454)\ny = value - x * scalar\nmemory[ap + 0] = x\nmemory[ap + 1] = y\n" - ] - ], - [ - 136, - [ - "memory[ap + 0] = segments.add()" - ] - ], - [ - 155, - [ - "memory[ap + 0] = 2570 <= memory[ap + -88]" - ] - ], - [ - 184, - [ - "memory[ap + 0] = segments.add()" - ] - ], - [ - 205, - [ - "memory[ap + 0] = segments.add()" - ] - ], - [ - 220, - [ - "memory[ap + 0] = segments.add()" - ] - ], - [ - 241, + 69, [ "memory[ap + 0] = segments.add()" ] ], [ - 262, + 88, [ - "memory[ap + 0] = segments.add()" + "memory[ap + 0] = 18430 <= memory[ap + -74]" ] ], [ - 276, + 113, [ "memory[ap + 0] = segments.add()" ] ], [ - 290, + 134, [ "memory[ap + 0] = segments.add()" ] ], [ - 587, - [ - "memory[ap + 0] = 24170 <= memory[fp + -11]" - ] - ], - [ - 598, - [ - "memory[ap + -1] = memory[ap + 0] < 4294967296" - ] - ], - [ - 631, - [ - "memory[ap + -1] = memory[ap + 0] < 340282366920938463463374607431768211456" - ] - ], - [ - 654, - [ - "memory[ap + -1] = memory[ap + 0] < 340282366920938463463374607431768211456" - ] - ], - [ - 674, - [ - "memory[ap + -1] = memory[ap + 0] < 340282366920938463463374607431768211456" - ] - ], - [ - 701, - [ - "memory[ap + 0] = (memory[fp + -9] + memory[ap + -1]) % PRIME < 4294967296" - ] - ], - [ - 727, + 156, [ "memory[ap + 0] = segments.add()" ] ], [ - 744, + 170, [ "memory[ap + 0] = segments.add()" ] ], [ - 770, + 184, [ "memory[ap + 0] = segments.add()" ] ], [ - 789, + 483, [ "memory[ap + 4] = memory[ap + -1] < 3618502788666131106986593281521497120414687020801267626233049500247285301248" ] ], [ - 793, + 487, [ "\n(value, scalar) = (memory[ap + 3], 313594649253062377472)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -2] = x\nmemory[ap + -1] = y\n" ] ], [ - 803, + 497, [ "\n(value, scalar) = (memory[ap + -2], 10633823966279326983230456482242756608)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -1] = x\nmemory[ap + 0] = y\n" ] ], [ - 811, + 505, [ "memory[ap + 0] = segments.add()" ] ], [ - 833, + 526, [ - "syscall_handler.syscall(syscall_ptr=memory[fp + -8])" + "syscall_handler.syscall(syscall_ptr=memory[fp + -7])" ] ], [ - 846, + 539, [ "memory[ap + 0] = memory[ap + -6] < memory[ap + -1]" ] ], [ - 858, + 551, [ "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" ] ], [ - 860, + 553, [ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], [ - 884, + 577, [ "memory[ap + 0] = memory[ap + -2] < memory[ap + -1]" ] ], [ - 896, + 589, [ "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" ] ], [ - 898, + 591, [ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], [ - 930, + 623, [ "memory[ap + 0] = segments.add()" ] ], [ - 947, + 640, [ "memory[ap + 0] = segments.add()" ] ], [ - 964, + 657, [ "memory[ap + 0] = segments.add()" ] ], [ - 981, + 674, [ "memory[ap + 0] = segments.add()" ] ], [ - 1009, + 702, [ "memory[ap + 0] = segments.add()" ] From 8fb9eea7ff1c7cdbbd26aac67ae8b85c6c176840 Mon Sep 17 00:00:00 2001 From: Pia Date: Tue, 23 Jul 2024 11:41:01 +0200 Subject: [PATCH 38/73] chore: turn into `program_hash` --- src/contract_dry_run.cairo | 2 +- src/module.cairo | 30 +++++++++++++++--------------- src/types.cairo | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/contract_dry_run.cairo b/src/contract_dry_run.cairo index 4d2b81c7..401d11ba 100644 --- a/src/contract_dry_run.cairo +++ b/src/contract_dry_run.cairo @@ -143,7 +143,7 @@ func main{ "low": hex(ids.result.low), "high": hex(ids.result.high) } - dictionary["class_hash"] = hex(ids.program_hash) + dictionary["program_hash"] = hex(ids.program_hash) list.append(dictionary) diff --git a/src/module.cairo b/src/module.cairo index 53513f09..8bd3b01f 100644 --- a/src/module.cairo +++ b/src/module.cairo @@ -8,7 +8,7 @@ func init_module{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, keccak_ptr: KeccakBuiltin*, pow2_array: felt* }(input: felt*, input_bytes_len: felt) -> (res: ModuleTask) { alloc_locals; - let (class_hash, module_inputs_len) = extract_constant_params{range_check_ptr=range_check_ptr}( + let (program_hash, module_inputs_len) = extract_constant_params{range_check_ptr=range_check_ptr}( input=input ); @@ -32,7 +32,7 @@ func init_module{ return ( res=ModuleTask( - class_hash=class_hash, module_inputs_len=module_inputs_len, module_inputs=module_inputs + program_hash=program_hash, module_inputs_len=module_inputs_len, module_inputs=module_inputs ), ); } @@ -41,24 +41,24 @@ func init_module{ // Inputs: // input: le 8-byte chunks // Outputs: -// class_hash, module_inputs_len +// program_hash, module_inputs_len func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(input: felt*) -> ( - class_hash: felt, module_inputs_len: felt + program_hash: felt, module_inputs_len: felt ) { alloc_locals; // ModuleTask Layout: - // 0-3: class_hash + // 0-3: program_hash // 4-7: dynamic_input_offset // 8-11: module_inputs_len - // Copy class_hash - let (class_hash_low_first) = word_reverse_endian_64([input]); - let (class_hash_low_second) = word_reverse_endian_64([input + 1]); - let (class_hash_high_first) = word_reverse_endian_64([input + 2]); - let (class_hash_high_second) = word_reverse_endian_64([input + 3]); - let class_hash_first = class_hash_low_first * 0x10000000000000000 + class_hash_low_second; - let class_hash_second = class_hash_high_first * 0x10000000000000000 + class_hash_high_second; - let class_hash = class_hash_first * 0x100000000000000000000000000000000 + class_hash_second; + // Copy program_hash + let (program_hash_low_first) = word_reverse_endian_64([input]); + let (program_hash_low_second) = word_reverse_endian_64([input + 1]); + let (program_hash_high_first) = word_reverse_endian_64([input + 2]); + let (program_hash_high_second) = word_reverse_endian_64([input + 3]); + let program_hash_first = program_hash_low_first * 0x10000000000000000 + program_hash_low_second; + let program_hash_second = program_hash_high_first * 0x10000000000000000 + program_hash_high_second; + let program_hash = program_hash_first * 0x100000000000000000000000000000000 + program_hash_second; // first 3 chunks of module_inputs_len should be 0 assert [input + 8] = 0x0; @@ -66,7 +66,7 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu assert [input + 10] = 0x0; let (module_inputs_len) = word_reverse_endian_64([input + 11]); - return (class_hash=class_hash, module_inputs_len=module_inputs_len); + return (program_hash=program_hash, module_inputs_len=module_inputs_len); } // Decodes the dynamic parameters of the Module @@ -79,7 +79,7 @@ func extract_dynamic_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}( ) -> () { alloc_locals; // ModuleTask Layout: - // 0-3: class_hash + // 0-3: program_hash // 4-7: dynamic_input_offset // 8-11: module_inputs_len // 12-15: input 1... diff --git a/src/types.cairo b/src/types.cairo index 322aae5f..ca6885bc 100644 --- a/src/types.cairo +++ b/src/types.cairo @@ -46,7 +46,7 @@ struct ComputationalTask { } struct ModuleTask { - class_hash: felt, + program_hash: felt, module_inputs_len: felt, module_inputs: felt*, } From 9dd8960690d51f12f6bd3aca3ced4755f4044966 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 23 Jul 2024 11:44:32 +0200 Subject: [PATCH 39/73] memorizers fixes --- .../account_memorizer_handler.py | 34 +++--- .../header_memorizer_handler.py | 102 +++++++++++------- .../storage_memorizer_handler.py | 7 +- 3 files changed, 93 insertions(+), 50 deletions(-) diff --git a/packages/contract_bootloader/syscall_memorizer_handler/account_memorizer_handler.py b/packages/contract_bootloader/syscall_memorizer_handler/account_memorizer_handler.py index 760c584c..cdf55abf 100644 --- a/packages/contract_bootloader/syscall_memorizer_handler/account_memorizer_handler.py +++ b/packages/contract_bootloader/syscall_memorizer_handler/account_memorizer_handler.py @@ -27,9 +27,11 @@ def get_nonce(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account).as_dict()[ - "nonce" - ] + value = int( + decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account).as_dict()[ + "nonce" + ] + ) return ( value % 0x100000000000000000000000000000000, @@ -47,9 +49,11 @@ def get_balance(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account).as_dict()[ - "balance" - ] + value = int( + decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account).as_dict()[ + "balance" + ] + ) return ( value % 0x100000000000000000000000000000000, @@ -67,9 +71,12 @@ def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account).as_dict()[ - "storageRoot" - ] + value = int( + decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account) + .as_dict()["storageRoot"] + .hex(), + 16, + ) return ( value % 0x100000000000000000000000000000000, @@ -87,9 +94,12 @@ def get_code_hash(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account).as_dict()[ - "codeHash" - ] + value = int( + decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), Account) + .as_dict()["codeHash"] + .hex(), + 16, + ) return ( value % 0x100000000000000000000000000000000, diff --git a/packages/contract_bootloader/syscall_memorizer_handler/header_memorizer_handler.py b/packages/contract_bootloader/syscall_memorizer_handler/header_memorizer_handler.py index ac849558..544bc3be 100644 --- a/packages/contract_bootloader/syscall_memorizer_handler/header_memorizer_handler.py +++ b/packages/contract_bootloader/syscall_memorizer_handler/header_memorizer_handler.py @@ -73,9 +73,12 @@ def get_coinbase(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["coinbase"] + value = int( + decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun) + .as_dict()["coinbase"] + .hex(), + 16, + ) return ( value % 0x100000000000000000000000000000000, @@ -93,9 +96,12 @@ def get_state_root(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["stateRoot"] + value = int( + decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun) + .as_dict()["stateRoot"] + .hex(), + 16, + ) return ( value % 0x100000000000000000000000000000000, @@ -113,9 +119,12 @@ def get_transaction_root(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["transactionsRoot"] + value = int( + decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun) + .as_dict()["transactionsRoot"] + .hex(), + 16, + ) return ( value % 0x100000000000000000000000000000000, @@ -133,9 +142,12 @@ def get_receipt_root(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["receiptsRoot"] + value = int( + decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun) + .as_dict()["receiptsRoot"] + .hex(), + 16, + ) return ( value % 0x100000000000000000000000000000000, @@ -156,9 +168,11 @@ def get_difficulty(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["difficulty"] + value = int( + decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["difficulty"] + ) return ( value % 0x100000000000000000000000000000000, @@ -176,9 +190,11 @@ def get_number(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["number"] + value = int( + decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["number"] + ) return ( value % 0x100000000000000000000000000000000, @@ -196,9 +212,11 @@ def get_gas_limit(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["gasLimit"] + value = int( + decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["gasLimit"] + ) return ( value % 0x100000000000000000000000000000000, @@ -216,9 +234,11 @@ def get_gas_used(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["gasUsed"] + value = int( + decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["gasUsed"] + ) return ( value % 0x100000000000000000000000000000000, @@ -236,9 +256,11 @@ def get_timestamp(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["timestamp"] + value = int( + decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["timestamp"] + ) return ( value % 0x100000000000000000000000000000000, @@ -259,9 +281,12 @@ def get_mix_hash(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["mixHash"] + value = int( + decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun) + .as_dict()["mixHash"] + .hex(), + 16, + ) return ( value % 0x100000000000000000000000000000000, @@ -279,9 +304,12 @@ def get_nonce(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["nonce"] + value = int( + decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun) + .as_dict()["nonce"] + .hex(), + 16, + ) return ( value % 0x100000000000000000000000000000000, @@ -299,9 +327,11 @@ def get_base_fee_per_gas(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun - ).as_dict()["baseFeePerGas"] + value = int( + decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), BlockHeaderDencun + ).as_dict()["baseFeePerGas"] + ) return ( value % 0x100000000000000000000000000000000, diff --git a/packages/contract_bootloader/syscall_memorizer_handler/storage_memorizer_handler.py b/packages/contract_bootloader/syscall_memorizer_handler/storage_memorizer_handler.py index d8049b8c..9b20afab 100644 --- a/packages/contract_bootloader/syscall_memorizer_handler/storage_memorizer_handler.py +++ b/packages/contract_bootloader/syscall_memorizer_handler/storage_memorizer_handler.py @@ -27,8 +27,11 @@ def get_slot(self, key: MemorizerKey) -> Tuple[int, int]: end_addr=memorizer_value_ptr + (rlp_len + 7) // 8, ) - value = decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), Binary.fixed_length(32) + value = int( + decode( + little_8_bytes_chunks_to_bytes(rlp, rlp_len), Binary.fixed_length(32) + ).hex(), + 16, ) return ( From 3653ca15307a7fcebac147f1b2f9d7917f722f62 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 23 Jul 2024 14:27:44 +0200 Subject: [PATCH 40/73] header memorizer tested --- packages/contract_bootloader/execute_syscalls.cairo | 9 +++++++++ .../contract_bootloader/provider/header_key_provider.py | 2 +- packages/contract_bootloader/syscall_handler.py | 1 - src/hdp_input.json | 6 +++--- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/contract_bootloader/execute_syscalls.cairo b/packages/contract_bootloader/execute_syscalls.cairo index dc1b4e8e..ca616419 100644 --- a/packages/contract_bootloader/execute_syscalls.cairo +++ b/packages/contract_bootloader/execute_syscalls.cairo @@ -230,6 +230,15 @@ func execute_call_contract{ return (); } if (functionId == HeaderMemorizerFunctionId.GET_EXTRA_DATA) { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.EXTRA_DATA); + let (value) = uint256_reverse_endian(num=field); + + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + + return (); + } + if (functionId == HeaderMemorizerFunctionId.GET_MIX_HASH) { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.MIX_HASH); let (value) = uint256_reverse_endian(num=field); diff --git a/packages/contract_bootloader/provider/header_key_provider.py b/packages/contract_bootloader/provider/header_key_provider.py index 4d12faa7..e24a5b64 100644 --- a/packages/contract_bootloader/provider/header_key_provider.py +++ b/packages/contract_bootloader/provider/header_key_provider.py @@ -21,7 +21,7 @@ def get_uncle(self, key: MemorizerKey) -> int: return int(self.get_block(key=key)["sha3Uncles"].hex(), 16) def get_coinbase(self, key: MemorizerKey) -> int: - return int(self.get_block(key=key)["miner"]) + return int(self.get_block(key=key)["miner"], 16) def get_state_root(self, key: MemorizerKey) -> int: return int(self.get_block(key=key)["stateRoot"].hex(), 16) diff --git a/packages/contract_bootloader/syscall_handler.py b/packages/contract_bootloader/syscall_handler.py index 86bc831d..7fdab98d 100644 --- a/packages/contract_bootloader/syscall_handler.py +++ b/packages/contract_bootloader/syscall_handler.py @@ -68,7 +68,6 @@ def _call_contract_helper( retdata = [] memorizerId = MemorizerId.from_int(request.contract_address) - functionId = AccountMemorizerFunctionId.from_int(request.selector) if memorizerId == MemorizerId.Header: total_size = Memorizer.size() + HeaderMemorizerKey.size() diff --git a/src/hdp_input.json b/src/hdp_input.json index 20bf4a2e..b0cc1594 100644 --- a/src/hdp_input.json +++ b/src/hdp_input.json @@ -1,7 +1,7 @@ { "cairo_run_output_path": "cairo_run_output.json", - "task_root": "0xbababda806a39052318e643bdb1eff6af2a633721c0d36ef9a4280a5986b605e", - "result_root": "0x8f06b439efd884098a3d193a8339bf4f4458779e99cbdf38cfe87f35e47d3628", + "task_root": "0xdbc4d2d3a6603ab060dfdee61eecd257a99cbc6305eebe96759dcc08575f6541", + "result_root": "0xf934fed6fbdbd4fce48a2f7c0d29e65724f018aa4529520767da42598cb9e16c", "proofs": { "mmr_metas": [ { @@ -665,7 +665,7 @@ "0x400180027fff7ffc", "0x400180037fff7ffd", "0x480680017fff8000", - "0x1", + "0x4", "0x48127ffe7fff8000", "0x482480017ffd8000", "0x4", From d85e1e23ba351897b09e8cdc39659ee07e864733 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 23 Jul 2024 15:53:18 +0200 Subject: [PATCH 41/73] tests passing --- .../memorizer/account_memorizer.py | 2 +- .../memorizer/storage_memorizer.py | 2 +- .../provider/account_key_provider.py | 12 +- .../provider/storage_key_provider.py | 4 +- .../contract_bootloader/syscall_handler.py | 6 +- src/hdp_input.json | 780 +++++++++++++++--- 6 files changed, 676 insertions(+), 130 deletions(-) diff --git a/packages/contract_bootloader/memorizer/account_memorizer.py b/packages/contract_bootloader/memorizer/account_memorizer.py index 28557d07..0b37b57e 100644 --- a/packages/contract_bootloader/memorizer/account_memorizer.py +++ b/packages/contract_bootloader/memorizer/account_memorizer.py @@ -49,7 +49,7 @@ def to_dict(self): return { "chain_id": self.chain_id, "block_number": self.block_number, - "address": Web3.toChecksumAddress(hex(self.address)), + "address": Web3.toChecksumAddress(f"0x{self.address:040x}"), } @classmethod diff --git a/packages/contract_bootloader/memorizer/storage_memorizer.py b/packages/contract_bootloader/memorizer/storage_memorizer.py index fd3f20c3..e6840f26 100644 --- a/packages/contract_bootloader/memorizer/storage_memorizer.py +++ b/packages/contract_bootloader/memorizer/storage_memorizer.py @@ -50,7 +50,7 @@ def to_dict(self): return { "chain_id": self.chain_id, "block_number": self.block_number, - "address": Web3.toChecksumAddress(hex(self.address)), + "address": Web3.toChecksumAddress(f"0x{self.address:040x}"), "storage_slot": self.storage_slot, } diff --git a/packages/contract_bootloader/provider/account_key_provider.py b/packages/contract_bootloader/provider/account_key_provider.py index ba0e5873..c6c99e83 100644 --- a/packages/contract_bootloader/provider/account_key_provider.py +++ b/packages/contract_bootloader/provider/account_key_provider.py @@ -8,8 +8,8 @@ def __init__(self, provider_url: str): super().__init__(provider_url=provider_url) def get_nonce(self, key: MemorizerKey) -> int: - address = Web3.to_checksum_address(f"0x{key.address:040x}") - if not self.web3.is_address(address): + address = Web3.toChecksumAddress(f"0x{key.address:040x}") + if not self.web3.isAddress(address): raise ValueError(f"Invalid Ethereum address: {address}") try: @@ -21,8 +21,8 @@ def get_nonce(self, key: MemorizerKey) -> int: raise Exception(f"An error occurred while fetching the nonce: {e}") def get_balance(self, key: MemorizerKey) -> int: - address = Web3.to_checksum_address(f"0x{key.address:040x}") - if not self.web3.is_address(address): + address = Web3.toChecksumAddress(f"0x{key.address:040x}") + if not self.web3.isAddress(address): raise ValueError(f"Invalid Ethereum address: {address}") try: @@ -41,8 +41,8 @@ def get_state_root(self, key: MemorizerKey) -> int: raise Exception(f"An error occurred while fetching the state root: {e}") def get_code_hash(self, key: MemorizerKey) -> int: - address = Web3.to_checksum_address(f"0x{key.address:040x}") - if not self.web3.is_address(address): + address = Web3.toChecksumAddress(f"0x{key.address:040x}") + if not self.web3.isAddress(address): raise ValueError(f"Invalid Ethereum address: {address}") try: diff --git a/packages/contract_bootloader/provider/storage_key_provider.py b/packages/contract_bootloader/provider/storage_key_provider.py index 93393f15..74fda532 100644 --- a/packages/contract_bootloader/provider/storage_key_provider.py +++ b/packages/contract_bootloader/provider/storage_key_provider.py @@ -8,8 +8,8 @@ def __init__(self, provider_url: str): super().__init__(provider_url=provider_url) def get_slot(self, key: MemorizerKey) -> int: - address = Web3.to_checksum_address(f"0x{key.address:040x}") - if not self.web3.is_address(address): + address = Web3.toChecksumAddress(f"0x{key.address:040x}") + if not self.web3.isAddress(address): raise ValueError(f"Invalid Ethereum address: {address}") try: diff --git a/packages/contract_bootloader/syscall_handler.py b/packages/contract_bootloader/syscall_handler.py index 7fdab98d..e6af5b76 100644 --- a/packages/contract_bootloader/syscall_handler.py +++ b/packages/contract_bootloader/syscall_handler.py @@ -101,6 +101,7 @@ def _call_contract_helper( f"Memorizer read must be initialized with a list of {total_size} integers" ) + function_id = AccountMemorizerFunctionId.from_int(request.selector) memorizer = Memorizer( dict_raw_ptrs=calldata[0 : Memorizer.size()], dict_manager=self.dict_manager, @@ -115,7 +116,7 @@ def _call_contract_helper( segments=self.segments, memorizer=memorizer, ) - retdata = handler.handle(function_id=functionId, key=key) + retdata = handler.handle(function_id=function_id, key=key) elif memorizerId == MemorizerId.Storage: total_size = Memorizer.size() + StorageMemorizerKey.size() @@ -125,6 +126,7 @@ def _call_contract_helper( f"Memorizer read must be initialized with a list of {total_size} integers" ) + function_id = StorageMemorizerFunctionId.from_int(request.selector) memorizer = Memorizer( dict_raw_ptrs=calldata[0 : Memorizer.size()], dict_manager=self.dict_manager, @@ -139,7 +141,7 @@ def _call_contract_helper( segments=self.segments, memorizer=memorizer, ) - retdata = handler.handle(function_id=functionId, key=key) + retdata = handler.handle(function_id=function_id, key=key) else: raise ValueError(f"MemorizerId {memorizerId} not matched") diff --git a/src/hdp_input.json b/src/hdp_input.json index b0cc1594..096e190d 100644 --- a/src/hdp_input.json +++ b/src/hdp_input.json @@ -1,7 +1,7 @@ { "cairo_run_output_path": "cairo_run_output.json", - "task_root": "0xdbc4d2d3a6603ab060dfdee61eecd257a99cbc6305eebe96759dcc08575f6541", - "result_root": "0xf934fed6fbdbd4fce48a2f7c0d29e65724f018aa4529520767da42598cb9e16c", + "task_root": "0x0e8750e145458269ba8b67e83fabe839532308d83cf278f3a4eee2f6c1e1690b", + "result_root": "0x8ad7fe6b4f0dd39c44ac5307d25679e90bf79d96f05dc0e65bc56b140154ef6b", "proofs": { "mmr_metas": [ { @@ -137,7 +137,494 @@ } } ], - "accounts": [], + "accounts": [ + { + "address": [ + "0x97a0134ae36acb13", + "0x874bc2eb01714d7f", + "0xd5f023bb" + ], + "account_key": "0x8ad2b901594e58a241532055dfe914294630ed5c33ffc31905452799f9b4aab0", + "proofs": [ + { + "block_number": 5361080, + "proof_bytes_len": [ + 532, + 532, + 532, + 532, + 532, + 500, + 147, + 83, + 106 + ], + "proof": [ + [ + "0x23c6017a01102f9", + "0x5d04919b35600925", + "0x8af6aeffa3a1b9bd", + "0x90ec8179c8b58e5f", + "0x884836a034601036", + "0x3c8c71ae4da1ce57", + "0x677ad1d9e7257b78", + "0xbc6695175e85dc24", + "0xf4ea0ecce4cf4f4", + "0xf0a8e070fa68eb9a", + "0x9cf6b9c8d9f829f5", + "0x7fe3fcaf553fdf16", + "0x1da0942d6658be3d", + "0x1f5979b63a014169", + "0x231f7cf119340765", + "0x4302c54a68564f3", + "0xa01050e1576e3796", + "0xb7dc4b78ef69422c", + "0xa16a70aab8cf5501", + "0xf4eb4bb16f2b545e", + "0xc1348038b44d3605", + "0xea4ddb48963670a0", + "0xcdd5cd7349feb5b3", + "0x233818f86640d56c", + "0x2091b034caf7066d", + "0x665dcbff4669a0ab", + "0xd4945c02ae7ebed2", + "0xe02e529747c9f263", + "0xd986587981d8d58f", + "0x52e24cc055a0fe41", + "0x35226b4882137b8c", + "0x76458eea1c4815cc", + "0x46184a25ea3b8bc4", + "0x758b6f00a0199dbf", + "0x2ca8ff958962eef5", + "0xbadd908ee2b5776f", + "0xf36bc273e9c674d8", + "0xf6fc1aa0aea86406", + "0xd6c6f27622899080", + "0x122380de718ddbb1", + "0xf5b8375b82a4403b", + "0xf6dda0ba4095dc12", + "0x10781e603488827c", + "0xcad3b9b916c21464", + "0xfffb2990c027f89c", + "0x70a0d20b44a666db", + "0x551db83682d7ec46", + "0xb63dbd50e62f7227", + "0x609237b4040df5d2", + "0xa05cf018cef13b57", + "0x8dd2bb666b3ce91a", + "0xbbadbd72a101bf52", + "0x73f26f2c60ea0bb0", + "0xe9ef15485195c03", + "0x5eff96ae52199ca0", + "0x30f9fd9c84103cf6", + "0xe64725173c9bf427", + "0x32e32ff441251c3b", + "0x49a310a42612a0d8", + "0x73958e4c3dff351d", + "0x9ddb68b48575b3f2", + "0xc9a7840902a4daa9", + "0xe200a4cb91a0dd08", + "0xbe17ee5cef10e87b", + "0x197f82276f0d3333", + "0xbbb92fdfe981f04c", + "0x801aea2b" + ], + [ + "0x433f9425a01102f9", + "0x2cb4fd5238278aea", + "0x51bf44d83fc2da14", + "0x75b33a0dfe8297a2", + "0x6e9131a07442c563", + "0xb46f1e0e609c001", + "0x8f7c85875bc544b3", + "0x2a937cc38649b852", + "0x9ab0a00fb3338e1d", + "0xca8cb8b86005af0f", + "0xaa131351cbff1f2", + "0xd2b345da7179b80a", + "0xbaa0297f802f23e3", + "0xfe5598cf070216bc", + "0xdeee4bf6498717c4", + "0x1fcd2c3a18b34451", + "0xa0be7499efdffc72", + "0xd7a339d0aa14014f", + "0x645f38d1b2b5873f", + "0xd18cb11694e8175b", + "0x29d6fbda3028f56", + "0x58ddd5d40aa88ba0", + "0x44e2c60f82c72303", + "0xeed4f52b6186e154", + "0x8d3cd19d61353a86", + "0x851be6ac17ffa043", + "0x84c4cdde6d711613", + "0x8a1f1308479bca91", + "0xc830723639acd075", + "0xde6b00f54da03991", + "0x5422a6c6cbe8cfa6", + "0xb0bec537620df6d4", + "0xfcd4afc8ff76f764", + "0x5df02db7a0d5a0fc", + "0x2e908235e1296a00", + "0x47c065791315f421", + "0x71b36bef579cd1ea", + "0x21a13ba0ca8e3b5f", + "0xe2683ea0dcf52479", + "0xae982ba67e6a914", + "0xc41b43bc321a857f", + "0x3860a05b49ce633e", + "0x62e2c24d7536889a", + "0xdc3622f5f097f639", + "0x5e268740b80f6074", + "0x23a023e776afa59c", + "0xa12a0649d3584b7c", + "0x74e807d822820f61", + "0xd491c764de88ccf3", + "0xa01ce610e94b6e10", + "0x1928caabcc262c50", + "0x27eef9182f849cbe", + "0x4c810346aa7720f6", + "0x1b9e53a7bf6852a2", + "0xd911418a84b6ca0", + "0x87d63c6f6ac9c451", + "0xb8251f4465b7aad8", + "0x56d525354566fe4a", + "0x72961a65bde8a048", + "0xe25f20295c917754", + "0x7db9b0c589c87315", + "0x78f9a00c31eeca27", + "0x9f14160ec2a01b00", + "0x52eda47bd9b4040a", + "0x1a98b40b1a35e39e", + "0x4aec1e1154d6339e", + "0x805e634b" + ], + [ + "0xdcb447dba01102f9", + "0x68980ba151eadfb3", + "0x8a19926217faceb2", + "0x71732d37e1accb26", + "0xc4cee6a0ac4dfcbe", + "0x5282d8edb0f9b6b2", + "0xb14ac18e7f0f4e41", + "0x59f4620d88037c37", + "0x385aa0ecbad44439", + "0x34a815e14f56e350", + "0x955804ac7196189b", + "0x43835bc28de186e5", + "0x22a016d6e7e7feee", + "0x173da768a6e17d23", + "0x62aef2b511d1c64f", + "0xd2aea1318fd607f1", + "0xa01ed8e3d750beb5", + "0xfd043b65d2787122", + "0x814595ebadf21488", + "0x49735eee3bc1bf60", + "0x418695a7b0cbe6d1", + "0xb630c76ceeb770a0", + "0x159b746de50c8efa", + "0x1d6c816c9ddf3fc0", + "0x304198e6d06f7cba", + "0x9c51ae2e57c0a069", + "0x518df55d29aaff6e", + "0x47b7a90e5fbdc267", + "0xaadbb5837dcf039d", + "0xe6b82ff389a00875", + "0x3057e43586dace7c", + "0x5bba10ae629487c7", + "0x79802b46d54dc535", + "0x7118bc2ea0db8010", + "0x9ecee2471d13bdfc", + "0xe83a158eaabf5530", + "0x616c28d8accfabf1", + "0xe14b62a0aca05230", + "0x1cf73e61d3eafd64", + "0x731e6fd5f5004644", + "0x8a11f600630bcaa9", + "0xe8e8a071a6c79502", + "0x1956dc5c1b5e1996", + "0x3c009b4961eb8e4b", + "0x319cb86a396b0484", + "0x12a0a356d9808791", + "0xaa7023a4b8d848e9", + "0xb57142dc5e92bfe", + "0x79e441da724252d8", + "0xa0c88baca27030e2", + "0xe9fc8ad899d928fb", + "0x5c246638facc308f", + "0x7d0f8d43bd265df0", + "0x29b2b2db27455f62", + "0x83add5e4f0c7e6a0", + "0x4d3f0123dca7bb75", + "0x5617485d8558315e", + "0x19bbbde134211b65", + "0x8bf9948ff76da0d2", + "0xfae662b187abfea", + "0x3f2645164a1efcfb", + "0xc104af341ae8527a", + "0x252f758406a0760e", + "0xac975460f5e41e2a", + "0xcb3cdccc9faa5afe", + "0x6885deda224e35f", + "0x80dfc77b" + ], + [ + "0xe1e6e6a5a01102f9", + "0xc439eef2e83e6c0b", + "0xa535626fecfdd6ed", + "0xc470d74b92b0a756", + "0xcb00d0a09da9ce4f", + "0xb9c0edabd2e61878", + "0xf35584bbfb659596", + "0x3bc6193576d3c100", + "0x24fba08887cb4626", + "0xb0ea70482082e2cf", + "0x894ef179ae2e6af5", + "0x1817752c75ba9a32", + "0x24a0606c9ce499a2", + "0x99c9c75a8b6ba611", + "0xf5f718e2dda8c563", + "0xbde0d0a19e1e8627", + "0xa0d10f356e6c437f", + "0x750121f018a036f4", + "0x977eec9097d76f4b", + "0x1e5382ea3a733f5e", + "0xb5b9bff92e230008", + "0x373ed05ca59b3fa0", + "0x597efec7d1172562", + "0x801c9e013d34744c", + "0x6ecd85cddbe119d8", + "0x173408f4fda2a033", + "0x5b70095e0a7b9e6f", + "0x695ca5c74b14df04", + "0xccfb8ef06874bf71", + "0xc47bde7beca0fa13", + "0xeb0c13e77b4a0b39", + "0xbf28d767d6a7ef40", + "0x77687ffb5f28e7fa", + "0x50e0da87a06c453b", + "0x287e05d0f37a83a1", + "0x132e63668c4d1f54", + "0x8d261cdba58927a8", + "0x4f2f50a008c08488", + "0x5d34b827228eaf15", + "0x6c0137698843bb41", + "0xb953ce34574ee316", + "0x2a2fa0f47a73c093", + "0xa68654f518ea1e35", + "0x4b69941abbceb4d4", + "0x78ea3f5a9343be53", + "0x35a0455b56da95c4", + "0x84f7c48d4a76a42c", + "0x7afa2af411f5604f", + "0x92d23f4edea981c2", + "0xa00139cde34dad66", + "0xb96de98c72fd4592", + "0x506da4b5a7afa103", + "0x755acfa53547b746", + "0xfcbd42821a6faa9f", + "0x72936e6b5881cda0", + "0xe59e1ff672d8dcef", + "0x88b806955b39560d", + "0x7baf784a73ea8418", + "0xafa0b0691c29a0f4", + "0x8fecb8232fb44f75", + "0x9514baba6ea39e2e", + "0xd5ce40ba3330e874", + "0x3b70e3a37fa0eadd", + "0xa8bb30d3282924ac", + "0xd96f45f9323e9f21", + "0x6e8f8b1bb28113df", + "0x801b1a91" + ], + [ + "0xb6721834a01102f9", + "0x65b0b3b817362a19", + "0xe6bdc762cac6abf1", + "0x9e173d04650c9407", + "0xb89c43a0b60d822e", + "0x7775a556aff6a883", + "0x23ff3617b77c8d58", + "0x4831875ee0fb97b4", + "0xa2d3a07b889389c6", + "0xedce415fe81713ef", + "0xe6840d757c6e65e", + "0x50a0d255cd20d549", + "0xdca062818ac693cc", + "0x67658d8a7006c420", + "0xa9b21080a598376", + "0x923645230702f6e6", + "0xa009d874d6e5b9ad", + "0x128888be6d275907", + "0xcbf07e937547de7a", + "0xedea6891d513a54", + "0xd7833969b2471f9", + "0x3dec416ff498baa0", + "0x48142eb5163582da", + "0xe2b7d888b2a5ce15", + "0xa8fd3a9094a2f152", + "0x1c1b51e21188a0f9", + "0xf29e4e9e991ecd68", + "0xa980d1b19681fc79", + "0x3e6bb3b29f35b6d2", + "0x54f9c3d47da0ece8", + "0xf663ce3a5f15e834", + "0xe19a4e29920fe8c7", + "0x9137497f331c6671", + "0x8954cc91a07738ae", + "0x3c56c8dbc1f252d0", + "0xa06e915f2033c28f", + "0x1ea4d6212563b359", + "0x3776e7a06f21c3be", + "0x1e251935059ebd48", + "0xf5da5d7c7601e0c1", + "0x6dec3478245276cf", + "0x6ae3a0d6ed841766", + "0x4d637fafc196c32b", + "0x1872cd4ab0fb582e", + "0xb88bb2e761846b4c", + "0x31a06a7530c30808", + "0x11259421f0feb7c4", + "0xaa1c99f2106769dd", + "0xede10c2c05993ae4", + "0xa02d30982e30bb0f", + "0x235594ee53c44c05", + "0x73387cee25571335", + "0x26607787c455b91d", + "0x2b73d84d306eb1d3", + "0xdefe6f4f50ac96a0", + "0x85858e8b0ede8c06", + "0xeac0f28cd11f30f3", + "0x1e5fd4a42ec0658", + "0x4ad0bd885da5a06d", + "0x8d7d10d3a7cf336e", + "0x9c5458d1b620227", + "0xd0c91ad463adee5e", + "0xd5fa22fdc7a080fb", + "0x2240f7c2622bd91d", + "0x38d3d7853ef0d516", + "0x3f51bb86a892550e", + "0x8088049f" + ], + [ + "0x8a169437a0f101f9", + "0xfa3ced185956309b", + "0x8db06f289f3afe2f", + "0x52035bc077222d8", + "0x81cecca08e33e3ff", + "0x89a250e215c171cc", + "0x62c1bc60f0993650", + "0xbbf62b96459bcb5a", + "0xd445a08173fda93c", + "0x91e7d43fe3377371", + "0x5502931ba59fddb3", + "0x1850b91b288e1685", + "0x64a0a630c8207acf", + "0x58160f099ed6023", + "0x4198238ff4613e16", + "0x77a336c10e03830d", + "0xa0eee1cea4502c76", + "0xf03b6b2a60a90439", + "0xa6ae0795e51d73f7", + "0x50143ee9c95b716b", + "0x108687f67e7a94fb", + "0xb12beb59cef3f6a0", + "0xafb92ce4c1a7c30d", + "0x2f9c1bc1f8797cdf", + "0xd44b981d3cf8c962", + "0xb7473eac86a0804e", + "0x17d294fc99c4eb84", + "0xfc134b89c34521e3", + "0x2dfd108c430de5b3", + "0xcbff41e7a0690d8d", + "0x7262a4626784226e", + "0xd766f80aea9d6f9c", + "0x475d36ab0542fd41", + "0xb912eba0932ea0db", + "0x2d1cd9badaf643de", + "0x95e64b5eb7ad9a54", + "0x58d5e092664b2a5b", + "0xc352a0e708f0003f", + "0xcfa1c1d55e281237", + "0x9e50c506df0c6d92", + "0x177117b78c273ad0", + "0x87a0655a2b1444ee", + "0x567ba6fb34252d22", + "0xb27c861900096e61", + "0x686c7e2d0bd66e7b", + "0xa0846bfab63b51ea", + "0xc6ead052cf367d6b", + "0xb7f01de54f58d9b7", + "0x14b2e41168155bf9", + "0x15799e90891e2e2a", + "0xf33c015b01bc83a0", + "0xc64e908e435f0a45", + "0xa2e576fdc5b71c81", + "0xdf7af1dae9fcc66f", + "0xc7b80409a927a036", + "0xdd45519a5945592c", + "0x332aaa1ae333836c", + "0x1b7ef2b40b6dc194", + "0xf0bae61277a079a2", + "0x35e03e67ca2824ee", + "0x715f902a6a8d4f52", + "0x7f942bfd1917df67", + "0x802efe51" + ], + [ + "0x2e896a4d4ea091f8", + "0x11c47fbbfcd66965", + "0xfa264bb69a6b3cf6", + "0x6a15a88209b6e3ac", + "0xfba0808080facf9e", + "0x509c2d93079b239b", + "0x46e6084a232eaa65", + "0xec96e29bb96af360", + "0x808e4d79fd0a01f7", + "0x10c4332e32a08080", + "0x3c58ad19246301dc", + "0x7ee9d2dc08f00328", + "0xda7a7eb1fb996a6f", + "0x4512a3da05a6b0e", + "0xf29247e223c0b2bd", + "0x68af6edd3da39a07", + "0x821ee0c83ce615ae", + "0x808080804b366c8e", + "0x808080" + ], + [ + "0x198ec87aa08051f8", + "0x69468d18b420fc23", + "0xcaed890611ce65bf", + "0x54afb686e30b4471", + "0x80808080918073ee", + "0xda5d26326c8ba080", + "0xfa0d187d28e2397a", + "0x4eb95b8e08b4e0bc", + "0x7f323b88311b42cc", + "0x8080808080803c90", + "0x808080" + ], + [ + "0xa2584e59209d68f8", + "0x2914e9df55205341", + "0x19c3ff335ced3046", + "0xb0aab4f999274505", + "0x8064128246f848b8", + "0x55cc1b171fe856a0", + "0xf8c092e64583ffa6", + "0xad6c991be0485b6e", + "0xb463e3b52f6201c0", + "0xf7860146d2c5a021", + "0xc7dcb27d7e923c23", + "0x82ca53b600e5c003", + "0x855d04d8fa7b3b27", + "0x70a4" + ] + ] + } + ] + } + ], "storages": [], "transactions": [], "transaction_receipts": [] @@ -147,7 +634,8 @@ "type": "module", "context": { "inputs": [ - "0x51cdb8" + "0x51cdb8", + "0x13cb6ae34a13a0977f4d7101ebc24b87bb23f0d5" ], "module_class": { "prime": "0x800000000000011000000000000000000000000000000000000000000000001", @@ -156,21 +644,21 @@ "0xa0680017fff8000", "0x7", "0x482680017ffa8000", - "0xfffffffffffffffffffffffffffff650", + "0xfffffffffffffffffffffffffffff330", "0x400280007ff97fff", "0x10780017fff7fff", - "0xb3", + "0xd7", "0x4825800180007ffa", - "0x9b0", + "0xcd0", "0x400280007ff97fff", "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0xbb", + "0xdf", "0x482680017ff98000", "0x1", "0x20680017fff7ff8", - "0x9a", + "0xbe", "0x48307ff680007ff7", "0x20680017fff7fff", "0x4", @@ -191,7 +679,7 @@ "0x480680017fff8000", "0x0", "0x20680017fff7ffe", - "0x74", + "0x98", "0x480080007fff8000", "0xa0680017fff8000", "0x12", @@ -208,7 +696,7 @@ "0x402480017fff7ffb", "0xffffffffffffffffffffffffffffffff", "0x20680017fff7fff", - "0x5f", + "0x83", "0x402780017fff7fff", "0x1", "0x400080007ff87ffe", @@ -221,14 +709,35 @@ "0x20680017fff7fff", "0x4", "0x10780017fff7fff", + "0xa", + "0x482480017ff78000", + "0x1", + "0x48127ff77fff8000", + "0x480680017fff8000", + "0x0", + "0x480080007ff48000", + "0x10780017fff7fff", + "0x8", + "0x48127ff77fff8000", + "0x48127ff77fff8000", + "0x480680017fff8000", + "0x1", + "0x480680017fff8000", + "0x0", + "0x20680017fff7ffe", + "0x58", + "0x48307ffc80007ffd", + "0x20680017fff7fff", + "0x4", + "0x10780017fff7fff", "0x10", "0x40780017fff7fff", "0x1", "0x480680017fff8000", "0x496e70757420746f6f206c6f6e6720666f7220617267756d656e7473", "0x400080007ffe7fff", - "0x48127ffc7fff8000", - "0x48127fb77fff8000", + "0x48127ff77fff8000", + "0x48127fb27fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -237,33 +746,34 @@ "0x1", "0x208b7fff7fff7ffe", "0x1104800180018000", - "0x27a", + "0x28a", "0x482480017fff8000", - "0x279", + "0x289", "0x480080007fff8000", "0xa0680017fff8000", "0x9", - "0x4824800180007fb5", - "0x47fe", + "0x4824800180007fb0", + "0x48c6", "0x482480017fff8000", "0x100000000000000000000000000000000", - "0x400080007ff77fff", + "0x400080007ff27fff", "0x10780017fff7fff", - "0x27", - "0x4824800180007fb5", - "0x47fe", - "0x400080007ff87fff", - "0x482480017ff88000", + "0x28", + "0x4824800180007fb0", + "0x48c6", + "0x400080007ff37fff", + "0x482480017ff38000", "0x1", "0x48127ffe7fff8000", "0x480a7ffb7fff8000", - "0x48127fe67fff8000", - "0x48127fe67fff8000", + "0x48127fe37fff8000", + "0x48127fe37fff8000", "0x480680017fff8000", "0xaa36a7", - "0x48127fef7fff8000", + "0x48127fea7fff8000", + "0x48127ff17fff8000", "0x1104800180018000", - "0x174", + "0x182", "0x20680017fff7ffd", "0xf", "0x40780017fff7fff", @@ -292,9 +802,23 @@ "0x480680017fff8000", "0x4f7574206f6620676173", "0x400080007ffe7fff", - "0x482480017ff58000", + "0x482480017ff08000", "0x1", - "0x48127fb07fff8000", + "0x48127fab7fff8000", + "0x480a7ffb7fff8000", + "0x480680017fff8000", + "0x1", + "0x48127ffa7fff8000", + "0x482480017ff98000", + "0x1", + "0x208b7fff7fff7ffe", + "0x40780017fff7fff", + "0x1", + "0x480680017fff8000", + "0x4661696c656420746f20646573657269616c697a6520706172616d202333", + "0x400080007ffe7fff", + "0x48127ff87fff8000", + "0x48127fb37fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -635,7 +1159,7 @@ "0x0", "0x208b7fff7fff7ffe", "0x480680017fff8000", - "0x0", + "0x1", "0xa0680017fff8004", "0xe", "0x4824800180047ffe", @@ -643,54 +1167,55 @@ "0x484480017ffe8000", "0x110000000000000000", "0x48307ffe7fff8002", - "0x480280007ff77ffc", - "0x480280017ff77ffc", + "0x480280007ff67ffc", + "0x480280017ff67ffc", "0x402480017ffb7ffd", "0xffffffffffffffeeffffffffffffffff", - "0x400280027ff77ffd", + "0x400280027ff67ffd", "0x10780017fff7fff", - "0xcd", + "0xce", "0x484480017fff8001", "0x8000000000000000000000000000000", "0x48307fff80007ffd", - "0x480280007ff77ffd", - "0x480280017ff77ffd", + "0x480280007ff67ffd", + "0x480280017ff67ffd", "0x402480017ffc7ffe", "0xf8000000000000000000000000000000", - "0x400280027ff77ffe", + "0x400280027ff67ffe", "0x40780017fff7fff", "0x1", - "0x400180007fff7ffa", - "0x400180017fff7ffb", - "0x400180027fff7ffc", - "0x400180037fff7ffd", + "0x400180007fff7ff9", + "0x400180017fff7ffa", + "0x400180027fff7ffb", + "0x400180037fff7ffc", + "0x400180047fff7ffd", "0x480680017fff8000", - "0x4", + "0x3", "0x48127ffe7fff8000", "0x482480017ffd8000", - "0x4", - "0x482680017ff78000", + "0x5", + "0x482680017ff68000", "0x3", "0x480680017fff8000", "0x43616c6c436f6e7472616374", - "0x400280007ff97fff", - "0x400380017ff97ff8", - "0x400280027ff97ff4", - "0x400280037ff97ffb", - "0x400280047ff97ffc", - "0x400280057ff97ffd", - "0x480280077ff98000", + "0x400280007ff87fff", + "0x400380017ff87ff7", + "0x400280027ff87ff4", + "0x400280037ff87ffb", + "0x400280047ff87ffc", + "0x400280057ff87ffd", + "0x480280077ff88000", "0x20680017fff7fff", "0xa2", - "0x480280087ff98000", - "0x480280097ff98000", + "0x480280087ff88000", + "0x480280097ff88000", "0x480680017fff8000", "0x0", - "0x480280067ff98000", - "0x482680017ff98000", + "0x480280067ff88000", + "0x482680017ff88000", "0xa", - "0x480280087ff98000", - "0x480280097ff98000", + "0x480280087ff88000", + "0x480280097ff88000", "0x48307ff980007ffa", "0xa0680017fff8000", "0x6", @@ -845,13 +1370,13 @@ "0x40780017fff7fff", "0x1d", "0x48127fe07fff8000", - "0x480280067ff98000", - "0x482680017ff98000", + "0x480280067ff88000", + "0x482680017ff88000", "0xa", "0x480680017fff8000", "0x1", - "0x480280087ff98000", - "0x480280097ff98000", + "0x480280087ff88000", + "0x480280097ff88000", "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0x21", @@ -860,10 +1385,10 @@ "0x480680017fff8000", "0x4f7074696f6e3a3a756e77726170206661696c65642e", "0x400080007ffe7fff", - "0x482680017ff78000", + "0x482680017ff68000", "0x3", + "0x480a7ff77fff8000", "0x480a7ff87fff8000", - "0x480a7ff97fff8000", "0x480680017fff8000", "0x1", "0x48127ffa7fff8000", @@ -872,9 +1397,9 @@ "0x208b7fff7fff7ffe" ], "bytecode_segment_lengths": [ - 199, + 235, 282, - 236 + 237 ], "hints": [ [ @@ -883,7 +1408,7 @@ { "TestLessThanOrEqual": { "lhs": { - "Immediate": "0x9b0" + "Immediate": "0xcd0" }, "rhs": { "Deref": { @@ -957,7 +1482,7 @@ ] ], [ - 69, + 90, [ { "AllocSegment": { @@ -970,17 +1495,17 @@ ] ], [ - 88, + 109, [ { "TestLessThanOrEqual": { "lhs": { - "Immediate": "0x47fe" + "Immediate": "0x48c6" }, "rhs": { "Deref": { "register": "AP", - "offset": -74 + "offset": -79 } }, "dst": { @@ -992,7 +1517,7 @@ ] ], [ - 113, + 135, [ { "AllocSegment": { @@ -1005,7 +1530,7 @@ ] ], [ - 134, + 156, [ { "AllocSegment": { @@ -1018,7 +1543,7 @@ ] ], [ - 156, + 171, [ { "AllocSegment": { @@ -1031,7 +1556,7 @@ ] ], [ - 170, + 192, [ { "AllocSegment": { @@ -1044,7 +1569,7 @@ ] ], [ - 184, + 206, [ { "AllocSegment": { @@ -1057,7 +1582,20 @@ ] ], [ - 483, + 220, + [ + { + "AllocSegment": { + "dst": { + "register": "AP", + "offset": 0 + } + } + } + ] + ], + [ + 519, [ { "TestLessThan": { @@ -1079,7 +1617,7 @@ ] ], [ - 487, + 523, [ { "LinearSplit": { @@ -1108,7 +1646,7 @@ ] ], [ - 497, + 533, [ { "LinearSplit": { @@ -1137,7 +1675,7 @@ ] ], [ - 505, + 541, [ { "AllocSegment": { @@ -1150,14 +1688,14 @@ ] ], [ - 526, + 563, [ { "SystemCall": { "system": { "Deref": { "register": "FP", - "offset": -7 + "offset": -8 } } } @@ -1165,7 +1703,7 @@ ] ], [ - 539, + 576, [ { "TestLessThan": { @@ -1190,7 +1728,7 @@ ] ], [ - 551, + 588, [ { "TestLessThan": { @@ -1212,7 +1750,7 @@ ] ], [ - 553, + 590, [ { "DivMod": { @@ -1238,7 +1776,7 @@ ] ], [ - 577, + 614, [ { "TestLessThan": { @@ -1263,7 +1801,7 @@ ] ], [ - 589, + 626, [ { "TestLessThan": { @@ -1285,7 +1823,7 @@ ] ], [ - 591, + 628, [ { "DivMod": { @@ -1311,7 +1849,7 @@ ] ], [ - 623, + 660, [ { "AllocSegment": { @@ -1324,7 +1862,7 @@ ] ], [ - 640, + 677, [ { "AllocSegment": { @@ -1337,7 +1875,7 @@ ] ], [ - 657, + 694, [ { "AllocSegment": { @@ -1350,7 +1888,7 @@ ] ], [ - 674, + 711, [ { "AllocSegment": { @@ -1363,7 +1901,7 @@ ] ], [ - 702, + 739, [ { "AllocSegment": { @@ -1380,7 +1918,7 @@ [ 0, [ - "memory[ap + 0] = 2480 <= memory[fp + -6]" + "memory[ap + 0] = 3280 <= memory[fp + -6]" ] ], [ @@ -1396,139 +1934,145 @@ ] ], [ - 69, + 90, [ "memory[ap + 0] = segments.add()" ] ], [ - 88, + 109, [ - "memory[ap + 0] = 18430 <= memory[ap + -74]" + "memory[ap + 0] = 18630 <= memory[ap + -79]" ] ], [ - 113, + 135, [ "memory[ap + 0] = segments.add()" ] ], [ - 134, + 156, [ "memory[ap + 0] = segments.add()" ] ], [ - 156, + 171, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 192, [ "memory[ap + 0] = segments.add()" ] ], [ - 170, + 206, [ "memory[ap + 0] = segments.add()" ] ], [ - 184, + 220, [ "memory[ap + 0] = segments.add()" ] ], [ - 483, + 519, [ "memory[ap + 4] = memory[ap + -1] < 3618502788666131106986593281521497120414687020801267626233049500247285301248" ] ], [ - 487, + 523, [ "\n(value, scalar) = (memory[ap + 3], 313594649253062377472)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -2] = x\nmemory[ap + -1] = y\n" ] ], [ - 497, + 533, [ "\n(value, scalar) = (memory[ap + -2], 10633823966279326983230456482242756608)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -1] = x\nmemory[ap + 0] = y\n" ] ], [ - 505, + 541, [ "memory[ap + 0] = segments.add()" ] ], [ - 526, + 563, [ - "syscall_handler.syscall(syscall_ptr=memory[fp + -7])" + "syscall_handler.syscall(syscall_ptr=memory[fp + -8])" ] ], [ - 539, + 576, [ "memory[ap + 0] = memory[ap + -6] < memory[ap + -1]" ] ], [ - 551, + 588, [ "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" ] ], [ - 553, + 590, [ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], [ - 577, + 614, [ "memory[ap + 0] = memory[ap + -2] < memory[ap + -1]" ] ], [ - 589, + 626, [ "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" ] ], [ - 591, + 628, [ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], [ - 623, + 660, [ "memory[ap + 0] = segments.add()" ] ], [ - 640, + 677, [ "memory[ap + 0] = segments.add()" ] ], [ - 657, + 694, [ "memory[ap + 0] = segments.add()" ] ], [ - 674, + 711, [ "memory[ap + 0] = segments.add()" ] ], [ - 702, + 739, [ "memory[ap + 0] = segments.add()" ] From cca9411f948fd556175433a9814d5d7527b5be5f Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 23 Jul 2024 16:29:47 +0200 Subject: [PATCH 42/73] finalized --- .../provider/evm_provider.py | 2 +- .../provider/header_key_provider.py | 2 +- src/hdp_input.json | 1001 ++++------------- 3 files changed, 228 insertions(+), 777 deletions(-) diff --git a/packages/contract_bootloader/provider/evm_provider.py b/packages/contract_bootloader/provider/evm_provider.py index 6da1ae63..f85f3d72 100644 --- a/packages/contract_bootloader/provider/evm_provider.py +++ b/packages/contract_bootloader/provider/evm_provider.py @@ -5,7 +5,7 @@ class EVMProvider(ABC): def __init__(self, provider_url: str): self.web3 = Web3(Web3.HTTPProvider(provider_url)) - if not self.web3.is_connected(): + if not self.web3.isConnected(): raise ValueError( f"Failed to connect to the Ethereum node at {provider_url}" ) diff --git a/packages/contract_bootloader/provider/header_key_provider.py b/packages/contract_bootloader/provider/header_key_provider.py index e24a5b64..19cd15cd 100644 --- a/packages/contract_bootloader/provider/header_key_provider.py +++ b/packages/contract_bootloader/provider/header_key_provider.py @@ -30,7 +30,7 @@ def get_transaction_root(self, key: MemorizerKey) -> int: return int(self.get_block(key=key)["transactionsRoot"].hex(), 16) def get_receipt_root(self, key: MemorizerKey) -> int: - return int(self.get_block(key=key)["receiptRoot"].hex(), 16) + return int(self.get_block(key=key)["receiptsRoot"].hex(), 16) def get_bloom(self, key: MemorizerKey) -> int: pass diff --git a/src/hdp_input.json b/src/hdp_input.json index 096e190d..cf146f29 100644 --- a/src/hdp_input.json +++ b/src/hdp_input.json @@ -1,27 +1,30 @@ { "cairo_run_output_path": "cairo_run_output.json", - "task_root": "0x0e8750e145458269ba8b67e83fabe839532308d83cf278f3a4eee2f6c1e1690b", - "result_root": "0x8ad7fe6b4f0dd39c44ac5307d25679e90bf79d96f05dc0e65bc56b140154ef6b", + "task_root": "0x8097383b9c7188337a5705971bd0fde01944a1d3d71a5117a109c5fe4b364957", + "result_root": "0x22186d2b20a1eb397cfbf6afd9f7b1400bb57a270bb6e3910a335fbf0281efaa", "proofs": { "mmr_metas": [ { - "id": 27, - "root": "0x492627ffa5084ec078f4d461408dfaa50b504a022c5471452d598da0040c066", - "size": 13024091, + "id": 26, + "root": "0x1ef5f15d72aeca1a9b972a5345075bc71dececcc2b80977795fe326b373409b", + "size": 12713774, "peaks": [ "0x262c4c9b1cb2a036924aecf563dc9952e5f8b41004310adde86f22abb793eb1", - "0x10b39aed56c8f244a1df559c944ada6f12b7238f8c06a2c243ba4276b8059b0", - "0x46f45f218ea3aec481f350cda528a6f9f926a2dd53dae302e2cb610e5f152c7", - "0x1d52a06e6d02569893a1d842c00bb67c044be541c614e88613d7fc7187e18c1", - "0x770ebf618a589c17e3dc05bda7121acbedc0b48cd25f2943dc43f395f8bf0db", - "0x7263e878f7deafdc49b47da57f8594d477e572d3ac2bec27bb73860a35b1899", - "0x7b9e99f008949f9ee33d2965708ac6773a57965514df6383d55de104a39ab8c", - "0x28f6ccdcd38f6be6c437d100fcd62604c3293e31342a777dc37c712869ab08c", - "0x13d87197fe5d6f646a57dc918dcbef210737020dca9b89537fd8718ac69da3e", - "0x7eef4b790b56858c0232b494034d4c8699112d88f358209f71f02d5e93a7084", - "0x25cd2f0b579c902c41ac26df96ed5b21e16a3127dce2b471973dc86eb4c099f", - "0x5fdedfd0123b7461d5b3162fe82f7f3172c42fda6209415367870086f7c7918", - "0x7c0a415d5a6c4c90fd2dde1b340c3be305a72aa3b758dd26b8d7b4a78b53681" + "0x63e06c6dd962e6232140b8f20fc4972ee69ca29d1c6ca4455d80afd4be0f3de", + "0x5d9f3a811000d20c9f8d8a009c42c0e09d8851d7408cf51f895a4cc6c944fe2", + "0x7cfa034db84fe407a3716305cc6edc4f324fe6c58d8159c36ca5e98591a2f01", + "0x39d028c626a83c7959b8b13fee8900f6f1649f6a8d30af21f19a7feb2ae91f6", + "0x6090d83a827e322067762ce98e9f446963b67e6905ad77b73fd67e5cc3e0772", + "0x39ab5f2f251401f7fa51ad942785bd7d448a611c280a83cfa2f033d69536f75", + "0x2fb88bc05b349f7ee9bd5a0da6b13d2b424c2bc327da885d65764dc299737eb", + "0x6f66f43b00705e5183a4b2bae518f1efcd0c3d5bdbb3fbd94e85195836d0e5e", + "0x5453015740839bbbd6de557ade0785b90e3b19c1dd0844382e7705cdd1083a2", + "0x77407ac448a14e2746b0029bc01a860e6f9fae9d42a4343b8e04c020030347f", + "0x5e1e429f2a8973f3ca39c48297d5e1945d15308b13196241d66d75014cb4ba5", + "0x208d9c7280e2849e4f06643e33c9ec827662914bd6eed86415e429dcc0236b8", + "0x25f3138cc90bcf5cf0fe723ca4de019bbdb43c9982a10420304ac6b68715841", + "0x58f0411792e93f7cee724b26c3f1a1f15aaf42ba3cac1e171e9a28692213f34", + "0x37192494e7043e3cf055ae2948ac85515fa37dbcb699b309ccb5f1b069d0ddd" ], "chain_id": 11155111 } @@ -29,602 +32,107 @@ "headers": [ { "rlp": [ - "0x2e8d3af9a06502f9", - "0x7af2d3b2542aea7b", - "0x75f079981b05a875", - "0xb8b303369fed198f", - "0x4dcc1da0e0b17427", + "0x90feaa06a05e02f9", + "0xbc37ef77eb960db4", + "0x11dc047578f0a8a1", + "0x59c431e03b60a16a", + "0x4dcc1da0fd7382db", "0xb585ab7a5dc7dee8", "0x4512d31ad4ccb667", "0x42a1f013748a941b", - "0x7a6a944793d440fd", - "0x5dbcb70bd582b8a9", - "0x2ff1999c7144a2a1", - "0x85c55063d9a0a306", - "0xbfd0cb7565b86954", - "0xd7c7acfd7f88881a", - "0x97e5d47e42631e2b", - "0x773a16cca0bc28e6", - "0xa157a5c6e62f7d7c", - "0xf7d80c902e33759a", - "0xb5f417f8aab99a4b", - "0xb34b66a014a5d63d", - "0xceb30e687cb36ada", - "0x1d99ed3a1e047fb4", - "0x5099e20e5bfaa9e8", - "0x1b9be0138a3b8", - "0x807a00014e902eae", - "0x584c089132629081", - "0x5018193080b8d0", - "0x908068232863a00e", - "0x112010a421000805", - "0x83c0040104b9248a", - "0x13ee0806100401", - "0xc00240620900405", - "0x4826050812e00110", - "0xa10160040a0002c8", - "0x124fe801c202086", - "0x226480c244059110", - "0x504649860a406408", - "0xa72904104540cc80", - "0x20401122c28d8806", - "0xd08d01cc88804", - "0x204000810c0942a2", - "0xa1432898241f0164", - "0x684420900942a010", - "0x38404c40b06110", - "0x670ca4888891286f", - "0xc4750010131006c", - "0x6c8200483200000", - "0xa18148102136d124", - "0x42c80263578502", - "0x30002db21402102", - "0x5400601435d0300e", - "0x49e0818800890401", - "0x81620cb14015f39", - "0x42040e0542e7000", - "0x4100b06c112e0846", - "0xa213214a44d20288", - "0xc90184b8cd518380", - "0x65840282bc8380c3", - "0xd0183d899a45cdb", - "0x678868746567840c", - "0x85312e30322e316f", - "0x3c30a078756e696c", - "0xeb108dad0a8b074d", - "0x3aedf7ad39285187", - "0xa348af6bc1b570a2", - "0x885ec1d72607df", - "0x8500000000000000", - "0xa253a07bc054fa01", - "0x72236e89438fc395", - "0x3549c5cec5b604b1", - "0x94d70ecf9fe99a7a", - "0x28337dbccaa0383", - "0xa00000d004840000", - "0x96a39fda54a4ed1f", - "0x1d1ad9d3eb7004fa", - "0x1e12f396750a4bac", - "0x2253017aba91d3f2" + "0xb67944793d440fd", + "0xae85169bf90d6124", + "0xc2eb90753fd0dac", + "0x308c7df836a0d7f4", + "0xb61fc576fbc8b667", + "0xcfdfcc2fdc695db4", + "0x891d690c08679389", + "0xa0bddf4a0316a12", + "0x62ac0f53f799fa89", + "0x3aa16b99cd5f7f39", + "0xb86a495ff7d3057c", + "0x76abe4a0dc078c1a", + "0xd38a7979ca340c76", + "0x38d8ce61dc3b3f4b", + "0x48d08e752088dc74", + "0x1b9cafab91cf3", + "0xa26712c14e4c39bd", + "0x62c28b97734c9dcd", + "0x48b423783eae5e82", + "0x6e98bf477cadfe8a", + "0x33ac6b89221ae96d", + "0xf4df6f82a386f2c6", + "0x7d0423c33ffbb9c4", + "0x3f0aaf183cfe02d5", + "0xa30f6b1e666fadc", + "0x36dbefab6ac6aaf1", + "0x114ce64bf05e87e5", + "0x8bd843931ba720e0", + "0xd2e5619e560a4fb6", + "0x64ac1691a0575eb2", + "0x502157aff5237e8f", + "0xd42be903183a1be3", + "0xa16e1e55d6e35e5b", + "0x2e2e039b6900e9b3", + "0x7ee97d5acd0e734a", + "0xe11bedfdd332c395", + "0xb451ad3df3a70f3f", + "0xde073f0403a5422c", + "0x501fe842ca83c15b", + "0x6b86d2e3a3e3842d", + "0x5687afeebd5c3c1", + "0x41ca2bb901b4efe6", + "0x34c51be4e48e75ce", + "0xd06fd5847893284b", + "0xc71774cb90c992dd", + "0xb59ac87a63f29b18", + "0x5d96b2c97bbf6382", + "0xcad779074e1365a3", + "0xc9018445b6608380", + "0x848024c0018480c3", + "0x74654e91202a9a66", + "0x2d646e696d726568", + "0x8a0302e37322e31", + "0x32cb70aeb47fb6b1", + "0xd719df5d5c91a4e7", + "0x56bfb7fb9b881128", + "0x8847de36adc1a6c9", + "0x0", + "0x23a098951e2a0485", + "0xc6d3273f558a5202", + "0x80429dcc20f70dca", + "0xc76d0d0249a05300", + "0x837b8509b80bc373", + "0x70018400000c", + "0xad450984e13b75a0", + "0x4618829fcf148b21", + "0x7dc1b8fa6a48df1f", + "0x53f437f04e924a58", + "0xdb" ], - "rlp_bytes_len": 616, + "rlp_bytes_len": 609, "proof": { - "leaf_idx": 1171785, + "leaf_idx": 12665754, "mmr_path": [ - "0x078aa9ab084541b50c4fd18e620a6842f690f25adb80ef42e308e42ffc9aa02", - "0x787baed1b5e5643ed87a39b0d3afa2f6ea423e961e4cedca920ef7a42ef0b6a", - "0x3c3232b1f45be7df4f28abed027e69143370eada11be07a1a4c31942bfa1fe5", - "0x0c95a53ceccebbad610d2c6a4690448999bc2856398627d90ffac4e60a6bfb6", - "0x5fec4665ee76fa515ff5628482daff91b20e4f54622de8ef75d2dccf27bbfdf", - "0x7f0829c96bb6b4442955b449db044f8fc402b675e1c390d05de0c0848ee91fa", - "0x6c0cc2647d2438f83ca6cc6afba68d24148369e5a421f687bea60e6bcf46fb3", - "0x7343f6841bc0c73a74726c35c8fd50f7ce609cf56f49ed77b30d1736052797a", - "0x7e480f1dd8667e052b75cb10f1d842de1e42bf46526582d65943906b83ef7a7", - "0x25f1d39c524c0120f94751556ca190e710886e26a0be682177640ea053b7c64", - "0x7dde31504e89131c4ddc7645cac85fccc20a4d4230eabfd0bcf311075413bf8", - "0x7273550997a142ea6dcc870be7e10912133a4bfc9904ed30bede306a151704d", - "0x235b43cbee714a34855435a48846a751def3280ac249b39b075858ed2ecb47e", - "0x6d366ebc609ed8f579834208ccab5fe62611848eadf93312ba31faacb4b702f", - "0x0b2fa755643acbb90d31fe81530a6d842443b6e9d62233d7e3e01963d7756e4", - "0x630e360de1c802bdc77459d550ac2c22f8ec261c02815363ae0ef7fbb6eea67", - "0x4d0aa5617b21c9d6acdf01d8ff55ec9b703373d958b7cdee74dddf6b2dcb097", - "0x23ed0242eb2a6f9c4bc66161745cbebb45fe5886f685dc28bf2f1aeaf91e627", - "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", - "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", - "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", - "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" + "0x016138b64811c873d927e15b23152c2bdc40d72bae68d8da6b0e273cdb5f76d", + "0x315749a6b68f7fa25bdaf6351b241a9cf10b0dbd6e6908d6d46f50e736142d8", + "0x03b2f52364657beadab6067e1544aef146b4928825d4eaa64e72d1494b2982b", + "0x234e1553cc791b98c3dc65b289ec4e585c3e7a2cbddd940083481a6b7e95be3", + "0x72032e547929d1e29c1ee2b245d36717d0ac20c944edaeb0a98aa05ad092bec", + "0x1dcd2890c2e8f8861dcc70f0647b864ce61ed79a103d06a229370694bd84685", + "0x7514c67fe23e7d8f0d94ae734b4263020dbfc1fbddf74ab72d99b042f2640ae", + "0x2c00badfab7a1df77df41f72b3aef6d90b80df29304b88c49ef3464f5ae5b8c", + "0x53007f9a57efaefcb4b871967f4bebe9f5c45d75288752326a5ffac7db2bc83", + "0x5f8a59073239f728e501858b149266afd89f5bb4708a87e683867d62c5016ee", + "0x4b0b0e53aca136814dcaf2d79ebba75442c985bfbf1568d459c520c14ca8f50", + "0x6c95b5af56d209bed9b9ce01489fa1507aa30cf4f44159c8e2097ffbeaa8481", + "0x1db820709ce34edcc67ebc93ff5253ba014c377aec7e07170e477daedbdea0f", + "0x0f5eba795c267135dfce63ee39c570c69385cfe529b8f0bbf2cc3878e68b722" ] } } ], - "accounts": [ - { - "address": [ - "0x97a0134ae36acb13", - "0x874bc2eb01714d7f", - "0xd5f023bb" - ], - "account_key": "0x8ad2b901594e58a241532055dfe914294630ed5c33ffc31905452799f9b4aab0", - "proofs": [ - { - "block_number": 5361080, - "proof_bytes_len": [ - 532, - 532, - 532, - 532, - 532, - 500, - 147, - 83, - 106 - ], - "proof": [ - [ - "0x23c6017a01102f9", - "0x5d04919b35600925", - "0x8af6aeffa3a1b9bd", - "0x90ec8179c8b58e5f", - "0x884836a034601036", - "0x3c8c71ae4da1ce57", - "0x677ad1d9e7257b78", - "0xbc6695175e85dc24", - "0xf4ea0ecce4cf4f4", - "0xf0a8e070fa68eb9a", - "0x9cf6b9c8d9f829f5", - "0x7fe3fcaf553fdf16", - "0x1da0942d6658be3d", - "0x1f5979b63a014169", - "0x231f7cf119340765", - "0x4302c54a68564f3", - "0xa01050e1576e3796", - "0xb7dc4b78ef69422c", - "0xa16a70aab8cf5501", - "0xf4eb4bb16f2b545e", - "0xc1348038b44d3605", - "0xea4ddb48963670a0", - "0xcdd5cd7349feb5b3", - "0x233818f86640d56c", - "0x2091b034caf7066d", - "0x665dcbff4669a0ab", - "0xd4945c02ae7ebed2", - "0xe02e529747c9f263", - "0xd986587981d8d58f", - "0x52e24cc055a0fe41", - "0x35226b4882137b8c", - "0x76458eea1c4815cc", - "0x46184a25ea3b8bc4", - "0x758b6f00a0199dbf", - "0x2ca8ff958962eef5", - "0xbadd908ee2b5776f", - "0xf36bc273e9c674d8", - "0xf6fc1aa0aea86406", - "0xd6c6f27622899080", - "0x122380de718ddbb1", - "0xf5b8375b82a4403b", - "0xf6dda0ba4095dc12", - "0x10781e603488827c", - "0xcad3b9b916c21464", - "0xfffb2990c027f89c", - "0x70a0d20b44a666db", - "0x551db83682d7ec46", - "0xb63dbd50e62f7227", - "0x609237b4040df5d2", - "0xa05cf018cef13b57", - "0x8dd2bb666b3ce91a", - "0xbbadbd72a101bf52", - "0x73f26f2c60ea0bb0", - "0xe9ef15485195c03", - "0x5eff96ae52199ca0", - "0x30f9fd9c84103cf6", - "0xe64725173c9bf427", - "0x32e32ff441251c3b", - "0x49a310a42612a0d8", - "0x73958e4c3dff351d", - "0x9ddb68b48575b3f2", - "0xc9a7840902a4daa9", - "0xe200a4cb91a0dd08", - "0xbe17ee5cef10e87b", - "0x197f82276f0d3333", - "0xbbb92fdfe981f04c", - "0x801aea2b" - ], - [ - "0x433f9425a01102f9", - "0x2cb4fd5238278aea", - "0x51bf44d83fc2da14", - "0x75b33a0dfe8297a2", - "0x6e9131a07442c563", - "0xb46f1e0e609c001", - "0x8f7c85875bc544b3", - "0x2a937cc38649b852", - "0x9ab0a00fb3338e1d", - "0xca8cb8b86005af0f", - "0xaa131351cbff1f2", - "0xd2b345da7179b80a", - "0xbaa0297f802f23e3", - "0xfe5598cf070216bc", - "0xdeee4bf6498717c4", - "0x1fcd2c3a18b34451", - "0xa0be7499efdffc72", - "0xd7a339d0aa14014f", - "0x645f38d1b2b5873f", - "0xd18cb11694e8175b", - "0x29d6fbda3028f56", - "0x58ddd5d40aa88ba0", - "0x44e2c60f82c72303", - "0xeed4f52b6186e154", - "0x8d3cd19d61353a86", - "0x851be6ac17ffa043", - "0x84c4cdde6d711613", - "0x8a1f1308479bca91", - "0xc830723639acd075", - "0xde6b00f54da03991", - "0x5422a6c6cbe8cfa6", - "0xb0bec537620df6d4", - "0xfcd4afc8ff76f764", - "0x5df02db7a0d5a0fc", - "0x2e908235e1296a00", - "0x47c065791315f421", - "0x71b36bef579cd1ea", - "0x21a13ba0ca8e3b5f", - "0xe2683ea0dcf52479", - "0xae982ba67e6a914", - "0xc41b43bc321a857f", - "0x3860a05b49ce633e", - "0x62e2c24d7536889a", - "0xdc3622f5f097f639", - "0x5e268740b80f6074", - "0x23a023e776afa59c", - "0xa12a0649d3584b7c", - "0x74e807d822820f61", - "0xd491c764de88ccf3", - "0xa01ce610e94b6e10", - "0x1928caabcc262c50", - "0x27eef9182f849cbe", - "0x4c810346aa7720f6", - "0x1b9e53a7bf6852a2", - "0xd911418a84b6ca0", - "0x87d63c6f6ac9c451", - "0xb8251f4465b7aad8", - "0x56d525354566fe4a", - "0x72961a65bde8a048", - "0xe25f20295c917754", - "0x7db9b0c589c87315", - "0x78f9a00c31eeca27", - "0x9f14160ec2a01b00", - "0x52eda47bd9b4040a", - "0x1a98b40b1a35e39e", - "0x4aec1e1154d6339e", - "0x805e634b" - ], - [ - "0xdcb447dba01102f9", - "0x68980ba151eadfb3", - "0x8a19926217faceb2", - "0x71732d37e1accb26", - "0xc4cee6a0ac4dfcbe", - "0x5282d8edb0f9b6b2", - "0xb14ac18e7f0f4e41", - "0x59f4620d88037c37", - "0x385aa0ecbad44439", - "0x34a815e14f56e350", - "0x955804ac7196189b", - "0x43835bc28de186e5", - "0x22a016d6e7e7feee", - "0x173da768a6e17d23", - "0x62aef2b511d1c64f", - "0xd2aea1318fd607f1", - "0xa01ed8e3d750beb5", - "0xfd043b65d2787122", - "0x814595ebadf21488", - "0x49735eee3bc1bf60", - "0x418695a7b0cbe6d1", - "0xb630c76ceeb770a0", - "0x159b746de50c8efa", - "0x1d6c816c9ddf3fc0", - "0x304198e6d06f7cba", - "0x9c51ae2e57c0a069", - "0x518df55d29aaff6e", - "0x47b7a90e5fbdc267", - "0xaadbb5837dcf039d", - "0xe6b82ff389a00875", - "0x3057e43586dace7c", - "0x5bba10ae629487c7", - "0x79802b46d54dc535", - "0x7118bc2ea0db8010", - "0x9ecee2471d13bdfc", - "0xe83a158eaabf5530", - "0x616c28d8accfabf1", - "0xe14b62a0aca05230", - "0x1cf73e61d3eafd64", - "0x731e6fd5f5004644", - "0x8a11f600630bcaa9", - "0xe8e8a071a6c79502", - "0x1956dc5c1b5e1996", - "0x3c009b4961eb8e4b", - "0x319cb86a396b0484", - "0x12a0a356d9808791", - "0xaa7023a4b8d848e9", - "0xb57142dc5e92bfe", - "0x79e441da724252d8", - "0xa0c88baca27030e2", - "0xe9fc8ad899d928fb", - "0x5c246638facc308f", - "0x7d0f8d43bd265df0", - "0x29b2b2db27455f62", - "0x83add5e4f0c7e6a0", - "0x4d3f0123dca7bb75", - "0x5617485d8558315e", - "0x19bbbde134211b65", - "0x8bf9948ff76da0d2", - "0xfae662b187abfea", - "0x3f2645164a1efcfb", - "0xc104af341ae8527a", - "0x252f758406a0760e", - "0xac975460f5e41e2a", - "0xcb3cdccc9faa5afe", - "0x6885deda224e35f", - "0x80dfc77b" - ], - [ - "0xe1e6e6a5a01102f9", - "0xc439eef2e83e6c0b", - "0xa535626fecfdd6ed", - "0xc470d74b92b0a756", - "0xcb00d0a09da9ce4f", - "0xb9c0edabd2e61878", - "0xf35584bbfb659596", - "0x3bc6193576d3c100", - "0x24fba08887cb4626", - "0xb0ea70482082e2cf", - "0x894ef179ae2e6af5", - "0x1817752c75ba9a32", - "0x24a0606c9ce499a2", - "0x99c9c75a8b6ba611", - "0xf5f718e2dda8c563", - "0xbde0d0a19e1e8627", - "0xa0d10f356e6c437f", - "0x750121f018a036f4", - "0x977eec9097d76f4b", - "0x1e5382ea3a733f5e", - "0xb5b9bff92e230008", - "0x373ed05ca59b3fa0", - "0x597efec7d1172562", - "0x801c9e013d34744c", - "0x6ecd85cddbe119d8", - "0x173408f4fda2a033", - "0x5b70095e0a7b9e6f", - "0x695ca5c74b14df04", - "0xccfb8ef06874bf71", - "0xc47bde7beca0fa13", - "0xeb0c13e77b4a0b39", - "0xbf28d767d6a7ef40", - "0x77687ffb5f28e7fa", - "0x50e0da87a06c453b", - "0x287e05d0f37a83a1", - "0x132e63668c4d1f54", - "0x8d261cdba58927a8", - "0x4f2f50a008c08488", - "0x5d34b827228eaf15", - "0x6c0137698843bb41", - "0xb953ce34574ee316", - "0x2a2fa0f47a73c093", - "0xa68654f518ea1e35", - "0x4b69941abbceb4d4", - "0x78ea3f5a9343be53", - "0x35a0455b56da95c4", - "0x84f7c48d4a76a42c", - "0x7afa2af411f5604f", - "0x92d23f4edea981c2", - "0xa00139cde34dad66", - "0xb96de98c72fd4592", - "0x506da4b5a7afa103", - "0x755acfa53547b746", - "0xfcbd42821a6faa9f", - "0x72936e6b5881cda0", - "0xe59e1ff672d8dcef", - "0x88b806955b39560d", - "0x7baf784a73ea8418", - "0xafa0b0691c29a0f4", - "0x8fecb8232fb44f75", - "0x9514baba6ea39e2e", - "0xd5ce40ba3330e874", - "0x3b70e3a37fa0eadd", - "0xa8bb30d3282924ac", - "0xd96f45f9323e9f21", - "0x6e8f8b1bb28113df", - "0x801b1a91" - ], - [ - "0xb6721834a01102f9", - "0x65b0b3b817362a19", - "0xe6bdc762cac6abf1", - "0x9e173d04650c9407", - "0xb89c43a0b60d822e", - "0x7775a556aff6a883", - "0x23ff3617b77c8d58", - "0x4831875ee0fb97b4", - "0xa2d3a07b889389c6", - "0xedce415fe81713ef", - "0xe6840d757c6e65e", - "0x50a0d255cd20d549", - "0xdca062818ac693cc", - "0x67658d8a7006c420", - "0xa9b21080a598376", - "0x923645230702f6e6", - "0xa009d874d6e5b9ad", - "0x128888be6d275907", - "0xcbf07e937547de7a", - "0xedea6891d513a54", - "0xd7833969b2471f9", - "0x3dec416ff498baa0", - "0x48142eb5163582da", - "0xe2b7d888b2a5ce15", - "0xa8fd3a9094a2f152", - "0x1c1b51e21188a0f9", - "0xf29e4e9e991ecd68", - "0xa980d1b19681fc79", - "0x3e6bb3b29f35b6d2", - "0x54f9c3d47da0ece8", - "0xf663ce3a5f15e834", - "0xe19a4e29920fe8c7", - "0x9137497f331c6671", - "0x8954cc91a07738ae", - "0x3c56c8dbc1f252d0", - "0xa06e915f2033c28f", - "0x1ea4d6212563b359", - "0x3776e7a06f21c3be", - "0x1e251935059ebd48", - "0xf5da5d7c7601e0c1", - "0x6dec3478245276cf", - "0x6ae3a0d6ed841766", - "0x4d637fafc196c32b", - "0x1872cd4ab0fb582e", - "0xb88bb2e761846b4c", - "0x31a06a7530c30808", - "0x11259421f0feb7c4", - "0xaa1c99f2106769dd", - "0xede10c2c05993ae4", - "0xa02d30982e30bb0f", - "0x235594ee53c44c05", - "0x73387cee25571335", - "0x26607787c455b91d", - "0x2b73d84d306eb1d3", - "0xdefe6f4f50ac96a0", - "0x85858e8b0ede8c06", - "0xeac0f28cd11f30f3", - "0x1e5fd4a42ec0658", - "0x4ad0bd885da5a06d", - "0x8d7d10d3a7cf336e", - "0x9c5458d1b620227", - "0xd0c91ad463adee5e", - "0xd5fa22fdc7a080fb", - "0x2240f7c2622bd91d", - "0x38d3d7853ef0d516", - "0x3f51bb86a892550e", - "0x8088049f" - ], - [ - "0x8a169437a0f101f9", - "0xfa3ced185956309b", - "0x8db06f289f3afe2f", - "0x52035bc077222d8", - "0x81cecca08e33e3ff", - "0x89a250e215c171cc", - "0x62c1bc60f0993650", - "0xbbf62b96459bcb5a", - "0xd445a08173fda93c", - "0x91e7d43fe3377371", - "0x5502931ba59fddb3", - "0x1850b91b288e1685", - "0x64a0a630c8207acf", - "0x58160f099ed6023", - "0x4198238ff4613e16", - "0x77a336c10e03830d", - "0xa0eee1cea4502c76", - "0xf03b6b2a60a90439", - "0xa6ae0795e51d73f7", - "0x50143ee9c95b716b", - "0x108687f67e7a94fb", - "0xb12beb59cef3f6a0", - "0xafb92ce4c1a7c30d", - "0x2f9c1bc1f8797cdf", - "0xd44b981d3cf8c962", - "0xb7473eac86a0804e", - "0x17d294fc99c4eb84", - "0xfc134b89c34521e3", - "0x2dfd108c430de5b3", - "0xcbff41e7a0690d8d", - "0x7262a4626784226e", - "0xd766f80aea9d6f9c", - "0x475d36ab0542fd41", - "0xb912eba0932ea0db", - "0x2d1cd9badaf643de", - "0x95e64b5eb7ad9a54", - "0x58d5e092664b2a5b", - "0xc352a0e708f0003f", - "0xcfa1c1d55e281237", - "0x9e50c506df0c6d92", - "0x177117b78c273ad0", - "0x87a0655a2b1444ee", - "0x567ba6fb34252d22", - "0xb27c861900096e61", - "0x686c7e2d0bd66e7b", - "0xa0846bfab63b51ea", - "0xc6ead052cf367d6b", - "0xb7f01de54f58d9b7", - "0x14b2e41168155bf9", - "0x15799e90891e2e2a", - "0xf33c015b01bc83a0", - "0xc64e908e435f0a45", - "0xa2e576fdc5b71c81", - "0xdf7af1dae9fcc66f", - "0xc7b80409a927a036", - "0xdd45519a5945592c", - "0x332aaa1ae333836c", - "0x1b7ef2b40b6dc194", - "0xf0bae61277a079a2", - "0x35e03e67ca2824ee", - "0x715f902a6a8d4f52", - "0x7f942bfd1917df67", - "0x802efe51" - ], - [ - "0x2e896a4d4ea091f8", - "0x11c47fbbfcd66965", - "0xfa264bb69a6b3cf6", - "0x6a15a88209b6e3ac", - "0xfba0808080facf9e", - "0x509c2d93079b239b", - "0x46e6084a232eaa65", - "0xec96e29bb96af360", - "0x808e4d79fd0a01f7", - "0x10c4332e32a08080", - "0x3c58ad19246301dc", - "0x7ee9d2dc08f00328", - "0xda7a7eb1fb996a6f", - "0x4512a3da05a6b0e", - "0xf29247e223c0b2bd", - "0x68af6edd3da39a07", - "0x821ee0c83ce615ae", - "0x808080804b366c8e", - "0x808080" - ], - [ - "0x198ec87aa08051f8", - "0x69468d18b420fc23", - "0xcaed890611ce65bf", - "0x54afb686e30b4471", - "0x80808080918073ee", - "0xda5d26326c8ba080", - "0xfa0d187d28e2397a", - "0x4eb95b8e08b4e0bc", - "0x7f323b88311b42cc", - "0x8080808080803c90", - "0x808080" - ], - [ - "0xa2584e59209d68f8", - "0x2914e9df55205341", - "0x19c3ff335ced3046", - "0xb0aab4f999274505", - "0x8064128246f848b8", - "0x55cc1b171fe856a0", - "0xf8c092e64583ffa6", - "0xad6c991be0485b6e", - "0xb463e3b52f6201c0", - "0xf7860146d2c5a021", - "0xc7dcb27d7e923c23", - "0x82ca53b600e5c003", - "0x855d04d8fa7b3b27", - "0x70a4" - ] - ] - } - ] - } - ], + "accounts": [], "storages": [], "transactions": [], "transaction_receipts": [] @@ -634,8 +142,7 @@ "type": "module", "context": { "inputs": [ - "0x51cdb8", - "0x13cb6ae34a13a0977f4d7101ebc24b87bb23f0d5" + "0x60b645" ], "module_class": { "prime": "0x800000000000011000000000000000000000000000000000000000000000001", @@ -644,21 +151,21 @@ "0xa0680017fff8000", "0x7", "0x482680017ffa8000", - "0xfffffffffffffffffffffffffffff330", + "0xfffffffffffffffffffffffffffff650", "0x400280007ff97fff", "0x10780017fff7fff", - "0xd7", + "0xb3", "0x4825800180007ffa", - "0xcd0", + "0x9b0", "0x400280007ff97fff", "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0xdf", + "0xbb", "0x482680017ff98000", "0x1", "0x20680017fff7ff8", - "0xbe", + "0x9a", "0x48307ff680007ff7", "0x20680017fff7fff", "0x4", @@ -679,7 +186,7 @@ "0x480680017fff8000", "0x0", "0x20680017fff7ffe", - "0x98", + "0x74", "0x480080007fff8000", "0xa0680017fff8000", "0x12", @@ -696,7 +203,7 @@ "0x402480017fff7ffb", "0xffffffffffffffffffffffffffffffff", "0x20680017fff7fff", - "0x83", + "0x5f", "0x402780017fff7fff", "0x1", "0x400080007ff87ffe", @@ -709,35 +216,14 @@ "0x20680017fff7fff", "0x4", "0x10780017fff7fff", - "0xa", - "0x482480017ff78000", - "0x1", - "0x48127ff77fff8000", - "0x480680017fff8000", - "0x0", - "0x480080007ff48000", - "0x10780017fff7fff", - "0x8", - "0x48127ff77fff8000", - "0x48127ff77fff8000", - "0x480680017fff8000", - "0x1", - "0x480680017fff8000", - "0x0", - "0x20680017fff7ffe", - "0x58", - "0x48307ffc80007ffd", - "0x20680017fff7fff", - "0x4", - "0x10780017fff7fff", "0x10", "0x40780017fff7fff", "0x1", "0x480680017fff8000", "0x496e70757420746f6f206c6f6e6720666f7220617267756d656e7473", "0x400080007ffe7fff", - "0x48127ff77fff8000", - "0x48127fb27fff8000", + "0x48127ffc7fff8000", + "0x48127fb77fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -746,34 +232,33 @@ "0x1", "0x208b7fff7fff7ffe", "0x1104800180018000", - "0x28a", + "0x27a", "0x482480017fff8000", - "0x289", + "0x279", "0x480080007fff8000", "0xa0680017fff8000", "0x9", - "0x4824800180007fb0", - "0x48c6", + "0x4824800180007fb5", + "0x47fe", "0x482480017fff8000", "0x100000000000000000000000000000000", - "0x400080007ff27fff", + "0x400080007ff77fff", "0x10780017fff7fff", - "0x28", - "0x4824800180007fb0", - "0x48c6", - "0x400080007ff37fff", - "0x482480017ff38000", + "0x27", + "0x4824800180007fb5", + "0x47fe", + "0x400080007ff87fff", + "0x482480017ff88000", "0x1", "0x48127ffe7fff8000", "0x480a7ffb7fff8000", - "0x48127fe37fff8000", - "0x48127fe37fff8000", + "0x48127fe67fff8000", + "0x48127fe67fff8000", "0x480680017fff8000", "0xaa36a7", - "0x48127fea7fff8000", - "0x48127ff17fff8000", + "0x48127fef7fff8000", "0x1104800180018000", - "0x182", + "0x174", "0x20680017fff7ffd", "0xf", "0x40780017fff7fff", @@ -802,23 +287,9 @@ "0x480680017fff8000", "0x4f7574206f6620676173", "0x400080007ffe7fff", - "0x482480017ff08000", - "0x1", - "0x48127fab7fff8000", - "0x480a7ffb7fff8000", - "0x480680017fff8000", - "0x1", - "0x48127ffa7fff8000", - "0x482480017ff98000", - "0x1", - "0x208b7fff7fff7ffe", - "0x40780017fff7fff", + "0x482480017ff58000", "0x1", - "0x480680017fff8000", - "0x4661696c656420746f20646573657269616c697a6520706172616d202333", - "0x400080007ffe7fff", - "0x48127ff87fff8000", - "0x48127fb37fff8000", + "0x48127fb07fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -1159,7 +630,7 @@ "0x0", "0x208b7fff7fff7ffe", "0x480680017fff8000", - "0x1", + "0x0", "0xa0680017fff8004", "0xe", "0x4824800180047ffe", @@ -1167,55 +638,54 @@ "0x484480017ffe8000", "0x110000000000000000", "0x48307ffe7fff8002", - "0x480280007ff67ffc", - "0x480280017ff67ffc", + "0x480280007ff77ffc", + "0x480280017ff77ffc", "0x402480017ffb7ffd", "0xffffffffffffffeeffffffffffffffff", - "0x400280027ff67ffd", + "0x400280027ff77ffd", "0x10780017fff7fff", - "0xce", + "0xcd", "0x484480017fff8001", "0x8000000000000000000000000000000", "0x48307fff80007ffd", - "0x480280007ff67ffd", - "0x480280017ff67ffd", + "0x480280007ff77ffd", + "0x480280017ff77ffd", "0x402480017ffc7ffe", "0xf8000000000000000000000000000000", - "0x400280027ff67ffe", + "0x400280027ff77ffe", "0x40780017fff7fff", "0x1", - "0x400180007fff7ff9", - "0x400180017fff7ffa", - "0x400180027fff7ffb", - "0x400180037fff7ffc", - "0x400180047fff7ffd", + "0x400180007fff7ffa", + "0x400180017fff7ffb", + "0x400180027fff7ffc", + "0x400180037fff7ffd", "0x480680017fff8000", - "0x3", + "0x5", "0x48127ffe7fff8000", "0x482480017ffd8000", - "0x5", - "0x482680017ff68000", + "0x4", + "0x482680017ff78000", "0x3", "0x480680017fff8000", "0x43616c6c436f6e7472616374", - "0x400280007ff87fff", - "0x400380017ff87ff7", - "0x400280027ff87ff4", - "0x400280037ff87ffb", - "0x400280047ff87ffc", - "0x400280057ff87ffd", - "0x480280077ff88000", + "0x400280007ff97fff", + "0x400380017ff97ff8", + "0x400280027ff97ff4", + "0x400280037ff97ffb", + "0x400280047ff97ffc", + "0x400280057ff97ffd", + "0x480280077ff98000", "0x20680017fff7fff", "0xa2", - "0x480280087ff88000", - "0x480280097ff88000", + "0x480280087ff98000", + "0x480280097ff98000", "0x480680017fff8000", "0x0", - "0x480280067ff88000", - "0x482680017ff88000", + "0x480280067ff98000", + "0x482680017ff98000", "0xa", - "0x480280087ff88000", - "0x480280097ff88000", + "0x480280087ff98000", + "0x480280097ff98000", "0x48307ff980007ffa", "0xa0680017fff8000", "0x6", @@ -1370,13 +840,13 @@ "0x40780017fff7fff", "0x1d", "0x48127fe07fff8000", - "0x480280067ff88000", - "0x482680017ff88000", + "0x480280067ff98000", + "0x482680017ff98000", "0xa", "0x480680017fff8000", "0x1", - "0x480280087ff88000", - "0x480280097ff88000", + "0x480280087ff98000", + "0x480280097ff98000", "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0x21", @@ -1385,10 +855,10 @@ "0x480680017fff8000", "0x4f7074696f6e3a3a756e77726170206661696c65642e", "0x400080007ffe7fff", - "0x482680017ff68000", + "0x482680017ff78000", "0x3", - "0x480a7ff77fff8000", "0x480a7ff87fff8000", + "0x480a7ff97fff8000", "0x480680017fff8000", "0x1", "0x48127ffa7fff8000", @@ -1397,9 +867,9 @@ "0x208b7fff7fff7ffe" ], "bytecode_segment_lengths": [ - 235, + 199, 282, - 237 + 236 ], "hints": [ [ @@ -1408,7 +878,7 @@ { "TestLessThanOrEqual": { "lhs": { - "Immediate": "0xcd0" + "Immediate": "0x9b0" }, "rhs": { "Deref": { @@ -1482,7 +952,7 @@ ] ], [ - 90, + 69, [ { "AllocSegment": { @@ -1495,17 +965,17 @@ ] ], [ - 109, + 88, [ { "TestLessThanOrEqual": { "lhs": { - "Immediate": "0x48c6" + "Immediate": "0x47fe" }, "rhs": { "Deref": { "register": "AP", - "offset": -79 + "offset": -74 } }, "dst": { @@ -1517,7 +987,7 @@ ] ], [ - 135, + 113, [ { "AllocSegment": { @@ -1530,7 +1000,7 @@ ] ], [ - 156, + 134, [ { "AllocSegment": { @@ -1543,20 +1013,7 @@ ] ], [ - 171, - [ - { - "AllocSegment": { - "dst": { - "register": "AP", - "offset": 0 - } - } - } - ] - ], - [ - 192, + 156, [ { "AllocSegment": { @@ -1569,7 +1026,7 @@ ] ], [ - 206, + 170, [ { "AllocSegment": { @@ -1582,7 +1039,7 @@ ] ], [ - 220, + 184, [ { "AllocSegment": { @@ -1595,7 +1052,7 @@ ] ], [ - 519, + 483, [ { "TestLessThan": { @@ -1617,7 +1074,7 @@ ] ], [ - 523, + 487, [ { "LinearSplit": { @@ -1646,7 +1103,7 @@ ] ], [ - 533, + 497, [ { "LinearSplit": { @@ -1675,7 +1132,7 @@ ] ], [ - 541, + 505, [ { "AllocSegment": { @@ -1688,14 +1145,14 @@ ] ], [ - 563, + 526, [ { "SystemCall": { "system": { "Deref": { "register": "FP", - "offset": -8 + "offset": -7 } } } @@ -1703,7 +1160,7 @@ ] ], [ - 576, + 539, [ { "TestLessThan": { @@ -1728,7 +1185,7 @@ ] ], [ - 588, + 551, [ { "TestLessThan": { @@ -1750,7 +1207,7 @@ ] ], [ - 590, + 553, [ { "DivMod": { @@ -1776,7 +1233,7 @@ ] ], [ - 614, + 577, [ { "TestLessThan": { @@ -1801,7 +1258,7 @@ ] ], [ - 626, + 589, [ { "TestLessThan": { @@ -1823,7 +1280,7 @@ ] ], [ - 628, + 591, [ { "DivMod": { @@ -1849,7 +1306,7 @@ ] ], [ - 660, + 623, [ { "AllocSegment": { @@ -1862,7 +1319,7 @@ ] ], [ - 677, + 640, [ { "AllocSegment": { @@ -1875,7 +1332,7 @@ ] ], [ - 694, + 657, [ { "AllocSegment": { @@ -1888,7 +1345,7 @@ ] ], [ - 711, + 674, [ { "AllocSegment": { @@ -1901,7 +1358,7 @@ ] ], [ - 739, + 702, [ { "AllocSegment": { @@ -1918,7 +1375,7 @@ [ 0, [ - "memory[ap + 0] = 3280 <= memory[fp + -6]" + "memory[ap + 0] = 2480 <= memory[fp + -6]" ] ], [ @@ -1934,145 +1391,139 @@ ] ], [ - 90, + 69, [ "memory[ap + 0] = segments.add()" ] ], [ - 109, - [ - "memory[ap + 0] = 18630 <= memory[ap + -79]" - ] - ], - [ - 135, + 88, [ - "memory[ap + 0] = segments.add()" + "memory[ap + 0] = 18430 <= memory[ap + -74]" ] ], [ - 156, + 113, [ "memory[ap + 0] = segments.add()" ] ], [ - 171, + 134, [ "memory[ap + 0] = segments.add()" ] ], [ - 192, + 156, [ "memory[ap + 0] = segments.add()" ] ], [ - 206, + 170, [ "memory[ap + 0] = segments.add()" ] ], [ - 220, + 184, [ "memory[ap + 0] = segments.add()" ] ], [ - 519, + 483, [ "memory[ap + 4] = memory[ap + -1] < 3618502788666131106986593281521497120414687020801267626233049500247285301248" ] ], [ - 523, + 487, [ "\n(value, scalar) = (memory[ap + 3], 313594649253062377472)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -2] = x\nmemory[ap + -1] = y\n" ] ], [ - 533, + 497, [ "\n(value, scalar) = (memory[ap + -2], 10633823966279326983230456482242756608)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -1] = x\nmemory[ap + 0] = y\n" ] ], [ - 541, + 505, [ "memory[ap + 0] = segments.add()" ] ], [ - 563, + 526, [ - "syscall_handler.syscall(syscall_ptr=memory[fp + -8])" + "syscall_handler.syscall(syscall_ptr=memory[fp + -7])" ] ], [ - 576, + 539, [ "memory[ap + 0] = memory[ap + -6] < memory[ap + -1]" ] ], [ - 588, + 551, [ "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" ] ], [ - 590, + 553, [ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], [ - 614, + 577, [ "memory[ap + 0] = memory[ap + -2] < memory[ap + -1]" ] ], [ - 626, + 589, [ "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" ] ], [ - 628, + 591, [ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], [ - 660, + 623, [ "memory[ap + 0] = segments.add()" ] ], [ - 677, + 640, [ "memory[ap + 0] = segments.add()" ] ], [ - 694, + 657, [ "memory[ap + 0] = segments.add()" ] ], [ - 711, + 674, [ "memory[ap + 0] = segments.add()" ] ], [ - 739, + 702, [ "memory[ap + 0] = segments.add()" ] From 7e5a3e274d6fb024fc313d663ba489d1d0b17cd0 Mon Sep 17 00:00:00 2001 From: petscheit Date: Tue, 23 Jul 2024 16:52:57 +0200 Subject: [PATCH 43/73] chore: fix unit tests --- Makefile | 2 +- src/datalakes/block_sampled_datalake.cairo | 15 ++++--- .../block_sampled_datalake.cairo | 1 + tests/cairo_programs/computational_task.cairo | 9 ++-- tests/cairo_programs/test_vectors.cairo | 41 ++++++++++--------- .../txs_in_block_datalake.cairo | 13 ++++-- tools/make/launch_cairo_files.py | 4 +- 7 files changed, 49 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index b67d823a..42de0162 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ run-pie: get-program-hash: @echo "Getting hdp.cairo program's hash..." - cairo-compile ./src/hdp.cairo --output $(BUILD_DIR)/hdp.json + cairo-compile --cairo_path="packages/eth_essentials" "src/hdp.cairo" --output $(BUILD_DIR)/hdp.json cairo-hash-program --program $(BUILD_DIR)/hdp.json @echo "Program hash retrieved." diff --git a/src/datalakes/block_sampled_datalake.cairo b/src/datalakes/block_sampled_datalake.cairo index d0dc7c54..0f023dec 100644 --- a/src/datalakes/block_sampled_datalake.cairo +++ b/src/datalakes/block_sampled_datalake.cairo @@ -64,11 +64,11 @@ func init_block_sampled{ // Account Input Layout: // extract & write field_idx - let field_idx = extract_byte_at_pos([input + 26], 5, pow2_array); + let field_idx = extract_byte_at_pos([input + 30], 5, pow2_array); assert [properties] = field_idx; let (address) = extract_address{bitwise_ptr=bitwise_ptr}( - chunk_one=[input + 24], chunk_two=[input + 25], chunk_three=[input + 26] + chunk_one=[input + 28], chunk_two=[input + 29], chunk_three=[input + 30] ); // write address to properties @@ -90,7 +90,7 @@ func init_block_sampled{ // Account Slot Input Layout: let (address) = extract_address{bitwise_ptr=bitwise_ptr}( - chunk_one=[input + 24], chunk_two=[input + 25], chunk_three=[input + 26] + chunk_one=[input + 28], chunk_two=[input + 29], chunk_three=[input + 30] ); // write address to properties @@ -99,7 +99,7 @@ func init_block_sampled{ extract_and_write_slot{ range_check_ptr=range_check_ptr, bitwise_ptr=bitwise_ptr, properties=properties - }(chunks=input + 26); + }(chunks=input + 30); return ( res=BlockSampledDataLake( @@ -336,7 +336,10 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu let (increment) = word_reverse_endian_64([input + 19]); return ( - chain_id=chain_id, block_range_start=block_range_start, block_range_end=block_range_end, increment=increment + chain_id=chain_id, + block_range_start=block_range_start, + block_range_end=block_range_end, + increment=increment, ); } @@ -479,4 +482,4 @@ func fetch_header_data_points{ return fetch_header_data_points( chain_id=chain_id, datalake=datalake, index=index + 1, data_points=data_points ); -} \ No newline at end of file +} diff --git a/tests/cairo_programs/block_sampled_datalake.cairo b/tests/cairo_programs/block_sampled_datalake.cairo index 6407b835..30a1ebe2 100644 --- a/tests/cairo_programs/block_sampled_datalake.cairo +++ b/tests/cairo_programs/block_sampled_datalake.cairo @@ -47,6 +47,7 @@ func test_block_sampled_datalake_decoding{ func block_sampled_datalake_eq( a: BlockSampledDataLake, b: BlockSampledDataLake, property_type: felt ) { + assert a.chain_id = b.chain_id; assert a.block_range_start = b.block_range_start; assert a.block_range_end = b.block_range_end; assert a.increment = b.increment; diff --git a/tests/cairo_programs/computational_task.cairo b/tests/cairo_programs/computational_task.cairo index d786b2a8..f47f3bce 100644 --- a/tests/cairo_programs/computational_task.cairo +++ b/tests/cairo_programs/computational_task.cairo @@ -64,9 +64,9 @@ func test_computational_task_init{ "type": "datalake_compute", "context": { "task_bytes_len": 128, - "encoded_task": ["0x25ca8521ba63d557", "0xc9f9f40f48f31e27", "0x739b20c59ba605a5", "0x813cc91cdc15ae0e", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0"], - "datalake_bytes_len": 224, - "encoded_datalake": ["0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0xf826540000000000", "0x0", "0x0", "0x0", "0x1527540000000000", "0x0", "0x0", "0x0", "0x100000000000000", "0x0", "0x0", "0x0", "0xa000000000000000", "0x0", "0x0", "0x0", "0x200000000000000", "0x1101", "0x0", "0x0", "0x0"], + "encoded_task": ["0xAE1B44980CDF67EC", "0x45E6CCA5D27DED75", "0x438632DD6582D123", "0x3DD3EFC40A866EC9", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0", "0x0"], + "datalake_bytes_len": 256, + "encoded_datalake": ["0x0", "0x0", "0x0", "0x0", "0x0","0x0","0x0", "0xA736AA0000000000", "0x0", "0x0", "0x0", "0xf826540000000000", "0x0", "0x0", "0x0", "0x1527540000000000", "0x0", "0x0", "0x0", "0x100000000000000", "0x0", "0x0", "0x0", "0xa000000000000000", "0x0", "0x0", "0x0", "0x200000000000000", "0x1101", "0x0", "0x0", "0x0"], "datalake_type": 0, "property_type": 1 } @@ -81,6 +81,7 @@ func test_computational_task_init{ local expected_datalake: BlockSampledDataLake; assert expected_datalake = BlockSampledDataLake( + chain_id=11155111, block_range_start=5515000, block_range_end=5515029, increment=1, @@ -94,7 +95,7 @@ func test_computational_task_init{ assert expected_task = ComputationalTask( chain_id=0x1, - hash=Uint256(0xB85414EBA86F94BAC1CA653D3D3CF014, 0x212F54CE9F4342F21C5D865F1641AABC), + hash=Uint256(0x38008646DD09E46B5D7C68B43B5C5DE2, 0xEA113874535324B3CEB180080880F599), datalake_ptr=datalake_ptr, datalake_type=DatalakeType.BLOCK_SAMPLED, aggregate_fn_id=AGGREGATE_FN.AVG, diff --git a/tests/cairo_programs/test_vectors.cairo b/tests/cairo_programs/test_vectors.cairo index b12d4969..445ce578 100644 --- a/tests/cairo_programs/test_vectors.cairo +++ b/tests/cairo_programs/test_vectors.cairo @@ -21,14 +21,15 @@ namespace BlockSampledDataLakeMocker { local datalake_bytes_len: felt; %{ + ids.datalake.chain_id = 11155111 ids.datalake.block_range_start = 5382810 ids.datalake.block_range_end = 5382815 ids.datalake.increment = 1 ids.datalake.property_type = 1 ids.datalake.properties = segments.gen_arg([8]) - datalake_input = [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9a22520000000000, 0x0, 0x0, 0x0, 0x9f22520000000000, 0x0, 0x0, 0x0, 0x100000000000000, 0x0, 0x0, 0x0, 0xa000000000000000, 0x0, 0x0, 0x0, 0x200000000000000, 0x801, 0x0, 0x0, 0x0] - ids.datalake_bytes_len = 224 + datalake_input = [0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xA736AA0000000000,0x0,0x0,0x0,0x9a22520000000000,0x0,0x0,0x0,0x9f22520000000000,0x0,0x0,0x0,0x100000000000000,0x0,0x0,0x0,0xa000000000000000,0x0,0x0,0x0,0x200000000000000,0x801,0x0,0x0,0x0] + ids.datalake_bytes_len = 256 segments.write_arg(ids.datalake_input, datalake_input) %} @@ -48,14 +49,15 @@ namespace BlockSampledDataLakeMocker { local datalake_bytes_len: felt; %{ + ids.datalake.chain_id = 11155111 ids.datalake.block_range_start = 4952100 ids.datalake.block_range_end = 4952120 ids.datalake.increment = 1 ids.datalake.property_type = 2 - ids.datalake.properties = segments.gen_arg([0x1, 0x7f2c6f930306d3aa736b3a6c6a98f512f74036d4]) + ids.datalake.properties = segments.gen_arg([0x1,0x7f2c6f930306d3aa736b3a6c6a98f512f74036d4]) - datalake_input = [0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x24904b0000000000,0x0,0x0,0x0,0x38904b0000000000,0x0,0x0,0x0,0x100000000000000,0x0,0x0,0x0,0xa000000000000000,0x0,0x0,0x0,0x1600000000000000,0xd30603936f2c7f02,0xf5986a6c3a6b73aa,0x1d43640f712,0x0] - ids.datalake_bytes_len = 224 + datalake_input = [0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xA736AA0000000000,0x0,0x0,0x0,0x24904b0000000000,0x0,0x0,0x0,0x38904b0000000000,0x0,0x0,0x0,0x100000000000000,0x0,0x0,0x0,0xa000000000000000,0x0,0x0,0x0,0x1600000000000000,0xd30603936f2c7f02,0xf5986a6c3a6b73aa,0x1d43640f712,0x0] + ids.datalake_bytes_len = 256 segments.write_arg(ids.datalake_input, datalake_input) %} @@ -75,14 +77,15 @@ namespace BlockSampledDataLakeMocker { local datalake_bytes_len: felt; %{ + ids.datalake.chain_id = 11155111 ids.datalake.block_range_start = 5382810 ids.datalake.block_range_end = 5382815 ids.datalake.increment = 1 ids.datalake.property_type = 3 - ids.datalake.properties = segments.gen_arg([0x75CeC1db9dCeb703200EAa6595f66885C962B920, 0x0, 0x2]) + ids.datalake.properties = segments.gen_arg([0x75CeC1db9dCeb703200EAa6595f66885C962B920,0x0,0x2]) - datalake_input = [0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x9a22520000000000,0x0,0x0,0x0,0x9f22520000000000,0x0,0x0,0x0,0x100000000000000,0x0,0x0,0x0,0xa000000000000000,0x0,0x0,0x0,0x3500000000000000,0xb7ce9ddbc1ce7503,0x68f69565aa0e2003,0x20b962c985,0x0,0x0,0x0,0x200000000,0x0] - ids.datalake_bytes_len = 256 + datalake_input = [0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xA736AA0000000000,0x0,0x0,0x0,0x9a22520000000000,0x0,0x0,0x0,0x9f22520000000000,0x0,0x0,0x0,0x100000000000000,0x0,0x0,0x0,0xa000000000000000,0x0,0x0,0x0,0x3500000000000000,0xb7ce9ddbc1ce7503,0x68f69565aa0e2003,0x20b962c985,0x0,0x0,0x0,0x200000000,0x0] + ids.datalake_bytes_len = 288 segments.write_arg(ids.datalake_input, datalake_input) %} @@ -113,7 +116,7 @@ namespace BlockSampledTaskMocker { from tools.py.utils import bytes_to_8_bytes_chunks_little # mocks python params that are available during full flow block_sampled_tasks = [{'property_type': 1 }] - task_bytes = bytes.fromhex("22B4DA4CC94620C9DFCC5AE7429AD350AC86587E6D9925A6209587EF17967F20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") + task_bytes = bytes.fromhex("6A3B90F31FC36A592E67293D5D9359BADCD9B6E2B5E078B349B546A5AEE0904A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") segments.write_arg(ids.tasks_bytes_len, [len(task_bytes)]) segments.write_arg(ids.task_input, bytes_to_8_bytes_chunks_little(task_bytes)) %} @@ -162,7 +165,7 @@ namespace BlockSampledTaskMocker { %{ from tools.py.utils import bytes_to_8_bytes_chunks_little - task_bytes = bytes.fromhex("22B4DA4CC94620C9DFCC5AE7429AD350AC86587E6D9925A6209587EF17967F20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") + task_bytes = bytes.fromhex("6A3B90F31FC36A592E67293D5D9359BADCD9B6E2B5E078B349B546A5AEE0904A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") ids.tasks_bytes_len = len(task_bytes) segments.write_arg(ids.task_input, bytes_to_8_bytes_chunks_little(task_bytes)) %} @@ -174,7 +177,7 @@ namespace BlockSampledTaskMocker { let task = ComputationalTask( chain_id=0x1, hash=Uint256( - low=0x407E98D423A7BB2DBF09B0E42601FC9B, high=0xEF8B01F35B404615F0339EEFAE7719A2 + low=0x29EDECDB24D47C8CFA6FA2C538D8C0AD, high=0x319EF071671DCEA889F113920CBB48DD ), datalake_ptr=datalake_ptr, datalake_type=DatalakeType.BLOCK_SAMPLED, @@ -205,7 +208,7 @@ namespace BlockSampledTaskMocker { %{ from tools.py.utils import bytes_to_8_bytes_chunks_little - task_bytes = bytes.fromhex("22B4DA4CC94620C9DFCC5AE7429AD350AC86587E6D9925A6209587EF17967F20000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") + task_bytes = bytes.fromhex("6A3B90F31FC36A592E67293D5D9359BADCD9B6E2B5E078B349B546A5AEE0904A000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") ids.tasks_bytes_len = len(task_bytes) segments.write_arg(ids.task_input, bytes_to_8_bytes_chunks_little(task_bytes)) %} @@ -215,7 +218,7 @@ namespace BlockSampledTaskMocker { let task = ComputationalTask( chain_id=0x1, hash=Uint256( - low=0x3CB6684D1B4B7FDEA3FBACAEA422C944, high=0x02F8516E3F7BE7FCCFDE22FB4A98DF37 + low=0xBB8F8BE052FA69FC932F586EFF3FFF82, high=0x800F013218B39FE67DF7C0D1F7246CB8 ), datalake_ptr=datalake_ptr, datalake_type=DatalakeType.BLOCK_SAMPLED, @@ -248,7 +251,7 @@ namespace BlockSampledTaskMocker { %{ from tools.py.utils import bytes_to_8_bytes_chunks_little - task_bytes = bytes.fromhex("22B4DA4CC94620C9DFCC5AE7429AD350AC86587E6D9925A6209587EF17967F20000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") + task_bytes = bytes.fromhex("6A3B90F31FC36A592E67293D5D9359BADCD9B6E2B5E078B349B546A5AEE0904A000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") ids.tasks_bytes_len = len(task_bytes) segments.write_arg(ids.task_input, bytes_to_8_bytes_chunks_little(task_bytes)) %} @@ -258,7 +261,7 @@ namespace BlockSampledTaskMocker { let task = ComputationalTask( chain_id=0x1, hash=Uint256( - low=0x9F439795EE0CA868B463479E5A905BF0, high=0x72CEFA1188B199ECEEAB39767CD32605 + low=0xCC50E918B8F9F1DF33CC8C9C86CBF4F0, high=0x133680AC8C33499C4364FEFFCB804E94 ), datalake_ptr=datalake_ptr, datalake_type=DatalakeType.BLOCK_SAMPLED, @@ -291,7 +294,7 @@ namespace BlockSampledTaskMocker { %{ from tools.py.utils import bytes_to_8_bytes_chunks_little - task_bytes = bytes.fromhex("22B4DA4CC94620C9DFCC5AE7429AD350AC86587E6D9925A6209587EF17967F20000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") + task_bytes = bytes.fromhex("6A3B90F31FC36A592E67293D5D9359BADCD9B6E2B5E078B349B546A5AEE0904A000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") ids.tasks_bytes_len = len(task_bytes) segments.write_arg(ids.task_input, bytes_to_8_bytes_chunks_little(task_bytes)) %} @@ -301,7 +304,7 @@ namespace BlockSampledTaskMocker { let task = ComputationalTask( chain_id=0x1, hash=Uint256( - low=0x1CD2E160D860B4D1BD1E327B6AA209BD, high=0xCABA4809710EB228D6A31DE1B852DFB7 + low=0x3ADE97877E3502F427D1853837DD1B41, high=0x67905CD8E3ACC23EFF54245537FFA500 ), datalake_ptr=datalake_ptr, datalake_type=DatalakeType.BLOCK_SAMPLED, @@ -335,7 +338,7 @@ namespace BlockSampledTaskMocker { %{ from tools.py.utils import bytes_to_8_bytes_chunks_little - task_bytes = bytes.fromhex("22B4DA4CC94620C9DFCC5AE7429AD350AC86587E6D9925A6209587EF17967F200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000186a0") + task_bytes = bytes.fromhex("6A3B90F31FC36A592E67293D5D9359BADCD9B6E2B5E078B349B546A5AEE0904A0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000186a0") ids.tasks_bytes_len = len(task_bytes) segments.write_arg(ids.task_input, bytes_to_8_bytes_chunks_little(task_bytes)) %} @@ -344,7 +347,7 @@ namespace BlockSampledTaskMocker { let task = ComputationalTask( chain_id=0x1, hash=Uint256( - low=0xAE5641FEA9032C936D7E54D7CF36E2C3, high=0xA53CFAB970F9780B3C39CFAC1DD3D425 + low=0x18E95103512DFA47ABF4237FB5FBF673, high=0xE6FF175F1DAB2E8AC4315F634B27BE8E ), datalake_ptr=datalake_ptr, datalake_type=DatalakeType.BLOCK_SAMPLED, diff --git a/tests/cairo_programs/txs_in_block_datalake.cairo b/tests/cairo_programs/txs_in_block_datalake.cairo index 08d4f8d8..d511d4be 100644 --- a/tests/cairo_programs/txs_in_block_datalake.cairo +++ b/tests/cairo_programs/txs_in_block_datalake.cairo @@ -14,13 +14,14 @@ func main{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, keccak_ptr: KeccakBuilt %{ encoded_datalakes = [ - "000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000005595f50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005c0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020100000000000000000000000000000000000000000000000000000000000000", - "000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000005595f50000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000005c0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020104000000000000000000000000000000000000000000000000000000000000", - "000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000005595f50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000101010100000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020104000000000000000000000000000000000000000000000000000000000000" + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000AA36A700000000000000000000000000000000000000000000000000000000005595f50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005c0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020100000000000000000000000000000000000000000000000000000000000000", + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000AA36A700000000000000000000000000000000000000000000000000000000005595f50000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000005c0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020104000000000000000000000000000000000000000000000000000000000000", + "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000AA36A700000000000000000000000000000000000000000000000000000000005595f50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000101010100000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020104000000000000000000000000000000000000000000000000000000000000" ] expected_datalakes = [ { + "chain_id": 11155111, "target_block": 5608949, "start_index": 0, "end_index": 92, @@ -31,6 +32,7 @@ func main{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, keccak_ptr: KeccakBuilt }, { + "chain_id": 11155111, "target_block": 5608949, "start_index": 5, "end_index": 92, @@ -40,6 +42,7 @@ func main{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, keccak_ptr: KeccakBuilt "type": 1, }, { + "chain_id": 11155111, "target_block": 5608949, "start_index": 0, "end_index": 90, @@ -70,6 +73,7 @@ func eval{ } let (input_chunks) = alloc(); + local chain_id: felt; local input_bytes_len: felt; local target_block: felt; local start_index: felt; @@ -88,7 +92,7 @@ func eval{ input_chunks = bytes_to_8_bytes_chunks_little(input_bytes) segments.write_arg(ids.input_chunks, input_chunks) - + ids.chain_id = expected_datalakes[ids.index]["chain_id"] ids.target_block = expected_datalakes[ids.index]["target_block"] ids.start_index = expected_datalakes[ids.index]["start_index"] ids.end_index = expected_datalakes[ids.index]["end_index"] @@ -101,6 +105,7 @@ func eval{ input=input_chunks, input_bytes_len=input_bytes_len ); + assert result.chain_id = chain_id; assert result.target_block = target_block; assert result.start_index = start_index; assert result.end_index = end_index; diff --git a/tools/make/launch_cairo_files.py b/tools/make/launch_cairo_files.py index b251f915..9a73047e 100755 --- a/tools/make/launch_cairo_files.py +++ b/tools/make/launch_cairo_files.py @@ -177,8 +177,8 @@ def test(self): if test_file == "tests/cairo_programs/test_vectors.cairo": continue - if test_file != "tests/cairo_programs/aggregate_functions.cairo": - continue + # if test_file != "tests/cairo_programs/computational_task.cairo": + # continue self.filename_dot_cairo_path = test_file self.filename_dot_cairo = os.path.basename(test_file) From 2f6914618f916cd6f9d9888289fd117a6df26b5c Mon Sep 17 00:00:00 2001 From: Pia Date: Tue, 23 Jul 2024 16:58:21 +0200 Subject: [PATCH 44/73] rm temp --- src/temp.cairo | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 src/temp.cairo diff --git a/src/temp.cairo b/src/temp.cairo deleted file mode 100644 index e4cf20aa..00000000 --- a/src/temp.cairo +++ /dev/null @@ -1,22 +0,0 @@ -from starkware.cairo.common.cairo_builtins import BitwiseBuiltin, KeccakBuiltin -from starkware.cairo.common.alloc import alloc -from src.rlp import le_chunks_to_uint256 - -func main{output_ptr: felt*, range_check_ptr, bitwise_ptr: BitwiseBuiltin*}() { - alloc_locals; - - local program_hash: felt = 0xaf1333b8346c1ac941efe380f3122a71c1f7cbad19301543712e74f765bfca; - let (local inputs: felt*) = alloc(); - local inputs_len: felt = 3; - assert inputs[0] = 5186021; - assert inputs[1] = 5186024; - assert inputs[2] = 113007187165825507614120510246167695609561346261; - - local program_hash_bit_len; - %{ - program_hash_bit_len = len(hex(ids.program_hash)) * 4 - print(f"Program hash: {program_hash_bit_len}") - %} - - return (); -} From b05a6f3d01327e21f71e5ac90285c532d10bd173 Mon Sep 17 00:00:00 2001 From: Pia Date: Tue, 23 Jul 2024 17:27:13 +0200 Subject: [PATCH 45/73] ci: fixtures update --- tools/make/full_flow_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/make/full_flow_test.sh b/tools/make/full_flow_test.sh index 62cfbce1..5767abce 100755 --- a/tools/make/full_flow_test.sh +++ b/tools/make/full_flow_test.sh @@ -39,7 +39,7 @@ cairo-compile --cairo_path="packages/eth_essentials" "src/hdp.cairo" --output "b # Clone the repository if the directory doesn't exist if [ ! -d "hdp-test" ]; then - git clone https://github.com/HerodotusDev/hdp-test && cd hdp-test && cd .. + git clone https://github.com/HerodotusDev/hdp-test && git checkout v2-fix && cd hdp-test && cd .. fi echo "Starting tests..." From da78e4797912bba41954ca5e5454130688c05046 Mon Sep 17 00:00:00 2001 From: Pia Date: Tue, 23 Jul 2024 17:28:44 +0200 Subject: [PATCH 46/73] chore: format --- src/merkle.cairo | 2 +- src/module.cairo | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/merkle.cairo b/src/merkle.cairo index f96e443b..f71317f1 100644 --- a/src/merkle.cairo +++ b/src/merkle.cairo @@ -89,7 +89,7 @@ func compute_tasks_hash_v2{ let (task_hash: Uint256) = keccak(encoded_task, task_bytes_len); let (task_hash) = uint256_reverse_endian(task_hash); - %{ + %{ target_task_hash = hex(ids.task_hash.low + ids.task_hash.high*2**128)[2:] print(f"Task Hash: 0x{target_task_hash}") %} diff --git a/src/module.cairo b/src/module.cairo index 8bd3b01f..4b70f971 100644 --- a/src/module.cairo +++ b/src/module.cairo @@ -8,9 +8,9 @@ func init_module{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, keccak_ptr: KeccakBuiltin*, pow2_array: felt* }(input: felt*, input_bytes_len: felt) -> (res: ModuleTask) { alloc_locals; - let (program_hash, module_inputs_len) = extract_constant_params{range_check_ptr=range_check_ptr}( - input=input - ); + let (program_hash, module_inputs_len) = extract_constant_params{ + range_check_ptr=range_check_ptr + }(input=input); %{ print(f"module_inputs_len = {ids.module_inputs_len}") %} @@ -32,7 +32,9 @@ func init_module{ return ( res=ModuleTask( - program_hash=program_hash, module_inputs_len=module_inputs_len, module_inputs=module_inputs + program_hash=program_hash, + module_inputs_len=module_inputs_len, + module_inputs=module_inputs, ), ); } @@ -57,8 +59,10 @@ func extract_constant_params{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(inpu let (program_hash_high_first) = word_reverse_endian_64([input + 2]); let (program_hash_high_second) = word_reverse_endian_64([input + 3]); let program_hash_first = program_hash_low_first * 0x10000000000000000 + program_hash_low_second; - let program_hash_second = program_hash_high_first * 0x10000000000000000 + program_hash_high_second; - let program_hash = program_hash_first * 0x100000000000000000000000000000000 + program_hash_second; + let program_hash_second = program_hash_high_first * 0x10000000000000000 + + program_hash_high_second; + let program_hash = program_hash_first * 0x100000000000000000000000000000000 + + program_hash_second; // first 3 chunks of module_inputs_len should be 0 assert [input + 8] = 0x0; From dcbde1bab4e3c8811818851b92d1604881cb66c7 Mon Sep 17 00:00:00 2001 From: Pia Date: Tue, 23 Jul 2024 18:01:11 +0200 Subject: [PATCH 47/73] chore: ci --- tools/make/full_flow_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/make/full_flow_test.sh b/tools/make/full_flow_test.sh index 5767abce..70548cbb 100755 --- a/tools/make/full_flow_test.sh +++ b/tools/make/full_flow_test.sh @@ -39,7 +39,7 @@ cairo-compile --cairo_path="packages/eth_essentials" "src/hdp.cairo" --output "b # Clone the repository if the directory doesn't exist if [ ! -d "hdp-test" ]; then - git clone https://github.com/HerodotusDev/hdp-test && git checkout v2-fix && cd hdp-test && cd .. + git clone -b v2-fix https://github.com/HerodotusDev/hdp-test.git && cd hdp-test && cd .. fi echo "Starting tests..." From 81f48a53141dea4186d044c396bf57ad19fadd3e Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 24 Jul 2024 10:17:40 +0200 Subject: [PATCH 48/73] storage slot fixes --- .../memorizer/storage_memorizer.py | 15 +- src/hdp_input.json | 1469 ++++++++++++++--- src/module.cairo | 9 - 3 files changed, 1244 insertions(+), 249 deletions(-) diff --git a/packages/contract_bootloader/memorizer/storage_memorizer.py b/packages/contract_bootloader/memorizer/storage_memorizer.py index e6840f26..afcc7bd4 100644 --- a/packages/contract_bootloader/memorizer/storage_memorizer.py +++ b/packages/contract_bootloader/memorizer/storage_memorizer.py @@ -34,7 +34,16 @@ def from_int(cls, values: List[int]): raise ValueError( "MemorizerKey must be initialized with a list of five integers" ) - return cls(values[0], values[1], values[2], (values[3], values[4])) + if ( + values[3] >= 0x100000000000000000000000000000000 + or values[4] >= 0x100000000000000000000000000000000 + ): + raise ValueError("Storage slot value not u128") + storage_slot_low = values[3] % 0x100000000000000000000000000000000 + storage_slot_high = values[4] % 0x100000000000000000000000000000000 + return cls( + values[0], values[1], values[2], (storage_slot_low, storage_slot_high) + ) def derive(self) -> int: return poseidon_hash_many( @@ -47,11 +56,13 @@ def derive(self) -> int: ) def to_dict(self): + storage_slot_value = (self.storage_slot[1] << 128) + self.storage_slot[0] + return { "chain_id": self.chain_id, "block_number": self.block_number, "address": Web3.toChecksumAddress(f"0x{self.address:040x}"), - "storage_slot": self.storage_slot, + "storage_slot": f"0x{storage_slot_value:064x}", } @classmethod diff --git a/src/hdp_input.json b/src/hdp_input.json index e86d72e1..6fef4821 100644 --- a/src/hdp_input.json +++ b/src/hdp_input.json @@ -1,30 +1,25 @@ { "cairo_run_output_path": "cairo_run_output.json", - "task_root": "0x8097383b9c7188337a5705971bd0fde01944a1d3d71a5117a109c5fe4b364957", - "result_root": "0x22186d2b20a1eb397cfbf6afd9f7b1400bb57a270bb6e3910a335fbf0281efaa", + "task_root": "0xa1fe02798951073ee7d57c273387c02df51dfe541532d9180daac5c33b6a069b", + "result_root": "0x4635a83e4c920ccdd08740b76c62084b39d3de95417c24787b8abc2f42ed611f", "proofs": { "mmr_metas": [ { "id": 26, - "root": "0x1ef5f15d72aeca1a9b972a5345075bc71dececcc2b80977795fe326b373409b", - "size": 12713774, + "root": "0x0b9c920d48a198b8a2c696343bee0f56ce40620ddd57d3f3b8b7921fd47b056", + "size": 12721637, "peaks": [ "0x262c4c9b1cb2a036924aecf563dc9952e5f8b41004310adde86f22abb793eb1", "0x63e06c6dd962e6232140b8f20fc4972ee69ca29d1c6ca4455d80afd4be0f3de", - "0x5d9f3a811000d20c9f8d8a009c42c0e09d8851d7408cf51f895a4cc6c944fe2", - "0x7cfa034db84fe407a3716305cc6edc4f324fe6c58d8159c36ca5e98591a2f01", - "0x39d028c626a83c7959b8b13fee8900f6f1649f6a8d30af21f19a7feb2ae91f6", - "0x6090d83a827e322067762ce98e9f446963b67e6905ad77b73fd67e5cc3e0772", - "0x39ab5f2f251401f7fa51ad942785bd7d448a611c280a83cfa2f033d69536f75", - "0x2fb88bc05b349f7ee9bd5a0da6b13d2b424c2bc327da885d65764dc299737eb", - "0x6f66f43b00705e5183a4b2bae518f1efcd0c3d5bdbb3fbd94e85195836d0e5e", - "0x5453015740839bbbd6de557ade0785b90e3b19c1dd0844382e7705cdd1083a2", - "0x77407ac448a14e2746b0029bc01a860e6f9fae9d42a4343b8e04c020030347f", - "0x5e1e429f2a8973f3ca39c48297d5e1945d15308b13196241d66d75014cb4ba5", - "0x208d9c7280e2849e4f06643e33c9ec827662914bd6eed86415e429dcc0236b8", - "0x25f3138cc90bcf5cf0fe723ca4de019bbdb43c9982a10420304ac6b68715841", - "0x58f0411792e93f7cee724b26c3f1a1f15aaf42ba3cac1e171e9a28692213f34", - "0x37192494e7043e3cf055ae2948ac85515fa37dbcb699b309ccb5f1b069d0ddd" + "0x3d088c444fcc7a0083f3cb9d95d56975d22a8ac1171fcf5c0d8fa325fcff4db", + "0x1f297faba0cf7c895b45ef10ff35dbd402495cc24fba54f170a16e907998ee0", + "0x5c8062d5c24f6672d8cd92eb837dfdc3d7ee7e398ac35d9471ea286869c10b7", + "0x0851697f89e265f2e51e890e56841f5af5e9ec671d1c65d6b8441158ca8be58", + "0x2d9ace828120f65429e1055d614e2f5f786e78b726f6f0b74cbd2b7bda2940e", + "0x0c47c0dbba34883fbfeb0b15f181ef80376dfed21255c4310c455efd8226ecb", + "0x58178a512a59efefd2e39a5ac9809b083f8895e2c8ea7ad290cb6b40e491ae6", + "0x7252579c6db593316e636db1fed6cf3e31cbd3e45bf68cf78329d4116ca2334", + "0x09c8af73a1e68a49506421d70f899b7e2cbe581b9e317ff45d99b466bef1152" ], "chain_id": 11155111 } @@ -127,114 +122,732 @@ "0x4b0b0e53aca136814dcaf2d79ebba75442c985bfbf1568d459c520c14ca8f50", "0x6c95b5af56d209bed9b9ce01489fa1507aa30cf4f44159c8e2097ffbeaa8481", "0x1db820709ce34edcc67ebc93ff5253ba014c377aec7e07170e477daedbdea0f", - "0x0f5eba795c267135dfce63ee39c570c69385cfe529b8f0bbf2cc3878e68b722" + "0x0f5eba795c267135dfce63ee39c570c69385cfe529b8f0bbf2cc3878e68b722", + "0x67f480c8680c743260bc19f8e214120a47f9b926efae3529eca3eea0dc4f612", + "0x5d9f3a811000d20c9f8d8a009c42c0e09d8851d7408cf51f895a4cc6c944fe2" ] } - }, + } + ], + "accounts": [ { - "rlp": [ - "0x2a661c27a02302f9", - "0x55599ca3ef044c21", - "0x7f4f6425b632d127", - "0x3bd25b345f2626d7", - "0x4dcc1da00079af17", - "0xb585ab7a5dc7dee8", - "0x4512d31ad4ccb667", - "0x42a1f013748a941b", - "0x2638944793d440fd", - "0x19f1dc688dbd9c53", - "0x8c27b45745990be8", - "0x44ecee1ef0a09fec", - "0x31ef5fc8b35f9240", - "0x5cff3221a63c3ff9", - "0x3a1b50acab9f2849", - "0x7b399c9ea0c9300c", - "0x928ab55d3c647fd8", - "0x75a98e7503cfb543", - "0xad77b5f16bbe83fb", - "0x46332fa029c561eb", - "0x3235cf0e42cc5876", - "0xafa351e8b25fdefb", - "0xdc2a3effd032bc5d", - "0x1b9525359b820", - "0x894220490e02024e", - "0x4629522101940", - "0x4140010320402180", - "0x3002ba00680310c2", - "0x8907908001000040", - "0xd30004402c884faa", - "0x6003a010f3068880", - "0x800024a004983085", - "0x4052070801e408c0", - "0x30000080a004a40", - "0xf8420c0504184085", - "0x111008300004000", - "0x124240030a08a048", - "0x440b5006054201c4", - "0x30004086c1265900", - "0x140c3b0090c40401", - "0x441884101a202002", - "0xc078801820130030", - "0x4d2200922018904", - "0x4118404d80f01198", - "0x220444880500a96", - "0x284548340004038", - "0x40800020262003b", - "0x80b20005020490a4", - "0x200084302098083", - "0x140470b11212c00", - "0x110428032523000", - "0xc73002400ad1102", - "0x344921862c929198", - "0x400902102100820", - "0x8210b13046004", - "0x90a6080080302c0", - "0xc90184e7214f8380", - "0x84c2f66c018480c3", - "0x43e8a0802c4eb965", - "0xbe857c88f0776672", - "0xb0e4fb3cb43479f4", - "0xdf1c5b163586f8b7", - "0x88895e9a10b91e", - "0x8500000000000000", - "0x6d90a0275acc5501", - "0xa9a52bfadf2cd5ff", - "0xd313639d4cc9140b", - "0xece5fda22a1d5a16", - "0x39b6181c72ba" + "address": [ + "0xb03b023f8f622702", + "0xc97185527db680b9", + "0x1cac6d5c" ], - "rlp_bytes_len": 550, - "proof": { - "leaf_idx": 1521895, - "mmr_path": [ - "0x598955397f4891983bce4886d22fa19c0d22255f94bb8aaa1faa7aec92cfc7f", - "0x2f91fb12566af84978eb5b8694abba5b6d23d0c57ca791fd3bfd01ecd3a0c8c", - "0x3b508668f7d92d379884c79d9031878cbaeb3fa28f053f48b57a7502e45611c", - "0x6ae0557449080a7745c6ad43b21c6f6f57d452817b23b77b5c2ff3d8ccb3760", - "0x593ac29a8b112e2bd247cad0b7b016786ad04217bee18f5e0ea41127ba23f75", - "0x787989b47e298c397a0a6123049fb85d5bd2f962ed9149ee6df656dbc605dda", - "0x6984af357d277724980ece2c11e93d6b6e14200715769b3fd9cbc9a0eaf29c7", - "0x61bc1b0b3467541328174831626b59bcebaec7ef9fda196df6895acfaca4ace", - "0x4fa6272ed7dae6104f103fdec5b82c09f8006abfc9e8e9bc44cff298749599c", - "0x4c9f22576f8d894fd2f992221402ee2d0a703c35c9e1d114f31411b13246bfc", - "0x5b620a5f345977ec7fd3bdeba082078594768bc2fac155ba33b1eab8885a069", - "0x572b3407be5793b54c558f5a7d9d4fb194aea5b14f2b2b7e2c8f526cefbde18", - "0x716621bd5c6f555cca5badd2849633fea9f506876642b58f985f6ab1de6340c", - "0x019df1b143b7076f7c8db2d84794c5bf29be24dbcd64d6a7482c7ff5490486f", - "0x145418fa00ec0102943417073ea3015c793e55e1a11f303aef71a154b2d418c", - "0x164770888e7afc464c2c3a956cf13d2aaf4b5786baec8424357e46f8e1968b2", - "0x46034840abeb358ce87e74d2963f6fb9c655841b31df46eab6e2b784b35d82c", - "0x4b2dfec0bb9b57c4e7ac16cedcd3ff50f381f7ab2df50bcfa3596308f79135a", - "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", - "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", - "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", - "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" - ] - } + "account_key": "0x50ee74d58b1680106e4f72f69255189c429b3b932377a0c02b1f24f58fac96e9", + "proofs": [ + { + "block_number": 6338117, + "proof_bytes_len": [ + 532, + 532, + 532, + 532, + 532, + 500, + 83, + 106 + ], + "proof": [ + [ + "0x775ba442a01102f9", + "0xe0160490a8ea1104", + "0x105a9bdc2be00f63", + "0x44561c546a458aba", + "0x940953a061516b03", + "0x20237914f5c440e1", + "0x1c7dfced338e0e11", + "0xad169f0cfc5a98eb", + "0x3956a05932589c46", + "0xb6ac900d54826219", + "0x83f496e9f1b1834c", + "0x8984d89cc6129605", + "0x26a0d77d53cc03a8", + "0xc8621c18be1f77d2", + "0x4262ea69ac0e49b6", + "0xfd54cc4b5f0c7eee", + "0xa04aacf31dad9149", + "0xae60dd8d64b83212", + "0x4b47799ed84c1769", + "0xad4bb65bcfff658a", + "0x63a8a7229967bfd6", + "0x1cdb0c7fa56548a0", + "0x947a518df8da45d3", + "0x1d0d1f70b7591051", + "0xe6654b27e0ee37b4", + "0x58cb5fc046f0a0c1", + "0xf602a024090bae91", + "0x865f202b9ee9be7c", + "0x703d052209c7689f", + "0xdd99c9e1ea07de1", + "0x60ca7dbc1e574621", + "0xbb43323298cec7c8", + "0xfd6c52c2c1a71e7f", + "0x48651f24a083e543", + "0x677be111be8d4036", + "0x2bac8560b5be2b2c", + "0x5d8ddffc8accf35b", + "0x2c7007a07eb0439b", + "0xcf107f121c88d4b2", + "0xa8c3a7e46edf459a", + "0x3074ce8f9762f482", + "0x125aa06436da3172", + "0xbc3d781394f79b53", + "0xfe09e67c8e316740", + "0xb640bfea2fc6ce6f", + "0xe0a04fbfdf218696", + "0xdbbc759df98413d6", + "0xa2d306c9de3edab2", + "0x9641df32b4370ec7", + "0xa07bbbe43c384c0e", + "0xd15be1e6057a9b16", + "0xceedca89d383be62", + "0xe5263e0e01509e03", + "0xa304612ab2e14d7f", + "0xd1ef9edd3df373a0", + "0xeb5b63859d552d11", + "0x98d49c4be338f093", + "0x8f541e93b045a87c", + "0xdde20cd109ada013", + "0x270a31314e82ebcd", + "0x25c051a77d88d25", + "0x828207dcf8132193", + "0x759de46f21a07673", + "0x4d21fa98d4a88817", + "0x3ee4edf543c4905a", + "0x48544f7e42a0aeb3", + "0x803ed89a" + ], + [ + "0x1313c0cca01102f9", + "0x69ae815bd9ff857", + "0x399c5a98a953bece", + "0x47d5557c86e5f58f", + "0x55c7ffa0462d10a3", + "0xccb6ff5609e94629", + "0x55ed45cc7bb6420", + "0xca140807b1577937", + "0x4a41a0b6d3996c77", + "0xea000f43a0238702", + "0xfe17c542ee075f2d", + "0x7ce4160d83660ff8", + "0x86a008c8ee791cfa", + "0xeb7d8ce7664124a3", + "0x3d5e43ab6922a876", + "0x7e9dd4a7e895c72a", + "0xa0812355bd0050f8", + "0xdb7772353c65c41e", + "0xdde7d57bfbbfdfcc", + "0xf07934321237cc10", + "0x4d138aeb7d89ef81", + "0x673514350858f8a0", + "0x944d165c53cefe44", + "0x919e11ef725b22e4", + "0x8b4bba7e08ef7dc8", + "0x7d59da49cb29a046", + "0xb2d0ead8340e1c3f", + "0x21a19ae3ef64fc5a", + "0xd848bd20ffc3126f", + "0xba3b91ac12a09d7d", + "0x418d802ab3d3de1c", + "0x866bb929955ec114", + "0x223a58308946b6a9", + "0xfd75ad61a0889f71", + "0x3a7aec07f6b2f3ca", + "0xc01f41d66a671e29", + "0x1ecec4da0aeacc2f", + "0xcf7b6da0e9417fc3", + "0xa39fe59aeead76e8", + "0x82a2e703ba504bee", + "0x4aec30e8fc9ffc6b", + "0xbeeea0f6355570cc", + "0xd48f6bacffbd5ece", + "0x7c2712fd795a4491", + "0x183d34a926384955", + "0x10a0815d88f70b0b", + "0x9c4d39d583c23e2d", + "0x319dae52a44877b9", + "0xf5f72f84ea591b37", + "0xa0879dc3bca23c8c", + "0xeb3755a658b7d72", + "0x1730c06b185bad31", + "0x9c72a6a53f097fb9", + "0xcd80da41dbd824a9", + "0x5c83c4f5b88bdba0", + "0xb5792da85baf4f01", + "0x1cfafdafde3dc2a9", + "0x577e94497b7212b5", + "0x438078a0933da08f", + "0x6a5eed91dd3853b9", + "0xb09cf00f93aac9ee", + "0x1cc06f84d2ecddb8", + "0x47dea469fda09d4c", + "0x2b37d888a6c65ec5", + "0x2d7e5408cbcdebdf", + "0x1609687258c71db", + "0x80d70cab" + ], + [ + "0x1093517aa01102f9", + "0x458e76e15c2a20cb", + "0xaa294f272e9f666", + "0x988eda2d9ea7183e", + "0xb32616a0b360a04b", + "0x3c1a14de37987f65", + "0x86aa22f369833be5", + "0xe74365792fedbe84", + "0x1b56a08486ada4c5", + "0xb8fa25a9ba6deec", + "0xf480b0cdc580e26a", + "0xa2499c00471025d3", + "0x6ba06557c8310c19", + "0xd9541cb9f6d0ed6", + "0x8309c6e8cf56cb74", + "0x5fcb255422619e71", + "0xa02b27bb96c684fc", + "0xa07000e3961b58b1", + "0xccbb91b27bfa7b77", + "0x71fdf874fa0e04b2", + "0x799769f4b9be994c", + "0x31e2f652ecb09da0", + "0xdbafbcc5dfd094e7", + "0xea99afb244bf0d5b", + "0x982d57383e4d5d10", + "0x3eb78a503bc3a0a2", + "0x86e233aa9f8151b9", + "0xbae81716ca039bec", + "0xb572c81739ca30f3", + "0x8270dc2ed2a09386", + "0x4a36dd55468007fe", + "0x5da7df1cc8e1ad52", + "0xd40e3e1b6735f4c9", + "0x80038f06a0bf1b26", + "0x24d32a36ebbf8a1c", + "0x105a1f6394f85693", + "0x8fbe5a873fd349c4", + "0x7b3616a043cd9577", + "0xabd9cb1c1a2bf42d", + "0x2966bc02a631f4bd", + "0x263070144dcef14b", + "0xa564a06846db3c38", + "0x47613cff798155f3", + "0x6d879f02ce155954", + "0x32c3f53ed3c01c48", + "0xda0d336e71276e2", + "0xa1d56d16b22767d9", + "0xd0850abde400daff", + "0x143907c949930540", + "0xa06c0ff1510400a4", + "0x39ba272ad0174580", + "0x7c9f7eeb02daefc6", + "0xae50a56fa8ae8f64", + "0xa92e90acaa8fd45d", + "0x8a652103165c3a0", + "0xba33a45af753c767", + "0x341afed28697cc13", + "0x8cbdcd2849fa9068", + "0x548fafe513e3a095", + "0x6478823bf9481809", + "0xda9b54c12dace121", + "0xc15413c128aaa355", + "0x1b593954aa005b2", + "0x5bc6e1620c78daab", + "0xbe64fa51bfbb52c7", + "0x3f64057d3e48c143", + "0x802e5b70" + ], + [ + "0x18a3dbaea01102f9", + "0x1573d84bffec200f", + "0xb37098e6333b95f9", + "0x61aada02923fc2db", + "0x9407f2a0c1788091", + "0xa724928966ae0480", + "0x5057beff9eec299a", + "0xfc30e98dbf5125d5", + "0xa001a0c5871f9e7c", + "0x917641adb1ea545d", + "0x22f160abf90a00a7", + "0x992b10cfc1e09e4b", + "0x6da058b0b57ae6ed", + "0x2d402ac5f6219153", + "0x2f0f8297aff7e90f", + "0x31f600dc849b05c5", + "0xa030ea05a37d3d83", + "0x291ba11d04554eb9", + "0xdbee93f4177a28ed", + "0x6a8dd31e9a9df29", + "0x7cc85a4fd2513500", + "0xf227aa261bbd7fa0", + "0x5c4ba6a3bd8faee5", + "0x781b80acc434490a", + "0x124aa60f9edd7707", + "0xc22e23bbd79a080", + "0x88cc2429f10c1c19", + "0x873e87e202df6f2b", + "0x64cb54b269b5d252", + "0x4833e53573a0c298", + "0xbf5516c43280fd0d", + "0x4aff09f8b32c1e60", + "0x5e5e35c39205e845", + "0xb1e5e6a0fc2e12", + "0x53d3eb00317f438d", + "0x3538b9504871b3e2", + "0x4f553215f337ba45", + "0x872c8a050f5e686", + "0xde236c4a4c50b220", + "0x4f661e1ec853c210", + "0x3a105206a6d3bcd0", + "0xd067a078d267820b", + "0x4746371aa9b2c02d", + "0x70ecc492f075624e", + "0x60d385a1e38abdbe", + "0x11a0bd79e9bcd422", + "0xacffab650f2552d9", + "0xdfbf84d80bc078b4", + "0x2ee7164fca1783b2", + "0xa0a091db7b21237e", + "0xb5df38cb1eeb47c0", + "0x15020eecd9d6ed3f", + "0x6ad5eca3e3441fd5", + "0x734a8d740885ee2", + "0xa2bc88d692c69da0", + "0x3e5566cab26f9f74", + "0x1ae75f42d0529457", + "0xc94511e912963ca1", + "0x29bcdd85c9f5a016", + "0x583ad5059774d416", + "0xfdf00902d47bb3ac", + "0x72ef8fb7abb86f09", + "0xfe1c73bbbca0a922", + "0xb430e6990105c58c", + "0x47967ea17cf34c95", + "0xcb71d2bc87b1207b", + "0x80f79851" + ], + [ + "0x766d7664a01102f9", + "0x4bb578df5348a240", + "0x1496acc1829d2c79", + "0x991d29bb8852a31f", + "0x9f0e07a004c02e84", + "0x2595f20766e7f2ca", + "0x4ed6c6899bb85f6", + "0x6bf8cfdcc08579ac", + "0xc4aba045c6206e2e", + "0x8f1d2d469f0f7060", + "0xb89aab62ed8d97f0", + "0xe11d5463ad4d0dd9", + "0xe0a0e218411792d2", + "0x99af5d6abfc6e926", + "0x9096b6c801b954b0", + "0x1bb2fa25b202b43f", + "0xa06cf907ce6caa78", + "0xaf1bc7f1da22160c", + "0xe2bd67768cd09269", + "0xe9d628eebaa87ff6", + "0x1179f52222db3f1a", + "0x57f5195e27f5cba0", + "0xee37b00143af2011", + "0x6f7873c0eae655b2", + "0xba0a4565c9f53339", + "0x538be6018a9a05a", + "0xf4a37a13bf9c6736", + "0x9a754a3b842e6021", + "0x30d8bb952529baec", + "0x2529963f11a06f34", + "0xf840e969508c46f8", + "0x9f48bbc31f907926", + "0xc22aedb36d974907", + "0x2ddc0e91a0bed7f6", + "0x51446731f61d8736", + "0x97e08c5778bf670f", + "0xe4bd59000f2e9337", + "0xac16eba09ab8eed8", + "0x3187e2978ffca791", + "0xaff1848bb6093de7", + "0xdb7553cf13854a2b", + "0x69b9a0ec6e8b8ff9", + "0xe3b66ed44e6a5cbd", + "0xe48e026197b53244", + "0xc3bab213ab3e95f5", + "0x96a07fbc2206bc95", + "0x2e212363a99927c9", + "0xe11d2c546435c785", + "0x8cffad1da3610dd7", + "0xa07b6e94f33d36db", + "0xc40f2936267b28e6", + "0x66fdf54e150850f4", + "0x7189047ecceb9a13", + "0xb062d3c893308d8d", + "0xa747850a873d71a0", + "0xa12db24f076c7d29", + "0x5f22dd6def3cfaf5", + "0xf5746cc371f7eeb1", + "0xd8364d0074f8a03c", + "0x5a00914bd289d193", + "0x8ecb693da9d78dfa", + "0x8e5669988f5b579f", + "0xaea7a07cffa0a679", + "0x6d139309a91dd68c", + "0xc68975628c5aa7bd", + "0x8f65b58d938d9041", + "0x804def37" + ], + [ + "0x38b6e9c9a0f101f9", + "0x1da861a0324b3ceb", + "0xaaa864d2fea69f3f", + "0x96122fcdd06064a6", + "0x31d825a020d1984b", + "0x3b3799d6becab808", + "0x1d4641115fd13e0d", + "0xd9ed8621e406a852", + "0x5a6aa06c4387641e", + "0xe86af7a5b31ec4f4", + "0x521e7d597300aabb", + "0x12c65ec4c26d12c4", + "0x9da061c35622ee1e", + "0xcf504eb3b252486c", + "0x325b221e976e2b0d", + "0xf1d318dd1b0c9d83", + "0xa05be77f4979091e", + "0x10ea5bccbbf278a8", + "0xf4e2985548d6c53b", + "0x4aeb06ca40499f82", + "0x8382d52d023a290d", + "0xd2ae0c6f68fccca0", + "0x9f27dbab0a08e5c2", + "0x8cba2a0859fb9304", + "0xd3b3f27b3bfe8017", + "0x6935cec01fefa0fc", + "0xd66c514b8498b72", + "0xe2aee099c0c0ef08", + "0xd677ff9d19549673", + "0xa6b7112084a0c4a5", + "0x1b92438d0cd09d1e", + "0xe0dcf69b84ce59c4", + "0x2fe26709ac8b9abb", + "0x43182bdaa0e6964a", + "0x74fdebc59202ade9", + "0x26812d9b8ed7485", + "0x4cf048069ca9b65d", + "0xa510f7a02c0c2530", + "0x765a5c2d2ee5d399", + "0x85b2c07f53660a07", + "0x6c4cb4912f3b4d3", + "0x40a08070ac94b76f", + "0x3449a2d6d027fa53", + "0x5ba9b66406408596", + "0x8fc11e5709175170", + "0xa002b4b4ea78d044", + "0x3c311795d74a66a6", + "0xce652385e77a6720", + "0x510e8301367bd611", + "0xd8302ba8f10714f9", + "0xd7cbc70db5963ca0", + "0x5fa462e35bcc9964", + "0x6881038e95c4d829", + "0xbc39c4f408a80c47", + "0x1de045c4cfa1a0ee", + "0x8f181ac5b205c349", + "0xce31916e336d8af2", + "0x7749885aa2341d6", + "0xf9f9e011ba0a6aa", + "0xb7fbfdddc8a28dde", + "0x50f8e26c63d95848", + "0x4b6a022c076c4dbb", + "0x8006370f" + ], + [ + "0x80808080808051f8", + "0xffa0808080808080", + "0x73ccf6e45e051c18", + "0x4c1b679571493edc", + "0xee58ad9c69c9ed38", + "0xa0a3a9318d2e27ba", + "0x8d5e5872d6132e33", + "0x952b38bccde59661", + "0xf466e84d1d8cff3a", + "0x1ba179572285be63", + "0x808080" + ], + [ + "0x1080168b359d68f8", + "0x9c185592f6724f6e", + "0xc0a07723933b9b42", + "0xe996ac8ff5241f2b", + "0x8086298246f848b8", + "0xda91a3a55a6700a0", + "0xbb873a54274cf45a", + "0x5e8794b83bac712c", + "0x302869fbb5ce5c5a", + "0x881feaafb5aca076", + "0xad5803d3ad9f2377", + "0x7501b84f9d2f3fd1", + "0x229522396d682c40", + "0xef4f" + ] + ] + } + ] + } + ], + "storages": [ + { + "address": [ + "0xb03b023f8f622702", + "0xc97185527db680b9", + "0x1cac6d5c" + ], + "slot": [ + "0x0", + "0x0", + "0x0", + "0x0" + ], + "storage_key": "0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563", + "proofs": [ + { + "block_number": 6338117, + "proof_bytes_len": [ + 532, + 532, + 500, + 147 + ], + "proof": [ + [ + "0x2060ea93a01102f9", + "0x3be7f67586917fc", + "0xf46797be33dd920", + "0x46f71327f4f7e93c", + "0xfee6da050dcb8e7", + "0xd1ebbf7239990d5a", + "0x16fd2bcfa0aac8ea", + "0xefa121ff692b42ee", + "0x69f5a0683eb612fd", + "0x4040958e09534fc7", + "0x7d002058b405dd8d", + "0x83b8e1f1ab919db9", + "0xc9a0d08159d00ffa", + "0x9b4c7ed0d9f6b06e", + "0xe362e70298fad1bf", + "0x73ce74d623dfa263", + "0xa0b2afe3f0566f50", + "0xf6f3feb54e7526e", + "0x135f45b8eda2acd0", + "0xce4f4504eda00b63", + "0x49d14ea9d1ff66b7", + "0xaa380ff695b2f1a0", + "0xf8b67484573ed5b8", + "0xba64afdd82bf5725", + "0x10bebe9ad6573e23", + "0xfa1ae3dcff94a0c3", + "0xca46061b183cdb3c", + "0xb01531b2f63f36fb", + "0xa7c1e905d477863b", + "0xb669f67101a08af5", + "0xffaa0b61469e111d", + "0x64f0bc5fa1af3e7", + "0xf69830a4517c9357", + "0x4e6c5298a0ffb73c", + "0x791de9ed5cefb79a", + "0xa8d00e27ec5d7b29", + "0xb3097a821c063163", + "0x36aefda0337906d7", + "0x450c66c3282299d0", + "0x86f58840cf5ceb5", + "0x891549c7e37ec336", + "0x6f83a0d44026c84e", + "0x1549bf2ec9508e57", + "0xb9f8d2b471a7f725", + "0xca5cc00b13f868e8", + "0xa5a0527b2261a914", + "0x43353fdc22a21458", + "0x72639263096b018", + "0xce38b9d316c63618", + "0xa0c55adafa1bf0b2", + "0x13f5409406502aa8", + "0x3547d43b6c7a18e7", + "0xa33e53c054b3c5be", + "0x954e511b735b7ad5", + "0x2f4b7afef2d6c5a0", + "0x7e235d766514824d", + "0xe42e83f68308d53f", + "0x5634980d762c797a", + "0x2a4406830df1a02e", + "0xbc13356e4bca5eb1", + "0x61aaf29b6de61e8a", + "0x8580333094a4fa7e", + "0x7440e98d25a040c9", + "0x5789e53a75b212ca", + "0xbe4651f69bb2c72", + "0x43c57bac6c6538b8", + "0x806495ce" + ], + [ + "0xc7ee5240a01102f9", + "0xd2a6510b738fa8bb", + "0x31220ea6b6e73676", + "0xbd341fedd7b75e9b", + "0x7cf045a0a478a1b7", + "0x55d215a9f9b05f3a", + "0xf7cc9ed1d74128cc", + "0xf2d3b26b0f960913", + "0x1f82a01613a97459", + "0x8904a8b444b71538", + "0x9deaa08374c24f4", + "0x6b64cf3c64b72c9", + "0x51a01080276662f7", + "0x69bd43ad0e38ea8b", + "0xffa78de704dba38a", + "0x25f681dc3bc365b2", + "0xa0db077017b6b037", + "0x5e08eec8de4466cb", + "0xc474e25b50e48a59", + "0x4a953fa367f95177", + "0x1c0338f06faba066", + "0xa2aa344eb7b611a0", + "0x7f8143a54e918366", + "0xad9675a92b65ece7", + "0x82fa947396a7d94f", + "0x5fdfe0822589a0b3", + "0x6bd4848a25786ef2", + "0x6daf8aad0c4c82ab", + "0x822a8f2a7f9dbd48", + "0x24f97730f8a0b267", + "0xe272e46930191c60", + "0x6250609f00f55929", + "0x29a99af425fee750", + "0x33cbf00fa01c41c6", + "0x1bf464c4476be93d", + "0xb890def59ec6d823", + "0x9882b92e72299137", + "0x897d31a07b6f6aea", + "0x2a8193a611b72714", + "0xaee41fe93c950349", + "0x54a3b8ed8ec43569", + "0x580ba03f0b5099a4", + "0xdb10feb3640e5571", + "0xb5bcb2940c9a65d0", + "0x648105a2bc090fb8", + "0xe9a0a8a688d8ab79", + "0xf59ab08e86130e12", + "0x884b0b1e544df7d7", + "0x31eb1778ad3f8cda", + "0xa0bffce0abcb3a94", + "0xa79159181c75e5f4", + "0xf763687b003d988e", + "0xe517a2e76e3dec7", + "0x364e085fe5924aaf", + "0xe3caa2516efeeea0", + "0x75bac5dd883321f", + "0x33812188e83b0fe", + "0x5bf1daa8fca65c90", + "0xee7cd9183f71a00a", + "0x531f6e3590764cdf", + "0xa68a959a1398c556", + "0x626240f3c329a6", + "0x32c98156e5a06941", + "0x1cf8f402f91a051f", + "0xc96a1a7c5b7c6ba3", + "0xffd37d295bd06cf1", + "0x80d0f029" + ], + [ + "0xb0090e14a0f101f9", + "0x8f4f3601c57db51d", + "0x2330a1b616e07fca", + "0x29e6276ddca8d93b", + "0xb1daa7a094a8303c", + "0xd335409df926410", + "0x94d08c3379d5f194", + "0x2e5af25e61ccb3f7", + "0xea080f014697278", + "0x848bdbb92fa70464", + "0xfc3f023463ef171d", + "0x6949fa841e60d373", + "0xa054ed12f34b0c0d", + "0x4c90601d8870f79e", + "0xb868cb6b268ee68c", + "0xb2214ca7d43cedbe", + "0xc8e3dd13cac9302a", + "0xe01e4a4a685dc9a0", + "0xecc9a83921e96a40", + "0x3ef7a16cfcf2465", + "0x9d0a845bda5f497f", + "0xde7146af1562a0ae", + "0x6bcc91f68d5ee908", + "0x29e37aee0c193add", + "0x81b8d263105dfee8", + "0x84ac93edbba0e1a5", + "0xb8d7905d10654ce0", + "0xed61dc06ff6e0045", + "0xe1d5148b24a7fd0", + "0x4eb6ddb3a042c112", + "0x4d29e48b191d4983", + "0xa516a035d2f9fc42", + "0x30b7b168334b9fc5", + "0x241baba0dd5dca13", + "0x5da1537d11d6d019", + "0x8c867cbf22aed0d2", + "0x978eb915d5333bbc", + "0x536ea066c26ffd90", + "0x9f6a47f4a1966d46", + "0x1cd65b45fbce8f95", + "0x63ac4d120aa8c020", + "0x97a0822d2ef59cfb", + "0x9ba50c3cfab23636", + "0xd3c4ec5917e0c128", + "0x3154a942345373ce", + "0xa06a45675079a0a2", + "0x3507decd13cf5aab", + "0xd01448b889dffa31", + "0xff0ac5775df90b22", + "0x3716a904d060adb7", + "0xa8cb93fb9ccc14a0", + "0xacf20453cf33071f", + "0x1baea1d6c59061f0", + "0xb454462fd379615d", + "0x951215dba51da057", + "0x25944b281dc11170", + "0x8d977364520f6260", + "0x41643220d7cbb5ff", + "0xb5a4cd2d60a0cfa8", + "0x31805288a5418e79", + "0xa00aaf997178a8", + "0xe538c6719fb34ba", + "0x80bc6ef9" + ], + [ + "0x361ebb55a08091f8", + "0xaaab6bec037b239f", + "0x80ee6263fe78c3ef", + "0xb0696b0983aeda52", + "0x851deaa02192db5c", + "0xd1dd1396759271b1", + "0x6a7fa9ae22eedebd", + "0xf8e56a5e7651c2e6", + "0x93a080445ea7bf78", + "0x588359fe93e47421", + "0x1869284a4e20b7ab", + "0x378b7e860a6f2ff7", + "0x80ad15263cc3e4ed", + "0x8680f38aba08080", + "0xfb671b4ef6a097f7", + "0x2804679b48710bb5", + "0x42fb5001db6b4438", + "0x8080808080945d41", + "0x808080" + ] + ] + } + ] } ], - "accounts": [], - "storages": [], "transactions": [], "transaction_receipts": [] }, @@ -242,32 +855,59 @@ { "type": "module", "context": { - "inputs": [ - "0x60b645" + "encoded_task": [ + "0xb3424e2f215f3e02", + "0xfb8dd84559b80524", + "0xbcbe5767b92e9c31", + "0x3450de4f93196035", + "0x0", + "0x0", + "0x0", + "0x4000000000000000", + "0x0", + "0x0", + "0x0", + "0x400000000000000", + "0x0", + "0x0", + "0x0", + "0x45b6600000000000", + "0x0", + "0x8f62270200000000", + "0x7db680b9b03b023f", + "0x1cac6d5cc9718552", + "0x0", + "0x0", + "0x0", + "0x0", + "0x0", + "0x0", + "0x0", + "0x0" ], - "task_bytes_len": 192, + "task_bytes_len": 224, "module_class": { "prime": "0x800000000000011000000000000000000000000000000000000000000000001", - "compiler_version": "2.6.4", + "compiler_version": "2.6.3", "bytecode": [ "0xa0680017fff8000", "0x7", "0x482680017ffa8000", - "0xfffffffffffffffffffffffffffff650", + "0xffffffffffffffffffffffffffffe214", "0x400280007ff97fff", "0x10780017fff7fff", - "0xb3", + "0x173", "0x4825800180007ffa", - "0x9b0", + "0x1dec", "0x400280007ff97fff", "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0xbb", + "0x17b", "0x482680017ff98000", "0x1", "0x20680017fff7ff8", - "0x9a", + "0x15a", "0x48307ff680007ff7", "0x20680017fff7fff", "0x4", @@ -288,7 +928,7 @@ "0x480680017fff8000", "0x0", "0x20680017fff7ffe", - "0x74", + "0x134", "0x480080007fff8000", "0xa0680017fff8000", "0x12", @@ -305,7 +945,7 @@ "0x402480017fff7ffb", "0xffffffffffffffffffffffffffffffff", "0x20680017fff7fff", - "0x5f", + "0x11f", "0x402780017fff7fff", "0x1", "0x400080007ff87ffe", @@ -318,14 +958,175 @@ "0x20680017fff7fff", "0x4", "0x10780017fff7fff", + "0xa", + "0x482480017ff78000", + "0x1", + "0x48127ff77fff8000", + "0x480680017fff8000", + "0x0", + "0x480080007ff48000", + "0x10780017fff7fff", + "0x8", + "0x48127ff77fff8000", + "0x48127ff77fff8000", + "0x480680017fff8000", + "0x1", + "0x480680017fff8000", + "0x0", + "0x20680017fff7ffe", + "0xf4", + "0x48307ffc80007ffd", + "0x20680017fff7fff", + "0x4", + "0x10780017fff7fff", + "0xa", + "0x482480017ffb8000", + "0x1", + "0x48127ffb7fff8000", + "0x480680017fff8000", + "0x0", + "0x48127ff87fff8000", + "0x10780017fff7fff", + "0x8", + "0x48127ffb7fff8000", + "0x48127ffb7fff8000", + "0x480680017fff8000", + "0x1", + "0x480680017fff8000", + "0x0", + "0x20680017fff7ffe", + "0x6c", + "0x480080007fff8000", + "0xa0680017fff8000", + "0x16", + "0x480080007ff38003", + "0x480080017ff28003", + "0x4844800180017ffe", + "0x100000000000000000000000000000000", + "0x483080017ffd7ffb", + "0x482480017fff7ffd", + "0x800000000000010fffffffffffffffff7ffffffffffffef0000000000000001", + "0x20680017fff7ffc", + "0x6", + "0x402480017fff7ffd", + "0xffffffffffffffffffffffffffffffff", + "0x10780017fff7fff", + "0x4", + "0x402480017ffe7ffd", + "0xf7ffffffffffffef0000000000000000", + "0x400080027fee7ffd", + "0x20680017fff7ffe", + "0x51", + "0x402780017fff7fff", + "0x1", + "0x400080007ff37ffe", + "0x482480017ff38000", + "0x1", + "0x48307ff980007ffa", + "0x20680017fff7fff", + "0x4", + "0x10780017fff7fff", + "0xa", + "0x482480017ff88000", + "0x1", + "0x48127ff87fff8000", + "0x480680017fff8000", + "0x0", + "0x48127ff57fff8000", + "0x10780017fff7fff", + "0x8", + "0x48127ff87fff8000", + "0x48127ff87fff8000", + "0x480680017fff8000", + "0x1", + "0x480680017fff8000", + "0x0", + "0x20680017fff7ffe", + "0x2a", + "0x480080007fff8000", + "0xa0680017fff8000", + "0x16", + "0x480080007ff88003", + "0x480080017ff78003", + "0x4844800180017ffe", + "0x100000000000000000000000000000000", + "0x483080017ffd7ffb", + "0x482480017fff7ffd", + "0x800000000000010fffffffffffffffff7ffffffffffffef0000000000000001", + "0x20680017fff7ffc", + "0x6", + "0x402480017fff7ffd", + "0xffffffffffffffffffffffffffffffff", + "0x10780017fff7fff", + "0x4", + "0x402480017ffe7ffd", + "0xf7ffffffffffffef0000000000000000", + "0x400080027ff37ffd", + "0x20680017fff7ffe", + "0x11", + "0x402780017fff7fff", + "0x1", + "0x400080007ff87ffe", + "0x40780017fff7fff", + "0x5", + "0x482480017ff38000", + "0x1", + "0x48127ff47fff8000", + "0x48127ff47fff8000", + "0x480680017fff8000", + "0x0", + "0x48127fed7fff8000", + "0x48127ff47fff8000", + "0x10780017fff7fff", + "0x24", + "0x482480017ff38000", + "0x3", + "0x10780017fff7fff", + "0x5", + "0x40780017fff7fff", + "0x7", + "0x48127ff37fff8000", + "0x48127ff47fff8000", + "0x48127ff47fff8000", + "0x480680017fff8000", + "0x1", + "0x480680017fff8000", + "0x0", + "0x480680017fff8000", + "0x0", + "0x10780017fff7fff", + "0x13", + "0x40780017fff7fff", + "0x8", + "0x482480017fe68000", + "0x3", + "0x10780017fff7fff", + "0x5", + "0x40780017fff7fff", + "0xf", + "0x48127fe67fff8000", + "0x48127fec7fff8000", + "0x48127fec7fff8000", + "0x480680017fff8000", + "0x1", + "0x480680017fff8000", + "0x0", + "0x480680017fff8000", + "0x0", + "0x20680017fff7ffd", + "0x5a", + "0x48307ffb80007ffc", + "0x20680017fff7fff", + "0x4", + "0x10780017fff7fff", "0x10", "0x40780017fff7fff", "0x1", "0x480680017fff8000", "0x496e70757420746f6f206c6f6e6720666f7220617267756d656e7473", "0x400080007ffe7fff", - "0x48127ffc7fff8000", - "0x48127fb77fff8000", + "0x48127ff77fff8000", + "0x48127f987fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -334,33 +1135,36 @@ "0x1", "0x208b7fff7fff7ffe", "0x1104800180018000", - "0x27a", + "0x29c", "0x482480017fff8000", - "0x279", + "0x29b", "0x480080007fff8000", "0xa0680017fff8000", "0x9", - "0x4824800180007fb5", - "0x47fe", + "0x4824800180007f96", + "0x4a56", "0x482480017fff8000", "0x100000000000000000000000000000000", - "0x400080007ff77fff", + "0x400080007ff27fff", "0x10780017fff7fff", - "0x27", - "0x4824800180007fb5", - "0x47fe", - "0x400080007ff87fff", - "0x482480017ff88000", + "0x2a", + "0x4824800180007f96", + "0x4a56", + "0x400080007ff37fff", + "0x482480017ff38000", "0x1", "0x48127ffe7fff8000", "0x480a7ffb7fff8000", - "0x48127fe67fff8000", - "0x48127fe67fff8000", + "0x48127fcb7fff8000", + "0x48127fcb7fff8000", "0x480680017fff8000", "0xaa36a7", + "0x48127fd07fff8000", + "0x48127fd77fff8000", + "0x48127fef7fff8000", "0x48127fef7fff8000", "0x1104800180018000", - "0x174", + "0x190", "0x20680017fff7ffd", "0xf", "0x40780017fff7fff", @@ -389,9 +1193,37 @@ "0x480680017fff8000", "0x4f7574206f6620676173", "0x400080007ffe7fff", - "0x482480017ff58000", + "0x482480017ff08000", + "0x1", + "0x48127f917fff8000", + "0x480a7ffb7fff8000", + "0x480680017fff8000", + "0x1", + "0x48127ffa7fff8000", + "0x482480017ff98000", "0x1", - "0x48127fb07fff8000", + "0x208b7fff7fff7ffe", + "0x40780017fff7fff", + "0x1", + "0x480680017fff8000", + "0x4661696c656420746f20646573657269616c697a6520706172616d202334", + "0x400080007ffe7fff", + "0x48127ff87fff8000", + "0x48127f997fff8000", + "0x480a7ffb7fff8000", + "0x480680017fff8000", + "0x1", + "0x48127ffa7fff8000", + "0x482480017ff98000", + "0x1", + "0x208b7fff7fff7ffe", + "0x40780017fff7fff", + "0x1", + "0x480680017fff8000", + "0x4661696c656420746f20646573657269616c697a6520706172616d202333", + "0x400080007ffe7fff", + "0x48127ff87fff8000", + "0x48127fb37fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -732,7 +1564,7 @@ "0x0", "0x208b7fff7fff7ffe", "0x480680017fff8000", - "0x0", + "0x2", "0xa0680017fff8004", "0xe", "0x4824800180047ffe", @@ -740,54 +1572,57 @@ "0x484480017ffe8000", "0x110000000000000000", "0x48307ffe7fff8002", - "0x480280007ff77ffc", - "0x480280017ff77ffc", + "0x480280007ff47ffc", + "0x480280017ff47ffc", "0x402480017ffb7ffd", "0xffffffffffffffeeffffffffffffffff", - "0x400280027ff77ffd", + "0x400280027ff47ffd", "0x10780017fff7fff", - "0xcd", + "0xd0", "0x484480017fff8001", "0x8000000000000000000000000000000", "0x48307fff80007ffd", - "0x480280007ff77ffd", - "0x480280017ff77ffd", + "0x480280007ff47ffd", + "0x480280017ff47ffd", "0x402480017ffc7ffe", "0xf8000000000000000000000000000000", - "0x400280027ff77ffe", + "0x400280027ff47ffe", "0x40780017fff7fff", "0x1", - "0x400180007fff7ffa", - "0x400180017fff7ffb", - "0x400180027fff7ffc", - "0x400180037fff7ffd", + "0x400180007fff7ff7", + "0x400180017fff7ff8", + "0x400180027fff7ff9", + "0x400180037fff7ffa", + "0x400180047fff7ffb", + "0x400180057fff7ffc", + "0x400180067fff7ffd", "0x480680017fff8000", - "0x5", + "0x0", "0x48127ffe7fff8000", "0x482480017ffd8000", - "0x4", - "0x482680017ff78000", + "0x7", + "0x482680017ff48000", "0x3", "0x480680017fff8000", "0x43616c6c436f6e7472616374", - "0x400280007ff97fff", - "0x400380017ff97ff8", - "0x400280027ff97ff4", - "0x400280037ff97ffb", - "0x400280047ff97ffc", - "0x400280057ff97ffd", - "0x480280077ff98000", + "0x400280007ff67fff", + "0x400380017ff67ff5", + "0x400280027ff67ff4", + "0x400280037ff67ffb", + "0x400280047ff67ffc", + "0x400280057ff67ffd", + "0x480280077ff68000", "0x20680017fff7fff", "0xa2", - "0x480280087ff98000", - "0x480280097ff98000", + "0x480280087ff68000", + "0x480280097ff68000", "0x480680017fff8000", "0x0", - "0x480280067ff98000", - "0x482680017ff98000", + "0x480280067ff68000", + "0x482680017ff68000", "0xa", - "0x480280087ff98000", - "0x480280097ff98000", + "0x480280087ff68000", + "0x480280097ff68000", "0x48307ff980007ffa", "0xa0680017fff8000", "0x6", @@ -942,13 +1777,13 @@ "0x40780017fff7fff", "0x1d", "0x48127fe07fff8000", - "0x480280067ff98000", - "0x482680017ff98000", + "0x480280067ff68000", + "0x482680017ff68000", "0xa", "0x480680017fff8000", "0x1", - "0x480280087ff98000", - "0x480280097ff98000", + "0x480280087ff68000", + "0x480280097ff68000", "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0x21", @@ -957,10 +1792,10 @@ "0x480680017fff8000", "0x4f7074696f6e3a3a756e77726170206661696c65642e", "0x400080007ffe7fff", - "0x482680017ff78000", + "0x482680017ff48000", "0x3", - "0x480a7ff87fff8000", - "0x480a7ff97fff8000", + "0x480a7ff57fff8000", + "0x480a7ff67fff8000", "0x480680017fff8000", "0x1", "0x48127ffa7fff8000", @@ -969,9 +1804,9 @@ "0x208b7fff7fff7ffe" ], "bytecode_segment_lengths": [ - 199, + 391, 282, - 236 + 239 ], "hints": [ [ @@ -980,7 +1815,7 @@ { "TestLessThanOrEqual": { "lhs": { - "Immediate": "0x9b0" + "Immediate": "0x1dec" }, "rhs": { "Deref": { @@ -1054,7 +1889,103 @@ ] ], [ - 69, + 107, + [ + { + "TestLessThan": { + "lhs": { + "Deref": { + "register": "AP", + "offset": -1 + } + }, + "rhs": { + "Immediate": "0x100000000000000000000000000000000" + }, + "dst": { + "register": "AP", + "offset": 0 + } + } + } + ] + ], + [ + 109, + [ + { + "DivMod": { + "lhs": { + "Deref": { + "register": "AP", + "offset": -2 + } + }, + "rhs": { + "Immediate": "0x100000000000000000000000000000000" + }, + "quotient": { + "register": "AP", + "offset": 3 + }, + "remainder": { + "register": "AP", + "offset": 4 + } + } + } + ] + ], + [ + 154, + [ + { + "TestLessThan": { + "lhs": { + "Deref": { + "register": "AP", + "offset": -1 + } + }, + "rhs": { + "Immediate": "0x100000000000000000000000000000000" + }, + "dst": { + "register": "AP", + "offset": 0 + } + } + } + ] + ], + [ + 156, + [ + { + "DivMod": { + "lhs": { + "Deref": { + "register": "AP", + "offset": -2 + } + }, + "rhs": { + "Immediate": "0x100000000000000000000000000000000" + }, + "quotient": { + "register": "AP", + "offset": 3 + }, + "remainder": { + "register": "AP", + "offset": 4 + } + } + } + ] + ], + [ + 230, [ { "AllocSegment": { @@ -1067,17 +1998,17 @@ ] ], [ - 88, + 249, [ { "TestLessThanOrEqual": { "lhs": { - "Immediate": "0x47fe" + "Immediate": "0x4a56" }, "rhs": { "Deref": { "register": "AP", - "offset": -74 + "offset": -105 } }, "dst": { @@ -1089,7 +2020,7 @@ ] ], [ - 113, + 277, [ { "AllocSegment": { @@ -1102,7 +2033,7 @@ ] ], [ - 134, + 298, [ { "AllocSegment": { @@ -1115,7 +2046,33 @@ ] ], [ - 156, + 313, + [ + { + "AllocSegment": { + "dst": { + "register": "AP", + "offset": 0 + } + } + } + ] + ], + [ + 327, + [ + { + "AllocSegment": { + "dst": { + "register": "AP", + "offset": 0 + } + } + } + ] + ], + [ + 348, [ { "AllocSegment": { @@ -1128,7 +2085,7 @@ ] ], [ - 170, + 362, [ { "AllocSegment": { @@ -1141,7 +2098,7 @@ ] ], [ - 184, + 376, [ { "AllocSegment": { @@ -1154,7 +2111,7 @@ ] ], [ - 483, + 675, [ { "TestLessThan": { @@ -1176,7 +2133,7 @@ ] ], [ - 487, + 679, [ { "LinearSplit": { @@ -1205,7 +2162,7 @@ ] ], [ - 497, + 689, [ { "LinearSplit": { @@ -1234,7 +2191,7 @@ ] ], [ - 505, + 697, [ { "AllocSegment": { @@ -1247,14 +2204,14 @@ ] ], [ - 526, + 721, [ { "SystemCall": { "system": { "Deref": { "register": "FP", - "offset": -7 + "offset": -10 } } } @@ -1262,7 +2219,7 @@ ] ], [ - 539, + 734, [ { "TestLessThan": { @@ -1287,7 +2244,7 @@ ] ], [ - 551, + 746, [ { "TestLessThan": { @@ -1309,7 +2266,7 @@ ] ], [ - 553, + 748, [ { "DivMod": { @@ -1335,7 +2292,7 @@ ] ], [ - 577, + 772, [ { "TestLessThan": { @@ -1360,7 +2317,7 @@ ] ], [ - 589, + 784, [ { "TestLessThan": { @@ -1382,7 +2339,7 @@ ] ], [ - 591, + 786, [ { "DivMod": { @@ -1408,7 +2365,7 @@ ] ], [ - 623, + 818, [ { "AllocSegment": { @@ -1421,7 +2378,7 @@ ] ], [ - 640, + 835, [ { "AllocSegment": { @@ -1434,7 +2391,7 @@ ] ], [ - 657, + 852, [ { "AllocSegment": { @@ -1447,7 +2404,7 @@ ] ], [ - 674, + 869, [ { "AllocSegment": { @@ -1460,7 +2417,7 @@ ] ], [ - 702, + 897, [ { "AllocSegment": { @@ -1477,7 +2434,7 @@ [ 0, [ - "memory[ap + 0] = 2480 <= memory[fp + -6]" + "memory[ap + 0] = 7660 <= memory[fp + -6]" ] ], [ @@ -1493,139 +2450,175 @@ ] ], [ - 69, + 107, + [ + "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" + ] + ], + [ + 109, + [ + "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" + ] + ], + [ + 154, + [ + "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" + ] + ], + [ + 156, + [ + "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" + ] + ], + [ + 230, [ "memory[ap + 0] = segments.add()" ] ], [ - 88, + 249, [ - "memory[ap + 0] = 18430 <= memory[ap + -74]" + "memory[ap + 0] = 19030 <= memory[ap + -105]" ] ], [ - 113, + 277, [ "memory[ap + 0] = segments.add()" ] ], [ - 134, + 298, [ "memory[ap + 0] = segments.add()" ] ], [ - 156, + 313, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 327, + [ + "memory[ap + 0] = segments.add()" + ] + ], + [ + 348, [ "memory[ap + 0] = segments.add()" ] ], [ - 170, + 362, [ "memory[ap + 0] = segments.add()" ] ], [ - 184, + 376, [ "memory[ap + 0] = segments.add()" ] ], [ - 483, + 675, [ "memory[ap + 4] = memory[ap + -1] < 3618502788666131106986593281521497120414687020801267626233049500247285301248" ] ], [ - 487, + 679, [ "\n(value, scalar) = (memory[ap + 3], 313594649253062377472)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -2] = x\nmemory[ap + -1] = y\n" ] ], [ - 497, + 689, [ "\n(value, scalar) = (memory[ap + -2], 10633823966279326983230456482242756608)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -1] = x\nmemory[ap + 0] = y\n" ] ], [ - 505, + 697, [ "memory[ap + 0] = segments.add()" ] ], [ - 526, + 721, [ - "syscall_handler.syscall(syscall_ptr=memory[fp + -7])" + "syscall_handler.syscall(syscall_ptr=memory[fp + -10])" ] ], [ - 539, + 734, [ "memory[ap + 0] = memory[ap + -6] < memory[ap + -1]" ] ], [ - 551, + 746, [ "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" ] ], [ - 553, + 748, [ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], [ - 577, + 772, [ "memory[ap + 0] = memory[ap + -2] < memory[ap + -1]" ] ], [ - 589, + 784, [ "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" ] ], [ - 591, + 786, [ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], [ - 623, + 818, [ "memory[ap + 0] = segments.add()" ] ], [ - 640, + 835, [ "memory[ap + 0] = segments.add()" ] ], [ - 657, + 852, [ "memory[ap + 0] = segments.add()" ] ], [ - 674, + 869, [ "memory[ap + 0] = segments.add()" ] ], [ - 702, + 897, [ "memory[ap + 0] = segments.add()" ] diff --git a/src/module.cairo b/src/module.cairo index 4b70f971..bcf09904 100644 --- a/src/module.cairo +++ b/src/module.cairo @@ -12,8 +12,6 @@ func init_module{ range_check_ptr=range_check_ptr }(input=input); - %{ print(f"module_inputs_len = {ids.module_inputs_len}") %} - let (module_inputs) = alloc(); extract_dynamic_params{range_check_ptr=range_check_ptr}( @@ -23,13 +21,6 @@ func init_module{ extracted_inputs=module_inputs, ); - %{ - print(ids.module_inputs_len) - - for i in range(ids.module_inputs_len): - print(memory[ids.module_inputs + i]) - %} - return ( res=ModuleTask( program_hash=program_hash, From ebfa454abb60b10a4fe2e5417d8671823264365b Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 24 Jul 2024 10:44:10 +0200 Subject: [PATCH 49/73] storage slot correct endiannes --- cairo/src/memorizer/storage_memorizer.cairo | 6 +- .../memorizer/storage_memorizer.py | 9 +- .../contract_bootloader/syscall_handler.py | 1 + src/hdp_input.json | 1343 +++++++---------- 4 files changed, 581 insertions(+), 778 deletions(-) diff --git a/cairo/src/memorizer/storage_memorizer.cairo b/cairo/src/memorizer/storage_memorizer.cairo index 87b675ea..3eb9fe25 100644 --- a/cairo/src/memorizer/storage_memorizer.cairo +++ b/cairo/src/memorizer/storage_memorizer.cairo @@ -11,7 +11,7 @@ pub struct StorageKey { pub chain_id: felt252, pub block_number: felt252, pub address: felt252, - pub storage_slot: u256, + pub key: u256, } #[generate_trait] @@ -26,8 +26,8 @@ pub impl StorageMemorizerImpl of StorageMemorizerTrait { key.chain_id, key.block_number, key.address, - key.storage_slot.low.into(), - key.storage_slot.high.into(), + key.key.high.into(), + key.key.low.into(), ] .span() ) diff --git a/packages/contract_bootloader/memorizer/storage_memorizer.py b/packages/contract_bootloader/memorizer/storage_memorizer.py index afcc7bd4..bc4e9d5b 100644 --- a/packages/contract_bootloader/memorizer/storage_memorizer.py +++ b/packages/contract_bootloader/memorizer/storage_memorizer.py @@ -39,10 +39,10 @@ def from_int(cls, values: List[int]): or values[4] >= 0x100000000000000000000000000000000 ): raise ValueError("Storage slot value not u128") - storage_slot_low = values[3] % 0x100000000000000000000000000000000 - storage_slot_high = values[4] % 0x100000000000000000000000000000000 + storage_slot_high = values[3] % 0x100000000000000000000000000000000 + storage_slot_low = values[4] % 0x100000000000000000000000000000000 return cls( - values[0], values[1], values[2], (storage_slot_low, storage_slot_high) + values[0], values[1], values[2], (storage_slot_high, storage_slot_low) ) def derive(self) -> int: @@ -50,13 +50,14 @@ def derive(self) -> int: [ self.chain_id, self.block_number, + self.address, self.storage_slot[0], self.storage_slot[1], ] ) def to_dict(self): - storage_slot_value = (self.storage_slot[1] << 128) + self.storage_slot[0] + storage_slot_value = (self.storage_slot[0] << 128) + self.storage_slot[1] return { "chain_id": self.chain_id, diff --git a/packages/contract_bootloader/syscall_handler.py b/packages/contract_bootloader/syscall_handler.py index e6af5b76..6f1f2ebb 100644 --- a/packages/contract_bootloader/syscall_handler.py +++ b/packages/contract_bootloader/syscall_handler.py @@ -131,6 +131,7 @@ def _call_contract_helper( dict_raw_ptrs=calldata[0 : Memorizer.size()], dict_manager=self.dict_manager, ) + print(memorizer.dict_ptr) idx = Memorizer.size() key = StorageMemorizerKey.from_int( diff --git a/src/hdp_input.json b/src/hdp_input.json index 6fef4821..aa5b51b6 100644 --- a/src/hdp_input.json +++ b/src/hdp_input.json @@ -1,25 +1,27 @@ { "cairo_run_output_path": "cairo_run_output.json", - "task_root": "0xa1fe02798951073ee7d57c273387c02df51dfe541532d9180daac5c33b6a069b", - "result_root": "0x4635a83e4c920ccdd08740b76c62084b39d3de95417c24787b8abc2f42ed611f", + "task_root": "0xaa30bf945c71955baeb7348ed98a37497a0cdbf0a01b2121004fd9f804a4a42a", + "result_root": "0xb5acdc1a6d2f10725b08b2c832572effa3715d85f00055f97a0c7fbffd9a43d8", "proofs": { "mmr_metas": [ { - "id": 26, - "root": "0x0b9c920d48a198b8a2c696343bee0f56ce40620ddd57d3f3b8b7921fd47b056", - "size": 12721637, + "id": 27, + "root": "0x492627ffa5084ec078f4d461408dfaa50b504a022c5471452d598da0040c066", + "size": 13024091, "peaks": [ "0x262c4c9b1cb2a036924aecf563dc9952e5f8b41004310adde86f22abb793eb1", - "0x63e06c6dd962e6232140b8f20fc4972ee69ca29d1c6ca4455d80afd4be0f3de", - "0x3d088c444fcc7a0083f3cb9d95d56975d22a8ac1171fcf5c0d8fa325fcff4db", - "0x1f297faba0cf7c895b45ef10ff35dbd402495cc24fba54f170a16e907998ee0", - "0x5c8062d5c24f6672d8cd92eb837dfdc3d7ee7e398ac35d9471ea286869c10b7", - "0x0851697f89e265f2e51e890e56841f5af5e9ec671d1c65d6b8441158ca8be58", - "0x2d9ace828120f65429e1055d614e2f5f786e78b726f6f0b74cbd2b7bda2940e", - "0x0c47c0dbba34883fbfeb0b15f181ef80376dfed21255c4310c455efd8226ecb", - "0x58178a512a59efefd2e39a5ac9809b083f8895e2c8ea7ad290cb6b40e491ae6", - "0x7252579c6db593316e636db1fed6cf3e31cbd3e45bf68cf78329d4116ca2334", - "0x09c8af73a1e68a49506421d70f899b7e2cbe581b9e317ff45d99b466bef1152" + "0x10b39aed56c8f244a1df559c944ada6f12b7238f8c06a2c243ba4276b8059b0", + "0x46f45f218ea3aec481f350cda528a6f9f926a2dd53dae302e2cb610e5f152c7", + "0x1d52a06e6d02569893a1d842c00bb67c044be541c614e88613d7fc7187e18c1", + "0x770ebf618a589c17e3dc05bda7121acbedc0b48cd25f2943dc43f395f8bf0db", + "0x7263e878f7deafdc49b47da57f8594d477e572d3ac2bec27bb73860a35b1899", + "0x7b9e99f008949f9ee33d2965708ac6773a57965514df6383d55de104a39ab8c", + "0x28f6ccdcd38f6be6c437d100fcd62604c3293e31342a777dc37c712869ab08c", + "0x13d87197fe5d6f646a57dc918dcbef210737020dca9b89537fd8718ac69da3e", + "0x7eef4b790b56858c0232b494034d4c8699112d88f358209f71f02d5e93a7084", + "0x25cd2f0b579c902c41ac26df96ed5b21e16a3127dce2b471973dc86eb4c099f", + "0x5fdedfd0123b7461d5b3162fe82f7f3172c42fda6209415367870086f7c7918", + "0x7c0a415d5a6c4c90fd2dde1b340c3be305a72aa3b758dd26b8d7b4a78b53681" ], "chain_id": 11155111 } @@ -27,104 +29,108 @@ "headers": [ { "rlp": [ - "0x90feaa06a05e02f9", - "0xbc37ef77eb960db4", - "0x11dc047578f0a8a1", - "0x59c431e03b60a16a", - "0x4dcc1da0fd7382db", + "0xab553e60a05002f9", + "0xb5af5af6f3748ffc", + "0x5026e0c6059e3094", + "0x31290e821421f93e", + "0x4dcc1da07b7d8642", "0xb585ab7a5dc7dee8", "0x4512d31ad4ccb667", "0x42a1f013748a941b", - "0xb67944793d440fd", - "0xae85169bf90d6124", - "0xc2eb90753fd0dac", - "0x308c7df836a0d7f4", - "0xb61fc576fbc8b667", - "0xcfdfcc2fdc695db4", - "0x891d690c08679389", - "0xa0bddf4a0316a12", - "0x62ac0f53f799fa89", - "0x3aa16b99cd5f7f39", - "0xb86a495ff7d3057c", - "0x76abe4a0dc078c1a", - "0xd38a7979ca340c76", - "0x38d8ce61dc3b3f4b", - "0x48d08e752088dc74", - "0x1b9cafab91cf3", - "0xa26712c14e4c39bd", - "0x62c28b97734c9dcd", - "0x48b423783eae5e82", - "0x6e98bf477cadfe8a", - "0x33ac6b89221ae96d", - "0xf4df6f82a386f2c6", - "0x7d0423c33ffbb9c4", - "0x3f0aaf183cfe02d5", - "0xa30f6b1e666fadc", - "0x36dbefab6ac6aaf1", - "0x114ce64bf05e87e5", - "0x8bd843931ba720e0", - "0xd2e5619e560a4fb6", - "0x64ac1691a0575eb2", - "0x502157aff5237e8f", - "0xd42be903183a1be3", - "0xa16e1e55d6e35e5b", - "0x2e2e039b6900e9b3", - "0x7ee97d5acd0e734a", - "0xe11bedfdd332c395", - "0xb451ad3df3a70f3f", - "0xde073f0403a5422c", - "0x501fe842ca83c15b", - "0x6b86d2e3a3e3842d", - "0x5687afeebd5c3c1", - "0x41ca2bb901b4efe6", - "0x34c51be4e48e75ce", - "0xd06fd5847893284b", - "0xc71774cb90c992dd", - "0xb59ac87a63f29b18", - "0x5d96b2c97bbf6382", - "0xcad779074e1365a3", - "0xc9018445b6608380", - "0x848024c0018480c3", - "0x74654e91202a9a66", - "0x2d646e696d726568", - "0x8a0302e37322e31", - "0x32cb70aeb47fb6b1", - "0xd719df5d5c91a4e7", - "0x56bfb7fb9b881128", - "0x8847de36adc1a6c9", - "0x0", - "0x23a098951e2a0485", - "0xc6d3273f558a5202", - "0x80429dcc20f70dca", - "0xc76d0d0249a05300", - "0x837b8509b80bc373", - "0x70018400000c", - "0xad450984e13b75a0", - "0x4618829fcf148b21", - "0x7dc1b8fa6a48df1f", - "0x53f437f04e924a58", - "0xdb" + "0x60c944793d440fd", + "0xc0e8871945ecd4b6", + "0x460c087fcfff72b7", + "0x13edbcfacfa07a44", + "0xc2b82650da8213bd", + "0xcc2d41741047abb9", + "0xcc6c3832c61831ae", + "0x831305aca06baecc", + "0xb3be92f6381cd13f", + "0xfc9ab6ab0f86b425", + "0x6bb106cadf54739d", + "0xb934c0a0250eaf6f", + "0xca32f31c3cb84c07", + "0x40672ca0d7b7f136", + "0xd5a9580578447bda", + "0x1b983a31c38de", + "0x84000000c12000a", + "0x50050020020c1c00", + "0x4000100000001180", + "0x1200a88008028002", + "0xb04008000100001", + "0x83000501400900a8", + "0x3a20082000000", + "0x212009102085", + "0x1108c400a800010", + "0x800000001a400842", + "0x40801504000484", + "0x50004000000801", + "0x1142600228006401", + "0x42800200142849f", + "0x80100081c0440e00", + "0x3404088018828201", + "0x40000008500d102", + "0x1600000820110110", + "0x410000c20901090", + "0x10440202400110", + "0x240a5480000000e", + "0x2000000020000", + "0x88040110000208", + "0x1020000022008020", + "0x80207009004", + "0x20030801002000", + "0x4c0420200142000", + "0xd20840844a0800a", + "0x2182000250a0", + "0x4000420000000d8", + "0x1002000859004008", + "0x1022001040a00c0", + "0xc90184a422528380", + "0x658492d4428380c3", + "0x39336338889090df", + "0x285c1ca039626434", + "0xc45a0c96f24d4fab", + "0x7dd9224168a21e7b", + "0x37300f99d831b22d", + "0x88f8d63f5dda", + "0x184000000000000", + "0x1a0f1c07a06de0cb", + "0x16cf889c82247fd4", + "0x37f3be47594d48e3", + "0x28876c1c651e4ccb", + "0xc40484808236979b", + "0x4b15438fefa00000", + "0xf4bcf8cbfce4b45a", + "0x5781e4595b786b1e", + "0xa27e59bf16385004", + "0xa6e90c" ], - "rlp_bytes_len": 609, + "rlp_bytes_len": 595, "proof": { - "leaf_idx": 12665754, + "leaf_idx": 1128302, "mmr_path": [ - "0x016138b64811c873d927e15b23152c2bdc40d72bae68d8da6b0e273cdb5f76d", - "0x315749a6b68f7fa25bdaf6351b241a9cf10b0dbd6e6908d6d46f50e736142d8", - "0x03b2f52364657beadab6067e1544aef146b4928825d4eaa64e72d1494b2982b", - "0x234e1553cc791b98c3dc65b289ec4e585c3e7a2cbddd940083481a6b7e95be3", - "0x72032e547929d1e29c1ee2b245d36717d0ac20c944edaeb0a98aa05ad092bec", - "0x1dcd2890c2e8f8861dcc70f0647b864ce61ed79a103d06a229370694bd84685", - "0x7514c67fe23e7d8f0d94ae734b4263020dbfc1fbddf74ab72d99b042f2640ae", - "0x2c00badfab7a1df77df41f72b3aef6d90b80df29304b88c49ef3464f5ae5b8c", - "0x53007f9a57efaefcb4b871967f4bebe9f5c45d75288752326a5ffac7db2bc83", - "0x5f8a59073239f728e501858b149266afd89f5bb4708a87e683867d62c5016ee", - "0x4b0b0e53aca136814dcaf2d79ebba75442c985bfbf1568d459c520c14ca8f50", - "0x6c95b5af56d209bed9b9ce01489fa1507aa30cf4f44159c8e2097ffbeaa8481", - "0x1db820709ce34edcc67ebc93ff5253ba014c377aec7e07170e477daedbdea0f", - "0x0f5eba795c267135dfce63ee39c570c69385cfe529b8f0bbf2cc3878e68b722", - "0x67f480c8680c743260bc19f8e214120a47f9b926efae3529eca3eea0dc4f612", - "0x5d9f3a811000d20c9f8d8a009c42c0e09d8851d7408cf51f895a4cc6c944fe2" + "0x084b287e17e16e6b0a5c62e1ae3a6ce61c522072683f2389b36c89acfae9964", + "0x1a8b79875a89bd30a5df42105a585c048c4e483acd72cef9f993521cd3c5985", + "0x1e8bf67178fe704198e9b55656e72b3bbf9890c5354af1016a6c95ce8ed580a", + "0x4864f4d2c6949c019a1a67814fd10fb5b024c0439fbe73fb76803e7c483a729", + "0x4f873d6cbf18ad90dd1b7ab0f70e2d912f21291cf5feeb761e10be1bd017567", + "0x43c1d0457eda4f9d6d18a34ceef2b79c66ad7d2c0efe20e6162791d9aada8b3", + "0x3ba7cbcdbcd74e0dbb16a39d02eaad7a9a299186eb8c20ed0d7525d2fb2913f", + "0x59f574cdb269085476421adce6c90ef095eee000d7900bd8027d7d605fece49", + "0x0d1c52d06ece2f4e85650a120cde1e4c451a39e46a55b5c8bd9af3d1776f790", + "0x2b90d1b79c39dfd85f585d2e176a6d26f423abb55657754a14e7385370e21fc", + "0x16c861c7bc7241bdae85549fa64ecdd4aebc02cea81f4e57d66214661dd7364", + "0x291843fd8db84516fde33e836302b5144813bb4785f5fd2b92ccdbc9aabe2d0", + "0x27deb19b6063d0b92d824f9975ede0e9ea7f708802b28d4e33e357e919834f0", + "0x7c03d542bddf87582c91863b48479f15adbb9c389943868465549785fe5b2fe", + "0x208a328038a61b7707924ec9cfd73bc6ce7c291c6157c829f22228979a5d1d0", + "0x630e360de1c802bdc77459d550ac2c22f8ec261c02815363ae0ef7fbb6eea67", + "0x4d0aa5617b21c9d6acdf01d8ff55ec9b703373d958b7cdee74dddf6b2dcb097", + "0x23ed0242eb2a6f9c4bc66161745cbebb45fe5886f685dc28bf2f1aeaf91e627", + "0x7aab79afb3e980f9731d2c86c342c1d89533ed23d08912d0bf41e88103a5b79", + "0x27d5dc0fe31c9125f2ecd34018ab6f31d62b3838592881c96449e3369b001f8", + "0x546455f57f4ee848d3952148e3b94700f387ee2c36730bfeda09379ce8fa509", + "0x08808a106dc9e09c29afd24be7cee31edd9f0d27ce0a3469839ef3d09ddfb43" ] } } @@ -132,463 +138,455 @@ "accounts": [ { "address": [ - "0xb03b023f8f622702", - "0xc97185527db680b9", - "0x1cac6d5c" + "0x3b7ce9ddbc1ce75", + "0x8568f69565aa0e20", + "0x20b962c9" ], - "account_key": "0x50ee74d58b1680106e4f72f69255189c429b3b932377a0c02b1f24f58fac96e9", + "account_key": "0x962f445fc8476432660877b666f653759ea69189b60d2f4a7008e70555746ad1", "proofs": [ { - "block_number": 6338117, + "block_number": 5382820, "proof_bytes_len": [ 532, 532, 532, 532, 532, - 500, + 436, 83, - 106 + 110 ], "proof": [ [ - "0x775ba442a01102f9", - "0xe0160490a8ea1104", - "0x105a9bdc2be00f63", - "0x44561c546a458aba", - "0x940953a061516b03", - "0x20237914f5c440e1", - "0x1c7dfced338e0e11", - "0xad169f0cfc5a98eb", - "0x3956a05932589c46", - "0xb6ac900d54826219", - "0x83f496e9f1b1834c", - "0x8984d89cc6129605", - "0x26a0d77d53cc03a8", - "0xc8621c18be1f77d2", - "0x4262ea69ac0e49b6", - "0xfd54cc4b5f0c7eee", - "0xa04aacf31dad9149", - "0xae60dd8d64b83212", - "0x4b47799ed84c1769", - "0xad4bb65bcfff658a", - "0x63a8a7229967bfd6", - "0x1cdb0c7fa56548a0", - "0x947a518df8da45d3", - "0x1d0d1f70b7591051", - "0xe6654b27e0ee37b4", - "0x58cb5fc046f0a0c1", - "0xf602a024090bae91", - "0x865f202b9ee9be7c", - "0x703d052209c7689f", - "0xdd99c9e1ea07de1", - "0x60ca7dbc1e574621", - "0xbb43323298cec7c8", - "0xfd6c52c2c1a71e7f", - "0x48651f24a083e543", - "0x677be111be8d4036", - "0x2bac8560b5be2b2c", - "0x5d8ddffc8accf35b", - "0x2c7007a07eb0439b", - "0xcf107f121c88d4b2", - "0xa8c3a7e46edf459a", - "0x3074ce8f9762f482", - "0x125aa06436da3172", - "0xbc3d781394f79b53", - "0xfe09e67c8e316740", - "0xb640bfea2fc6ce6f", - "0xe0a04fbfdf218696", - "0xdbbc759df98413d6", - "0xa2d306c9de3edab2", - "0x9641df32b4370ec7", - "0xa07bbbe43c384c0e", - "0xd15be1e6057a9b16", - "0xceedca89d383be62", - "0xe5263e0e01509e03", - "0xa304612ab2e14d7f", - "0xd1ef9edd3df373a0", - "0xeb5b63859d552d11", - "0x98d49c4be338f093", - "0x8f541e93b045a87c", - "0xdde20cd109ada013", - "0x270a31314e82ebcd", - "0x25c051a77d88d25", - "0x828207dcf8132193", - "0x759de46f21a07673", - "0x4d21fa98d4a88817", - "0x3ee4edf543c4905a", - "0x48544f7e42a0aeb3", - "0x803ed89a" + "0x7c61e3eba01102f9", + "0xb5a62db594c71c2a", + "0xd79416fcf8688b63", + "0x71e7bdd16306f821", + "0x4d477ca0d484a54a", + "0x2a033db653fd6d4e", + "0x9ed02b4b95b21d7a", + "0x4cd8f1b53f42f01f", + "0x4b5aa08f369ff204", + "0x652a536dbc85fdb6", + "0x66c654f4e025730a", + "0x671b0235356fc04e", + "0xf0a0fba61b61a406", + "0x17b7f8649cbf00e9", + "0xecaa5b13760a5fa4", + "0x615bc592d52f5e50", + "0xa046512c6a03af6c", + "0xee474ecfdb45299f", + "0x843b427b31eba68e", + "0xab8cf670abac84b0", + "0xa6a535a19d4639ce", + "0x5c41c9ccbf386aa0", + "0xb03db07e4cd213a", + "0xd75448fc9a7b1896", + "0x85b4c937397adc81", + "0x74ca9a593989a0ef", + "0x4ac604ac38d90548", + "0x32a1688ddc2a8193", + "0x81f0546eacb82309", + "0xefa944fca1a01e43", + "0xdfad25ff40f434da", + "0x6e07db21b71d8e65", + "0xfcdf0e6646add62c", + "0x56e9613ba0b1045a", + "0x8790ed530718c50", + "0x4dc4b9de48c9d222", + "0xb5ce5684ed9f5f1", + "0x4299aaa00a315f44", + "0xed4525bf273622fc", + "0x6cdf9b757ef88728", + "0x2d19f82ce86832ce", + "0x6441a0b4936de285", + "0x83a7e7cbe81cde7d", + "0x95b77e2a10cff7a5", + "0xbffc145df8241d37", + "0xe5a055a910e5a09a", + "0xa5471ed810846946", + "0x41bb2d8bc617803a", + "0xd6dba9efc4560a38", + "0xa0a530454ead297e", + "0xa85a62a7d066a51", + "0xc874621a47dbdf74", + "0x4ad7197adaa2dd25", + "0x3d26d4f03a020000", + "0x876d86a2f854d3a0", + "0xa877640bd28f78b7", + "0xe52d62b99a4e0fd2", + "0xeee1c4c0c8bc1099", + "0x6a487328b8da0ba", + "0x26883372414cfbea", + "0x24c06ca0e66cb2ee", + "0x8d2e4e69569f2114", + "0x1cdaeb08cea094c0", + "0x703d82ea470be54a", + "0xceb2e79532edc132", + "0x17a154fb3039f362", + "0x80684625" ], [ - "0x1313c0cca01102f9", - "0x69ae815bd9ff857", - "0x399c5a98a953bece", - "0x47d5557c86e5f58f", - "0x55c7ffa0462d10a3", - "0xccb6ff5609e94629", - "0x55ed45cc7bb6420", - "0xca140807b1577937", - "0x4a41a0b6d3996c77", - "0xea000f43a0238702", - "0xfe17c542ee075f2d", - "0x7ce4160d83660ff8", - "0x86a008c8ee791cfa", - "0xeb7d8ce7664124a3", - "0x3d5e43ab6922a876", - "0x7e9dd4a7e895c72a", - "0xa0812355bd0050f8", - "0xdb7772353c65c41e", - "0xdde7d57bfbbfdfcc", - "0xf07934321237cc10", - "0x4d138aeb7d89ef81", - "0x673514350858f8a0", - "0x944d165c53cefe44", - "0x919e11ef725b22e4", - "0x8b4bba7e08ef7dc8", - "0x7d59da49cb29a046", - "0xb2d0ead8340e1c3f", - "0x21a19ae3ef64fc5a", - "0xd848bd20ffc3126f", - "0xba3b91ac12a09d7d", - "0x418d802ab3d3de1c", - "0x866bb929955ec114", - "0x223a58308946b6a9", - "0xfd75ad61a0889f71", - "0x3a7aec07f6b2f3ca", - "0xc01f41d66a671e29", - "0x1ecec4da0aeacc2f", - "0xcf7b6da0e9417fc3", - "0xa39fe59aeead76e8", - "0x82a2e703ba504bee", - "0x4aec30e8fc9ffc6b", - "0xbeeea0f6355570cc", - "0xd48f6bacffbd5ece", - "0x7c2712fd795a4491", - "0x183d34a926384955", - "0x10a0815d88f70b0b", - "0x9c4d39d583c23e2d", - "0x319dae52a44877b9", - "0xf5f72f84ea591b37", - "0xa0879dc3bca23c8c", - "0xeb3755a658b7d72", - "0x1730c06b185bad31", - "0x9c72a6a53f097fb9", - "0xcd80da41dbd824a9", - "0x5c83c4f5b88bdba0", - "0xb5792da85baf4f01", - "0x1cfafdafde3dc2a9", - "0x577e94497b7212b5", - "0x438078a0933da08f", - "0x6a5eed91dd3853b9", - "0xb09cf00f93aac9ee", - "0x1cc06f84d2ecddb8", - "0x47dea469fda09d4c", - "0x2b37d888a6c65ec5", - "0x2d7e5408cbcdebdf", - "0x1609687258c71db", - "0x80d70cab" + "0x1efd9844a01102f9", + "0x8c072cde3129f4a6", + "0xff3aa8226d370172", + "0xafc5554227aaecfc", + "0xa8349fa00538ccd5", + "0x19352b32bf29b2e8", + "0xd732740eaaaab513", + "0x651e510835e68786", + "0x9b59a0f373bc0007", + "0x5e464fd03d8b14c8", + "0xbde725cadedff34", + "0x22fa16d7ade8ea57", + "0xea0f2682fffd69d", + "0x562dc82e0cb57f31", + "0xfe2f2d7c75395681", + "0x5539db5da2979a87", + "0xa00fa594b52682fc", + "0xad0f79d8bf79ae7b", + "0x53cca8cbd3dacf42", + "0x800aa08a23b18756", + "0x3ee9a9a3fcf6fcbd", + "0x20e0733a0faa2ca0", + "0x5030ddaf0927e4ad", + "0xb5e33c15476d1dda", + "0x140ec743e0283781", + "0x3aa15fd63b46a0ce", + "0x95219066be1d0fc3", + "0x2bcf21dffd10041d", + "0xb5183d1c234f4a84", + "0xa5b4793a13a0e97a", + "0x7e47207c4c465826", + "0xccce924ccb0c951e", + "0x7ddc3f5cd7ae0b30", + "0xa2c1d35fa068b83b", + "0x4347adab647a0801", + "0x37c47004b421e31b", + "0xbc0dbc765f96316", + "0x8e1f85a0bc3e6842", + "0x896b7fa90084c8ab", + "0xb01abd0a17629633", + "0xb3c368fb5143a21f", + "0x8522a015d97d273c", + "0x121690f296bbe11e", + "0x97dd772be0f7c416", + "0x6e08d27c16a8b750", + "0xf0a0105f2b1db536", + "0x3f6a904f84b4edcc", + "0xc8f8e1b2e8455962", + "0x5c3de94924612794", + "0xa0aac7bc0584d95b", + "0x7b72d76fa94fc990", + "0x593b92058216a902", + "0x7f5d784c1319132a", + "0x385eb44290804ae9", + "0xe1cccba4f75714a0", + "0xb1179f1903e8fb36", + "0x36f7d19df6691ae4", + "0x78f134b5eb7e2ccd", + "0x8e3bb5d63dc5a0f6", + "0x84347806c8a58d9", + "0x9dceebfc3065de5c", + "0x168530d8e9c1cca5", + "0x757cc04667a0b263", + "0xab6c9b1d185a3cf0", + "0x70bda215ed69ea8a", + "0x48c9a965c4aa8a7", + "0x80f15439" ], [ - "0x1093517aa01102f9", - "0x458e76e15c2a20cb", - "0xaa294f272e9f666", - "0x988eda2d9ea7183e", - "0xb32616a0b360a04b", - "0x3c1a14de37987f65", - "0x86aa22f369833be5", - "0xe74365792fedbe84", - "0x1b56a08486ada4c5", - "0xb8fa25a9ba6deec", - "0xf480b0cdc580e26a", - "0xa2499c00471025d3", - "0x6ba06557c8310c19", - "0xd9541cb9f6d0ed6", - "0x8309c6e8cf56cb74", - "0x5fcb255422619e71", - "0xa02b27bb96c684fc", - "0xa07000e3961b58b1", - "0xccbb91b27bfa7b77", - "0x71fdf874fa0e04b2", - "0x799769f4b9be994c", - "0x31e2f652ecb09da0", - "0xdbafbcc5dfd094e7", - "0xea99afb244bf0d5b", - "0x982d57383e4d5d10", - "0x3eb78a503bc3a0a2", - "0x86e233aa9f8151b9", - "0xbae81716ca039bec", - "0xb572c81739ca30f3", - "0x8270dc2ed2a09386", - "0x4a36dd55468007fe", - "0x5da7df1cc8e1ad52", - "0xd40e3e1b6735f4c9", - "0x80038f06a0bf1b26", - "0x24d32a36ebbf8a1c", - "0x105a1f6394f85693", - "0x8fbe5a873fd349c4", - "0x7b3616a043cd9577", - "0xabd9cb1c1a2bf42d", - "0x2966bc02a631f4bd", - "0x263070144dcef14b", - "0xa564a06846db3c38", - "0x47613cff798155f3", - "0x6d879f02ce155954", - "0x32c3f53ed3c01c48", - "0xda0d336e71276e2", - "0xa1d56d16b22767d9", - "0xd0850abde400daff", - "0x143907c949930540", - "0xa06c0ff1510400a4", - "0x39ba272ad0174580", - "0x7c9f7eeb02daefc6", - "0xae50a56fa8ae8f64", - "0xa92e90acaa8fd45d", - "0x8a652103165c3a0", - "0xba33a45af753c767", - "0x341afed28697cc13", - "0x8cbdcd2849fa9068", - "0x548fafe513e3a095", - "0x6478823bf9481809", - "0xda9b54c12dace121", - "0xc15413c128aaa355", - "0x1b593954aa005b2", - "0x5bc6e1620c78daab", - "0xbe64fa51bfbb52c7", - "0x3f64057d3e48c143", - "0x802e5b70" + "0x365cdaa6a01102f9", + "0x548687e6e2d18349", + "0xd18130c1a89a2957", + "0xfa2d66351fd5a315", + "0x34b76ba05662ac7e", + "0x572cb0793f1757ec", + "0xd688289305ef0b33", + "0xeb71d7482fcd72a", + "0x9ef8a0ad61bde95d", + "0xa00903c1f6780811", + "0xd658da2da3bc3d6f", + "0x9ba141863886b4d2", + "0xb9a02124b9b18e92", + "0x8671f0994d35c6ca", + "0x75b50898d840f64f", + "0x8db5c5a460e11004", + "0xa052c52932b393e9", + "0x6ec275bdfa587885", + "0xf56b656d47853449", + "0xbd98084756b50a8c", + "0x473ce07445efc73", + "0xe0cc1476176662a0", + "0xcf2178543079fe23", + "0xcab4a3c95abd2a88", + "0x22897d940fbd3c60", + "0x5005bea75822a061", + "0xa965a367732c5c67", + "0x30ccbd08bd5c7caf", + "0xc42dab70260b35b", + "0x7bb56b1ea9a0a830", + "0xdff1f6233201a751", + "0x533c49cfee129dba", + "0x51aa5b706b6755d4", + "0x4669b8b9a0ddde36", + "0x4b18343ba641db42", + "0xdf1e99c46fdef5cb", + "0x513e4246ec43042a", + "0xe0d036a0e4866d7a", + "0x42e1292302d96ba0", + "0x5641cd5d161765c", + "0xa43151e5b49ef0f1", + "0xaa88a07d5b61eb06", + "0xbce5d3e7bbd471c3", + "0x88075180281d7b34", + "0xab91ef94ba554234", + "0x26a0d50e5f031cf0", + "0x217172c3fe41ae03", + "0x6ba86b9003e5fa7a", + "0xa5c33284ce1f06d4", + "0xa055dfa633b07ee3", + "0xc544b2fed865197", + "0x14a5f272c1cb32de", + "0x4b049409129d5ec0", + "0x58407bd02c708213", + "0xdd5d7a3aa893c9a0", + "0x30b29455dcfbcc4c", + "0xd855032a50d0a22c", + "0x2c0a6b91df21cbe8", + "0x4cc1b4508436a0e4", + "0x9ad4a6b16d75240b", + "0x1c5c0ba7fb2c440c", + "0x8a5d34399ba0d052", + "0x3672f413e1a07543", + "0x7a60dfbff0785854", + "0x492b09dee781b9b2", + "0xe30e77a64a84e23c", + "0x80cbdd7b" ], [ - "0x18a3dbaea01102f9", - "0x1573d84bffec200f", - "0xb37098e6333b95f9", - "0x61aada02923fc2db", - "0x9407f2a0c1788091", - "0xa724928966ae0480", - "0x5057beff9eec299a", - "0xfc30e98dbf5125d5", - "0xa001a0c5871f9e7c", - "0x917641adb1ea545d", - "0x22f160abf90a00a7", - "0x992b10cfc1e09e4b", - "0x6da058b0b57ae6ed", - "0x2d402ac5f6219153", - "0x2f0f8297aff7e90f", - "0x31f600dc849b05c5", - "0xa030ea05a37d3d83", - "0x291ba11d04554eb9", - "0xdbee93f4177a28ed", - "0x6a8dd31e9a9df29", - "0x7cc85a4fd2513500", - "0xf227aa261bbd7fa0", - "0x5c4ba6a3bd8faee5", - "0x781b80acc434490a", - "0x124aa60f9edd7707", - "0xc22e23bbd79a080", - "0x88cc2429f10c1c19", - "0x873e87e202df6f2b", - "0x64cb54b269b5d252", - "0x4833e53573a0c298", - "0xbf5516c43280fd0d", - "0x4aff09f8b32c1e60", - "0x5e5e35c39205e845", - "0xb1e5e6a0fc2e12", - "0x53d3eb00317f438d", - "0x3538b9504871b3e2", - "0x4f553215f337ba45", - "0x872c8a050f5e686", - "0xde236c4a4c50b220", - "0x4f661e1ec853c210", - "0x3a105206a6d3bcd0", - "0xd067a078d267820b", - "0x4746371aa9b2c02d", - "0x70ecc492f075624e", - "0x60d385a1e38abdbe", - "0x11a0bd79e9bcd422", - "0xacffab650f2552d9", - "0xdfbf84d80bc078b4", - "0x2ee7164fca1783b2", - "0xa0a091db7b21237e", - "0xb5df38cb1eeb47c0", - "0x15020eecd9d6ed3f", - "0x6ad5eca3e3441fd5", - "0x734a8d740885ee2", - "0xa2bc88d692c69da0", - "0x3e5566cab26f9f74", - "0x1ae75f42d0529457", - "0xc94511e912963ca1", - "0x29bcdd85c9f5a016", - "0x583ad5059774d416", - "0xfdf00902d47bb3ac", - "0x72ef8fb7abb86f09", - "0xfe1c73bbbca0a922", - "0xb430e6990105c58c", - "0x47967ea17cf34c95", - "0xcb71d2bc87b1207b", - "0x80f79851" + "0xf6b877b1a01102f9", + "0xe7aa7603c90b4319", + "0x34c8513389339604", + "0xc451d1352573be34", + "0xeb8ad5a09d6cfcc4", + "0xb1f552a325008a63", + "0x26d1e83f81c88d91", + "0xb16afafc084a013d", + "0xfc69a0543ceaf28e", + "0xa962e5133f55745", + "0xa420c1bf598e36d4", + "0x6c211a28cb08425e", + "0x29a009eb12dd8587", + "0x43250fabaf027a07", + "0xe04b87350d4c55c", + "0xece8e24bf940b208", + "0xa03ec4c6ac4814e7", + "0xefea92985d1632e2", + "0xdb32466c4628e6bd", + "0x10c5444b00a322d2", + "0xb3b73882d399d574", + "0x72eee83c833f20a0", + "0xf521c2a824968f68", + "0x5d1b4f9d29d41e75", + "0x25a6fd7338ee612a", + "0xb494167251e4a02c", + "0xc5a93e94d2d99c70", + "0xd05a7fe25cb256b4", + "0xdd1caf061365272f", + "0x96f912e7aaa06e10", + "0xa6d2391d460ebd14", + "0x5c10cda11bc1c39d", + "0x1a3ccc0b97e1030f", + "0x824fc778a0381782", + "0xc7517890da856af7", + "0x19f06804f7a86b41", + "0xd2b23a082cd444ee", + "0x21bfaa019d827b7", + "0xc89eb3e4e9a8b678", + "0xd7fa27e3a300aefe", + "0xd4734727f1d5ba5", + "0x5795a0ba6719730f", + "0x3826f7ae5b2a2a0c", + "0xf912d6c6e808ea20", + "0xd7724f885c3af94f", + "0xeca049a187c6d08a", + "0x7664e3eefc4e9002", + "0xbe95b8e9e13f9540", + "0xebb9a48d3a9940b2", + "0xa05842d57aa7178f", + "0x115fadee30f43ddd", + "0x7084f9f438fa9781", + "0x17d87178c152d468", + "0xc30e711d091492af", + "0x1ea03c63377c87a0", + "0xb18c061168493240", + "0x580f33ea4ae60f4d", + "0x1204bb22f25e353c", + "0x4b70aeb8db00a05c", + "0xe2638155538bd67", + "0x7653cec061196029", + "0x5c0d296b24559e", + "0x9167edff5ba09b50", + "0xcefa52977ece8c9c", + "0x66eb902251635992", + "0x74dfe8bb03758b11", + "0x803125e7" ], [ - "0x766d7664a01102f9", - "0x4bb578df5348a240", - "0x1496acc1829d2c79", - "0x991d29bb8852a31f", - "0x9f0e07a004c02e84", - "0x2595f20766e7f2ca", - "0x4ed6c6899bb85f6", - "0x6bf8cfdcc08579ac", - "0xc4aba045c6206e2e", - "0x8f1d2d469f0f7060", - "0xb89aab62ed8d97f0", - "0xe11d5463ad4d0dd9", - "0xe0a0e218411792d2", - "0x99af5d6abfc6e926", - "0x9096b6c801b954b0", - "0x1bb2fa25b202b43f", - "0xa06cf907ce6caa78", - "0xaf1bc7f1da22160c", - "0xe2bd67768cd09269", - "0xe9d628eebaa87ff6", - "0x1179f52222db3f1a", - "0x57f5195e27f5cba0", - "0xee37b00143af2011", - "0x6f7873c0eae655b2", - "0xba0a4565c9f53339", - "0x538be6018a9a05a", - "0xf4a37a13bf9c6736", - "0x9a754a3b842e6021", - "0x30d8bb952529baec", - "0x2529963f11a06f34", - "0xf840e969508c46f8", - "0x9f48bbc31f907926", - "0xc22aedb36d974907", - "0x2ddc0e91a0bed7f6", - "0x51446731f61d8736", - "0x97e08c5778bf670f", - "0xe4bd59000f2e9337", - "0xac16eba09ab8eed8", - "0x3187e2978ffca791", - "0xaff1848bb6093de7", - "0xdb7553cf13854a2b", - "0x69b9a0ec6e8b8ff9", - "0xe3b66ed44e6a5cbd", - "0xe48e026197b53244", - "0xc3bab213ab3e95f5", - "0x96a07fbc2206bc95", - "0x2e212363a99927c9", - "0xe11d2c546435c785", - "0x8cffad1da3610dd7", - "0xa07b6e94f33d36db", - "0xc40f2936267b28e6", - "0x66fdf54e150850f4", - "0x7189047ecceb9a13", - "0xb062d3c893308d8d", - "0xa747850a873d71a0", - "0xa12db24f076c7d29", - "0x5f22dd6def3cfaf5", - "0xf5746cc371f7eeb1", - "0xd8364d0074f8a03c", - "0x5a00914bd289d193", - "0x8ecb693da9d78dfa", - "0x8e5669988f5b579f", - "0xaea7a07cffa0a679", - "0x6d139309a91dd68c", - "0xc68975628c5aa7bd", - "0x8f65b58d938d9041", - "0x804def37" + "0xf0ef1a82a01102f9", + "0x272e097eeb01a32c", + "0xc52ee715c1b8a65f", + "0xf5b2be6ba090d66e", + "0x73a9e8a0690d7f64", + "0xa348d637702d9331", + "0x65ac2182884d2b1c", + "0x969bdd2a7ed32005", + "0xdeb0a0278c0937c5", + "0x4f0f357c58944ec5", + "0x97cde9d0035fff7d", + "0x72cc4dff609a6145", + "0x63a058a104f1ec79", + "0x35af04a552292f89", + "0x32dc86ccccf17348", + "0x147da35537db09a9", + "0xa084f7e7fa7ff0fc", + "0xd9e0fde9d4c1e4bc", + "0x539f68de733ab56d", + "0xe1feb443e7612c02", + "0x6fc2c1ea25da2b3a", + "0x10f34f269a572da0", + "0xeef6d39e7617f736", + "0x629cefa3bb0a7142", + "0x1b946f908ef1ff08", + "0x483b5510a91aa0aa", + "0xbfbd8a1551a40c8a", + "0x4e8d35d3299fa62c", + "0xe762875f35ef4bb5", + "0xf663298ef7a0b2d2", + "0x8826a9c326d2ccd8", + "0xdeaa534ec9527b3", + "0xdd048903dd076748", + "0x4c45edfa0c25ed4", + "0x394ea3e5df85c4a1", + "0x1720a075e18123a6", + "0x7167d842aad780be", + "0xf0a356a0822c52a5", + "0x6adb550caadfec6a", + "0x3b2cbabf3124798c", + "0x93c22211a4f72b3c", + "0x5b14a020529f1c35", + "0xb37bd92c1f993b1", + "0x3233723e7b5c4e65", + "0x22269aff91e722f6", + "0x2aa0f5e16ab6558a", + "0x2204e95272d04b95", + "0xa39a86fd8da22558", + "0xe3764a9e51d52ac5", + "0xa0af19d73dffc8f0", + "0xbb14960ed766c273", + "0x9323155ea9c3eab1", + "0xeaaca5c7ca47cb88", + "0x645cc636a040cd7c", + "0x98a4f1fa69e49a0", + "0x34b9727babc84cc3", + "0xe918d91bfc0b8c87", + "0x5a0ad2cc3cda3b59", + "0x84d41c94bc74a084", + "0x58c117018c298b45", + "0x4c38656b0b043558", + "0x5f15c47187a5edca", + "0x9bb8a091aaa08c1e", + "0x5e31951a911730ba", + "0x294d7d92337d2a0e", + "0xff7f4e5ec3a5b4e3", + "0x80d7af5b" ], [ - "0x38b6e9c9a0f101f9", - "0x1da861a0324b3ceb", - "0xaaa864d2fea69f3f", - "0x96122fcdd06064a6", - "0x31d825a020d1984b", - "0x3b3799d6becab808", - "0x1d4641115fd13e0d", - "0xd9ed8621e406a852", - "0x5a6aa06c4387641e", - "0xe86af7a5b31ec4f4", - "0x521e7d597300aabb", - "0x12c65ec4c26d12c4", - "0x9da061c35622ee1e", - "0xcf504eb3b252486c", - "0x325b221e976e2b0d", - "0xf1d318dd1b0c9d83", - "0xa05be77f4979091e", - "0x10ea5bccbbf278a8", - "0xf4e2985548d6c53b", - "0x4aeb06ca40499f82", - "0x8382d52d023a290d", - "0xd2ae0c6f68fccca0", - "0x9f27dbab0a08e5c2", - "0x8cba2a0859fb9304", - "0xd3b3f27b3bfe8017", - "0x6935cec01fefa0fc", - "0xd66c514b8498b72", - "0xe2aee099c0c0ef08", - "0xd677ff9d19549673", - "0xa6b7112084a0c4a5", - "0x1b92438d0cd09d1e", - "0xe0dcf69b84ce59c4", - "0x2fe26709ac8b9abb", - "0x43182bdaa0e6964a", - "0x74fdebc59202ade9", - "0x26812d9b8ed7485", - "0x4cf048069ca9b65d", - "0xa510f7a02c0c2530", - "0x765a5c2d2ee5d399", - "0x85b2c07f53660a07", - "0x6c4cb4912f3b4d3", - "0x40a08070ac94b76f", - "0x3449a2d6d027fa53", - "0x5ba9b66406408596", - "0x8fc11e5709175170", - "0xa002b4b4ea78d044", - "0x3c311795d74a66a6", - "0xce652385e77a6720", - "0x510e8301367bd611", - "0xd8302ba8f10714f9", - "0xd7cbc70db5963ca0", - "0x5fa462e35bcc9964", - "0x6881038e95c4d829", - "0xbc39c4f408a80c47", - "0x1de045c4cfa1a0ee", - "0x8f181ac5b205c349", - "0xce31916e336d8af2", - "0x7749885aa2341d6", - "0xf9f9e011ba0a6aa", - "0xb7fbfdddc8a28dde", - "0x50f8e26c63d95848", - "0x4b6a022c076c4dbb", - "0x8006370f" + "0xaf23626da0b101f9", + "0xa367365d1b970124", + "0x65e759a72e878aa5", + "0xe4e02d4f5e37fb82", + "0x2558f1a05e27df20", + "0x5b6ea33a9fb9202d", + "0xfc5abea4476c897", + "0x8ff11ca49e762e58", + "0xfaa4a0272260e37a", + "0xaf0edd4f2833ccea", + "0xace3436577e032ce", + "0xccabb7fc8de69d34", + "0x24a05fdf82aeb040", + "0x60ddd0c191da6f5f", + "0xf8cb38939a79c836", + "0x5af3453a8acabb5c", + "0xa065cb106d07bb27", + "0xcffc5e1cd206d380", + "0x1081b2488fb955a6", + "0x8fbdaea9606ffe00", + "0x968e749c58e7bddc", + "0x7379a83b9f4977a0", + "0x5b5dbe8c62d6737a", + "0x87ca31004398d58a", + "0x7d3f9d50a2b3dc9c", + "0xe1aefba1ec9a05f", + "0x81fd3e67ba450856", + "0x2405879e8b3e313a", + "0xb44eceb64caac4ad", + "0x7524e099d0a05873", + "0x99572f395a78af46", + "0x329eca12b73e7afb", + "0xd5615ad6496fe3dd", + "0x29a4aa2aa0e22674", + "0x64ef8b64ec9ec133", + "0xfbcf841e5a70da6e", + "0xee2a86312ad6ece4", + "0x6c516ea04152e016", + "0x2ce5fa3fd3811fdf", + "0x101750195278bfa5", + "0x1205c4b2382730b5", + "0xe4a080943cef0674", + "0x5840eced3520c312", + "0x3f408ac137812fb0", + "0xef0b1fcae174025d", + "0xa0f88a78617f25f3", + "0xfd07702066c149be", + "0xbe166add9f371f65", + "0x10f0fce6574e85a5", + "0x36888ff2d7e55195", + "0xc852b6d58640a080", + "0x5eb439ecef8c8556", + "0xcfcf89fa5e950126", + "0x7bf954f98325d4c8", + "0x80801ecf" ], [ - "0x80808080808051f8", - "0xffa0808080808080", - "0x73ccf6e45e051c18", - "0x4c1b679571493edc", - "0xee58ad9c69c9ed38", - "0xa0a3a9318d2e27ba", - "0x8d5e5872d6132e33", - "0x952b38bccde59661", - "0xf466e84d1d8cff3a", - "0x1ba179572285be63", + "0xa0808080808051f8", + "0x7690f8de14ad2219", + "0xca504a511d01e0bd", + "0x83bb3671612d63e7", + "0x733c38d3befcb2c1", + "0xa080808080808080", + "0x94af46e820431ae8", + "0x25f498521a9f94db", + "0x34728bbeec8e4e86", + "0x3c6eeac033ea0a2b", "0x808080" ], [ - "0x1080168b359d68f8", - "0x9c185592f6724f6e", - "0xc0a07723933b9b42", - "0xe996ac8ff5241f2b", - "0x8086298246f848b8", - "0xda91a3a55a6700a0", - "0xbb873a54274cf45a", - "0x5e8794b83bac712c", - "0x302869fbb5ce5c5a", - "0x881feaafb5aca076", - "0xad5803d3ad9f2377", - "0x7501b84f9d2f3fd1", - "0x229522396d682c40", - "0xef4f" + "0x326447c83f9d6cf8", + "0x7553f666b6770866", + "0x4a2f0db68991a69e", + "0xd16a745505e70870", + "0x301286014af84cb8", + "0xf0bb69a00040e59c", + "0x622c5138549d7f40", + "0xfa77f381958a7618", + "0x17b90914ea19c15d", + "0xb3eaa01c2e245cb7", + "0xed095ef7d0228e44", + "0xdb3967ac872e9b84", + "0xc6fcefae4edb0441", + "0xfd559781fa6c" ] ] } @@ -598,250 +596,53 @@ "storages": [ { "address": [ - "0xb03b023f8f622702", - "0xc97185527db680b9", - "0x1cac6d5c" + "0x3b7ce9ddbc1ce75", + "0x8568f69565aa0e20", + "0x20b962c9" ], "slot": [ "0x0", "0x0", "0x0", - "0x0" + "0x100000000000000" ], - "storage_key": "0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563", + "storage_key": "0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", "proofs": [ { - "block_number": 6338117, + "block_number": 5382820, "proof_bytes_len": [ - 532, - 532, - 500, - 147 + 147, + 42 ], "proof": [ [ - "0x2060ea93a01102f9", - "0x3be7f67586917fc", - "0xf46797be33dd920", - "0x46f71327f4f7e93c", - "0xfee6da050dcb8e7", - "0xd1ebbf7239990d5a", - "0x16fd2bcfa0aac8ea", - "0xefa121ff692b42ee", - "0x69f5a0683eb612fd", - "0x4040958e09534fc7", - "0x7d002058b405dd8d", - "0x83b8e1f1ab919db9", - "0xc9a0d08159d00ffa", - "0x9b4c7ed0d9f6b06e", - "0xe362e70298fad1bf", - "0x73ce74d623dfa263", - "0xa0b2afe3f0566f50", - "0xf6f3feb54e7526e", - "0x135f45b8eda2acd0", - "0xce4f4504eda00b63", - "0x49d14ea9d1ff66b7", - "0xaa380ff695b2f1a0", - "0xf8b67484573ed5b8", - "0xba64afdd82bf5725", - "0x10bebe9ad6573e23", - "0xfa1ae3dcff94a0c3", - "0xca46061b183cdb3c", - "0xb01531b2f63f36fb", - "0xa7c1e905d477863b", - "0xb669f67101a08af5", - "0xffaa0b61469e111d", - "0x64f0bc5fa1af3e7", - "0xf69830a4517c9357", - "0x4e6c5298a0ffb73c", - "0x791de9ed5cefb79a", - "0xa8d00e27ec5d7b29", - "0xb3097a821c063163", - "0x36aefda0337906d7", - "0x450c66c3282299d0", - "0x86f58840cf5ceb5", - "0x891549c7e37ec336", - "0x6f83a0d44026c84e", - "0x1549bf2ec9508e57", - "0xb9f8d2b471a7f725", - "0xca5cc00b13f868e8", - "0xa5a0527b2261a914", - "0x43353fdc22a21458", - "0x72639263096b018", - "0xce38b9d316c63618", - "0xa0c55adafa1bf0b2", - "0x13f5409406502aa8", - "0x3547d43b6c7a18e7", - "0xa33e53c054b3c5be", - "0x954e511b735b7ad5", - "0x2f4b7afef2d6c5a0", - "0x7e235d766514824d", - "0xe42e83f68308d53f", - "0x5634980d762c797a", - "0x2a4406830df1a02e", - "0xbc13356e4bca5eb1", - "0x61aaf29b6de61e8a", - "0x8580333094a4fa7e", - "0x7440e98d25a040c9", - "0x5789e53a75b212ca", - "0xbe4651f69bb2c72", - "0x43c57bac6c6538b8", - "0x806495ce" - ], - [ - "0xc7ee5240a01102f9", - "0xd2a6510b738fa8bb", - "0x31220ea6b6e73676", - "0xbd341fedd7b75e9b", - "0x7cf045a0a478a1b7", - "0x55d215a9f9b05f3a", - "0xf7cc9ed1d74128cc", - "0xf2d3b26b0f960913", - "0x1f82a01613a97459", - "0x8904a8b444b71538", - "0x9deaa08374c24f4", - "0x6b64cf3c64b72c9", - "0x51a01080276662f7", - "0x69bd43ad0e38ea8b", - "0xffa78de704dba38a", - "0x25f681dc3bc365b2", - "0xa0db077017b6b037", - "0x5e08eec8de4466cb", - "0xc474e25b50e48a59", - "0x4a953fa367f95177", - "0x1c0338f06faba066", - "0xa2aa344eb7b611a0", - "0x7f8143a54e918366", - "0xad9675a92b65ece7", - "0x82fa947396a7d94f", - "0x5fdfe0822589a0b3", - "0x6bd4848a25786ef2", - "0x6daf8aad0c4c82ab", - "0x822a8f2a7f9dbd48", - "0x24f97730f8a0b267", - "0xe272e46930191c60", - "0x6250609f00f55929", - "0x29a99af425fee750", - "0x33cbf00fa01c41c6", - "0x1bf464c4476be93d", - "0xb890def59ec6d823", - "0x9882b92e72299137", - "0x897d31a07b6f6aea", - "0x2a8193a611b72714", - "0xaee41fe93c950349", - "0x54a3b8ed8ec43569", - "0x580ba03f0b5099a4", - "0xdb10feb3640e5571", - "0xb5bcb2940c9a65d0", - "0x648105a2bc090fb8", - "0xe9a0a8a688d8ab79", - "0xf59ab08e86130e12", - "0x884b0b1e544df7d7", - "0x31eb1778ad3f8cda", - "0xa0bffce0abcb3a94", - "0xa79159181c75e5f4", - "0xf763687b003d988e", - "0xe517a2e76e3dec7", - "0x364e085fe5924aaf", - "0xe3caa2516efeeea0", - "0x75bac5dd883321f", - "0x33812188e83b0fe", - "0x5bf1daa8fca65c90", - "0xee7cd9183f71a00a", - "0x531f6e3590764cdf", - "0xa68a959a1398c556", - "0x626240f3c329a6", - "0x32c98156e5a06941", - "0x1cf8f402f91a051f", - "0xc96a1a7c5b7c6ba3", - "0xffd37d295bd06cf1", - "0x80d0f029" - ], - [ - "0xb0090e14a0f101f9", - "0x8f4f3601c57db51d", - "0x2330a1b616e07fca", - "0x29e6276ddca8d93b", - "0xb1daa7a094a8303c", - "0xd335409df926410", - "0x94d08c3379d5f194", - "0x2e5af25e61ccb3f7", - "0xea080f014697278", - "0x848bdbb92fa70464", - "0xfc3f023463ef171d", - "0x6949fa841e60d373", - "0xa054ed12f34b0c0d", - "0x4c90601d8870f79e", - "0xb868cb6b268ee68c", - "0xb2214ca7d43cedbe", - "0xc8e3dd13cac9302a", - "0xe01e4a4a685dc9a0", - "0xecc9a83921e96a40", - "0x3ef7a16cfcf2465", - "0x9d0a845bda5f497f", - "0xde7146af1562a0ae", - "0x6bcc91f68d5ee908", - "0x29e37aee0c193add", - "0x81b8d263105dfee8", - "0x84ac93edbba0e1a5", - "0xb8d7905d10654ce0", - "0xed61dc06ff6e0045", - "0xe1d5148b24a7fd0", - "0x4eb6ddb3a042c112", - "0x4d29e48b191d4983", - "0xa516a035d2f9fc42", - "0x30b7b168334b9fc5", - "0x241baba0dd5dca13", - "0x5da1537d11d6d019", - "0x8c867cbf22aed0d2", - "0x978eb915d5333bbc", - "0x536ea066c26ffd90", - "0x9f6a47f4a1966d46", - "0x1cd65b45fbce8f95", - "0x63ac4d120aa8c020", - "0x97a0822d2ef59cfb", - "0x9ba50c3cfab23636", - "0xd3c4ec5917e0c128", - "0x3154a942345373ce", - "0xa06a45675079a0a2", - "0x3507decd13cf5aab", - "0xd01448b889dffa31", - "0xff0ac5775df90b22", - "0x3716a904d060adb7", - "0xa8cb93fb9ccc14a0", - "0xacf20453cf33071f", - "0x1baea1d6c59061f0", - "0xb454462fd379615d", - "0x951215dba51da057", - "0x25944b281dc11170", - "0x8d977364520f6260", - "0x41643220d7cbb5ff", - "0xb5a4cd2d60a0cfa8", - "0x31805288a5418e79", - "0xa00aaf997178a8", - "0xe538c6719fb34ba", - "0x80bc6ef9" + "0xc8a7b7a0808091f8", + "0xdb8ac1d6badde659", + "0x252e64288f4b960", + "0xb8b89458878b4f1b", + "0xe7a080f829865679", + "0xc910d1c731d3c6f9", + "0x1a053eaa7b0a5592", + "0xbd8d923da5261edc", + "0x806318223d317a51", + "0xce4a08080808080", + "0x32af4a8e1e0bc2f9", + "0x2b6db04ab83cdd01", + "0x2686913edce834ac", + "0x808007074f4cc4e5", + "0xfc2b302f1ac0a080", + "0x4ceb0ec6aa1d1571", + "0x21fed4450847731b", + "0xfbaaab524764719e", + "0x80ab02" ], [ - "0x361ebb55a08091f8", - "0xaaab6bec037b239f", - "0x80ee6263fe78c3ef", - "0xb0696b0983aeda52", - "0x851deaa02192db5c", - "0xd1dd1396759271b1", - "0x6a7fa9ae22eedebd", - "0xf8e56a5e7651c2e6", - "0x93a080445ea7bf78", - "0x588359fe93e47421", - "0x1869284a4e20b7ab", - "0x378b7e860a6f2ff7", - "0x80ad15263cc3e4ed", - "0x8680f38aba08080", - "0xfb671b4ef6a097f7", - "0x2804679b48710bb5", - "0x42fb5001db6b4438", - "0x8080808080945d41", - "0x808080" + "0x1276522d0e31a0e9", + "0x7e71fdcdee263b07", + "0xc2fa4a4bf40c326a", + "0xfab7e2cb9f2d73b0", + "0xe59c30128687f60c", + "0x40" ] ] } @@ -871,15 +672,15 @@ "0x0", "0x0", "0x0", - "0x45b6600000000000", - "0x0", - "0x8f62270200000000", - "0x7db680b9b03b023f", - "0x1cac6d5cc9718552", + "0xa422520000000000", "0x0", + "0xdbc1ce7500000000", + "0x65aa0e2003b7ce9d", + "0x20b962c98568f695", "0x0", "0x0", "0x0", + "0x100000000000000", "0x0", "0x0", "0x0", From 01807d668a24bef837efe3995c66bf86bd8839bb Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 24 Jul 2024 10:46:47 +0200 Subject: [PATCH 50/73] key struct member --- packages/contract_bootloader/memorizer/storage_memorizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/contract_bootloader/memorizer/storage_memorizer.py b/packages/contract_bootloader/memorizer/storage_memorizer.py index bc4e9d5b..1b0295e6 100644 --- a/packages/contract_bootloader/memorizer/storage_memorizer.py +++ b/packages/contract_bootloader/memorizer/storage_memorizer.py @@ -63,7 +63,7 @@ def to_dict(self): "chain_id": self.chain_id, "block_number": self.block_number, "address": Web3.toChecksumAddress(f"0x{self.address:040x}"), - "storage_slot": f"0x{storage_slot_value:064x}", + "key": f"0x{storage_slot_value:064x}", } @classmethod From 64edbe5f165e0efa0142aaa65a51213ec47429bd Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 24 Jul 2024 10:48:41 +0200 Subject: [PATCH 51/73] BE dry ryn syscall handler --- packages/contract_bootloader/provider/storage_key_provider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/contract_bootloader/provider/storage_key_provider.py b/packages/contract_bootloader/provider/storage_key_provider.py index 74fda532..d0a22ae6 100644 --- a/packages/contract_bootloader/provider/storage_key_provider.py +++ b/packages/contract_bootloader/provider/storage_key_provider.py @@ -14,7 +14,7 @@ def get_slot(self, key: MemorizerKey) -> int: try: # Combine the storage slot tuple into a single slot key - slot_key = key.storage_slot[1] << 128 | key.storage_slot[0] + slot_key = key.storage_slot[0] << 128 | key.storage_slot[1] # Fetch the storage slot data return int( self.web3.eth.get_storage_at( From 87e25e09b8b93a1769e090190c14a1baa6a2a623 Mon Sep 17 00:00:00 2001 From: Pia Date: Wed, 24 Jul 2024 11:10:18 +0200 Subject: [PATCH 52/73] result verification --- src/hdp.cairo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hdp.cairo b/src/hdp.cairo index 1e795f0c..fa0892cb 100644 --- a/src/hdp.cairo +++ b/src/hdp.cairo @@ -194,6 +194,8 @@ func run{ // Post Verification Checks: Ensure the roots match the expected roots %{ + if "result_root" in program_input: + assert ids.results_root.high * 2 ** 128 + ids.results_root.low == hex_to_int(program_input["result_root"]), "Expected results root mismatch" if "task_root" in program_input: assert ids.tasks_root.high * 2 ** 128 + ids.tasks_root.low == hex_to_int(program_input["task_root"]), "Expected results root mismatch" %} From 4f2d4cac6c47b0d2786f16af74e546b834e3e594 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 24 Jul 2024 11:25:21 +0200 Subject: [PATCH 53/73] storage slot fix --- .../contract_bootloader/execute_syscalls.cairo | 3 ++- .../storage_memorizer_handler.py | 7 ++----- src/hdp_input.json | 16 ++++++++-------- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/packages/contract_bootloader/execute_syscalls.cairo b/packages/contract_bootloader/execute_syscalls.cairo index ca616419..2a73bf0b 100644 --- a/packages/contract_bootloader/execute_syscalls.cairo +++ b/packages/contract_bootloader/execute_syscalls.cairo @@ -327,7 +327,8 @@ func execute_call_contract{ block_number=call_contract_request.calldata_start[3], address=call_contract_request.calldata_start[4], storage_slot=Uint256( - call_contract_request.calldata_start[5], call_contract_request.calldata_start[6] + low=call_contract_request.calldata_start[6], + high=call_contract_request.calldata_start[5], ), ); if (functionId == StorageMemorizerFunctionId.GET_SLOT) { diff --git a/packages/contract_bootloader/syscall_memorizer_handler/storage_memorizer_handler.py b/packages/contract_bootloader/syscall_memorizer_handler/storage_memorizer_handler.py index 9b20afab..d1febe5b 100644 --- a/packages/contract_bootloader/syscall_memorizer_handler/storage_memorizer_handler.py +++ b/packages/contract_bootloader/syscall_memorizer_handler/storage_memorizer_handler.py @@ -8,7 +8,7 @@ from starkware.cairo.lang.vm.memory_segments import MemorySegmentManager from tools.py.rlp import get_rlp_len from tools.py.utils import little_8_bytes_chunks_to_bytes -from rlp.sedes import Binary +from rlp.sedes import big_endian_int class StorageMemorizerHandler(AbstractStorageMemorizerBase): @@ -28,10 +28,7 @@ def get_slot(self, key: MemorizerKey) -> Tuple[int, int]: ) value = int( - decode( - little_8_bytes_chunks_to_bytes(rlp, rlp_len), Binary.fixed_length(32) - ).hex(), - 16, + decode(little_8_bytes_chunks_to_bytes(rlp, rlp_len), big_endian_int) ) return ( diff --git a/src/hdp_input.json b/src/hdp_input.json index aa5b51b6..522f31ca 100644 --- a/src/hdp_input.json +++ b/src/hdp_input.json @@ -1,7 +1,7 @@ { "cairo_run_output_path": "cairo_run_output.json", - "task_root": "0xaa30bf945c71955baeb7348ed98a37497a0cdbf0a01b2121004fd9f804a4a42a", - "result_root": "0xb5acdc1a6d2f10725b08b2c832572effa3715d85f00055f97a0c7fbffd9a43d8", + "task_root": "0xcc392fc5c447c5b129739adb810c745e43a6a3bbb98b5d26ae00c7c0b08491e0", + "result_root": "0x63cbd4ce7dcddf233f3c39d4ee6fcb836d0a82b97df9ef7f4212622c7ef8ddea", "proofs": { "mmr_metas": [ { @@ -657,10 +657,10 @@ "type": "module", "context": { "encoded_task": [ - "0xb3424e2f215f3e02", - "0xfb8dd84559b80524", - "0xbcbe5767b92e9c31", - "0x3450de4f93196035", + "0xe5895a6640af0302", + "0xa9053321f48e0a06", + "0x2f8a0734f300be37", + "0x25797242ad41dd5", "0x0", "0x0", "0x0", @@ -1395,8 +1395,8 @@ "0x400180027fff7ff9", "0x400180037fff7ffa", "0x400180047fff7ffb", - "0x400180057fff7ffc", - "0x400180067fff7ffd", + "0x400180057fff7ffd", + "0x400180067fff7ffc", "0x480680017fff8000", "0x0", "0x48127ffe7fff8000", From 255a584d8b6e98cf9d0bbf15fcecd5c412872d25 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 24 Jul 2024 11:31:11 +0200 Subject: [PATCH 54/73] cairo1 package update --- cairo/src/memorizer/storage_memorizer.cairo | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cairo/src/memorizer/storage_memorizer.cairo b/cairo/src/memorizer/storage_memorizer.cairo index 3eb9fe25..6a413e36 100644 --- a/cairo/src/memorizer/storage_memorizer.cairo +++ b/cairo/src/memorizer/storage_memorizer.cairo @@ -11,7 +11,7 @@ pub struct StorageKey { pub chain_id: felt252, pub block_number: felt252, pub address: felt252, - pub key: u256, + pub storage_slot: u256, } #[generate_trait] @@ -26,8 +26,8 @@ pub impl StorageMemorizerImpl of StorageMemorizerTrait { key.chain_id, key.block_number, key.address, - key.key.high.into(), - key.key.low.into(), + key.storage_slot.high.into(), + key.storage_slot.low.into(), ] .span() ) From d9c4544a46a013a2ac35315cb0c722e69cff1953 Mon Sep 17 00:00:00 2001 From: petscheit Date: Wed, 24 Jul 2024 13:54:02 +0200 Subject: [PATCH 55/73] feat: add coinbase to header field decoder --- src/converter.cairo | 2 +- src/decoders/header_decoder.cairo | 8 ++------ tests/python/test_header_decoding.py | 4 ++-- tests/utils/header.cairo | 12 ++++++------ 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/converter.cairo b/src/converter.cairo index 22a950d9..c43a21f2 100644 --- a/src/converter.cairo +++ b/src/converter.cairo @@ -13,5 +13,5 @@ func le_address_chunks_to_felt{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, po let (w1) = word_reverse_endian_64{bitwise_ptr=bitwise_ptr}([right_shifted + 1]); let (w2) = word_reverse_endian_64{bitwise_ptr=bitwise_ptr}([right_shifted + 2]); - return (address=w0 * 2 ** 128 + w1 * 2 ** 64 + w2); + return (address=w0 * pow2_array[128] + w1 * pow2_array[64] + w2); } diff --git a/src/decoders/header_decoder.cairo b/src/decoders/header_decoder.cairo index 0eb8052d..34e09471 100644 --- a/src/decoders/header_decoder.cairo +++ b/src/decoders/header_decoder.cairo @@ -52,11 +52,6 @@ namespace HeaderDecoder { func get_field_felt{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*}( rlp: felt*, field: felt ) -> (value: felt*, value_len: felt, bytes_len: felt) { - if (field == HeaderField.COINBASE) { - let value = get_address_value(rlp, 8, 6); - return (value=value, value_len=3, bytes_len=20); - } - if (field == HeaderField.BLOOM) { return get_bloom_filter(rlp); } @@ -79,7 +74,8 @@ namespace HeaderDecoder { return get_hash_value(rlp, 4, 5); } if (field == HeaderField.COINBASE) { - assert 1 = 0; // must use get_coinbase + let address = get_address_value(rlp, 8, 6); + return (Uint256(low=[address] + [address + 1] * pow2_array[64], high=[address + 2])); } if (field == HeaderField.STATE_ROOT) { return get_hash_value(rlp, 11, 3); diff --git a/tests/python/test_header_decoding.py b/tests/python/test_header_decoding.py index 513d526b..82cd5d2d 100644 --- a/tests/python/test_header_decoding.py +++ b/tests/python/test_header_decoding.py @@ -69,8 +69,8 @@ def fetch_header_dict(block_number): (low, high) = reverse_and_split_256_bytes(block.receiptsRoot) block_dict["receipts_root"] = {"low": low, "high": high} - coinbase = bytes_to_8_bytes_chunks_little(block.coinbase) - block_dict["coinbase"] = coinbase + (low, high) = reverse_and_split_256_bytes(block.coinbase) + block_dict["coinbase"] = {"low": low, "high": high} block_dict["difficulty"] = block.difficulty block_dict["number"] = block.number diff --git a/tests/utils/header.cairo b/tests/utils/header.cairo index 80335312..fca0ad8d 100644 --- a/tests/utils/header.cairo +++ b/tests/utils/header.cairo @@ -17,7 +17,7 @@ func test_header_decoding{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_ar local header_type: felt; local expected_parent_hash: Uint256; local expected_uncles_hash: Uint256; - let (expected_coinbase) = alloc(); + local expected_coinbase: Uint256; local expected_state_root: Uint256; local expected_tx_root: Uint256; local expected_receipts_root: Uint256; @@ -51,7 +51,8 @@ func test_header_decoding{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_ar ids.expected_parent_hash.high = header['parent_hash']["high"] ids.expected_uncles_hash.low = header['uncles_hash']["low"] ids.expected_uncles_hash.high = header['uncles_hash']["high"] - segments.write_arg(ids.expected_coinbase, header['coinbase']) + ids.expected_coinbase.low = header['coinbase']["low"] + ids.expected_coinbase.high = header['coinbase']["high"] ids.expected_state_root.low = header['state_root']["low"] ids.expected_state_root.high = header['state_root']["high"] ids.expected_tx_root.low = header['tx_root']["low"] @@ -102,10 +103,9 @@ func test_header_decoding{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_ar assert uncles_hash.low = expected_uncles_hash.low; assert uncles_hash.high = expected_uncles_hash.high; - let (coinbase, _, _) = HeaderDecoder.get_field_felt(rlp, HeaderField.COINBASE); - assert coinbase[0] = expected_coinbase[0]; - assert coinbase[1] = expected_coinbase[1]; - assert coinbase[2] = expected_coinbase[2]; + let coinbase = HeaderDecoder.get_field(rlp, HeaderField.COINBASE); + assert coinbase.low = expected_coinbase.low; + assert coinbase.high = expected_coinbase.high; let state_root = HeaderDecoder.get_field(rlp, HeaderField.STATE_ROOT); assert state_root.low = expected_state_root.low; From 7176ad16dcfeb6b16d3da8a8f0ab94582ad555d7 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 24 Jul 2024 16:16:06 +0200 Subject: [PATCH 56/73] ALL SYSCALLS WORKING --- .../provider/account_key_provider.py | 6 +- .../provider/test_account_key_provider.py | 6 +- src/hdp_input.json | 1346 +++++++---------- 3 files changed, 515 insertions(+), 843 deletions(-) diff --git a/packages/contract_bootloader/provider/account_key_provider.py b/packages/contract_bootloader/provider/account_key_provider.py index c6c99e83..6bb85edc 100644 --- a/packages/contract_bootloader/provider/account_key_provider.py +++ b/packages/contract_bootloader/provider/account_key_provider.py @@ -35,8 +35,10 @@ def get_balance(self, key: MemorizerKey) -> int: def get_state_root(self, key: MemorizerKey) -> int: try: - block = self.web3.eth.get_block(key.block_number) - return int(block["stateRoot"].hex(), 16) + address = Web3.toChecksumAddress(f"0x{key.address:040x}") + account_proof = self.web3.eth.get_proof(address, [], key.block_number) + state_root = account_proof['storageHash'] + return int(state_root.hex(), 16) except Exception as e: raise Exception(f"An error occurred while fetching the state root: {e}") diff --git a/packages/contract_bootloader/provider/test_account_key_provider.py b/packages/contract_bootloader/provider/test_account_key_provider.py index 2c7ee1b7..e9747bb1 100644 --- a/packages/contract_bootloader/provider/test_account_key_provider.py +++ b/packages/contract_bootloader/provider/test_account_key_provider.py @@ -33,8 +33,8 @@ def test_fetch_state_root(): value = provider.get_state_root( MemorizerKey( chain_id=11155111, - block_number=1450630, - address=0x2F14582947E292A2ECD20C430B46F2D27CFE213C, + block_number=5382820, + address=0x13cb6ae34a13a0977f4d7101ebc24b87bb23f0d5, ) ) - assert value == 0xFE6DE8AD0447064B4D98632F12623FB06BBF6F31FF4718A746E371276D5F96A6 + assert value == 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421 diff --git a/src/hdp_input.json b/src/hdp_input.json index 522f31ca..57cdd021 100644 --- a/src/hdp_input.json +++ b/src/hdp_input.json @@ -1,7 +1,7 @@ { "cairo_run_output_path": "cairo_run_output.json", - "task_root": "0xcc392fc5c447c5b129739adb810c745e43a6a3bbb98b5d26ae00c7c0b08491e0", - "result_root": "0x63cbd4ce7dcddf233f3c39d4ee6fcb836d0a82b97df9ef7f4212622c7ef8ddea", + "task_root": "0x94f085f1e6046825fcd0dcb9747c2f1a105b32102f9e725eee72df2d4d23aa89", + "result_root": "0xb54682f3b0457668f854eb00e61035883819fc5e94a17a3990fbb770b28c6295", "proofs": { "mmr_metas": [ { @@ -138,11 +138,11 @@ "accounts": [ { "address": [ - "0x3b7ce9ddbc1ce75", - "0x8568f69565aa0e20", - "0x20b962c9" + "0x97a0134ae36acb13", + "0x874bc2eb01714d7f", + "0xd5f023bb" ], - "account_key": "0x962f445fc8476432660877b666f653759ea69189b60d2f4a7008e70555746ad1", + "account_key": "0x8ad2b901594e58a241532055dfe914294630ed5c33ffc31905452799f9b4aab0", "proofs": [ { "block_number": 5382820, @@ -152,9 +152,10 @@ 532, 532, 532, - 436, + 500, + 147, 83, - 110 + 106 ], "proof": [ [ @@ -227,428 +228,402 @@ "0x80684625" ], [ - "0x1efd9844a01102f9", - "0x8c072cde3129f4a6", - "0xff3aa8226d370172", - "0xafc5554227aaecfc", - "0xa8349fa00538ccd5", - "0x19352b32bf29b2e8", - "0xd732740eaaaab513", - "0x651e510835e68786", - "0x9b59a0f373bc0007", - "0x5e464fd03d8b14c8", - "0xbde725cadedff34", - "0x22fa16d7ade8ea57", - "0xea0f2682fffd69d", - "0x562dc82e0cb57f31", - "0xfe2f2d7c75395681", - "0x5539db5da2979a87", - "0xa00fa594b52682fc", - "0xad0f79d8bf79ae7b", - "0x53cca8cbd3dacf42", - "0x800aa08a23b18756", - "0x3ee9a9a3fcf6fcbd", - "0x20e0733a0faa2ca0", - "0x5030ddaf0927e4ad", - "0xb5e33c15476d1dda", - "0x140ec743e0283781", - "0x3aa15fd63b46a0ce", - "0x95219066be1d0fc3", - "0x2bcf21dffd10041d", - "0xb5183d1c234f4a84", - "0xa5b4793a13a0e97a", - "0x7e47207c4c465826", - "0xccce924ccb0c951e", - "0x7ddc3f5cd7ae0b30", - "0xa2c1d35fa068b83b", - "0x4347adab647a0801", - "0x37c47004b421e31b", - "0xbc0dbc765f96316", - "0x8e1f85a0bc3e6842", - "0x896b7fa90084c8ab", - "0xb01abd0a17629633", - "0xb3c368fb5143a21f", - "0x8522a015d97d273c", - "0x121690f296bbe11e", - "0x97dd772be0f7c416", - "0x6e08d27c16a8b750", - "0xf0a0105f2b1db536", - "0x3f6a904f84b4edcc", - "0xc8f8e1b2e8455962", - "0x5c3de94924612794", - "0xa0aac7bc0584d95b", - "0x7b72d76fa94fc990", - "0x593b92058216a902", - "0x7f5d784c1319132a", - "0x385eb44290804ae9", - "0xe1cccba4f75714a0", - "0xb1179f1903e8fb36", - "0x36f7d19df6691ae4", - "0x78f134b5eb7e2ccd", - "0x8e3bb5d63dc5a0f6", - "0x84347806c8a58d9", - "0x9dceebfc3065de5c", - "0x168530d8e9c1cca5", - "0x757cc04667a0b263", - "0xab6c9b1d185a3cf0", - "0x70bda215ed69ea8a", - "0x48c9a965c4aa8a7", - "0x80f15439" + "0x66b09942a01102f9", + "0x4eea1a0a280d06cf", + "0xddc21e8383fde7e8", + "0xc3913a607e71a344", + "0xe21ca7a010e48f71", + "0x214ba79d3b53ce70", + "0xefce253571d45489", + "0x55fc178552d14363", + "0xee9fa00622347a61", + "0x94beeb851d845f65", + "0xf3ddeecc606bdab7", + "0xfe09f34d0b5110cf", + "0x9fa04327c4862d99", + "0x7f00a28786596a0f", + "0xaf30242d9293b705", + "0x7929f8d18ad38cf4", + "0xa03b3b53e411e6af", + "0x230aaacbf444b735", + "0xe3c4571ec78d3314", + "0x989b640f18e552c4", + "0x66bb55ee2a402a69", + "0x8642352c8fb2c1a0", + "0xff9ae5fe53a0e39a", + "0x84074671fa759110", + "0xf014c847e7e8e2a6", + "0xa33c55dece71a0b0", + "0x36f53970eb796fd0", + "0xc8d1772fd20168", + "0xfef5ecef5775f064", + "0xf95510746ca07ce9", + "0x601a3a404704615a", + "0x6afdb4f486b3d355", + "0xffbddca3b8fcfee0", + "0xbb50dc69a0380c4a", + "0x8f7413d2096668f3", + "0x7314832fd835f44e", + "0x52d95dce023b178d", + "0xa72d44a0b55aebdb", + "0x82376a65e0ed5723", + "0x53f3d1ab0cb9ed87", + "0x67b00b4ee20bd97f", + "0x3531a0ecc79c9263", + "0x9202ee4b2ba3cf49", + "0xb31fda146c80fce1", + "0x7e63b522f76dab53", + "0x7a053ad2fac8416", + "0x466f2a9b671e5318", + "0x67ddb015e552ede", + "0xf9e07343ee36507b", + "0xa01fb73f3dfe6207", + "0x83dc1eb02643475d", + "0xaf744df0d34af6cb", + "0x75e2a675b733ea70", + "0xa3ee77d5eeb98cb4", + "0xea750f3501c7f1a0", + "0xaa3c03c88da7083e", + "0x7662477dc9b3db81", + "0x934075e93df49559", + "0x518a40227de4a00e", + "0xc7e2cbe91c290f8d", + "0x292bd9ee86746f70", + "0x417e131393bd5bfa", + "0x6f617f28c9a0e475", + "0x4c0e59c04b8074d4", + "0xbb3752aa77ca60d9", + "0x4f254b7f8aef44ea", + "0x8015580e" ], [ - "0x365cdaa6a01102f9", - "0x548687e6e2d18349", - "0xd18130c1a89a2957", - "0xfa2d66351fd5a315", - "0x34b76ba05662ac7e", - "0x572cb0793f1757ec", - "0xd688289305ef0b33", - "0xeb71d7482fcd72a", - "0x9ef8a0ad61bde95d", - "0xa00903c1f6780811", - "0xd658da2da3bc3d6f", - "0x9ba141863886b4d2", - "0xb9a02124b9b18e92", - "0x8671f0994d35c6ca", - "0x75b50898d840f64f", - "0x8db5c5a460e11004", - "0xa052c52932b393e9", - "0x6ec275bdfa587885", - "0xf56b656d47853449", - "0xbd98084756b50a8c", - "0x473ce07445efc73", - "0xe0cc1476176662a0", - "0xcf2178543079fe23", - "0xcab4a3c95abd2a88", - "0x22897d940fbd3c60", - "0x5005bea75822a061", - "0xa965a367732c5c67", - "0x30ccbd08bd5c7caf", - "0xc42dab70260b35b", - "0x7bb56b1ea9a0a830", - "0xdff1f6233201a751", - "0x533c49cfee129dba", - "0x51aa5b706b6755d4", - "0x4669b8b9a0ddde36", - "0x4b18343ba641db42", - "0xdf1e99c46fdef5cb", - "0x513e4246ec43042a", - "0xe0d036a0e4866d7a", - "0x42e1292302d96ba0", - "0x5641cd5d161765c", - "0xa43151e5b49ef0f1", - "0xaa88a07d5b61eb06", - "0xbce5d3e7bbd471c3", - "0x88075180281d7b34", - "0xab91ef94ba554234", - "0x26a0d50e5f031cf0", - "0x217172c3fe41ae03", - "0x6ba86b9003e5fa7a", - "0xa5c33284ce1f06d4", - "0xa055dfa633b07ee3", - "0xc544b2fed865197", - "0x14a5f272c1cb32de", - "0x4b049409129d5ec0", - "0x58407bd02c708213", - "0xdd5d7a3aa893c9a0", - "0x30b29455dcfbcc4c", - "0xd855032a50d0a22c", - "0x2c0a6b91df21cbe8", - "0x4cc1b4508436a0e4", - "0x9ad4a6b16d75240b", - "0x1c5c0ba7fb2c440c", - "0x8a5d34399ba0d052", - "0x3672f413e1a07543", - "0x7a60dfbff0785854", - "0x492b09dee781b9b2", - "0xe30e77a64a84e23c", - "0x80cbdd7b" + "0x44e1eecca01102f9", + "0x7474098a27ce0ab", + "0x5056e85f40acf483", + "0x28123d367d0d8f64", + "0x424a57a0881ff3a4", + "0xf8bdd755a1730796", + "0xd923ac0aae8b464d", + "0x2a2652f489c81c9", + "0x563da0c3fba41fe1", + "0x83f70053bb958d5", + "0xa04f49ead3caed9c", + "0xc89c422d3ac9f809", + "0x34a0901c74f12cbb", + "0xbe0a0a499359ad86", + "0xdee864368e9e99de", + "0x5068474fcdcf9fb8", + "0xa07fd1ad037b317a", + "0xdfc7f2171574ff0f", + "0x21d80436c931f1e0", + "0x13f1f03a44746b81", + "0x952fbdbb407f49c3", + "0x108b082fa561ffa0", + "0x977aa488b311a31d", + "0x218c8b89769ffb88", + "0x12d93f702216fcd8", + "0x334963972817a08f", + "0xab980b29bde60d94", + "0x5db93b5ee032e1ef", + "0x79bafa05002bd239", + "0x75df34c970a0c91f", + "0x768276d6a06ccca4", + "0xa7f26ff5c02cff0e", + "0x1bf991a505681399", + "0x4bd1dc2ea0590237", + "0x7989c75e583b675f", + "0x2324128510b58162", + "0x622edc9941b332b8", + "0x22bcd6a0c6f4d618", + "0x89a44d0d4646a02b", + "0xf9a9e030aac36e55", + "0xaabb0787ae7fb4a0", + "0x9bc4a08b1d3ef870", + "0x3c8a02f81657e9d9", + "0x5623ad7faa0884d5", + "0x452fcab47243f960", + "0x93a0ec18ac8f86d9", + "0x1dbbf27ea56e7c2d", + "0x34cad3fdce61d1dd", + "0x250d51024a3e6d73", + "0xa08c63a4656eef7a", + "0x9bb255ee1e134d2f", + "0x78cc43fb5ab37664", + "0x938318be144f4300", + "0x7155ab0f94eed37e", + "0x11b90fd742d609a0", + "0xa25774f34225cf49", + "0xc0eee3e025baf8f", + "0xd220b40abfba16e5", + "0xa04bc79262aaa015", + "0x89edfb632d63363b", + "0xb7f43d16c083e1d6", + "0x85394f02564f3344", + "0x4fd477992fa0c707", + "0xdb52636642ee63a6", + "0x61de223783ee2649", + "0xff24c742a81cf821", + "0x802b7ef4" ], [ - "0xf6b877b1a01102f9", - "0xe7aa7603c90b4319", - "0x34c8513389339604", - "0xc451d1352573be34", - "0xeb8ad5a09d6cfcc4", - "0xb1f552a325008a63", - "0x26d1e83f81c88d91", - "0xb16afafc084a013d", - "0xfc69a0543ceaf28e", - "0xa962e5133f55745", - "0xa420c1bf598e36d4", - "0x6c211a28cb08425e", - "0x29a009eb12dd8587", - "0x43250fabaf027a07", - "0xe04b87350d4c55c", - "0xece8e24bf940b208", - "0xa03ec4c6ac4814e7", - "0xefea92985d1632e2", - "0xdb32466c4628e6bd", - "0x10c5444b00a322d2", - "0xb3b73882d399d574", - "0x72eee83c833f20a0", - "0xf521c2a824968f68", - "0x5d1b4f9d29d41e75", - "0x25a6fd7338ee612a", - "0xb494167251e4a02c", - "0xc5a93e94d2d99c70", - "0xd05a7fe25cb256b4", - "0xdd1caf061365272f", - "0x96f912e7aaa06e10", - "0xa6d2391d460ebd14", - "0x5c10cda11bc1c39d", - "0x1a3ccc0b97e1030f", - "0x824fc778a0381782", - "0xc7517890da856af7", - "0x19f06804f7a86b41", - "0xd2b23a082cd444ee", - "0x21bfaa019d827b7", - "0xc89eb3e4e9a8b678", - "0xd7fa27e3a300aefe", - "0xd4734727f1d5ba5", - "0x5795a0ba6719730f", - "0x3826f7ae5b2a2a0c", - "0xf912d6c6e808ea20", - "0xd7724f885c3af94f", - "0xeca049a187c6d08a", - "0x7664e3eefc4e9002", - "0xbe95b8e9e13f9540", - "0xebb9a48d3a9940b2", - "0xa05842d57aa7178f", - "0x115fadee30f43ddd", - "0x7084f9f438fa9781", - "0x17d87178c152d468", - "0xc30e711d091492af", - "0x1ea03c63377c87a0", - "0xb18c061168493240", - "0x580f33ea4ae60f4d", - "0x1204bb22f25e353c", - "0x4b70aeb8db00a05c", - "0xe2638155538bd67", - "0x7653cec061196029", - "0x5c0d296b24559e", - "0x9167edff5ba09b50", - "0xcefa52977ece8c9c", - "0x66eb902251635992", - "0x74dfe8bb03758b11", - "0x803125e7" + "0x4b721a99a01102f9", + "0xe02a3c912422ff37", + "0x409de205111f9d5", + "0xb4e2e2f6628cb64b", + "0xa09cb8a0e2a59448", + "0xcc4550c2002a5292", + "0x168b5851dc594d84", + "0xe5a269c47fe3551c", + "0x7d5a0a4907e7f14", + "0x25c625a5bba18bd3", + "0x85b8e227613c3e22", + "0x4a5048266abadf2", + "0x9ca0c6b865cdd2ea", + "0x59ffc593aaef458f", + "0x24ab6c65729cf7ce", + "0x990d9157d02330aa", + "0xa06c247e9f0f5b4a", + "0xf37d20f86f8918f3", + "0x8df6c7e10eefa537", + "0xe38a06cc8b5d3b24", + "0x26e0a38b0ba1d865", + "0x9439ad29be13c9a0", + "0x28a787564e1df2a4", + "0x6192ae89d5b0bded", + "0x8e9d459d7d3993", + "0x6c3ae898374ba079", + "0xdfc95da0800507ba", + "0x3f128ce05fa65d0", + "0x70e7501f136e12cb", + "0x3e7fe41785a0b7ee", + "0x39bf77aef30b2199", + "0xff9dd0e409522496", + "0xe6977427b6abe1c0", + "0x1deeb918a0a6d3ec", + "0xbbac0a36518f3e36", + "0x7c865698f88bf36d", + "0xf14da7897af696b5", + "0xa0b432a07160e674", + "0x1098d83de98221e2", + "0x7a06680689aea28b", + "0x567afc4403b52cf5", + "0x4f2fa04382d34b26", + "0x44e25fac5b4060cf", + "0x5ea33dbd2f58ac4f", + "0xb8ec321caff09cd2", + "0xeda06506bf1616c2", + "0x8380f3d0bc8e7ed8", + "0x36eb0c037027804c", + "0x38f1cfecd23f5470", + "0xa0ee4492fb413d3e", + "0x7febc69fd89fa397", + "0x9218affd020beaf9", + "0x5ffac1db7de3724a", + "0xa1de7685df286231", + "0x99345c1166cb22a0", + "0x9c25af6e1072a676", + "0x493463ed72e6199c", + "0x25e0e3b93fc00f36", + "0xb5cb9431b5b7a0a8", + "0x973f6b680e787724", + "0x4a9d2737a07361ed", + "0x1ea54f55ccf9e733", + "0x911be46f9aa00f7e", + "0xf7da93abba5f5150", + "0xc43c6f435cd6a21b", + "0xd3661e79fd6bc22a", + "0x806f1e4f" ], [ - "0xf0ef1a82a01102f9", - "0x272e097eeb01a32c", - "0xc52ee715c1b8a65f", - "0xf5b2be6ba090d66e", - "0x73a9e8a0690d7f64", - "0xa348d637702d9331", - "0x65ac2182884d2b1c", - "0x969bdd2a7ed32005", - "0xdeb0a0278c0937c5", - "0x4f0f357c58944ec5", - "0x97cde9d0035fff7d", - "0x72cc4dff609a6145", - "0x63a058a104f1ec79", - "0x35af04a552292f89", - "0x32dc86ccccf17348", - "0x147da35537db09a9", - "0xa084f7e7fa7ff0fc", - "0xd9e0fde9d4c1e4bc", - "0x539f68de733ab56d", - "0xe1feb443e7612c02", - "0x6fc2c1ea25da2b3a", - "0x10f34f269a572da0", - "0xeef6d39e7617f736", - "0x629cefa3bb0a7142", - "0x1b946f908ef1ff08", - "0x483b5510a91aa0aa", - "0xbfbd8a1551a40c8a", - "0x4e8d35d3299fa62c", - "0xe762875f35ef4bb5", - "0xf663298ef7a0b2d2", - "0x8826a9c326d2ccd8", - "0xdeaa534ec9527b3", - "0xdd048903dd076748", - "0x4c45edfa0c25ed4", - "0x394ea3e5df85c4a1", - "0x1720a075e18123a6", - "0x7167d842aad780be", - "0xf0a356a0822c52a5", - "0x6adb550caadfec6a", - "0x3b2cbabf3124798c", - "0x93c22211a4f72b3c", - "0x5b14a020529f1c35", - "0xb37bd92c1f993b1", - "0x3233723e7b5c4e65", - "0x22269aff91e722f6", - "0x2aa0f5e16ab6558a", - "0x2204e95272d04b95", - "0xa39a86fd8da22558", - "0xe3764a9e51d52ac5", - "0xa0af19d73dffc8f0", - "0xbb14960ed766c273", - "0x9323155ea9c3eab1", - "0xeaaca5c7ca47cb88", - "0x645cc636a040cd7c", - "0x98a4f1fa69e49a0", - "0x34b9727babc84cc3", - "0xe918d91bfc0b8c87", - "0x5a0ad2cc3cda3b59", - "0x84d41c94bc74a084", - "0x58c117018c298b45", - "0x4c38656b0b043558", - "0x5f15c47187a5edca", - "0x9bb8a091aaa08c1e", - "0x5e31951a911730ba", - "0x294d7d92337d2a0e", - "0xff7f4e5ec3a5b4e3", - "0x80d7af5b" + "0xb6721834a01102f9", + "0x65b0b3b817362a19", + "0xe6bdc762cac6abf1", + "0x9e173d04650c9407", + "0x85faffa0b60d822e", + "0x19b763e939de7ddd", + "0x7a82d3cec2145b21", + "0x5f42f7f6a2755762", + "0xf4a2a0ae34d64f07", + "0x16ae2615fcf48602", + "0x9280a59fe9dd7b2e", + "0xa8d0310b918aa446", + "0xaaa0b4d3ef08644f", + "0xf300410f95e540ac", + "0xa54a7659efd45ec3", + "0xc445230c53d1bddc", + "0xa00f4185f8dc93a7", + "0xe93d03ce43550301", + "0x1a00273c0ac61fb6", + "0x2e0f6f0d18272427", + "0x9805fcf2c8b1653c", + "0x3dec416ff498baa0", + "0x48142eb5163582da", + "0xe2b7d888b2a5ce15", + "0xa8fd3a9094a2f152", + "0x1c9788802016a0f9", + "0x58f7be2da9a6528", + "0x7fdf2f97d8dfafb7", + "0x791f954d3d6a623f", + "0x54f9c3d47da028bf", + "0xf663ce3a5f15e834", + "0xe19a4e29920fe8c7", + "0x9137497f331c6671", + "0x6ad990a5a07738ae", + "0x3736ee9ea0a8c61a", + "0x8427fb955e69b960", + "0x860412fda3d569e2", + "0x3776e7a02e65a325", + "0x1e251935059ebd48", + "0xf5da5d7c7601e0c1", + "0x6dec3478245276cf", + "0x6ae3a0d6ed841766", + "0x4d637fafc196c32b", + "0x1872cd4ab0fb582e", + "0xb88bb2e761846b4c", + "0x31a06a7530c30808", + "0x11259421f0feb7c4", + "0xaa1c99f2106769dd", + "0xede10c2c05993ae4", + "0xa02d30982e30bb0f", + "0x235594ee53c44c05", + "0x73387cee25571335", + "0x26607787c455b91d", + "0x2b73d84d306eb1d3", + "0xdefe6f4f50ac96a0", + "0x85858e8b0ede8c06", + "0xeac0f28cd11f30f3", + "0x1e5fd4a42ec0658", + "0xa60209a0074ba06d", + "0x741bfca4c7a04474", + "0x8085ee7246daeeae", + "0xe9f2fe44ff363a27", + "0xd5fa22fdc7a037fe", + "0x2240f7c2622bd91d", + "0x38d3d7853ef0d516", + "0x3f51bb86a892550e", + "0x8088049f" ], [ - "0xaf23626da0b101f9", - "0xa367365d1b970124", - "0x65e759a72e878aa5", - "0xe4e02d4f5e37fb82", - "0x2558f1a05e27df20", - "0x5b6ea33a9fb9202d", - "0xfc5abea4476c897", - "0x8ff11ca49e762e58", - "0xfaa4a0272260e37a", - "0xaf0edd4f2833ccea", - "0xace3436577e032ce", - "0xccabb7fc8de69d34", - "0x24a05fdf82aeb040", - "0x60ddd0c191da6f5f", - "0xf8cb38939a79c836", - "0x5af3453a8acabb5c", - "0xa065cb106d07bb27", - "0xcffc5e1cd206d380", - "0x1081b2488fb955a6", - "0x8fbdaea9606ffe00", - "0x968e749c58e7bddc", - "0x7379a83b9f4977a0", - "0x5b5dbe8c62d6737a", - "0x87ca31004398d58a", - "0x7d3f9d50a2b3dc9c", - "0xe1aefba1ec9a05f", - "0x81fd3e67ba450856", - "0x2405879e8b3e313a", - "0xb44eceb64caac4ad", - "0x7524e099d0a05873", - "0x99572f395a78af46", - "0x329eca12b73e7afb", - "0xd5615ad6496fe3dd", - "0x29a4aa2aa0e22674", - "0x64ef8b64ec9ec133", - "0xfbcf841e5a70da6e", - "0xee2a86312ad6ece4", - "0x6c516ea04152e016", - "0x2ce5fa3fd3811fdf", - "0x101750195278bfa5", - "0x1205c4b2382730b5", - "0xe4a080943cef0674", - "0x5840eced3520c312", - "0x3f408ac137812fb0", - "0xef0b1fcae174025d", - "0xa0f88a78617f25f3", - "0xfd07702066c149be", - "0xbe166add9f371f65", - "0x10f0fce6574e85a5", - "0x36888ff2d7e55195", - "0xc852b6d58640a080", - "0x5eb439ecef8c8556", - "0xcfcf89fa5e950126", - "0x7bf954f98325d4c8", - "0x80801ecf" + "0x8a169437a0f101f9", + "0xfa3ced185956309b", + "0x8db06f289f3afe2f", + "0x52035bc077222d8", + "0x81cecca08e33e3ff", + "0x89a250e215c171cc", + "0x62c1bc60f0993650", + "0xbbf62b96459bcb5a", + "0xd445a08173fda93c", + "0x91e7d43fe3377371", + "0x5502931ba59fddb3", + "0x1850b91b288e1685", + "0x64a0a630c8207acf", + "0x58160f099ed6023", + "0x4198238ff4613e16", + "0x77a336c10e03830d", + "0xa0eee1cea4502c76", + "0xf03b6b2a60a90439", + "0xa6ae0795e51d73f7", + "0x50143ee9c95b716b", + "0x108687f67e7a94fb", + "0xb12beb59cef3f6a0", + "0xafb92ce4c1a7c30d", + "0x2f9c1bc1f8797cdf", + "0xd44b981d3cf8c962", + "0xb7473eac86a0804e", + "0x17d294fc99c4eb84", + "0xfc134b89c34521e3", + "0x2dfd108c430de5b3", + "0xcbff41e7a0690d8d", + "0x7262a4626784226e", + "0xd766f80aea9d6f9c", + "0x475d36ab0542fd41", + "0xb912eba0932ea0db", + "0x2d1cd9badaf643de", + "0x95e64b5eb7ad9a54", + "0x58d5e092664b2a5b", + "0xc352a0e708f0003f", + "0xcfa1c1d55e281237", + "0x9e50c506df0c6d92", + "0x177117b78c273ad0", + "0x87a0655a2b1444ee", + "0x567ba6fb34252d22", + "0xb27c861900096e61", + "0x686c7e2d0bd66e7b", + "0xa0846bfab63b51ea", + "0xc6ead052cf367d6b", + "0xb7f01de54f58d9b7", + "0x14b2e41168155bf9", + "0x15799e90891e2e2a", + "0xf33c015b01bc83a0", + "0xc64e908e435f0a45", + "0xa2e576fdc5b71c81", + "0xdf7af1dae9fcc66f", + "0xc7b80409a927a036", + "0xdd45519a5945592c", + "0x332aaa1ae333836c", + "0x1b7ef2b40b6dc194", + "0xf0bae61277a079a2", + "0x35e03e67ca2824ee", + "0x715f902a6a8d4f52", + "0x7f942bfd1917df67", + "0x802efe51" ], [ - "0xa0808080808051f8", - "0x7690f8de14ad2219", - "0xca504a511d01e0bd", - "0x83bb3671612d63e7", - "0x733c38d3befcb2c1", - "0xa080808080808080", - "0x94af46e820431ae8", - "0x25f498521a9f94db", - "0x34728bbeec8e4e86", - "0x3c6eeac033ea0a2b", + "0x2e896a4d4ea091f8", + "0x11c47fbbfcd66965", + "0xfa264bb69a6b3cf6", + "0x6a15a88209b6e3ac", + "0xfba0808080facf9e", + "0x509c2d93079b239b", + "0x46e6084a232eaa65", + "0xec96e29bb96af360", + "0x808e4d79fd0a01f7", + "0x10c4332e32a08080", + "0x3c58ad19246301dc", + "0x7ee9d2dc08f00328", + "0xda7a7eb1fb996a6f", + "0x4512a3da05a6b0e", + "0xf29247e223c0b2bd", + "0x68af6edd3da39a07", + "0x821ee0c83ce615ae", + "0x808080804b366c8e", "0x808080" ], [ - "0x326447c83f9d6cf8", - "0x7553f666b6770866", - "0x4a2f0db68991a69e", - "0xd16a745505e70870", - "0x301286014af84cb8", - "0xf0bb69a00040e59c", - "0x622c5138549d7f40", - "0xfa77f381958a7618", - "0x17b90914ea19c15d", - "0xb3eaa01c2e245cb7", - "0xed095ef7d0228e44", - "0xdb3967ac872e9b84", - "0xc6fcefae4edb0441", - "0xfd559781fa6c" - ] - ] - } - ] - } - ], - "storages": [ - { - "address": [ - "0x3b7ce9ddbc1ce75", - "0x8568f69565aa0e20", - "0x20b962c9" - ], - "slot": [ - "0x0", - "0x0", - "0x0", - "0x100000000000000" - ], - "storage_key": "0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6", - "proofs": [ - { - "block_number": 5382820, - "proof_bytes_len": [ - 147, - 42 - ], - "proof": [ - [ - "0xc8a7b7a0808091f8", - "0xdb8ac1d6badde659", - "0x252e64288f4b960", - "0xb8b89458878b4f1b", - "0xe7a080f829865679", - "0xc910d1c731d3c6f9", - "0x1a053eaa7b0a5592", - "0xbd8d923da5261edc", - "0x806318223d317a51", - "0xce4a08080808080", - "0x32af4a8e1e0bc2f9", - "0x2b6db04ab83cdd01", - "0x2686913edce834ac", - "0x808007074f4cc4e5", - "0xfc2b302f1ac0a080", - "0x4ceb0ec6aa1d1571", - "0x21fed4450847731b", - "0xfbaaab524764719e", - "0x80ab02" + "0x198ec87aa08051f8", + "0x69468d18b420fc23", + "0xcaed890611ce65bf", + "0x54afb686e30b4471", + "0x80808080918073ee", + "0xda5d26326c8ba080", + "0xfa0d187d28e2397a", + "0x4eb95b8e08b4e0bc", + "0x7f323b88311b42cc", + "0x8080808080803c90", + "0x808080" ], [ - "0x1276522d0e31a0e9", - "0x7e71fdcdee263b07", - "0xc2fa4a4bf40c326a", - "0xfab7e2cb9f2d73b0", - "0xe59c30128687f60c", - "0x40" + "0xa2584e59209d68f8", + "0x2914e9df55205341", + "0x19c3ff335ced3046", + "0xb0aab4f999274505", + "0x8064128246f848b8", + "0x55cc1b171fe856a0", + "0xf8c092e64583ffa6", + "0xad6c991be0485b6e", + "0xb463e3b52f6201c0", + "0xf7860146d2c5a021", + "0xc7dcb27d7e923c23", + "0x82ca53b600e5c003", + "0x855d04d8fa7b3b27", + "0x70a4" ] ] } ] } ], + "storages": [], "transactions": [], "transaction_receipts": [] }, @@ -657,10 +632,10 @@ "type": "module", "context": { "encoded_task": [ - "0xe5895a6640af0302", - "0xa9053321f48e0a06", - "0x2f8a0734f300be37", - "0x25797242ad41dd5", + "0x67c89780e72c1b04", + "0x6449215836ba259c", + "0xb444dca75bb6a4fa", + "0x5b2ef9700c510404", "0x0", "0x0", "0x0", @@ -668,25 +643,17 @@ "0x0", "0x0", "0x0", - "0x400000000000000", + "0x200000000000000", "0x0", "0x0", "0x0", "0xa422520000000000", "0x0", - "0xdbc1ce7500000000", - "0x65aa0e2003b7ce9d", - "0x20b962c98568f695", - "0x0", - "0x0", - "0x0", - "0x100000000000000", - "0x0", - "0x0", - "0x0", - "0x0" + "0xe36acb1300000000", + "0x1714d7f97a0134a", + "0xd5f023bb874bc2eb" ], - "task_bytes_len": 224, + "task_bytes_len": 160, "module_class": { "prime": "0x800000000000011000000000000000000000000000000000000000000000001", "compiler_version": "2.6.3", @@ -694,21 +661,21 @@ "0xa0680017fff8000", "0x7", "0x482680017ffa8000", - "0xffffffffffffffffffffffffffffe214", + "0xfffffffffffffffffffffffffffff330", "0x400280007ff97fff", "0x10780017fff7fff", - "0x173", + "0xd7", "0x4825800180007ffa", - "0x1dec", + "0xcd0", "0x400280007ff97fff", "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0x17b", + "0xdf", "0x482680017ff98000", "0x1", "0x20680017fff7ff8", - "0x15a", + "0xbe", "0x48307ff680007ff7", "0x20680017fff7fff", "0x4", @@ -729,7 +696,7 @@ "0x480680017fff8000", "0x0", "0x20680017fff7ffe", - "0x134", + "0x98", "0x480080007fff8000", "0xa0680017fff8000", "0x12", @@ -746,7 +713,7 @@ "0x402480017fff7ffb", "0xffffffffffffffffffffffffffffffff", "0x20680017fff7fff", - "0x11f", + "0x83", "0x402780017fff7fff", "0x1", "0x400080007ff87ffe", @@ -775,151 +742,11 @@ "0x480680017fff8000", "0x0", "0x20680017fff7ffe", - "0xf4", + "0x58", "0x48307ffc80007ffd", "0x20680017fff7fff", "0x4", "0x10780017fff7fff", - "0xa", - "0x482480017ffb8000", - "0x1", - "0x48127ffb7fff8000", - "0x480680017fff8000", - "0x0", - "0x48127ff87fff8000", - "0x10780017fff7fff", - "0x8", - "0x48127ffb7fff8000", - "0x48127ffb7fff8000", - "0x480680017fff8000", - "0x1", - "0x480680017fff8000", - "0x0", - "0x20680017fff7ffe", - "0x6c", - "0x480080007fff8000", - "0xa0680017fff8000", - "0x16", - "0x480080007ff38003", - "0x480080017ff28003", - "0x4844800180017ffe", - "0x100000000000000000000000000000000", - "0x483080017ffd7ffb", - "0x482480017fff7ffd", - "0x800000000000010fffffffffffffffff7ffffffffffffef0000000000000001", - "0x20680017fff7ffc", - "0x6", - "0x402480017fff7ffd", - "0xffffffffffffffffffffffffffffffff", - "0x10780017fff7fff", - "0x4", - "0x402480017ffe7ffd", - "0xf7ffffffffffffef0000000000000000", - "0x400080027fee7ffd", - "0x20680017fff7ffe", - "0x51", - "0x402780017fff7fff", - "0x1", - "0x400080007ff37ffe", - "0x482480017ff38000", - "0x1", - "0x48307ff980007ffa", - "0x20680017fff7fff", - "0x4", - "0x10780017fff7fff", - "0xa", - "0x482480017ff88000", - "0x1", - "0x48127ff87fff8000", - "0x480680017fff8000", - "0x0", - "0x48127ff57fff8000", - "0x10780017fff7fff", - "0x8", - "0x48127ff87fff8000", - "0x48127ff87fff8000", - "0x480680017fff8000", - "0x1", - "0x480680017fff8000", - "0x0", - "0x20680017fff7ffe", - "0x2a", - "0x480080007fff8000", - "0xa0680017fff8000", - "0x16", - "0x480080007ff88003", - "0x480080017ff78003", - "0x4844800180017ffe", - "0x100000000000000000000000000000000", - "0x483080017ffd7ffb", - "0x482480017fff7ffd", - "0x800000000000010fffffffffffffffff7ffffffffffffef0000000000000001", - "0x20680017fff7ffc", - "0x6", - "0x402480017fff7ffd", - "0xffffffffffffffffffffffffffffffff", - "0x10780017fff7fff", - "0x4", - "0x402480017ffe7ffd", - "0xf7ffffffffffffef0000000000000000", - "0x400080027ff37ffd", - "0x20680017fff7ffe", - "0x11", - "0x402780017fff7fff", - "0x1", - "0x400080007ff87ffe", - "0x40780017fff7fff", - "0x5", - "0x482480017ff38000", - "0x1", - "0x48127ff47fff8000", - "0x48127ff47fff8000", - "0x480680017fff8000", - "0x0", - "0x48127fed7fff8000", - "0x48127ff47fff8000", - "0x10780017fff7fff", - "0x24", - "0x482480017ff38000", - "0x3", - "0x10780017fff7fff", - "0x5", - "0x40780017fff7fff", - "0x7", - "0x48127ff37fff8000", - "0x48127ff47fff8000", - "0x48127ff47fff8000", - "0x480680017fff8000", - "0x1", - "0x480680017fff8000", - "0x0", - "0x480680017fff8000", - "0x0", - "0x10780017fff7fff", - "0x13", - "0x40780017fff7fff", - "0x8", - "0x482480017fe68000", - "0x3", - "0x10780017fff7fff", - "0x5", - "0x40780017fff7fff", - "0xf", - "0x48127fe67fff8000", - "0x48127fec7fff8000", - "0x48127fec7fff8000", - "0x480680017fff8000", - "0x1", - "0x480680017fff8000", - "0x0", - "0x480680017fff8000", - "0x0", - "0x20680017fff7ffd", - "0x5a", - "0x48307ffb80007ffc", - "0x20680017fff7fff", - "0x4", - "0x10780017fff7fff", "0x10", "0x40780017fff7fff", "0x1", @@ -927,7 +754,7 @@ "0x496e70757420746f6f206c6f6e6720666f7220617267756d656e7473", "0x400080007ffe7fff", "0x48127ff77fff8000", - "0x48127f987fff8000", + "0x48127fb27fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -936,36 +763,34 @@ "0x1", "0x208b7fff7fff7ffe", "0x1104800180018000", - "0x29c", + "0x28a", "0x482480017fff8000", - "0x29b", + "0x289", "0x480080007fff8000", "0xa0680017fff8000", "0x9", - "0x4824800180007f96", - "0x4a56", + "0x4824800180007fb0", + "0x48c6", "0x482480017fff8000", "0x100000000000000000000000000000000", "0x400080007ff27fff", "0x10780017fff7fff", - "0x2a", - "0x4824800180007f96", - "0x4a56", + "0x28", + "0x4824800180007fb0", + "0x48c6", "0x400080007ff37fff", "0x482480017ff38000", "0x1", "0x48127ffe7fff8000", "0x480a7ffb7fff8000", - "0x48127fcb7fff8000", - "0x48127fcb7fff8000", + "0x48127fe37fff8000", + "0x48127fe37fff8000", "0x480680017fff8000", "0xaa36a7", - "0x48127fd07fff8000", - "0x48127fd77fff8000", - "0x48127fef7fff8000", - "0x48127fef7fff8000", + "0x48127fea7fff8000", + "0x48127ff17fff8000", "0x1104800180018000", - "0x190", + "0x182", "0x20680017fff7ffd", "0xf", "0x40780017fff7fff", @@ -996,21 +821,7 @@ "0x400080007ffe7fff", "0x482480017ff08000", "0x1", - "0x48127f917fff8000", - "0x480a7ffb7fff8000", - "0x480680017fff8000", - "0x1", - "0x48127ffa7fff8000", - "0x482480017ff98000", - "0x1", - "0x208b7fff7fff7ffe", - "0x40780017fff7fff", - "0x1", - "0x480680017fff8000", - "0x4661696c656420746f20646573657269616c697a6520706172616d202334", - "0x400080007ffe7fff", - "0x48127ff87fff8000", - "0x48127f997fff8000", + "0x48127fab7fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -1365,7 +1176,7 @@ "0x0", "0x208b7fff7fff7ffe", "0x480680017fff8000", - "0x2", + "0x1", "0xa0680017fff8004", "0xe", "0x4824800180047ffe", @@ -1373,57 +1184,55 @@ "0x484480017ffe8000", "0x110000000000000000", "0x48307ffe7fff8002", - "0x480280007ff47ffc", - "0x480280017ff47ffc", + "0x480280007ff67ffc", + "0x480280017ff67ffc", "0x402480017ffb7ffd", "0xffffffffffffffeeffffffffffffffff", - "0x400280027ff47ffd", + "0x400280027ff67ffd", "0x10780017fff7fff", - "0xd0", + "0xce", "0x484480017fff8001", "0x8000000000000000000000000000000", "0x48307fff80007ffd", - "0x480280007ff47ffd", - "0x480280017ff47ffd", + "0x480280007ff67ffd", + "0x480280017ff67ffd", "0x402480017ffc7ffe", "0xf8000000000000000000000000000000", - "0x400280027ff47ffe", + "0x400280027ff67ffe", "0x40780017fff7fff", "0x1", - "0x400180007fff7ff7", - "0x400180017fff7ff8", - "0x400180027fff7ff9", - "0x400180037fff7ffa", - "0x400180047fff7ffb", - "0x400180057fff7ffd", - "0x400180067fff7ffc", + "0x400180007fff7ff9", + "0x400180017fff7ffa", + "0x400180027fff7ffb", + "0x400180037fff7ffc", + "0x400180047fff7ffd", "0x480680017fff8000", - "0x0", + "0x2", "0x48127ffe7fff8000", "0x482480017ffd8000", - "0x7", - "0x482680017ff48000", + "0x5", + "0x482680017ff68000", "0x3", "0x480680017fff8000", "0x43616c6c436f6e7472616374", - "0x400280007ff67fff", - "0x400380017ff67ff5", - "0x400280027ff67ff4", - "0x400280037ff67ffb", - "0x400280047ff67ffc", - "0x400280057ff67ffd", - "0x480280077ff68000", + "0x400280007ff87fff", + "0x400380017ff87ff7", + "0x400280027ff87ff4", + "0x400280037ff87ffb", + "0x400280047ff87ffc", + "0x400280057ff87ffd", + "0x480280077ff88000", "0x20680017fff7fff", "0xa2", - "0x480280087ff68000", - "0x480280097ff68000", + "0x480280087ff88000", + "0x480280097ff88000", "0x480680017fff8000", "0x0", - "0x480280067ff68000", - "0x482680017ff68000", + "0x480280067ff88000", + "0x482680017ff88000", "0xa", - "0x480280087ff68000", - "0x480280097ff68000", + "0x480280087ff88000", + "0x480280097ff88000", "0x48307ff980007ffa", "0xa0680017fff8000", "0x6", @@ -1578,13 +1387,13 @@ "0x40780017fff7fff", "0x1d", "0x48127fe07fff8000", - "0x480280067ff68000", - "0x482680017ff68000", + "0x480280067ff88000", + "0x482680017ff88000", "0xa", "0x480680017fff8000", "0x1", - "0x480280087ff68000", - "0x480280097ff68000", + "0x480280087ff88000", + "0x480280097ff88000", "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0x21", @@ -1593,10 +1402,10 @@ "0x480680017fff8000", "0x4f7074696f6e3a3a756e77726170206661696c65642e", "0x400080007ffe7fff", - "0x482680017ff48000", + "0x482680017ff68000", "0x3", - "0x480a7ff57fff8000", - "0x480a7ff67fff8000", + "0x480a7ff77fff8000", + "0x480a7ff87fff8000", "0x480680017fff8000", "0x1", "0x48127ffa7fff8000", @@ -1605,9 +1414,9 @@ "0x208b7fff7fff7ffe" ], "bytecode_segment_lengths": [ - 391, + 235, 282, - 239 + 237 ], "hints": [ [ @@ -1616,7 +1425,7 @@ { "TestLessThanOrEqual": { "lhs": { - "Immediate": "0x1dec" + "Immediate": "0xcd0" }, "rhs": { "Deref": { @@ -1690,103 +1499,7 @@ ] ], [ - 107, - [ - { - "TestLessThan": { - "lhs": { - "Deref": { - "register": "AP", - "offset": -1 - } - }, - "rhs": { - "Immediate": "0x100000000000000000000000000000000" - }, - "dst": { - "register": "AP", - "offset": 0 - } - } - } - ] - ], - [ - 109, - [ - { - "DivMod": { - "lhs": { - "Deref": { - "register": "AP", - "offset": -2 - } - }, - "rhs": { - "Immediate": "0x100000000000000000000000000000000" - }, - "quotient": { - "register": "AP", - "offset": 3 - }, - "remainder": { - "register": "AP", - "offset": 4 - } - } - } - ] - ], - [ - 154, - [ - { - "TestLessThan": { - "lhs": { - "Deref": { - "register": "AP", - "offset": -1 - } - }, - "rhs": { - "Immediate": "0x100000000000000000000000000000000" - }, - "dst": { - "register": "AP", - "offset": 0 - } - } - } - ] - ], - [ - 156, - [ - { - "DivMod": { - "lhs": { - "Deref": { - "register": "AP", - "offset": -2 - } - }, - "rhs": { - "Immediate": "0x100000000000000000000000000000000" - }, - "quotient": { - "register": "AP", - "offset": 3 - }, - "remainder": { - "register": "AP", - "offset": 4 - } - } - } - ] - ], - [ - 230, + 90, [ { "AllocSegment": { @@ -1799,17 +1512,17 @@ ] ], [ - 249, + 109, [ { "TestLessThanOrEqual": { "lhs": { - "Immediate": "0x4a56" + "Immediate": "0x48c6" }, "rhs": { "Deref": { "register": "AP", - "offset": -105 + "offset": -79 } }, "dst": { @@ -1821,20 +1534,7 @@ ] ], [ - 277, - [ - { - "AllocSegment": { - "dst": { - "register": "AP", - "offset": 0 - } - } - } - ] - ], - [ - 298, + 135, [ { "AllocSegment": { @@ -1847,7 +1547,7 @@ ] ], [ - 313, + 156, [ { "AllocSegment": { @@ -1860,7 +1560,7 @@ ] ], [ - 327, + 171, [ { "AllocSegment": { @@ -1873,7 +1573,7 @@ ] ], [ - 348, + 192, [ { "AllocSegment": { @@ -1886,7 +1586,7 @@ ] ], [ - 362, + 206, [ { "AllocSegment": { @@ -1899,7 +1599,7 @@ ] ], [ - 376, + 220, [ { "AllocSegment": { @@ -1912,7 +1612,7 @@ ] ], [ - 675, + 519, [ { "TestLessThan": { @@ -1934,7 +1634,7 @@ ] ], [ - 679, + 523, [ { "LinearSplit": { @@ -1963,7 +1663,7 @@ ] ], [ - 689, + 533, [ { "LinearSplit": { @@ -1992,7 +1692,7 @@ ] ], [ - 697, + 541, [ { "AllocSegment": { @@ -2005,14 +1705,14 @@ ] ], [ - 721, + 563, [ { "SystemCall": { "system": { "Deref": { "register": "FP", - "offset": -10 + "offset": -8 } } } @@ -2020,7 +1720,7 @@ ] ], [ - 734, + 576, [ { "TestLessThan": { @@ -2045,7 +1745,7 @@ ] ], [ - 746, + 588, [ { "TestLessThan": { @@ -2067,7 +1767,7 @@ ] ], [ - 748, + 590, [ { "DivMod": { @@ -2093,7 +1793,7 @@ ] ], [ - 772, + 614, [ { "TestLessThan": { @@ -2118,7 +1818,7 @@ ] ], [ - 784, + 626, [ { "TestLessThan": { @@ -2140,7 +1840,7 @@ ] ], [ - 786, + 628, [ { "DivMod": { @@ -2166,7 +1866,7 @@ ] ], [ - 818, + 660, [ { "AllocSegment": { @@ -2179,7 +1879,7 @@ ] ], [ - 835, + 677, [ { "AllocSegment": { @@ -2192,7 +1892,7 @@ ] ], [ - 852, + 694, [ { "AllocSegment": { @@ -2205,7 +1905,7 @@ ] ], [ - 869, + 711, [ { "AllocSegment": { @@ -2218,7 +1918,7 @@ ] ], [ - 897, + 739, [ { "AllocSegment": { @@ -2235,7 +1935,7 @@ [ 0, [ - "memory[ap + 0] = 7660 <= memory[fp + -6]" + "memory[ap + 0] = 3280 <= memory[fp + -6]" ] ], [ @@ -2251,175 +1951,145 @@ ] ], [ - 107, - [ - "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" - ] - ], - [ - 109, - [ - "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" - ] - ], - [ - 154, - [ - "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" - ] - ], - [ - 156, - [ - "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" - ] - ], - [ - 230, + 90, [ "memory[ap + 0] = segments.add()" ] ], [ - 249, - [ - "memory[ap + 0] = 19030 <= memory[ap + -105]" - ] - ], - [ - 277, + 109, [ - "memory[ap + 0] = segments.add()" + "memory[ap + 0] = 18630 <= memory[ap + -79]" ] ], [ - 298, + 135, [ "memory[ap + 0] = segments.add()" ] ], [ - 313, + 156, [ "memory[ap + 0] = segments.add()" ] ], [ - 327, + 171, [ "memory[ap + 0] = segments.add()" ] ], [ - 348, + 192, [ "memory[ap + 0] = segments.add()" ] ], [ - 362, + 206, [ "memory[ap + 0] = segments.add()" ] ], [ - 376, + 220, [ "memory[ap + 0] = segments.add()" ] ], [ - 675, + 519, [ "memory[ap + 4] = memory[ap + -1] < 3618502788666131106986593281521497120414687020801267626233049500247285301248" ] ], [ - 679, + 523, [ "\n(value, scalar) = (memory[ap + 3], 313594649253062377472)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -2] = x\nmemory[ap + -1] = y\n" ] ], [ - 689, + 533, [ "\n(value, scalar) = (memory[ap + -2], 10633823966279326983230456482242756608)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -1] = x\nmemory[ap + 0] = y\n" ] ], [ - 697, + 541, [ "memory[ap + 0] = segments.add()" ] ], [ - 721, + 563, [ - "syscall_handler.syscall(syscall_ptr=memory[fp + -10])" + "syscall_handler.syscall(syscall_ptr=memory[fp + -8])" ] ], [ - 734, + 576, [ "memory[ap + 0] = memory[ap + -6] < memory[ap + -1]" ] ], [ - 746, + 588, [ "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" ] ], [ - 748, + 590, [ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], [ - 772, + 614, [ "memory[ap + 0] = memory[ap + -2] < memory[ap + -1]" ] ], [ - 784, + 626, [ "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" ] ], [ - 786, + 628, [ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], [ - 818, + 660, [ "memory[ap + 0] = segments.add()" ] ], [ - 835, + 677, [ "memory[ap + 0] = segments.add()" ] ], [ - 852, + 694, [ "memory[ap + 0] = segments.add()" ] ], [ - 869, + 711, [ "memory[ap + 0] = segments.add()" ] ], [ - 897, + 739, [ "memory[ap + 0] = segments.add()" ] From 17fedef576e3537a118b43ac9bc7744e31ef22e1 Mon Sep 17 00:00:00 2001 From: Pia Date: Wed, 24 Jul 2024 16:32:15 +0200 Subject: [PATCH 57/73] chore: format --- packages/contract_bootloader/provider/account_key_provider.py | 2 +- .../contract_bootloader/provider/test_account_key_provider.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/contract_bootloader/provider/account_key_provider.py b/packages/contract_bootloader/provider/account_key_provider.py index 6bb85edc..757a4eec 100644 --- a/packages/contract_bootloader/provider/account_key_provider.py +++ b/packages/contract_bootloader/provider/account_key_provider.py @@ -37,7 +37,7 @@ def get_state_root(self, key: MemorizerKey) -> int: try: address = Web3.toChecksumAddress(f"0x{key.address:040x}") account_proof = self.web3.eth.get_proof(address, [], key.block_number) - state_root = account_proof['storageHash'] + state_root = account_proof["storageHash"] return int(state_root.hex(), 16) except Exception as e: raise Exception(f"An error occurred while fetching the state root: {e}") diff --git a/packages/contract_bootloader/provider/test_account_key_provider.py b/packages/contract_bootloader/provider/test_account_key_provider.py index e9747bb1..29958313 100644 --- a/packages/contract_bootloader/provider/test_account_key_provider.py +++ b/packages/contract_bootloader/provider/test_account_key_provider.py @@ -34,7 +34,7 @@ def test_fetch_state_root(): MemorizerKey( chain_id=11155111, block_number=5382820, - address=0x13cb6ae34a13a0977f4d7101ebc24b87bb23f0d5, + address=0x13CB6AE34A13A0977F4D7101EBC24B87BB23F0D5, ) ) - assert value == 0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421 + assert value == 0x56E81F171BCC55A6FF8345E692C0F86E5B48E01B996CADC001622FB5E363B421 From ca9905f32cd9a292cf5f7d35d4f143fd517c5b76 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 24 Jul 2024 19:30:00 +0200 Subject: [PATCH 58/73] coinbase fix --- src/decoders/header_decoder.cairo | 2 +- src/hdp_input.json | 793 +++++------------------------- 2 files changed, 124 insertions(+), 671 deletions(-) diff --git a/src/decoders/header_decoder.cairo b/src/decoders/header_decoder.cairo index 34e09471..dc69ccc2 100644 --- a/src/decoders/header_decoder.cairo +++ b/src/decoders/header_decoder.cairo @@ -75,7 +75,7 @@ namespace HeaderDecoder { } if (field == HeaderField.COINBASE) { let address = get_address_value(rlp, 8, 6); - return (Uint256(low=[address] + [address + 1] * pow2_array[64], high=[address + 2])); + return le_chunks_to_uint256(elements=address, elements_len=3, bytes_len=20); } if (field == HeaderField.STATE_ROOT) { return get_hash_value(rlp, 11, 3); diff --git a/src/hdp_input.json b/src/hdp_input.json index 57cdd021..871ce333 100644 --- a/src/hdp_input.json +++ b/src/hdp_input.json @@ -1,7 +1,7 @@ { "cairo_run_output_path": "cairo_run_output.json", - "task_root": "0x94f085f1e6046825fcd0dcb9747c2f1a105b32102f9e725eee72df2d4d23aa89", - "result_root": "0xb54682f3b0457668f854eb00e61035883819fc5e94a17a3990fbb770b28c6295", + "task_root": "0x51f79f008b174e582dbf61c04533b7cab5f5344f96144308d76a9c8a6b149750", + "result_root": "0x12ca6ff87f9c2bff4e8198180b6a0822063756ee9561553c520aa43c6254d396", "proofs": { "mmr_metas": [ { @@ -135,494 +135,7 @@ } } ], - "accounts": [ - { - "address": [ - "0x97a0134ae36acb13", - "0x874bc2eb01714d7f", - "0xd5f023bb" - ], - "account_key": "0x8ad2b901594e58a241532055dfe914294630ed5c33ffc31905452799f9b4aab0", - "proofs": [ - { - "block_number": 5382820, - "proof_bytes_len": [ - 532, - 532, - 532, - 532, - 532, - 500, - 147, - 83, - 106 - ], - "proof": [ - [ - "0x7c61e3eba01102f9", - "0xb5a62db594c71c2a", - "0xd79416fcf8688b63", - "0x71e7bdd16306f821", - "0x4d477ca0d484a54a", - "0x2a033db653fd6d4e", - "0x9ed02b4b95b21d7a", - "0x4cd8f1b53f42f01f", - "0x4b5aa08f369ff204", - "0x652a536dbc85fdb6", - "0x66c654f4e025730a", - "0x671b0235356fc04e", - "0xf0a0fba61b61a406", - "0x17b7f8649cbf00e9", - "0xecaa5b13760a5fa4", - "0x615bc592d52f5e50", - "0xa046512c6a03af6c", - "0xee474ecfdb45299f", - "0x843b427b31eba68e", - "0xab8cf670abac84b0", - "0xa6a535a19d4639ce", - "0x5c41c9ccbf386aa0", - "0xb03db07e4cd213a", - "0xd75448fc9a7b1896", - "0x85b4c937397adc81", - "0x74ca9a593989a0ef", - "0x4ac604ac38d90548", - "0x32a1688ddc2a8193", - "0x81f0546eacb82309", - "0xefa944fca1a01e43", - "0xdfad25ff40f434da", - "0x6e07db21b71d8e65", - "0xfcdf0e6646add62c", - "0x56e9613ba0b1045a", - "0x8790ed530718c50", - "0x4dc4b9de48c9d222", - "0xb5ce5684ed9f5f1", - "0x4299aaa00a315f44", - "0xed4525bf273622fc", - "0x6cdf9b757ef88728", - "0x2d19f82ce86832ce", - "0x6441a0b4936de285", - "0x83a7e7cbe81cde7d", - "0x95b77e2a10cff7a5", - "0xbffc145df8241d37", - "0xe5a055a910e5a09a", - "0xa5471ed810846946", - "0x41bb2d8bc617803a", - "0xd6dba9efc4560a38", - "0xa0a530454ead297e", - "0xa85a62a7d066a51", - "0xc874621a47dbdf74", - "0x4ad7197adaa2dd25", - "0x3d26d4f03a020000", - "0x876d86a2f854d3a0", - "0xa877640bd28f78b7", - "0xe52d62b99a4e0fd2", - "0xeee1c4c0c8bc1099", - "0x6a487328b8da0ba", - "0x26883372414cfbea", - "0x24c06ca0e66cb2ee", - "0x8d2e4e69569f2114", - "0x1cdaeb08cea094c0", - "0x703d82ea470be54a", - "0xceb2e79532edc132", - "0x17a154fb3039f362", - "0x80684625" - ], - [ - "0x66b09942a01102f9", - "0x4eea1a0a280d06cf", - "0xddc21e8383fde7e8", - "0xc3913a607e71a344", - "0xe21ca7a010e48f71", - "0x214ba79d3b53ce70", - "0xefce253571d45489", - "0x55fc178552d14363", - "0xee9fa00622347a61", - "0x94beeb851d845f65", - "0xf3ddeecc606bdab7", - "0xfe09f34d0b5110cf", - "0x9fa04327c4862d99", - "0x7f00a28786596a0f", - "0xaf30242d9293b705", - "0x7929f8d18ad38cf4", - "0xa03b3b53e411e6af", - "0x230aaacbf444b735", - "0xe3c4571ec78d3314", - "0x989b640f18e552c4", - "0x66bb55ee2a402a69", - "0x8642352c8fb2c1a0", - "0xff9ae5fe53a0e39a", - "0x84074671fa759110", - "0xf014c847e7e8e2a6", - "0xa33c55dece71a0b0", - "0x36f53970eb796fd0", - "0xc8d1772fd20168", - "0xfef5ecef5775f064", - "0xf95510746ca07ce9", - "0x601a3a404704615a", - "0x6afdb4f486b3d355", - "0xffbddca3b8fcfee0", - "0xbb50dc69a0380c4a", - "0x8f7413d2096668f3", - "0x7314832fd835f44e", - "0x52d95dce023b178d", - "0xa72d44a0b55aebdb", - "0x82376a65e0ed5723", - "0x53f3d1ab0cb9ed87", - "0x67b00b4ee20bd97f", - "0x3531a0ecc79c9263", - "0x9202ee4b2ba3cf49", - "0xb31fda146c80fce1", - "0x7e63b522f76dab53", - "0x7a053ad2fac8416", - "0x466f2a9b671e5318", - "0x67ddb015e552ede", - "0xf9e07343ee36507b", - "0xa01fb73f3dfe6207", - "0x83dc1eb02643475d", - "0xaf744df0d34af6cb", - "0x75e2a675b733ea70", - "0xa3ee77d5eeb98cb4", - "0xea750f3501c7f1a0", - "0xaa3c03c88da7083e", - "0x7662477dc9b3db81", - "0x934075e93df49559", - "0x518a40227de4a00e", - "0xc7e2cbe91c290f8d", - "0x292bd9ee86746f70", - "0x417e131393bd5bfa", - "0x6f617f28c9a0e475", - "0x4c0e59c04b8074d4", - "0xbb3752aa77ca60d9", - "0x4f254b7f8aef44ea", - "0x8015580e" - ], - [ - "0x44e1eecca01102f9", - "0x7474098a27ce0ab", - "0x5056e85f40acf483", - "0x28123d367d0d8f64", - "0x424a57a0881ff3a4", - "0xf8bdd755a1730796", - "0xd923ac0aae8b464d", - "0x2a2652f489c81c9", - "0x563da0c3fba41fe1", - "0x83f70053bb958d5", - "0xa04f49ead3caed9c", - "0xc89c422d3ac9f809", - "0x34a0901c74f12cbb", - "0xbe0a0a499359ad86", - "0xdee864368e9e99de", - "0x5068474fcdcf9fb8", - "0xa07fd1ad037b317a", - "0xdfc7f2171574ff0f", - "0x21d80436c931f1e0", - "0x13f1f03a44746b81", - "0x952fbdbb407f49c3", - "0x108b082fa561ffa0", - "0x977aa488b311a31d", - "0x218c8b89769ffb88", - "0x12d93f702216fcd8", - "0x334963972817a08f", - "0xab980b29bde60d94", - "0x5db93b5ee032e1ef", - "0x79bafa05002bd239", - "0x75df34c970a0c91f", - "0x768276d6a06ccca4", - "0xa7f26ff5c02cff0e", - "0x1bf991a505681399", - "0x4bd1dc2ea0590237", - "0x7989c75e583b675f", - "0x2324128510b58162", - "0x622edc9941b332b8", - "0x22bcd6a0c6f4d618", - "0x89a44d0d4646a02b", - "0xf9a9e030aac36e55", - "0xaabb0787ae7fb4a0", - "0x9bc4a08b1d3ef870", - "0x3c8a02f81657e9d9", - "0x5623ad7faa0884d5", - "0x452fcab47243f960", - "0x93a0ec18ac8f86d9", - "0x1dbbf27ea56e7c2d", - "0x34cad3fdce61d1dd", - "0x250d51024a3e6d73", - "0xa08c63a4656eef7a", - "0x9bb255ee1e134d2f", - "0x78cc43fb5ab37664", - "0x938318be144f4300", - "0x7155ab0f94eed37e", - "0x11b90fd742d609a0", - "0xa25774f34225cf49", - "0xc0eee3e025baf8f", - "0xd220b40abfba16e5", - "0xa04bc79262aaa015", - "0x89edfb632d63363b", - "0xb7f43d16c083e1d6", - "0x85394f02564f3344", - "0x4fd477992fa0c707", - "0xdb52636642ee63a6", - "0x61de223783ee2649", - "0xff24c742a81cf821", - "0x802b7ef4" - ], - [ - "0x4b721a99a01102f9", - "0xe02a3c912422ff37", - "0x409de205111f9d5", - "0xb4e2e2f6628cb64b", - "0xa09cb8a0e2a59448", - "0xcc4550c2002a5292", - "0x168b5851dc594d84", - "0xe5a269c47fe3551c", - "0x7d5a0a4907e7f14", - "0x25c625a5bba18bd3", - "0x85b8e227613c3e22", - "0x4a5048266abadf2", - "0x9ca0c6b865cdd2ea", - "0x59ffc593aaef458f", - "0x24ab6c65729cf7ce", - "0x990d9157d02330aa", - "0xa06c247e9f0f5b4a", - "0xf37d20f86f8918f3", - "0x8df6c7e10eefa537", - "0xe38a06cc8b5d3b24", - "0x26e0a38b0ba1d865", - "0x9439ad29be13c9a0", - "0x28a787564e1df2a4", - "0x6192ae89d5b0bded", - "0x8e9d459d7d3993", - "0x6c3ae898374ba079", - "0xdfc95da0800507ba", - "0x3f128ce05fa65d0", - "0x70e7501f136e12cb", - "0x3e7fe41785a0b7ee", - "0x39bf77aef30b2199", - "0xff9dd0e409522496", - "0xe6977427b6abe1c0", - "0x1deeb918a0a6d3ec", - "0xbbac0a36518f3e36", - "0x7c865698f88bf36d", - "0xf14da7897af696b5", - "0xa0b432a07160e674", - "0x1098d83de98221e2", - "0x7a06680689aea28b", - "0x567afc4403b52cf5", - "0x4f2fa04382d34b26", - "0x44e25fac5b4060cf", - "0x5ea33dbd2f58ac4f", - "0xb8ec321caff09cd2", - "0xeda06506bf1616c2", - "0x8380f3d0bc8e7ed8", - "0x36eb0c037027804c", - "0x38f1cfecd23f5470", - "0xa0ee4492fb413d3e", - "0x7febc69fd89fa397", - "0x9218affd020beaf9", - "0x5ffac1db7de3724a", - "0xa1de7685df286231", - "0x99345c1166cb22a0", - "0x9c25af6e1072a676", - "0x493463ed72e6199c", - "0x25e0e3b93fc00f36", - "0xb5cb9431b5b7a0a8", - "0x973f6b680e787724", - "0x4a9d2737a07361ed", - "0x1ea54f55ccf9e733", - "0x911be46f9aa00f7e", - "0xf7da93abba5f5150", - "0xc43c6f435cd6a21b", - "0xd3661e79fd6bc22a", - "0x806f1e4f" - ], - [ - "0xb6721834a01102f9", - "0x65b0b3b817362a19", - "0xe6bdc762cac6abf1", - "0x9e173d04650c9407", - "0x85faffa0b60d822e", - "0x19b763e939de7ddd", - "0x7a82d3cec2145b21", - "0x5f42f7f6a2755762", - "0xf4a2a0ae34d64f07", - "0x16ae2615fcf48602", - "0x9280a59fe9dd7b2e", - "0xa8d0310b918aa446", - "0xaaa0b4d3ef08644f", - "0xf300410f95e540ac", - "0xa54a7659efd45ec3", - "0xc445230c53d1bddc", - "0xa00f4185f8dc93a7", - "0xe93d03ce43550301", - "0x1a00273c0ac61fb6", - "0x2e0f6f0d18272427", - "0x9805fcf2c8b1653c", - "0x3dec416ff498baa0", - "0x48142eb5163582da", - "0xe2b7d888b2a5ce15", - "0xa8fd3a9094a2f152", - "0x1c9788802016a0f9", - "0x58f7be2da9a6528", - "0x7fdf2f97d8dfafb7", - "0x791f954d3d6a623f", - "0x54f9c3d47da028bf", - "0xf663ce3a5f15e834", - "0xe19a4e29920fe8c7", - "0x9137497f331c6671", - "0x6ad990a5a07738ae", - "0x3736ee9ea0a8c61a", - "0x8427fb955e69b960", - "0x860412fda3d569e2", - "0x3776e7a02e65a325", - "0x1e251935059ebd48", - "0xf5da5d7c7601e0c1", - "0x6dec3478245276cf", - "0x6ae3a0d6ed841766", - "0x4d637fafc196c32b", - "0x1872cd4ab0fb582e", - "0xb88bb2e761846b4c", - "0x31a06a7530c30808", - "0x11259421f0feb7c4", - "0xaa1c99f2106769dd", - "0xede10c2c05993ae4", - "0xa02d30982e30bb0f", - "0x235594ee53c44c05", - "0x73387cee25571335", - "0x26607787c455b91d", - "0x2b73d84d306eb1d3", - "0xdefe6f4f50ac96a0", - "0x85858e8b0ede8c06", - "0xeac0f28cd11f30f3", - "0x1e5fd4a42ec0658", - "0xa60209a0074ba06d", - "0x741bfca4c7a04474", - "0x8085ee7246daeeae", - "0xe9f2fe44ff363a27", - "0xd5fa22fdc7a037fe", - "0x2240f7c2622bd91d", - "0x38d3d7853ef0d516", - "0x3f51bb86a892550e", - "0x8088049f" - ], - [ - "0x8a169437a0f101f9", - "0xfa3ced185956309b", - "0x8db06f289f3afe2f", - "0x52035bc077222d8", - "0x81cecca08e33e3ff", - "0x89a250e215c171cc", - "0x62c1bc60f0993650", - "0xbbf62b96459bcb5a", - "0xd445a08173fda93c", - "0x91e7d43fe3377371", - "0x5502931ba59fddb3", - "0x1850b91b288e1685", - "0x64a0a630c8207acf", - "0x58160f099ed6023", - "0x4198238ff4613e16", - "0x77a336c10e03830d", - "0xa0eee1cea4502c76", - "0xf03b6b2a60a90439", - "0xa6ae0795e51d73f7", - "0x50143ee9c95b716b", - "0x108687f67e7a94fb", - "0xb12beb59cef3f6a0", - "0xafb92ce4c1a7c30d", - "0x2f9c1bc1f8797cdf", - "0xd44b981d3cf8c962", - "0xb7473eac86a0804e", - "0x17d294fc99c4eb84", - "0xfc134b89c34521e3", - "0x2dfd108c430de5b3", - "0xcbff41e7a0690d8d", - "0x7262a4626784226e", - "0xd766f80aea9d6f9c", - "0x475d36ab0542fd41", - "0xb912eba0932ea0db", - "0x2d1cd9badaf643de", - "0x95e64b5eb7ad9a54", - "0x58d5e092664b2a5b", - "0xc352a0e708f0003f", - "0xcfa1c1d55e281237", - "0x9e50c506df0c6d92", - "0x177117b78c273ad0", - "0x87a0655a2b1444ee", - "0x567ba6fb34252d22", - "0xb27c861900096e61", - "0x686c7e2d0bd66e7b", - "0xa0846bfab63b51ea", - "0xc6ead052cf367d6b", - "0xb7f01de54f58d9b7", - "0x14b2e41168155bf9", - "0x15799e90891e2e2a", - "0xf33c015b01bc83a0", - "0xc64e908e435f0a45", - "0xa2e576fdc5b71c81", - "0xdf7af1dae9fcc66f", - "0xc7b80409a927a036", - "0xdd45519a5945592c", - "0x332aaa1ae333836c", - "0x1b7ef2b40b6dc194", - "0xf0bae61277a079a2", - "0x35e03e67ca2824ee", - "0x715f902a6a8d4f52", - "0x7f942bfd1917df67", - "0x802efe51" - ], - [ - "0x2e896a4d4ea091f8", - "0x11c47fbbfcd66965", - "0xfa264bb69a6b3cf6", - "0x6a15a88209b6e3ac", - "0xfba0808080facf9e", - "0x509c2d93079b239b", - "0x46e6084a232eaa65", - "0xec96e29bb96af360", - "0x808e4d79fd0a01f7", - "0x10c4332e32a08080", - "0x3c58ad19246301dc", - "0x7ee9d2dc08f00328", - "0xda7a7eb1fb996a6f", - "0x4512a3da05a6b0e", - "0xf29247e223c0b2bd", - "0x68af6edd3da39a07", - "0x821ee0c83ce615ae", - "0x808080804b366c8e", - "0x808080" - ], - [ - "0x198ec87aa08051f8", - "0x69468d18b420fc23", - "0xcaed890611ce65bf", - "0x54afb686e30b4471", - "0x80808080918073ee", - "0xda5d26326c8ba080", - "0xfa0d187d28e2397a", - "0x4eb95b8e08b4e0bc", - "0x7f323b88311b42cc", - "0x8080808080803c90", - "0x808080" - ], - [ - "0xa2584e59209d68f8", - "0x2914e9df55205341", - "0x19c3ff335ced3046", - "0xb0aab4f999274505", - "0x8064128246f848b8", - "0x55cc1b171fe856a0", - "0xf8c092e64583ffa6", - "0xad6c991be0485b6e", - "0xb463e3b52f6201c0", - "0xf7860146d2c5a021", - "0xc7dcb27d7e923c23", - "0x82ca53b600e5c003", - "0x855d04d8fa7b3b27", - "0x70a4" - ] - ] - } - ] - } - ], + "accounts": [], "storages": [], "transactions": [], "transaction_receipts": [] @@ -632,10 +145,10 @@ "type": "module", "context": { "encoded_task": [ - "0x67c89780e72c1b04", - "0x6449215836ba259c", - "0xb444dca75bb6a4fa", - "0x5b2ef9700c510404", + "0x8fc47b12ce143e02", + "0x7d61b30cebd8300b", + "0xd691d0cd4e9a5f63", + "0xe06a7e93d0fdac01", "0x0", "0x0", "0x0", @@ -643,17 +156,13 @@ "0x0", "0x0", "0x0", - "0x200000000000000", - "0x0", + "0x100000000000000", "0x0", "0x0", - "0xa422520000000000", "0x0", - "0xe36acb1300000000", - "0x1714d7f97a0134a", - "0xd5f023bb874bc2eb" + "0xa422520000000000" ], - "task_bytes_len": 160, + "task_bytes_len": 128, "module_class": { "prime": "0x800000000000011000000000000000000000000000000000000000000000001", "compiler_version": "2.6.3", @@ -661,21 +170,21 @@ "0xa0680017fff8000", "0x7", "0x482680017ffa8000", - "0xfffffffffffffffffffffffffffff330", + "0xfffffffffffffffffffffffffffff650", "0x400280007ff97fff", "0x10780017fff7fff", - "0xd7", + "0xb3", "0x4825800180007ffa", - "0xcd0", + "0x9b0", "0x400280007ff97fff", "0x480a7ffc7fff8000", "0x480a7ffd7fff8000", "0x1104800180018000", - "0xdf", + "0xbb", "0x482680017ff98000", "0x1", "0x20680017fff7ff8", - "0xbe", + "0x9a", "0x48307ff680007ff7", "0x20680017fff7fff", "0x4", @@ -696,7 +205,7 @@ "0x480680017fff8000", "0x0", "0x20680017fff7ffe", - "0x98", + "0x74", "0x480080007fff8000", "0xa0680017fff8000", "0x12", @@ -713,7 +222,7 @@ "0x402480017fff7ffb", "0xffffffffffffffffffffffffffffffff", "0x20680017fff7fff", - "0x83", + "0x5f", "0x402780017fff7fff", "0x1", "0x400080007ff87ffe", @@ -726,35 +235,14 @@ "0x20680017fff7fff", "0x4", "0x10780017fff7fff", - "0xa", - "0x482480017ff78000", - "0x1", - "0x48127ff77fff8000", - "0x480680017fff8000", - "0x0", - "0x480080007ff48000", - "0x10780017fff7fff", - "0x8", - "0x48127ff77fff8000", - "0x48127ff77fff8000", - "0x480680017fff8000", - "0x1", - "0x480680017fff8000", - "0x0", - "0x20680017fff7ffe", - "0x58", - "0x48307ffc80007ffd", - "0x20680017fff7fff", - "0x4", - "0x10780017fff7fff", "0x10", "0x40780017fff7fff", "0x1", "0x480680017fff8000", "0x496e70757420746f6f206c6f6e6720666f7220617267756d656e7473", "0x400080007ffe7fff", - "0x48127ff77fff8000", - "0x48127fb27fff8000", + "0x48127ffc7fff8000", + "0x48127fb77fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -763,34 +251,33 @@ "0x1", "0x208b7fff7fff7ffe", "0x1104800180018000", - "0x28a", + "0x27a", "0x482480017fff8000", - "0x289", + "0x279", "0x480080007fff8000", "0xa0680017fff8000", "0x9", - "0x4824800180007fb0", - "0x48c6", + "0x4824800180007fb5", + "0x47fe", "0x482480017fff8000", "0x100000000000000000000000000000000", - "0x400080007ff27fff", + "0x400080007ff77fff", "0x10780017fff7fff", - "0x28", - "0x4824800180007fb0", - "0x48c6", - "0x400080007ff37fff", - "0x482480017ff38000", + "0x27", + "0x4824800180007fb5", + "0x47fe", + "0x400080007ff87fff", + "0x482480017ff88000", "0x1", "0x48127ffe7fff8000", "0x480a7ffb7fff8000", - "0x48127fe37fff8000", - "0x48127fe37fff8000", + "0x48127fe67fff8000", + "0x48127fe67fff8000", "0x480680017fff8000", "0xaa36a7", - "0x48127fea7fff8000", - "0x48127ff17fff8000", + "0x48127fef7fff8000", "0x1104800180018000", - "0x182", + "0x174", "0x20680017fff7ffd", "0xf", "0x40780017fff7fff", @@ -819,23 +306,9 @@ "0x480680017fff8000", "0x4f7574206f6620676173", "0x400080007ffe7fff", - "0x482480017ff08000", + "0x482480017ff58000", "0x1", - "0x48127fab7fff8000", - "0x480a7ffb7fff8000", - "0x480680017fff8000", - "0x1", - "0x48127ffa7fff8000", - "0x482480017ff98000", - "0x1", - "0x208b7fff7fff7ffe", - "0x40780017fff7fff", - "0x1", - "0x480680017fff8000", - "0x4661696c656420746f20646573657269616c697a6520706172616d202333", - "0x400080007ffe7fff", - "0x48127ff87fff8000", - "0x48127fb37fff8000", + "0x48127fb07fff8000", "0x480a7ffb7fff8000", "0x480680017fff8000", "0x1", @@ -1176,7 +649,7 @@ "0x0", "0x208b7fff7fff7ffe", "0x480680017fff8000", - "0x1", + "0x0", "0xa0680017fff8004", "0xe", "0x4824800180047ffe", @@ -1184,55 +657,54 @@ "0x484480017ffe8000", "0x110000000000000000", "0x48307ffe7fff8002", - "0x480280007ff67ffc", - "0x480280017ff67ffc", + "0x480280007ff77ffc", + "0x480280017ff77ffc", "0x402480017ffb7ffd", "0xffffffffffffffeeffffffffffffffff", - "0x400280027ff67ffd", + "0x400280027ff77ffd", "0x10780017fff7fff", - "0xce", + "0xcd", "0x484480017fff8001", "0x8000000000000000000000000000000", "0x48307fff80007ffd", - "0x480280007ff67ffd", - "0x480280017ff67ffd", + "0x480280007ff77ffd", + "0x480280017ff77ffd", "0x402480017ffc7ffe", "0xf8000000000000000000000000000000", - "0x400280027ff67ffe", + "0x400280027ff77ffe", "0x40780017fff7fff", "0x1", - "0x400180007fff7ff9", - "0x400180017fff7ffa", - "0x400180027fff7ffb", - "0x400180037fff7ffc", - "0x400180047fff7ffd", + "0x400180007fff7ffa", + "0x400180017fff7ffb", + "0x400180027fff7ffc", + "0x400180037fff7ffd", "0x480680017fff8000", "0x2", "0x48127ffe7fff8000", "0x482480017ffd8000", - "0x5", - "0x482680017ff68000", + "0x4", + "0x482680017ff78000", "0x3", "0x480680017fff8000", "0x43616c6c436f6e7472616374", - "0x400280007ff87fff", - "0x400380017ff87ff7", - "0x400280027ff87ff4", - "0x400280037ff87ffb", - "0x400280047ff87ffc", - "0x400280057ff87ffd", - "0x480280077ff88000", + "0x400280007ff97fff", + "0x400380017ff97ff8", + "0x400280027ff97ff4", + "0x400280037ff97ffb", + "0x400280047ff97ffc", + "0x400280057ff97ffd", + "0x480280077ff98000", "0x20680017fff7fff", "0xa2", - "0x480280087ff88000", - "0x480280097ff88000", + "0x480280087ff98000", + "0x480280097ff98000", "0x480680017fff8000", "0x0", - "0x480280067ff88000", - "0x482680017ff88000", + "0x480280067ff98000", + "0x482680017ff98000", "0xa", - "0x480280087ff88000", - "0x480280097ff88000", + "0x480280087ff98000", + "0x480280097ff98000", "0x48307ff980007ffa", "0xa0680017fff8000", "0x6", @@ -1387,13 +859,13 @@ "0x40780017fff7fff", "0x1d", "0x48127fe07fff8000", - "0x480280067ff88000", - "0x482680017ff88000", + "0x480280067ff98000", + "0x482680017ff98000", "0xa", "0x480680017fff8000", "0x1", - "0x480280087ff88000", - "0x480280097ff88000", + "0x480280087ff98000", + "0x480280097ff98000", "0x208b7fff7fff7ffe", "0x40780017fff7fff", "0x21", @@ -1402,10 +874,10 @@ "0x480680017fff8000", "0x4f7074696f6e3a3a756e77726170206661696c65642e", "0x400080007ffe7fff", - "0x482680017ff68000", + "0x482680017ff78000", "0x3", - "0x480a7ff77fff8000", "0x480a7ff87fff8000", + "0x480a7ff97fff8000", "0x480680017fff8000", "0x1", "0x48127ffa7fff8000", @@ -1414,9 +886,9 @@ "0x208b7fff7fff7ffe" ], "bytecode_segment_lengths": [ - 235, + 199, 282, - 237 + 236 ], "hints": [ [ @@ -1425,7 +897,7 @@ { "TestLessThanOrEqual": { "lhs": { - "Immediate": "0xcd0" + "Immediate": "0x9b0" }, "rhs": { "Deref": { @@ -1499,7 +971,7 @@ ] ], [ - 90, + 69, [ { "AllocSegment": { @@ -1512,17 +984,17 @@ ] ], [ - 109, + 88, [ { "TestLessThanOrEqual": { "lhs": { - "Immediate": "0x48c6" + "Immediate": "0x47fe" }, "rhs": { "Deref": { "register": "AP", - "offset": -79 + "offset": -74 } }, "dst": { @@ -1534,7 +1006,7 @@ ] ], [ - 135, + 113, [ { "AllocSegment": { @@ -1547,7 +1019,7 @@ ] ], [ - 156, + 134, [ { "AllocSegment": { @@ -1560,20 +1032,7 @@ ] ], [ - 171, - [ - { - "AllocSegment": { - "dst": { - "register": "AP", - "offset": 0 - } - } - } - ] - ], - [ - 192, + 156, [ { "AllocSegment": { @@ -1586,7 +1045,7 @@ ] ], [ - 206, + 170, [ { "AllocSegment": { @@ -1599,7 +1058,7 @@ ] ], [ - 220, + 184, [ { "AllocSegment": { @@ -1612,7 +1071,7 @@ ] ], [ - 519, + 483, [ { "TestLessThan": { @@ -1634,7 +1093,7 @@ ] ], [ - 523, + 487, [ { "LinearSplit": { @@ -1663,7 +1122,7 @@ ] ], [ - 533, + 497, [ { "LinearSplit": { @@ -1692,7 +1151,7 @@ ] ], [ - 541, + 505, [ { "AllocSegment": { @@ -1705,14 +1164,14 @@ ] ], [ - 563, + 526, [ { "SystemCall": { "system": { "Deref": { "register": "FP", - "offset": -8 + "offset": -7 } } } @@ -1720,7 +1179,7 @@ ] ], [ - 576, + 539, [ { "TestLessThan": { @@ -1745,7 +1204,7 @@ ] ], [ - 588, + 551, [ { "TestLessThan": { @@ -1767,7 +1226,7 @@ ] ], [ - 590, + 553, [ { "DivMod": { @@ -1793,7 +1252,7 @@ ] ], [ - 614, + 577, [ { "TestLessThan": { @@ -1818,7 +1277,7 @@ ] ], [ - 626, + 589, [ { "TestLessThan": { @@ -1840,7 +1299,7 @@ ] ], [ - 628, + 591, [ { "DivMod": { @@ -1866,7 +1325,7 @@ ] ], [ - 660, + 623, [ { "AllocSegment": { @@ -1879,7 +1338,7 @@ ] ], [ - 677, + 640, [ { "AllocSegment": { @@ -1892,7 +1351,7 @@ ] ], [ - 694, + 657, [ { "AllocSegment": { @@ -1905,7 +1364,7 @@ ] ], [ - 711, + 674, [ { "AllocSegment": { @@ -1918,7 +1377,7 @@ ] ], [ - 739, + 702, [ { "AllocSegment": { @@ -1935,7 +1394,7 @@ [ 0, [ - "memory[ap + 0] = 3280 <= memory[fp + -6]" + "memory[ap + 0] = 2480 <= memory[fp + -6]" ] ], [ @@ -1951,145 +1410,139 @@ ] ], [ - 90, + 69, [ "memory[ap + 0] = segments.add()" ] ], [ - 109, - [ - "memory[ap + 0] = 18630 <= memory[ap + -79]" - ] - ], - [ - 135, + 88, [ - "memory[ap + 0] = segments.add()" + "memory[ap + 0] = 18430 <= memory[ap + -74]" ] ], [ - 156, + 113, [ "memory[ap + 0] = segments.add()" ] ], [ - 171, + 134, [ "memory[ap + 0] = segments.add()" ] ], [ - 192, + 156, [ "memory[ap + 0] = segments.add()" ] ], [ - 206, + 170, [ "memory[ap + 0] = segments.add()" ] ], [ - 220, + 184, [ "memory[ap + 0] = segments.add()" ] ], [ - 519, + 483, [ "memory[ap + 4] = memory[ap + -1] < 3618502788666131106986593281521497120414687020801267626233049500247285301248" ] ], [ - 523, + 487, [ "\n(value, scalar) = (memory[ap + 3], 313594649253062377472)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -2] = x\nmemory[ap + -1] = y\n" ] ], [ - 533, + 497, [ "\n(value, scalar) = (memory[ap + -2], 10633823966279326983230456482242756608)\nx = min(value // scalar, 340282366920938463463374607431768211455)\ny = value - x * scalar\nmemory[ap + -1] = x\nmemory[ap + 0] = y\n" ] ], [ - 541, + 505, [ "memory[ap + 0] = segments.add()" ] ], [ - 563, + 526, [ - "syscall_handler.syscall(syscall_ptr=memory[fp + -8])" + "syscall_handler.syscall(syscall_ptr=memory[fp + -7])" ] ], [ - 576, + 539, [ "memory[ap + 0] = memory[ap + -6] < memory[ap + -1]" ] ], [ - 588, + 551, [ "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" ] ], [ - 590, + 553, [ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], [ - 614, + 577, [ "memory[ap + 0] = memory[ap + -2] < memory[ap + -1]" ] ], [ - 626, + 589, [ "memory[ap + 0] = memory[ap + -1] < 340282366920938463463374607431768211456" ] ], [ - 628, + 591, [ "(memory[ap + 3], memory[ap + 4]) = divmod(memory[ap + -2], 340282366920938463463374607431768211456)" ] ], [ - 660, + 623, [ "memory[ap + 0] = segments.add()" ] ], [ - 677, + 640, [ "memory[ap + 0] = segments.add()" ] ], [ - 694, + 657, [ "memory[ap + 0] = segments.add()" ] ], [ - 711, + 674, [ "memory[ap + 0] = segments.add()" ] ], [ - 739, + 702, [ "memory[ap + 0] = segments.add()" ] From a83d213073c0148b638c697ba30a296e346a2184 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Wed, 24 Jul 2024 20:46:12 +0200 Subject: [PATCH 59/73] fix test --- tests/python/test_header_decoding.py | 3 ++- tests/utils/header.cairo | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/python/test_header_decoding.py b/tests/python/test_header_decoding.py index 82cd5d2d..9ffbbe33 100644 --- a/tests/python/test_header_decoding.py +++ b/tests/python/test_header_decoding.py @@ -13,6 +13,7 @@ from tools.py.utils import ( bytes_to_8_bytes_chunks_little, reverse_and_split_256_bytes, + split_128, ) from dotenv import load_dotenv import os @@ -69,7 +70,7 @@ def fetch_header_dict(block_number): (low, high) = reverse_and_split_256_bytes(block.receiptsRoot) block_dict["receipts_root"] = {"low": low, "high": high} - (low, high) = reverse_and_split_256_bytes(block.coinbase) + (low, high) = split_128(int.from_bytes(block.coinbase, "big")) block_dict["coinbase"] = {"low": low, "high": high} block_dict["difficulty"] = block.difficulty diff --git a/tests/utils/header.cairo b/tests/utils/header.cairo index fca0ad8d..b73eea6a 100644 --- a/tests/utils/header.cairo +++ b/tests/utils/header.cairo @@ -103,7 +103,14 @@ func test_header_decoding{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_ar assert uncles_hash.low = expected_uncles_hash.low; assert uncles_hash.high = expected_uncles_hash.high; - let coinbase = HeaderDecoder.get_field(rlp, HeaderField.COINBASE); + let coinbase_le = HeaderDecoder.get_field(rlp, HeaderField.COINBASE); + let (coinbase) = uint256_reverse_endian(num=coinbase_le); + %{ + print(hex(ids.coinbase.high)) + print(hex(ids.coinbase.low)) + print(hex(ids.expected_coinbase.high)) + print(hex(ids.expected_coinbase.low)) + %} assert coinbase.low = expected_coinbase.low; assert coinbase.high = expected_coinbase.high; From 24fc9a15de54f82ffa508521f70365803792fc98 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Thu, 25 Jul 2024 08:35:23 +0200 Subject: [PATCH 60/73] cleanup --- tests/utils/header.cairo | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/utils/header.cairo b/tests/utils/header.cairo index b73eea6a..cb862469 100644 --- a/tests/utils/header.cairo +++ b/tests/utils/header.cairo @@ -105,12 +105,6 @@ func test_header_decoding{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_ar let coinbase_le = HeaderDecoder.get_field(rlp, HeaderField.COINBASE); let (coinbase) = uint256_reverse_endian(num=coinbase_le); - %{ - print(hex(ids.coinbase.high)) - print(hex(ids.coinbase.low)) - print(hex(ids.expected_coinbase.high)) - print(hex(ids.expected_coinbase.low)) - %} assert coinbase.low = expected_coinbase.low; assert coinbase.high = expected_coinbase.high; From aefe08aa3f707bc49ed27160eaa6b3eb33ace437 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Thu, 25 Jul 2024 09:03:11 +0200 Subject: [PATCH 61/73] env fixes --- .../dryrun_syscall_handler.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/contract_bootloader/dryrun_syscall_handler.py b/packages/contract_bootloader/dryrun_syscall_handler.py index db068a6f..171d2101 100644 --- a/packages/contract_bootloader/dryrun_syscall_handler.py +++ b/packages/contract_bootloader/dryrun_syscall_handler.py @@ -1,3 +1,4 @@ +import os from typing import ( Dict, Iterable, @@ -31,7 +32,17 @@ DryRunStorageMemorizerHandler, ) -EVM_PROVIDER_URL = "https://sepolia.ethereum.iosis.tech/" +# Load environment variables from a .env file if present +from dotenv import load_dotenv + +load_dotenv() + +RPC_URL = os.getenv("RPC_URL", "") + +if not RPC_URL: + raise ValueError( + "RPC_URL environment variable is not set. Please set it in your environment or in a .env file." + ) class DryRunSyscallHandler(SyscallHandlerBase): @@ -95,7 +106,7 @@ def _call_contract_helper( handler = DryRunHeaderMemorizerHandler( memorizer=memorizer, - evm_provider_url=EVM_PROVIDER_URL, + evm_provider_url=RPC_URL, ) retdata = handler.handle(function_id=function_id, key=key) @@ -122,7 +133,7 @@ def _call_contract_helper( handler = DryRunAccountMemorizerHandler( memorizer=memorizer, - evm_provider_url=EVM_PROVIDER_URL, + evm_provider_url=RPC_URL, ) retdata = handler.handle(function_id=function_id, key=key) @@ -149,7 +160,7 @@ def _call_contract_helper( handler = DryRunStorageMemorizerHandler( memorizer=memorizer, - evm_provider_url=EVM_PROVIDER_URL, + evm_provider_url=RPC_URL, ) retdata = handler.handle(function_id=function_id, key=key) From d04c05e67f0dd1702d7128050431767d5267f46e Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Thu, 25 Jul 2024 09:45:36 +0200 Subject: [PATCH 62/73] static function ptrs lists --- .../execute_syscalls.cairo | 247 ++---------------- .../account_memorizer_handler.cairo | 37 +++ .../header_memorizer_handler.cairo | 109 ++++++++ .../storage_memorizer_handler.cairo | 13 + 4 files changed, 176 insertions(+), 230 deletions(-) create mode 100644 packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo create mode 100644 packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo create mode 100644 packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo diff --git a/packages/contract_bootloader/execute_syscalls.cairo b/packages/contract_bootloader/execute_syscalls.cairo index 2a73bf0b..9df7c94f 100644 --- a/packages/contract_bootloader/execute_syscalls.cairo +++ b/packages/contract_bootloader/execute_syscalls.cairo @@ -61,40 +61,6 @@ namespace MemorizerId { const STORAGE = 2; } -namespace HeaderMemorizerFunctionId { - const GET_PARENT = 0; - const GET_UNCLE = 1; - const GET_COINBASE = 2; - const GET_STATE_ROOT = 3; - const GET_TRANSACTION_ROOT = 4; - const GET_RECEIPT_ROOT = 5; - const GET_BLOOM = 6; - const GET_DIFFICULTY = 7; - const GET_NUMBER = 8; - const GET_GAS_LIMIT = 9; - const GET_GAS_USED = 10; - const GET_TIMESTAMP = 11; - const GET_EXTRA_DATA = 12; - const GET_MIX_HASH = 13; - const GET_NONCE = 14; - const GET_BASE_FEE_PER_GAS = 15; - const GET_WITHDRAWALS_ROOT = 16; - const GET_BLOB_GAS_USED = 17; - const GET_EXCESS_BLOB_GAS = 18; - const GET_PARENT_BEACON_BLOCK_ROOT = 19; -} - -namespace AccountMemorizerFunctionId { - const GET_NONCE = 0; - const GET_BALANCE = 1; - const GET_STATE_ROOT = 2; - const GET_CODE_HASH = 3; -} - -namespace StorageMemorizerFunctionId { - const GET_SLOT = 0; -} - // Executes a syscall that calls another contract. func execute_call_contract{ range_check_ptr, @@ -120,158 +86,21 @@ func execute_call_contract{ let call_contract_response = cast(syscall_ptr, CallContractResponse*); let syscall_ptr = syscall_ptr + CallContractResponse.SIZE; - let memorizerId = call_contract_request.contract_address; - let functionId = call_contract_request.selector; + let memorizer_id = call_contract_request.contract_address; + let function_id = call_contract_request.selector; if (memorizerId == MemorizerId.HEADER) { let (rlp) = HeaderMemorizer.get( chain_id=call_contract_request.calldata_start[2], block_number=call_contract_request.calldata_start[3], ); - if (functionId == HeaderMemorizerFunctionId.GET_PARENT) { - let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.PARENT); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == HeaderMemorizerFunctionId.GET_UNCLE) { - let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.UNCLE); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == HeaderMemorizerFunctionId.GET_COINBASE) { - let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.COINBASE); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == HeaderMemorizerFunctionId.GET_STATE_ROOT) { - let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.STATE_ROOT); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == HeaderMemorizerFunctionId.GET_TRANSACTION_ROOT) { - let field: Uint256 = HeaderDecoder.get_field( - rlp=rlp, field=HeaderField.TRANSACTION_ROOT - ); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == HeaderMemorizerFunctionId.GET_RECEIPT_ROOT) { - let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.RECEIPT_ROOT); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == HeaderMemorizerFunctionId.GET_DIFFICULTY) { - let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.DIFFICULTY); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == HeaderMemorizerFunctionId.GET_NUMBER) { - let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.NUMBER); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == HeaderMemorizerFunctionId.GET_GAS_LIMIT) { - let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.GAS_LIMIT); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == HeaderMemorizerFunctionId.GET_GAS_USED) { - let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.GAS_USED); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - return (); - } - if (functionId == HeaderMemorizerFunctionId.GET_TIMESTAMP) { - let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.TIMESTAMP); - let (value) = uint256_reverse_endian(num=field); + let (header_memorizer_get_value_funcs) = get_label_location(header_memorizer_get_value); + let value = header_memorizer_get_value_funcs[function_id](); - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == HeaderMemorizerFunctionId.GET_EXTRA_DATA) { - let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.EXTRA_DATA); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == HeaderMemorizerFunctionId.GET_MIX_HASH) { - let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.MIX_HASH); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == HeaderMemorizerFunctionId.GET_NONCE) { - let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.NONCE); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == HeaderMemorizerFunctionId.GET_BASE_FEE_PER_GAS) { - let field: Uint256 = HeaderDecoder.get_field( - rlp=rlp, field=HeaderField.BASE_FEE_PER_GAS - ); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - - // Unknown HeaderMemorizerFunctionId - assert 1 = 0; - - return (); + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + return () } if (memorizerId == MemorizerId.ACCOUNT) { let (rlp) = AccountMemorizer.get( @@ -279,47 +108,13 @@ func execute_call_contract{ block_number=call_contract_request.calldata_start[3], address=call_contract_request.calldata_start[4], ); - if (functionId == AccountMemorizerFunctionId.GET_NONCE) { - let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.NONCE); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - return (); - } - if (functionId == AccountMemorizerFunctionId.GET_BALANCE) { - let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.BALANCE); - let (value) = uint256_reverse_endian(num=field); + let (account_memorizer_get_value_funcs) = get_label_location(account_memorizer_get_value); + let value = account_memorizer_get_value_funcs[function_id](); - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == AccountMemorizerFunctionId.GET_STATE_ROOT) { - let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.STATE_ROOT); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - if (functionId == AccountMemorizerFunctionId.GET_CODE_HASH) { - let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.CODE_HASH); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - - return (); - } - - // Unknown AccountMemorizerFunctionId - assert 1 = 0; - - return (); + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + return () } if (memorizerId == MemorizerId.STORAGE) { let (rlp) = StorageMemorizer.get( @@ -331,20 +126,12 @@ func execute_call_contract{ high=call_contract_request.calldata_start[5], ), ); - if (functionId == StorageMemorizerFunctionId.GET_SLOT) { - let field: Uint256 = StorageSlotDecoder.get_word(rlp=rlp); - let (value) = uint256_reverse_endian(num=field); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; + let (storage_memorizer_get_value_funcs) = get_label_location(storage_memorizer_get_value); + let value = storage_memorizer_get_value_funcs[function_id](); - return (); - } - - // Unknown StorageMemorizerFunctionId - assert 1 = 0; - - return (); + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; + return () } // Unknown MemorizerId diff --git a/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo new file mode 100644 index 00000000..9662784d --- /dev/null +++ b/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo @@ -0,0 +1,37 @@ +from src.decoders.account_decoder import AccountDecoder, AccountField +from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian + +account_memorizer_get_value: +dw get_label_location(account_memorizer_get_nonce_value); // GET_NONCE = 0; +dw get_label_location(account_memorizer_get_balance_value); // GET_BALANCE = 1; +dw get_label_location(account_memorizer_get_state_root_value); // GET_STATE_ROOT = 2; +dw get_label_location(account_memorizer_get_code_hash_value); // GET_CODE_HASH = 3; +dw 0; + +func account_memorizer_get_nonce_value() -> Uint256 { + let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.NONCE); + let (value) = uint256_reverse_endian(num=field); + + return value; +} + +func account_memorizer_get_balance_value() -> Uint256 { + let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.BALANCE); + let (value) = uint256_reverse_endian(num=field); + + return value; +} + +func account_memorizer_get_state_root_value() -> Uint256 { + let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.STATE_ROOT); + let (value) = uint256_reverse_endian(num=field); + + return value; +} + +func account_memorizer_get_code_hash_value() -> Uint256 { + let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.CODE_HASH); + let (value) = uint256_reverse_endian(num=field); + + return value; +} diff --git a/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo new file mode 100644 index 00000000..8c900ce0 --- /dev/null +++ b/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo @@ -0,0 +1,109 @@ +from src.decoders.header_decoder import HeaderDecoder, HeaderField +from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian + +header_memorizer_get_value: +dw get_label_location(header_memorizer_get_parent_value); // GET_PARENT = 0; +dw get_label_location(header_memorizer_get_uncle_value); // GET_UNCLE = 1; +dw get_label_location(header_memorizer_get_coinbase_value); // GET_COINBASE = 2; +dw get_label_location(header_memorizer_get_state_root_value); // GET_STATE_ROOT = 3; +dw get_label_location(header_memorizer_get_transaction_root_value); // GET_TRANSACTION_ROOT = 4; +dw get_label_location(header_memorizer_get_receipt_root_value); // GET_RECEIPT_ROOT = 5; +dw get_label_location(header_memorizer_get_difficulty_value); // GET_DIFFICULTY = 7; +dw get_label_location(header_memorizer_get_number_value); // GET_NUMBER = 8; +dw get_label_location(header_memorizer_get_gas_limit_value); // GET_GAS_LIMIT = 9; +dw get_label_location(header_memorizer_get_gas_used_value); // GET_GAS_USED = 10; +dw get_label_location(header_memorizer_get_timestamp_value); // GET_TIMESTAMP = 11; +dw get_label_location(header_memorizer_get_extra_data_value); // GET_EXTRA_DATA = 12; +dw get_label_location(header_memorizer_get_mix_hash_value); // GET_MIX_HASH = 13; +dw get_label_location(header_memorizer_get_nonce_value); // GET_NONCE = 14; +dw get_label_location(header_memorizer_get_base_fee_per_gas_value); // GET_BASE_FEE_PER_GAS = 15; +dw 0; + +func header_memorizer_get_parent_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.PARENT); + let (value) = uint256_reverse_endian(num=field); + return value; +} + +func header_memorizer_get_uncle_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.UNCLE); + let (value) = uint256_reverse_endian(num=field); + return value; +} + +func header_memorizer_get_coinbase_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.COINBASE); + let (value) = uint256_reverse_endian(num=field); + return value; +} + +func header_memorizer_get_state_root_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.STATE_ROOT); + let (value) = uint256_reverse_endian(num=field); + return value; +} + +func header_memorizer_get_transaction_root_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.TRANSACTION_ROOT); + let (value) = uint256_reverse_endian(num=field); + return value; +} + +func header_memorizer_get_receipt_root_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.RECEIPT_ROOT); + let (value) = uint256_reverse_endian(num=field); + return value; +} +func header_memorizer_get_difficulty_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.DIFFICULTY); + let (value) = uint256_reverse_endian(num=field); + return value; +} + +func header_memorizer_get_number_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.NUMBER); + let (value) = uint256_reverse_endian(num=field); + return value; +} + +func header_memorizer_get_gas_limit_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.GAS_LIMIT); + let (value) = uint256_reverse_endian(num=field); + return value; +} + +func header_memorizer_get_gas_used_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.GAS_USED); + let (value) = uint256_reverse_endian(num=field); + return value; +} + +func header_memorizer_get_timestamp_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.TIMESTAMP); + let (value) = uint256_reverse_endian(num=field); + return value; +} + +func header_memorizer_get_extra_data_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.EXTRA_DATA); + let (value) = uint256_reverse_endian(num=field); + return value; +} + +func header_memorizer_get_mix_hash_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.MIX_HASH); + let (value) = uint256_reverse_endian(num=field); + return value; +} + +func header_memorizer_get_nonce_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.NONCE); + let (value) = uint256_reverse_endian(num=field); + return value; +} + +func header_memorizer_get_base_fee_per_gas_value() -> Uint256 { + let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.BASE_FEE_PER_GAS); + let (value) = uint256_reverse_endian(num=field); + return value; +} diff --git a/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo new file mode 100644 index 00000000..45f75692 --- /dev/null +++ b/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo @@ -0,0 +1,13 @@ +from src.decoders.storage_slot_decoder import StorageSlotDecoder +from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian + +storage_memorizer_get_value: +dw get_label_location(storage_memorizer_get_slot_value); // GET_SLOT = 0; +dw 0; + +func storage_memorizer_get_slot_value() -> Uint256 { + let field: Uint256 = StorageSlotDecoder.get_word(rlp=rlp); + let (value) = uint256_reverse_endian(num=field); + + return value; +} From f1fac19602644edafffc38fac46c17efa4866cbf Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Thu, 25 Jul 2024 10:29:49 +0200 Subject: [PATCH 63/73] wip --- .../execute_syscalls.cairo | 62 +++++++++---- .../account_memorizer_handler.cairo | 26 +++++- .../header_memorizer_handler.cairo | 86 +++++++++++++++---- .../storage_memorizer_handler.cairo | 11 ++- 4 files changed, 150 insertions(+), 35 deletions(-) diff --git a/packages/contract_bootloader/execute_syscalls.cairo b/packages/contract_bootloader/execute_syscalls.cairo index 9df7c94f..fba10eb8 100644 --- a/packages/contract_bootloader/execute_syscalls.cairo +++ b/packages/contract_bootloader/execute_syscalls.cairo @@ -14,6 +14,16 @@ from src.decoders.account_decoder import AccountDecoder, AccountField from src.decoders.storage_slot_decoder import StorageSlotDecoder from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian from starkware.cairo.common.dict_access import DictAccess +from starkware.cairo.common.registers import get_label_location +from contract_bootloader.execute_syscalls_handler.header_memorizer_handler import ( + header_memorizer_get_value, +) +from contract_bootloader.execute_syscalls_handler.account_memorizer_handler import ( + account_memorizer_get_value, +) +from contract_bootloader.execute_syscalls_handler.storage_memorizer_handler import ( + storage_memorizer_get_value, +) struct ExecutionInfo { selector: felt, @@ -61,6 +71,16 @@ namespace MemorizerId { const STORAGE = 2; } +func abstract_get_value_func_caller{ + range_check_ptr, + bitwise_ptr: BitwiseBuiltin*, + pow2_array: felt*, + rlp: felt, + return_value_ptr: Uint256*, +}(func_ptr: felt*) -> () { + jmp abs func_ptr; +} + // Executes a syscall that calls another contract. func execute_call_contract{ range_check_ptr, @@ -96,11 +116,15 @@ func execute_call_contract{ ); let (header_memorizer_get_value_funcs) = get_label_location(header_memorizer_get_value); - let value = header_memorizer_get_value_funcs[function_id](); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - return () + local return_value: Uint256; + let return_value_ptr: Uint256* = &return_value; + with rlp, return_value_ptr { + abstract_get_value_func_caller(header_memorizer_get_value_funcs[function_id]); + } + + assert call_contract_response.retdata_start[0] = return_value.low; + assert call_contract_response.retdata_start[1] = return_value.high; + return (); } if (memorizerId == MemorizerId.ACCOUNT) { let (rlp) = AccountMemorizer.get( @@ -110,11 +134,15 @@ func execute_call_contract{ ); let (account_memorizer_get_value_funcs) = get_label_location(account_memorizer_get_value); - let value = account_memorizer_get_value_funcs[function_id](); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - return () + local return_value: Uint256; + let return_value_ptr: Uint256* = &return_value; + with rlp, return_value_ptr { + abstract_get_value_func_caller(account_memorizer_get_value_funcs[function_id]); + } + + assert call_contract_response.retdata_start[0] = return_value.low; + assert call_contract_response.retdata_start[1] = return_value.high; + return (); } if (memorizerId == MemorizerId.STORAGE) { let (rlp) = StorageMemorizer.get( @@ -127,11 +155,15 @@ func execute_call_contract{ ), ); let (storage_memorizer_get_value_funcs) = get_label_location(storage_memorizer_get_value); - let value = storage_memorizer_get_value_funcs[function_id](); - - assert call_contract_response.retdata_start[0] = value.low; - assert call_contract_response.retdata_start[1] = value.high; - return () + local return_value: Uint256; + let return_value_ptr: Uint256* = &return_value; + with rlp, return_value_ptr { + abstract_get_value_func_caller(storage_memorizer_get_value_funcs[function_id]); + } + + assert call_contract_response.retdata_start[0] = return_value.low; + assert call_contract_response.retdata_start[1] = return_value.high; + return (); } // Unknown MemorizerId diff --git a/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo index 9662784d..a995afbd 100644 --- a/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo +++ b/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo @@ -1,5 +1,15 @@ from src.decoders.account_decoder import AccountDecoder, AccountField from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian +from starkware.cairo.common.registers import get_label_location +from starkware.cairo.common.cairo_builtins import BitwiseBuiltin + +// This is not used but stays for reference +namespace AccountMemorizerFunctionId { + const GET_NONCE = 0; + const GET_BALANCE = 1; + const GET_STATE_ROOT = 2; + const GET_CODE_HASH = 3; +} account_memorizer_get_value: dw get_label_location(account_memorizer_get_nonce_value); // GET_NONCE = 0; @@ -8,28 +18,36 @@ dw get_label_location(account_memorizer_get_state_root_value); // GET_STATE_ROO dw get_label_location(account_memorizer_get_code_hash_value); // GET_CODE_HASH = 3; dw 0; -func account_memorizer_get_nonce_value() -> Uint256 { +func account_memorizer_get_nonce_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.NONCE); let (value) = uint256_reverse_endian(num=field); return value; } -func account_memorizer_get_balance_value() -> Uint256 { +func account_memorizer_get_balance_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.BALANCE); let (value) = uint256_reverse_endian(num=field); return value; } -func account_memorizer_get_state_root_value() -> Uint256 { +func account_memorizer_get_state_root_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.STATE_ROOT); let (value) = uint256_reverse_endian(num=field); return value; } -func account_memorizer_get_code_hash_value() -> Uint256 { +func account_memorizer_get_code_hash_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.CODE_HASH); let (value) = uint256_reverse_endian(num=field); diff --git a/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo index 8c900ce0..0d3cdf75 100644 --- a/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo +++ b/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo @@ -1,5 +1,31 @@ from src.decoders.header_decoder import HeaderDecoder, HeaderField from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian +from starkware.cairo.common.registers import get_label_location +from starkware.cairo.common.cairo_builtins import BitwiseBuiltin + +// This is not used but stays for reference +namespace HeaderMemorizerFunctionId { + const GET_PARENT = 0; + const GET_UNCLE = 1; + const GET_COINBASE = 2; + const GET_STATE_ROOT = 3; + const GET_TRANSACTION_ROOT = 4; + const GET_RECEIPT_ROOT = 5; + const GET_BLOOM = 6; + const GET_DIFFICULTY = 7; + const GET_NUMBER = 8; + const GET_GAS_LIMIT = 9; + const GET_GAS_USED = 10; + const GET_TIMESTAMP = 11; + const GET_EXTRA_DATA = 12; + const GET_MIX_HASH = 13; + const GET_NONCE = 14; + const GET_BASE_FEE_PER_GAS = 15; + const GET_WITHDRAWALS_ROOT = 16; + const GET_BLOB_GAS_USED = 17; + const GET_EXCESS_BLOB_GAS = 18; + const GET_PARENT_BEACON_BLOCK_ROOT = 19; +} header_memorizer_get_value: dw get_label_location(header_memorizer_get_parent_value); // GET_PARENT = 0; @@ -19,90 +45,120 @@ dw get_label_location(header_memorizer_get_nonce_value); // GET_NONCE = 14; dw get_label_location(header_memorizer_get_base_fee_per_gas_value); // GET_BASE_FEE_PER_GAS = 15; dw 0; -func header_memorizer_get_parent_value() -> Uint256 { +func header_memorizer_get_parent_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.PARENT); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_uncle_value() -> Uint256 { +func header_memorizer_get_uncle_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.UNCLE); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_coinbase_value() -> Uint256 { +func header_memorizer_get_coinbase_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.COINBASE); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_state_root_value() -> Uint256 { +func header_memorizer_get_state_root_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.STATE_ROOT); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_transaction_root_value() -> Uint256 { +func header_memorizer_get_transaction_root_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.TRANSACTION_ROOT); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_receipt_root_value() -> Uint256 { +func header_memorizer_get_receipt_root_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.RECEIPT_ROOT); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_difficulty_value() -> Uint256 { +func header_memorizer_get_difficulty_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.DIFFICULTY); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_number_value() -> Uint256 { +func header_memorizer_get_number_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.NUMBER); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_gas_limit_value() -> Uint256 { +func header_memorizer_get_gas_limit_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.GAS_LIMIT); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_gas_used_value() -> Uint256 { +func header_memorizer_get_gas_used_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.GAS_USED); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_timestamp_value() -> Uint256 { +func header_memorizer_get_timestamp_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.TIMESTAMP); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_extra_data_value() -> Uint256 { +func header_memorizer_get_extra_data_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.EXTRA_DATA); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_mix_hash_value() -> Uint256 { +func header_memorizer_get_mix_hash_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.MIX_HASH); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_nonce_value() -> Uint256 { +func header_memorizer_get_nonce_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.NONCE); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_base_fee_per_gas_value() -> Uint256 { +func header_memorizer_get_base_fee_per_gas_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.BASE_FEE_PER_GAS); let (value) = uint256_reverse_endian(num=field); return value; diff --git a/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo index 45f75692..26d01dc2 100644 --- a/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo +++ b/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo @@ -1,11 +1,20 @@ from src.decoders.storage_slot_decoder import StorageSlotDecoder from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian +from starkware.cairo.common.registers import get_label_location +from starkware.cairo.common.cairo_builtins import BitwiseBuiltin + +// This is not used but stays for reference +namespace StorageMemorizerFunctionId { + const GET_SLOT = 0; +} storage_memorizer_get_value: dw get_label_location(storage_memorizer_get_slot_value); // GET_SLOT = 0; dw 0; -func storage_memorizer_get_slot_value() -> Uint256 { +func storage_memorizer_get_slot_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = StorageSlotDecoder.get_word(rlp=rlp); let (value) = uint256_reverse_endian(num=field); From 0b889bc761b27493b29eab2b14ff5cd9ac59e3aa Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Thu, 25 Jul 2024 10:58:58 +0200 Subject: [PATCH 64/73] big opts --- .../execute_entry_point.cairo | 14 +++- .../execute_syscalls.cairo | 80 +++++++++---------- .../account_memorizer_handler.cairo | 8 -- .../get_value_trait.cairo | 5 ++ .../header_memorizer_handler.cairo | 19 ----- .../storage_memorizer_handler.cairo | 5 -- 6 files changed, 54 insertions(+), 77 deletions(-) create mode 100644 packages/contract_bootloader/execute_syscalls_handler/get_value_trait.cairo diff --git a/packages/contract_bootloader/execute_entry_point.cairo b/packages/contract_bootloader/execute_entry_point.cairo index ac7fe900..edab8be9 100644 --- a/packages/contract_bootloader/execute_entry_point.cairo +++ b/packages/contract_bootloader/execute_entry_point.cairo @@ -24,6 +24,8 @@ from starkware.starknet.core.os.constants import ( ) from contract_bootloader.contract_class.compiled_class import CompiledClass, CompiledClassEntryPoint from contract_bootloader.execute_syscalls import ExecutionContext, execute_syscalls +from contract_bootloader.execute_syscalls_handler.get_value_trait import GetValueTrait +from starkware.cairo.common.registers import get_fp_and_pc // Represents the arguments pushed to the stack before calling an entry point. struct EntryPointCallArguments { @@ -56,11 +58,21 @@ func call_execute_syscalls{ storage_dict: DictAccess*, pow2_array: felt*, }(execution_context: ExecutionContext*, syscall_ptr_end: felt*, dry_run: felt) { + alloc_locals; + let (__fp__, _) = get_fp_and_pc(); + if (dry_run == 1) { return (); } - execute_syscalls(execution_context, syscall_ptr_end); + // TODO to be filled with fn ptrs + local get_value_trait: GetValueTrait; + + execute_syscalls( + execution_context=execution_context, + syscall_ptr_end=syscall_ptr_end, + get_value_trait=&get_value_trait, + ); return (); } diff --git a/packages/contract_bootloader/execute_syscalls.cairo b/packages/contract_bootloader/execute_syscalls.cairo index fba10eb8..865c4f14 100644 --- a/packages/contract_bootloader/execute_syscalls.cairo +++ b/packages/contract_bootloader/execute_syscalls.cairo @@ -15,15 +15,7 @@ from src.decoders.storage_slot_decoder import StorageSlotDecoder from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian from starkware.cairo.common.dict_access import DictAccess from starkware.cairo.common.registers import get_label_location -from contract_bootloader.execute_syscalls_handler.header_memorizer_handler import ( - header_memorizer_get_value, -) -from contract_bootloader.execute_syscalls_handler.account_memorizer_handler import ( - account_memorizer_get_value, -) -from contract_bootloader.execute_syscalls_handler.storage_memorizer_handler import ( - storage_memorizer_get_value, -) +from contract_bootloader.execute_syscalls_handler.get_value_trait import GetValueTrait struct ExecutionInfo { selector: felt, @@ -54,15 +46,21 @@ func execute_syscalls{ account_dict: DictAccess*, storage_dict: DictAccess*, pow2_array: felt*, -}(execution_context: ExecutionContext*, syscall_ptr_end: felt*) { +}(execution_context: ExecutionContext*, syscall_ptr_end: felt*, get_value_trait: GetValueTrait*) { if (syscall_ptr == syscall_ptr_end) { return (); } assert [syscall_ptr] = CALL_CONTRACT_SELECTOR; - execute_call_contract(caller_execution_context=execution_context); - - return execute_syscalls(execution_context=execution_context, syscall_ptr_end=syscall_ptr_end); + execute_call_contract( + caller_execution_context=execution_context, get_value_trait=get_value_trait + ); + + return execute_syscalls( + execution_context=execution_context, + syscall_ptr_end=syscall_ptr_end, + get_value_trait=get_value_trait, + ); } namespace MemorizerId { @@ -72,12 +70,8 @@ namespace MemorizerId { } func abstract_get_value_func_caller{ - range_check_ptr, - bitwise_ptr: BitwiseBuiltin*, - pow2_array: felt*, - rlp: felt, - return_value_ptr: Uint256*, -}(func_ptr: felt*) -> () { + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* +}(func_ptr: felt*) -> Uint256 { jmp abs func_ptr; } @@ -92,7 +86,7 @@ func execute_call_contract{ account_dict: DictAccess*, storage_dict: DictAccess*, pow2_array: felt*, -}(caller_execution_context: ExecutionContext*) { +}(caller_execution_context: ExecutionContext*, get_value_trait: GetValueTrait*) { alloc_locals; let request_header = cast(syscall_ptr, RequestHeader*); let syscall_ptr = syscall_ptr + RequestHeader.SIZE; @@ -109,42 +103,40 @@ func execute_call_contract{ let memorizer_id = call_contract_request.contract_address; let function_id = call_contract_request.selector; - if (memorizerId == MemorizerId.HEADER) { + if (memorizer_id == MemorizerId.HEADER) { let (rlp) = HeaderMemorizer.get( chain_id=call_contract_request.calldata_start[2], block_number=call_contract_request.calldata_start[3], ); - let (header_memorizer_get_value_funcs) = get_label_location(header_memorizer_get_value); - local return_value: Uint256; - let return_value_ptr: Uint256* = &return_value; - with rlp, return_value_ptr { - abstract_get_value_func_caller(header_memorizer_get_value_funcs[function_id]); + with rlp { + let value = abstract_get_value_func_caller( + get_value_trait.header_memorizer_get_value_ptrs[function_id] + ); } - assert call_contract_response.retdata_start[0] = return_value.low; - assert call_contract_response.retdata_start[1] = return_value.high; + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; return (); } - if (memorizerId == MemorizerId.ACCOUNT) { + if (memorizer_id == MemorizerId.ACCOUNT) { let (rlp) = AccountMemorizer.get( chain_id=call_contract_request.calldata_start[2], block_number=call_contract_request.calldata_start[3], address=call_contract_request.calldata_start[4], ); - let (account_memorizer_get_value_funcs) = get_label_location(account_memorizer_get_value); - local return_value: Uint256; - let return_value_ptr: Uint256* = &return_value; - with rlp, return_value_ptr { - abstract_get_value_func_caller(account_memorizer_get_value_funcs[function_id]); + with rlp { + let value = abstract_get_value_func_caller( + get_value_trait.account_memorizer_get_value_ptrs[function_id] + ); } - assert call_contract_response.retdata_start[0] = return_value.low; - assert call_contract_response.retdata_start[1] = return_value.high; + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; return (); } - if (memorizerId == MemorizerId.STORAGE) { + if (memorizer_id == MemorizerId.STORAGE) { let (rlp) = StorageMemorizer.get( chain_id=call_contract_request.calldata_start[2], block_number=call_contract_request.calldata_start[3], @@ -154,15 +146,15 @@ func execute_call_contract{ high=call_contract_request.calldata_start[5], ), ); - let (storage_memorizer_get_value_funcs) = get_label_location(storage_memorizer_get_value); - local return_value: Uint256; - let return_value_ptr: Uint256* = &return_value; - with rlp, return_value_ptr { - abstract_get_value_func_caller(storage_memorizer_get_value_funcs[function_id]); + + with rlp { + let value = abstract_get_value_func_caller( + get_value_trait.storage_memorizer_get_value_ptrs[function_id] + ); } - assert call_contract_response.retdata_start[0] = return_value.low; - assert call_contract_response.retdata_start[1] = return_value.high; + assert call_contract_response.retdata_start[0] = value.low; + assert call_contract_response.retdata_start[1] = value.high; return (); } diff --git a/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo index a995afbd..7a76348d 100644 --- a/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo +++ b/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo @@ -1,6 +1,5 @@ from src.decoders.account_decoder import AccountDecoder, AccountField from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian -from starkware.cairo.common.registers import get_label_location from starkware.cairo.common.cairo_builtins import BitwiseBuiltin // This is not used but stays for reference @@ -11,13 +10,6 @@ namespace AccountMemorizerFunctionId { const GET_CODE_HASH = 3; } -account_memorizer_get_value: -dw get_label_location(account_memorizer_get_nonce_value); // GET_NONCE = 0; -dw get_label_location(account_memorizer_get_balance_value); // GET_BALANCE = 1; -dw get_label_location(account_memorizer_get_state_root_value); // GET_STATE_ROOT = 2; -dw get_label_location(account_memorizer_get_code_hash_value); // GET_CODE_HASH = 3; -dw 0; - func account_memorizer_get_nonce_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { diff --git a/packages/contract_bootloader/execute_syscalls_handler/get_value_trait.cairo b/packages/contract_bootloader/execute_syscalls_handler/get_value_trait.cairo new file mode 100644 index 00000000..dcb3c76f --- /dev/null +++ b/packages/contract_bootloader/execute_syscalls_handler/get_value_trait.cairo @@ -0,0 +1,5 @@ +struct GetValueTrait { + header_memorizer_get_value_ptrs: felt**, + account_memorizer_get_value_ptrs: felt**, + storage_memorizer_get_value_ptrs: felt**, +} diff --git a/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo index 0d3cdf75..9561a605 100644 --- a/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo +++ b/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo @@ -1,6 +1,5 @@ from src.decoders.header_decoder import HeaderDecoder, HeaderField from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian -from starkware.cairo.common.registers import get_label_location from starkware.cairo.common.cairo_builtins import BitwiseBuiltin // This is not used but stays for reference @@ -27,24 +26,6 @@ namespace HeaderMemorizerFunctionId { const GET_PARENT_BEACON_BLOCK_ROOT = 19; } -header_memorizer_get_value: -dw get_label_location(header_memorizer_get_parent_value); // GET_PARENT = 0; -dw get_label_location(header_memorizer_get_uncle_value); // GET_UNCLE = 1; -dw get_label_location(header_memorizer_get_coinbase_value); // GET_COINBASE = 2; -dw get_label_location(header_memorizer_get_state_root_value); // GET_STATE_ROOT = 3; -dw get_label_location(header_memorizer_get_transaction_root_value); // GET_TRANSACTION_ROOT = 4; -dw get_label_location(header_memorizer_get_receipt_root_value); // GET_RECEIPT_ROOT = 5; -dw get_label_location(header_memorizer_get_difficulty_value); // GET_DIFFICULTY = 7; -dw get_label_location(header_memorizer_get_number_value); // GET_NUMBER = 8; -dw get_label_location(header_memorizer_get_gas_limit_value); // GET_GAS_LIMIT = 9; -dw get_label_location(header_memorizer_get_gas_used_value); // GET_GAS_USED = 10; -dw get_label_location(header_memorizer_get_timestamp_value); // GET_TIMESTAMP = 11; -dw get_label_location(header_memorizer_get_extra_data_value); // GET_EXTRA_DATA = 12; -dw get_label_location(header_memorizer_get_mix_hash_value); // GET_MIX_HASH = 13; -dw get_label_location(header_memorizer_get_nonce_value); // GET_NONCE = 14; -dw get_label_location(header_memorizer_get_base_fee_per_gas_value); // GET_BASE_FEE_PER_GAS = 15; -dw 0; - func header_memorizer_get_parent_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { diff --git a/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo index 26d01dc2..59269f09 100644 --- a/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo +++ b/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo @@ -1,6 +1,5 @@ from src.decoders.storage_slot_decoder import StorageSlotDecoder from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian -from starkware.cairo.common.registers import get_label_location from starkware.cairo.common.cairo_builtins import BitwiseBuiltin // This is not used but stays for reference @@ -8,10 +7,6 @@ namespace StorageMemorizerFunctionId { const GET_SLOT = 0; } -storage_memorizer_get_value: -dw get_label_location(storage_memorizer_get_slot_value); // GET_SLOT = 0; -dw 0; - func storage_memorizer_get_slot_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { From cfed5a82879d9a4ba706a6b43eaeaed2dff06e6f Mon Sep 17 00:00:00 2001 From: Pia Date: Thu, 25 Jul 2024 11:03:56 +0200 Subject: [PATCH 65/73] fix: return always bytes32 --- src/hdp.cairo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hdp.cairo b/src/hdp.cairo index fa0892cb..a4742cd8 100644 --- a/src/hdp.cairo +++ b/src/hdp.cairo @@ -204,8 +204,8 @@ func run{ import json dictionary = dict() - dictionary["tasks_root"] = hex(ids.tasks_root.high * 2 ** 128 + ids.tasks_root.low ) - dictionary["results_root"] = hex(ids.results_root.high * 2 ** 128 + ids.results_root.low) + dictionary["tasks_root"] = '0x' + (hex(ids.tasks_root.high * 2 ** 128 + ids.tasks_root.low)[2:].zfill(64)) + dictionary["results_root"] = '0x' + (hex(ids.results_root.high * 2 ** 128 + ids.results_root.low)[2:].zfill(64)) results = list() for i in range(ids.results_len): results.append(memory[ids.results.address_ + i]) From 0cabcb4a2083d8edad10fbc6ba30d1c21d4c6a6c Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Thu, 25 Jul 2024 14:40:45 +0200 Subject: [PATCH 66/73] get_memorizer_handler_ptrs --- .../execute_entry_point.cairo | 15 ++- .../execute_syscalls.cairo | 6 +- .../account_memorizer_handler.cairo | 32 +++++- .../get_value_trait.cairo | 6 +- .../header_memorizer_handler.cairo | 103 ++++++++++++++---- .../storage_memorizer_handler.cairo | 17 ++- 6 files changed, 140 insertions(+), 39 deletions(-) diff --git a/packages/contract_bootloader/execute_entry_point.cairo b/packages/contract_bootloader/execute_entry_point.cairo index edab8be9..d6bb8ecf 100644 --- a/packages/contract_bootloader/execute_entry_point.cairo +++ b/packages/contract_bootloader/execute_entry_point.cairo @@ -26,6 +26,15 @@ from contract_bootloader.contract_class.compiled_class import CompiledClass, Com from contract_bootloader.execute_syscalls import ExecutionContext, execute_syscalls from contract_bootloader.execute_syscalls_handler.get_value_trait import GetValueTrait from starkware.cairo.common.registers import get_fp_and_pc +from contract_bootloader.execute_syscalls_handler.header_memorizer_handler import ( + get_memorizer_handler_ptrs as get_header_memorizer_handler_ptrs, +) +from contract_bootloader.execute_syscalls_handler.account_memorizer_handler import ( + get_memorizer_handler_ptrs as get_account_memorizer_handler_ptrs, +) +from contract_bootloader.execute_syscalls_handler.storage_memorizer_handler import ( + get_memorizer_handler_ptrs as get_storage_memorizer_handler_ptrs, +) // Represents the arguments pushed to the stack before calling an entry point. struct EntryPointCallArguments { @@ -66,7 +75,11 @@ func call_execute_syscalls{ } // TODO to be filled with fn ptrs - local get_value_trait: GetValueTrait; + local get_value_trait: GetValueTrait = GetValueTrait( + header_memorizer_handler_ptrs=get_header_memorizer_handler_ptrs(), + account_memorizer_handler_ptrs=get_account_memorizer_handler_ptrs(), + storage_memorizer_handler_ptrs=get_storage_memorizer_handler_ptrs(), + ); execute_syscalls( execution_context=execution_context, diff --git a/packages/contract_bootloader/execute_syscalls.cairo b/packages/contract_bootloader/execute_syscalls.cairo index 865c4f14..11dedfb6 100644 --- a/packages/contract_bootloader/execute_syscalls.cairo +++ b/packages/contract_bootloader/execute_syscalls.cairo @@ -111,7 +111,7 @@ func execute_call_contract{ with rlp { let value = abstract_get_value_func_caller( - get_value_trait.header_memorizer_get_value_ptrs[function_id] + get_value_trait.header_memorizer_handler_ptrs[function_id] ); } @@ -128,7 +128,7 @@ func execute_call_contract{ with rlp { let value = abstract_get_value_func_caller( - get_value_trait.account_memorizer_get_value_ptrs[function_id] + get_value_trait.account_memorizer_handler_ptrs[function_id] ); } @@ -149,7 +149,7 @@ func execute_call_contract{ with rlp { let value = abstract_get_value_func_caller( - get_value_trait.storage_memorizer_get_value_ptrs[function_id] + get_value_trait.storage_memorizer_handler_ptrs[function_id] ); } diff --git a/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo index 7a76348d..4e892e12 100644 --- a/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo +++ b/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo @@ -1,6 +1,8 @@ +from starkware.cairo.common.alloc import alloc from src.decoders.account_decoder import AccountDecoder, AccountField from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian from starkware.cairo.common.cairo_builtins import BitwiseBuiltin +from starkware.cairo.common.registers import get_label_location // This is not used but stays for reference namespace AccountMemorizerFunctionId { @@ -10,16 +12,34 @@ namespace AccountMemorizerFunctionId { const GET_CODE_HASH = 3; } -func account_memorizer_get_nonce_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* -}() -> Uint256 { +func get_memorizer_handler_ptrs() -> felt** { + let (handler_list) = alloc(); + let handler_ptrs = cast(handler_list, felt**); + + let (label) = get_label_location(get_nonce_value); + assert handler_ptrs[AccountMemorizerFunctionId.GET_NONCE] = label; + + let (label) = get_label_location(get_balance_value); + assert handler_ptrs[AccountMemorizerFunctionId.GET_BALANCE] = label; + + let (label) = get_label_location(get_state_root_value); + assert handler_ptrs[AccountMemorizerFunctionId.GET_STATE_ROOT] = label; + + let (label) = get_label_location(get_code_hash_value); + assert handler_ptrs[AccountMemorizerFunctionId.GET_CODE_HASH] = label; + + return handler_ptrs; +} + +func get_nonce_value{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt*}( + ) -> Uint256 { let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.NONCE); let (value) = uint256_reverse_endian(num=field); return value; } -func account_memorizer_get_balance_value{ +func get_balance_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.BALANCE); @@ -28,7 +48,7 @@ func account_memorizer_get_balance_value{ return value; } -func account_memorizer_get_state_root_value{ +func get_state_root_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.STATE_ROOT); @@ -37,7 +57,7 @@ func account_memorizer_get_state_root_value{ return value; } -func account_memorizer_get_code_hash_value{ +func get_code_hash_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.CODE_HASH); diff --git a/packages/contract_bootloader/execute_syscalls_handler/get_value_trait.cairo b/packages/contract_bootloader/execute_syscalls_handler/get_value_trait.cairo index dcb3c76f..9f740f1c 100644 --- a/packages/contract_bootloader/execute_syscalls_handler/get_value_trait.cairo +++ b/packages/contract_bootloader/execute_syscalls_handler/get_value_trait.cairo @@ -1,5 +1,5 @@ struct GetValueTrait { - header_memorizer_get_value_ptrs: felt**, - account_memorizer_get_value_ptrs: felt**, - storage_memorizer_get_value_ptrs: felt**, + header_memorizer_handler_ptrs: felt**, + account_memorizer_handler_ptrs: felt**, + storage_memorizer_handler_ptrs: felt**, } diff --git a/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo index 9561a605..ed0d24bf 100644 --- a/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo +++ b/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo @@ -1,6 +1,8 @@ +from starkware.cairo.common.alloc import alloc from src.decoders.header_decoder import HeaderDecoder, HeaderField from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian from starkware.cairo.common.cairo_builtins import BitwiseBuiltin +from starkware.cairo.common.registers import get_label_location // This is not used but stays for reference namespace HeaderMemorizerFunctionId { @@ -26,23 +28,80 @@ namespace HeaderMemorizerFunctionId { const GET_PARENT_BEACON_BLOCK_ROOT = 19; } -func header_memorizer_get_parent_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* -}() -> Uint256 { +func get_memorizer_handler_ptrs() -> felt** { + let (handler_list) = alloc(); + let handler_ptrs = cast(handler_list, felt**); + + let (label) = get_label_location(get_parent_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_PARENT] = label; + + let (label) = get_label_location(get_uncle_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_UNCLE] = label; + + let (label) = get_label_location(get_coinbase_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_COINBASE] = label; + + let (label) = get_label_location(get_state_root_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_STATE_ROOT] = label; + + let (label) = get_label_location(get_transaction_root_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_TRANSACTION_ROOT] = label; + + let (label) = get_label_location(get_receipt_root_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_RECEIPT_ROOT] = label; + + assert handler_ptrs[HeaderMemorizerFunctionId.GET_BLOOM] = cast(0, felt*); + + let (label) = get_label_location(get_difficulty_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_DIFFICULTY] = label; + + let (label) = get_label_location(get_number_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_NUMBER] = label; + + let (label) = get_label_location(get_gas_limit_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_GAS_LIMIT] = label; + + let (label) = get_label_location(get_gas_used_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_GAS_USED] = label; + + let (label) = get_label_location(get_timestamp_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_TIMESTAMP] = label; + + let (label) = get_label_location(get_extra_data_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_EXTRA_DATA] = label; + + let (label) = get_label_location(get_mix_hash_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_MIX_HASH] = label; + + let (label) = get_label_location(get_nonce_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_NONCE] = label; + + let (label) = get_label_location(get_base_fee_per_gas_value); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_BASE_FEE_PER_GAS] = label; + + assert handler_ptrs[HeaderMemorizerFunctionId.GET_WITHDRAWALS_ROOT] = cast(0, felt*); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_BLOB_GAS_USED] = cast(0, felt*); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_EXCESS_BLOB_GAS] = cast(0, felt*); + assert handler_ptrs[HeaderMemorizerFunctionId.GET_PARENT_BEACON_BLOCK_ROOT] = cast(0, felt*); + + return handler_ptrs; +} + +func get_parent_value{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt*}( + ) -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.PARENT); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_uncle_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* -}() -> Uint256 { +func get_uncle_value{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt*}( + ) -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.UNCLE); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_coinbase_value{ +func get_coinbase_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.COINBASE); @@ -50,7 +109,7 @@ func header_memorizer_get_coinbase_value{ return value; } -func header_memorizer_get_state_root_value{ +func get_state_root_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.STATE_ROOT); @@ -58,7 +117,7 @@ func header_memorizer_get_state_root_value{ return value; } -func header_memorizer_get_transaction_root_value{ +func get_transaction_root_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.TRANSACTION_ROOT); @@ -66,14 +125,14 @@ func header_memorizer_get_transaction_root_value{ return value; } -func header_memorizer_get_receipt_root_value{ +func get_receipt_root_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.RECEIPT_ROOT); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_difficulty_value{ +func get_difficulty_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.DIFFICULTY); @@ -81,15 +140,14 @@ func header_memorizer_get_difficulty_value{ return value; } -func header_memorizer_get_number_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* -}() -> Uint256 { +func get_number_value{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt*}( + ) -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.NUMBER); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_gas_limit_value{ +func get_gas_limit_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.GAS_LIMIT); @@ -97,7 +155,7 @@ func header_memorizer_get_gas_limit_value{ return value; } -func header_memorizer_get_gas_used_value{ +func get_gas_used_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.GAS_USED); @@ -105,7 +163,7 @@ func header_memorizer_get_gas_used_value{ return value; } -func header_memorizer_get_timestamp_value{ +func get_timestamp_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.TIMESTAMP); @@ -113,7 +171,7 @@ func header_memorizer_get_timestamp_value{ return value; } -func header_memorizer_get_extra_data_value{ +func get_extra_data_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.EXTRA_DATA); @@ -121,7 +179,7 @@ func header_memorizer_get_extra_data_value{ return value; } -func header_memorizer_get_mix_hash_value{ +func get_mix_hash_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.MIX_HASH); @@ -129,15 +187,14 @@ func header_memorizer_get_mix_hash_value{ return value; } -func header_memorizer_get_nonce_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* -}() -> Uint256 { +func get_nonce_value{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt*}( + ) -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.NONCE); let (value) = uint256_reverse_endian(num=field); return value; } -func header_memorizer_get_base_fee_per_gas_value{ +func get_base_fee_per_gas_value{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.BASE_FEE_PER_GAS); diff --git a/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo index 59269f09..83c9fe5c 100644 --- a/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo +++ b/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo @@ -1,15 +1,26 @@ +from starkware.cairo.common.alloc import alloc from src.decoders.storage_slot_decoder import StorageSlotDecoder from starkware.cairo.common.uint256 import Uint256, uint256_reverse_endian from starkware.cairo.common.cairo_builtins import BitwiseBuiltin +from starkware.cairo.common.registers import get_label_location // This is not used but stays for reference namespace StorageMemorizerFunctionId { const GET_SLOT = 0; } -func storage_memorizer_get_slot_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* -}() -> Uint256 { +func get_memorizer_handler_ptrs() -> felt** { + let (handler_list) = alloc(); + let handler_ptrs = cast(handler_list, felt**); + + let (label) = get_label_location(get_slot_value); + assert handler_ptrs[StorageMemorizerFunctionId.GET_SLOT] = label; + + return handler_ptrs; +} + +func get_slot_value{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt*}( + ) -> Uint256 { let field: Uint256 = StorageSlotDecoder.get_word(rlp=rlp); let (value) = uint256_reverse_endian(num=field); From 3e611f129dfa4f623d0a0ff32737d67c26f6734c Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Thu, 25 Jul 2024 14:49:43 +0200 Subject: [PATCH 67/73] opts --- .../execute_syscalls.cairo | 25 +++++------ .../account_memorizer_handler.cairo | 11 ++--- .../header_memorizer_handler.cairo | 42 ++++++++++--------- .../storage_memorizer_handler.cairo | 5 ++- 4 files changed, 43 insertions(+), 40 deletions(-) diff --git a/packages/contract_bootloader/execute_syscalls.cairo b/packages/contract_bootloader/execute_syscalls.cairo index 11dedfb6..5bd9ae78 100644 --- a/packages/contract_bootloader/execute_syscalls.cairo +++ b/packages/contract_bootloader/execute_syscalls.cairo @@ -70,8 +70,8 @@ namespace MemorizerId { } func abstract_get_value_func_caller{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* -}(func_ptr: felt*) -> Uint256 { + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* +}() -> Uint256 { jmp abs func_ptr; } @@ -109,10 +109,9 @@ func execute_call_contract{ block_number=call_contract_request.calldata_start[3], ); - with rlp { - let value = abstract_get_value_func_caller( - get_value_trait.header_memorizer_handler_ptrs[function_id] - ); + let func_ptr: felt* = get_value_trait.header_memorizer_handler_ptrs[function_id]; + with func_ptr, rlp { + let value = abstract_get_value_func_caller(); } assert call_contract_response.retdata_start[0] = value.low; @@ -126,10 +125,9 @@ func execute_call_contract{ address=call_contract_request.calldata_start[4], ); - with rlp { - let value = abstract_get_value_func_caller( - get_value_trait.account_memorizer_handler_ptrs[function_id] - ); + let func_ptr: felt* = get_value_trait.account_memorizer_handler_ptrs[function_id]; + with func_ptr, rlp { + let value = abstract_get_value_func_caller(); } assert call_contract_response.retdata_start[0] = value.low; @@ -147,10 +145,9 @@ func execute_call_contract{ ), ); - with rlp { - let value = abstract_get_value_func_caller( - get_value_trait.storage_memorizer_handler_ptrs[function_id] - ); + let func_ptr: felt* = get_value_trait.storage_memorizer_handler_ptrs[function_id]; + with func_ptr, rlp { + let value = abstract_get_value_func_caller(); } assert call_contract_response.retdata_start[0] = value.low; diff --git a/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo index 4e892e12..bbf342b9 100644 --- a/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo +++ b/packages/contract_bootloader/execute_syscalls_handler/account_memorizer_handler.cairo @@ -31,8 +31,9 @@ func get_memorizer_handler_ptrs() -> felt** { return handler_ptrs; } -func get_nonce_value{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt*}( - ) -> Uint256 { +func get_nonce_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.NONCE); let (value) = uint256_reverse_endian(num=field); @@ -40,7 +41,7 @@ func get_nonce_value{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: } func get_balance_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.BALANCE); let (value) = uint256_reverse_endian(num=field); @@ -49,7 +50,7 @@ func get_balance_value{ } func get_state_root_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.STATE_ROOT); let (value) = uint256_reverse_endian(num=field); @@ -58,7 +59,7 @@ func get_state_root_value{ } func get_code_hash_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = AccountDecoder.get_field(rlp=rlp, field=AccountField.CODE_HASH); let (value) = uint256_reverse_endian(num=field); diff --git a/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo index ed0d24bf..8991c559 100644 --- a/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo +++ b/packages/contract_bootloader/execute_syscalls_handler/header_memorizer_handler.cairo @@ -87,22 +87,24 @@ func get_memorizer_handler_ptrs() -> felt** { return handler_ptrs; } -func get_parent_value{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt*}( - ) -> Uint256 { +func get_parent_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.PARENT); let (value) = uint256_reverse_endian(num=field); return value; } -func get_uncle_value{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt*}( - ) -> Uint256 { +func get_uncle_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.UNCLE); let (value) = uint256_reverse_endian(num=field); return value; } func get_coinbase_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.COINBASE); let (value) = uint256_reverse_endian(num=field); @@ -110,7 +112,7 @@ func get_coinbase_value{ } func get_state_root_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.STATE_ROOT); let (value) = uint256_reverse_endian(num=field); @@ -118,7 +120,7 @@ func get_state_root_value{ } func get_transaction_root_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.TRANSACTION_ROOT); let (value) = uint256_reverse_endian(num=field); @@ -126,29 +128,30 @@ func get_transaction_root_value{ } func get_receipt_root_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.RECEIPT_ROOT); let (value) = uint256_reverse_endian(num=field); return value; } func get_difficulty_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.DIFFICULTY); let (value) = uint256_reverse_endian(num=field); return value; } -func get_number_value{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt*}( - ) -> Uint256 { +func get_number_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.NUMBER); let (value) = uint256_reverse_endian(num=field); return value; } func get_gas_limit_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.GAS_LIMIT); let (value) = uint256_reverse_endian(num=field); @@ -156,7 +159,7 @@ func get_gas_limit_value{ } func get_gas_used_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.GAS_USED); let (value) = uint256_reverse_endian(num=field); @@ -164,7 +167,7 @@ func get_gas_used_value{ } func get_timestamp_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.TIMESTAMP); let (value) = uint256_reverse_endian(num=field); @@ -172,7 +175,7 @@ func get_timestamp_value{ } func get_extra_data_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.EXTRA_DATA); let (value) = uint256_reverse_endian(num=field); @@ -180,22 +183,23 @@ func get_extra_data_value{ } func get_mix_hash_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.MIX_HASH); let (value) = uint256_reverse_endian(num=field); return value; } -func get_nonce_value{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt*}( - ) -> Uint256 { +func get_nonce_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.NONCE); let (value) = uint256_reverse_endian(num=field); return value; } func get_base_fee_per_gas_value{ - range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt* + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { let field: Uint256 = HeaderDecoder.get_field(rlp=rlp, field=HeaderField.BASE_FEE_PER_GAS); let (value) = uint256_reverse_endian(num=field); diff --git a/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo b/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo index 83c9fe5c..c8abe033 100644 --- a/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo +++ b/packages/contract_bootloader/execute_syscalls_handler/storage_memorizer_handler.cairo @@ -19,8 +19,9 @@ func get_memorizer_handler_ptrs() -> felt** { return handler_ptrs; } -func get_slot_value{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, rlp: felt*}( - ) -> Uint256 { +func get_slot_value{ + range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* +}() -> Uint256 { let field: Uint256 = StorageSlotDecoder.get_word(rlp=rlp); let (value) = uint256_reverse_endian(num=field); From ec19e1dd0261109b0c822222230253af02cdf276 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Thu, 25 Jul 2024 14:52:01 +0200 Subject: [PATCH 68/73] rename --- packages/contract_bootloader/execute_syscalls.cairo | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/contract_bootloader/execute_syscalls.cairo b/packages/contract_bootloader/execute_syscalls.cairo index 5bd9ae78..f7ec2aff 100644 --- a/packages/contract_bootloader/execute_syscalls.cairo +++ b/packages/contract_bootloader/execute_syscalls.cairo @@ -69,7 +69,7 @@ namespace MemorizerId { const STORAGE = 2; } -func abstract_get_value_func_caller{ +func abstract_memorizer_handler{ range_check_ptr, bitwise_ptr: BitwiseBuiltin*, pow2_array: felt*, func_ptr: felt*, rlp: felt* }() -> Uint256 { jmp abs func_ptr; @@ -111,7 +111,7 @@ func execute_call_contract{ let func_ptr: felt* = get_value_trait.header_memorizer_handler_ptrs[function_id]; with func_ptr, rlp { - let value = abstract_get_value_func_caller(); + let value = abstract_memorizer_handler(); } assert call_contract_response.retdata_start[0] = value.low; @@ -127,7 +127,7 @@ func execute_call_contract{ let func_ptr: felt* = get_value_trait.account_memorizer_handler_ptrs[function_id]; with func_ptr, rlp { - let value = abstract_get_value_func_caller(); + let value = abstract_memorizer_handler(); } assert call_contract_response.retdata_start[0] = value.low; @@ -147,7 +147,7 @@ func execute_call_contract{ let func_ptr: felt* = get_value_trait.storage_memorizer_handler_ptrs[function_id]; with func_ptr, rlp { - let value = abstract_get_value_func_caller(); + let value = abstract_memorizer_handler(); } assert call_contract_response.retdata_start[0] = value.low; From e160aae52275698eb1d6e3885ab79a4c89b1fbd9 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Mon, 29 Jul 2024 12:37:27 +0200 Subject: [PATCH 69/73] cache in providers --- .../provider/account_key_provider.py | 28 +++++++++++++++++-- .../provider/header_key_provider.py | 9 +++++- .../provider/storage_key_provider.py | 21 ++++++++------ 3 files changed, 47 insertions(+), 11 deletions(-) diff --git a/packages/contract_bootloader/provider/account_key_provider.py b/packages/contract_bootloader/provider/account_key_provider.py index 757a4eec..944874d5 100644 --- a/packages/contract_bootloader/provider/account_key_provider.py +++ b/packages/contract_bootloader/provider/account_key_provider.py @@ -1,13 +1,22 @@ +import os from web3 import Web3 from contract_bootloader.memorizer.account_memorizer import MemorizerKey from contract_bootloader.provider.evm_provider import EVMProvider +from functools import lru_cache class AccountKeyEVMProvider(EVMProvider): def __init__(self, provider_url: str): super().__init__(provider_url=provider_url) + self.nonce_cache = {} + self.balance_cache = {} + self.state_root_cache = {} + self.code_hash_cache = {} def get_nonce(self, key: MemorizerKey) -> int: + if key in self.nonce_cache: + return self.nonce_cache[key] + address = Web3.toChecksumAddress(f"0x{key.address:040x}") if not self.web3.isAddress(address): raise ValueError(f"Invalid Ethereum address: {address}") @@ -16,11 +25,15 @@ def get_nonce(self, key: MemorizerKey) -> int: nonce = self.web3.eth.get_transaction_count( address, block_identifier=key.block_number ) + self.nonce_cache[key] = int(nonce) return int(nonce) except Exception as e: raise Exception(f"An error occurred while fetching the nonce: {e}") def get_balance(self, key: MemorizerKey) -> int: + if key in self.balance_cache: + return self.balance_cache[key] + address = Web3.toChecksumAddress(f"0x{key.address:040x}") if not self.web3.isAddress(address): raise ValueError(f"Invalid Ethereum address: {address}") @@ -29,26 +42,37 @@ def get_balance(self, key: MemorizerKey) -> int: balance = self.web3.eth.get_balance( address, block_identifier=key.block_number ) + self.balance_cache[key] = int(balance) return int(balance) except Exception as e: raise Exception(f"An error occurred while fetching the balance: {e}") def get_state_root(self, key: MemorizerKey) -> int: + if key in self.state_root_cache: + return self.state_root_cache[key] + try: address = Web3.toChecksumAddress(f"0x{key.address:040x}") account_proof = self.web3.eth.get_proof(address, [], key.block_number) state_root = account_proof["storageHash"] - return int(state_root.hex(), 16) + state_root_int = int(state_root.hex(), 16) + self.state_root_cache[key] = state_root_int + return state_root_int except Exception as e: raise Exception(f"An error occurred while fetching the state root: {e}") def get_code_hash(self, key: MemorizerKey) -> int: + if key in self.code_hash_cache: + return self.code_hash_cache[key] + address = Web3.toChecksumAddress(f"0x{key.address:040x}") if not self.web3.isAddress(address): raise ValueError(f"Invalid Ethereum address: {address}") try: code = self.web3.eth.get_code(address, block_identifier=key.block_number) - return int(Web3.keccak(code).hex(), 16) + code_hash = int(Web3.keccak(code).hex(), 16) + self.code_hash_cache[key] = code_hash + return code_hash except Exception as e: raise Exception(f"An error occurred while fetching the code hash: {e}") diff --git a/packages/contract_bootloader/provider/header_key_provider.py b/packages/contract_bootloader/provider/header_key_provider.py index 19cd15cd..68e545a7 100644 --- a/packages/contract_bootloader/provider/header_key_provider.py +++ b/packages/contract_bootloader/provider/header_key_provider.py @@ -6,11 +6,18 @@ class HeaderKeyEVMProvider(EVMProvider): def __init__(self, provider_url: str): super().__init__(provider_url=provider_url) + self.block_cache = {} def get_block(self, key: MemorizerKey) -> BlockData: + if key in self.block_cache: + return self.block_cache[key] + try: # Fetch the block details - return self.web3.eth.get_block(key.block_number) + block = self.web3.eth.get_block(key.block_number) + # Cache the fetched block + self.block_cache[key] = block + return block except Exception as e: raise Exception(f"An error occurred while fetching the parent block: {e}") diff --git a/packages/contract_bootloader/provider/storage_key_provider.py b/packages/contract_bootloader/provider/storage_key_provider.py index d0a22ae6..1b92d75f 100644 --- a/packages/contract_bootloader/provider/storage_key_provider.py +++ b/packages/contract_bootloader/provider/storage_key_provider.py @@ -6,21 +6,26 @@ class StorageKeyEVMProvider(EVMProvider): def __init__(self, provider_url: str): super().__init__(provider_url=provider_url) + self.slot_cache = {} def get_slot(self, key: MemorizerKey) -> int: address = Web3.toChecksumAddress(f"0x{key.address:040x}") if not self.web3.isAddress(address): raise ValueError(f"Invalid Ethereum address: {address}") + # Combine the storage slot tuple into a single slot key + slot_key = key.storage_slot[0] << 128 | key.storage_slot[1] + + if key in self.slot_cache: + return self.slot_cache[key] + try: - # Combine the storage slot tuple into a single slot key - slot_key = key.storage_slot[0] << 128 | key.storage_slot[1] # Fetch the storage slot data - return int( - self.web3.eth.get_storage_at( - address, slot_key, block_identifier=key.block_number - ).hex(), - 16, + slot_data = self.web3.eth.get_storage_at( + address, slot_key, block_identifier=key.block_number ) + slot_value = int(slot_data.hex(), 16) + self.slot_cache[key] = slot_value + return slot_value except Exception as e: - raise Exception(f"An error occurred while fetching the parent block: {e}") + raise Exception(f"An error occurred while fetching the storage slot: {e}") From 4bf686c30fbfbff835799c6da1287d1675e118b9 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Mon, 29 Jul 2024 13:11:19 +0200 Subject: [PATCH 70/73] fix --- packages/contract_bootloader/provider/account_key_provider.py | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/contract_bootloader/provider/account_key_provider.py b/packages/contract_bootloader/provider/account_key_provider.py index 944874d5..20e86dea 100644 --- a/packages/contract_bootloader/provider/account_key_provider.py +++ b/packages/contract_bootloader/provider/account_key_provider.py @@ -2,7 +2,6 @@ from web3 import Web3 from contract_bootloader.memorizer.account_memorizer import MemorizerKey from contract_bootloader.provider.evm_provider import EVMProvider -from functools import lru_cache class AccountKeyEVMProvider(EVMProvider): From dc37ce8c73ac5961ae15acd83ce973afa4a4ce87 Mon Sep 17 00:00:00 2001 From: Bartosz Nowak Date: Tue, 30 Jul 2024 18:21:46 +0200 Subject: [PATCH 71/73] full_flow_test uses hdp-test default branch --- tools/make/full_flow_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/make/full_flow_test.sh b/tools/make/full_flow_test.sh index 6774a9fc..d2d9e199 100755 --- a/tools/make/full_flow_test.sh +++ b/tools/make/full_flow_test.sh @@ -39,7 +39,7 @@ cairo-compile --cairo_path="packages/eth_essentials" "src/hdp.cairo" --output "b # Clone the repository if the directory doesn't exist if [ ! -d "hdp-test" ]; then - git clone https://github.com/HerodotusDev/hdp-test && cd hdp-test && git checkout syscalls && cd .. + git clone https://github.com/HerodotusDev/hdp-test fi echo "Starting tests..." From 74fd0192e3fc09ffd0b1092eb037fd257e5eaf61 Mon Sep 17 00:00:00 2001 From: Pia Date: Thu, 1 Aug 2024 08:09:08 -0400 Subject: [PATCH 72/73] bumped: python package `v0.0.6` --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c799af36..b96e26be 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ def run(self): name="hdp-cairo-dev", long_description=long_description, long_description_content_type="text/markdown", - version="0.0.5", + version="0.0.6", packages=[ "tools", "contract_bootloader", From 834335a9654c236d9b83b60567c164be068c23c9 Mon Sep 17 00:00:00 2001 From: Pia Date: Fri, 2 Aug 2024 09:14:23 -0400 Subject: [PATCH 73/73] returning json as bytes32 --- src/hdp.cairo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hdp.cairo b/src/hdp.cairo index a4742cd8..1fc4e8f6 100644 --- a/src/hdp.cairo +++ b/src/hdp.cairo @@ -208,7 +208,7 @@ func run{ dictionary["results_root"] = '0x' + (hex(ids.results_root.high * 2 ** 128 + ids.results_root.low)[2:].zfill(64)) results = list() for i in range(ids.results_len): - results.append(memory[ids.results.address_ + i]) + results.append('0x' + (hex(memory[ids.results.address_ + i])[2:].zfill(64))) dictionary["results"] = results with open(cairo_run_output_path, 'w') as json_file: json.dump(dictionary, json_file)