diff --git a/pyproject.toml b/pyproject.toml index 6f638d4..4227235 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "voltaire_bundler" -version = "v0.1.0-alpha.27" +version = "v0.1.0-alpha.29" description = "EIP-4337 python Bundler" authors = ["Candide Wallet Team"] license = "LGPL" diff --git a/voltaire-p2p b/voltaire-p2p index ee9db02..96bab69 100755 Binary files a/voltaire-p2p and b/voltaire-p2p differ diff --git a/voltaire_bundler/bundler/bundle/bundle_manager.py b/voltaire_bundler/bundler/bundle/bundle_manager.py index b72bd81..71ee940 100644 --- a/voltaire_bundler/bundler/bundle/bundle_manager.py +++ b/voltaire_bundler/bundler/bundle/bundle_manager.py @@ -108,6 +108,7 @@ async def send_bundle( user_operation.call_gas_limit + user_operation.verification_gas_limit * 3 ) + gas_estimation += 10_000 call_data = encode_handleops_calldata( user_operations_list, self.bundler_address diff --git a/voltaire_bundler/bundler/execution_endpoint.py b/voltaire_bundler/bundler/execution_endpoint.py index a680abe..f3c662d 100644 --- a/voltaire_bundler/bundler/execution_endpoint.py +++ b/voltaire_bundler/bundler/execution_endpoint.py @@ -63,6 +63,7 @@ def __init__( bundler_address: Address, entrypoints: list[Address], bundler_helper_byte_code: str, + entrypoint_mod_byte_code: str, chain_id: int, is_unsafe: bool, is_legacy_mode: bool, @@ -110,6 +111,7 @@ def __init__( max_priority_fee_per_gas_percentage_multiplier, max_verification_gas, max_call_data_gas, + entrypoint_mod_byte_code, ) self.user_operation_handler = UserOperationHandler( @@ -301,7 +303,11 @@ async def _event_rpc_supportedEntryPoints( async def _event_rpc_estimateUserOperationGas( self, req_arguments: list) -> dict[str, str]: - user_operation: UserOperation = UserOperation(req_arguments[0]) + user_operation_with_optional_params = ( + fell_user_operation_optional_parameters(req_arguments[0]) + ) + user_operation: UserOperation = UserOperation( + user_operation_with_optional_params) entrypoint_address: str = req_arguments[1] state_override_set_dict: dict[str, Any] = {} if req_arguments[2] is not None: @@ -604,3 +610,39 @@ async def exception_handler_decorator( except (ExecutionException, ValidationException) as excp: rpc_call_response = {"payload": excp, "is_error": True} return rpc_call_response + + +def fell_user_operation_optional_parameters( + user_operation_with_optional_params: dict[str, str]) -> dict[str, str]: + if ( + "preVerificationGas" not in user_operation_with_optional_params + or + user_operation_with_optional_params["preVerificationGas"] is None + ): + user_operation_with_optional_params["preVerificationGas"] = "0x" + if ( + "verificationGasLimit" not in user_operation_with_optional_params + or + user_operation_with_optional_params["verificationGasLimit"] is None + ): + user_operation_with_optional_params["verificationGasLimit"] = "0x" + if ( + "callGasLimit" not in user_operation_with_optional_params + or + user_operation_with_optional_params["callGasLimit"] is None + ): + user_operation_with_optional_params["callGasLimit"] = "0x" + if ( + "maxFeePerGas" not in user_operation_with_optional_params + or + user_operation_with_optional_params["maxFeePerGas"] is None + ): + user_operation_with_optional_params["maxFeePerGas"] = "0x" + if ( + "maxPriorityFeePerGas" not in user_operation_with_optional_params + or + user_operation_with_optional_params["maxPriorityFeePerGas"] is None + ): + user_operation_with_optional_params["maxPriorityFeePerGas"] = "0x" + + return user_operation_with_optional_params diff --git a/voltaire_bundler/bundler/gas_manager.py b/voltaire_bundler/bundler/gas_manager.py index 736a01d..e01b78b 100644 --- a/voltaire_bundler/bundler/gas_manager.py +++ b/voltaire_bundler/bundler/gas_manager.py @@ -12,7 +12,8 @@ from voltaire_bundler.user_operation.user_operation_handler import \ UserOperationHandler from voltaire_bundler.utils.decode import ( - decode_FailedOp_event, decode_gasEstimateL1Component_result) + decode_FailedOp_event, + decode_gasEstimateL1Component_result) from voltaire_bundler.utils.encode import ( encode_gasEstimateL1Component_calldata, encode_handleops_calldata) from voltaire_bundler.utils.eth_client_utils import \ @@ -31,6 +32,7 @@ class GasManager: estimate_gas_with_override_enabled: bool max_verification_gas: int max_call_data_gas: int + entrypoint_mod_byte_code: str def __init__( self, @@ -41,6 +43,7 @@ def __init__( max_priority_fee_per_gas_percentage_multiplier: int, max_verification_gas, max_call_data_gas, + entrypoint_mod_byte_code, ): self.ethereum_node_url = ethereum_node_url self.chain_id = chain_id @@ -54,6 +57,7 @@ def __init__( self.estimate_gas_with_override_enabled = True self.max_verification_gas = max_verification_gas self.max_call_data_gas = max_call_data_gas + self.entrypoint_mod_byte_code = entrypoint_mod_byte_code async def estimate_callgaslimit_and_preverificationgas_and_verificationgas( self, @@ -61,30 +65,51 @@ async def estimate_callgaslimit_and_preverificationgas_and_verificationgas( entrypoint: str, state_override_set_dict: dict[str, Any], ) -> tuple[str, str, str]: - # set verification_gas_limit to self.max_verification_gas to prevent - # out of gas revert - user_operation.verification_gas_limit = self.max_verification_gas + input_preverification_gas = user_operation.pre_verification_gas + input_verification_gas_limit = user_operation.verification_gas_limit + input_call_gas_limit = user_operation.call_gas_limit - (call_gas_limit, verification_gas_limit) = ( + if user_operation.verification_gas_limit == 0: + user_operation.verification_gas_limit = self.max_verification_gas + + estimated_verification_gas_limit = 0 + estimated_call_gas_limit = 0 + is_check_once = not (input_call_gas_limit == 0) + + (estimated_call_gas_limit, estimated_verification_gas_limit) = ( await self.estimate_call_gas_and_verificationgas_limit( user_operation, entrypoint, state_override_set_dict, + is_check_once ) ) - user_operation.call_gas_limit = call_gas_limit - user_operation.verification_gas_limit = verification_gas_limit - # calculate preverification_gas - preverification_gas = await self.get_preverification_gas( - user_operation, - entrypoint, - ) + if input_verification_gas_limit == 0: + result_verification_gas_limit = estimated_verification_gas_limit + else: + result_verification_gas_limit = input_verification_gas_limit + + if input_call_gas_limit == 0: + result_call_gas_limit = estimated_call_gas_limit + else: + result_call_gas_limit = input_call_gas_limit + + if input_preverification_gas == 0: + user_operation.call_gas_limit = result_call_gas_limit + user_operation.verification_gas_limit = result_verification_gas_limit + + result_preverification_gas = await self.get_preverification_gas( + user_operation, + entrypoint, + ) + else: + result_preverification_gas = user_operation.pre_verification_gas return ( - hex(call_gas_limit), - hex(preverification_gas), - hex(verification_gas_limit), + hex(result_call_gas_limit), + hex(result_preverification_gas), + hex(result_verification_gas_limit), ) async def estimate_call_gas_and_verificationgas_limit( @@ -92,9 +117,13 @@ async def estimate_call_gas_and_verificationgas_limit( user_operation: UserOperation, entrypoint: str, state_override_set_dict: dict[str, Any], + is_check_once: bool, ) -> tuple[int, int]: min_gas = 0 - max_gas = self.max_call_data_gas + if is_check_once: + max_gas = user_operation.call_gas_limit + else: + max_gas = self.max_call_data_gas is_continious = False while True: ( @@ -106,24 +135,28 @@ async def estimate_call_gas_and_verificationgas_limit( min_gas, max_gas, is_continious, + is_check_once, state_override_set_dict, ) if solidity_error[:10] == "0x3a803a81": # success - return failed_op_params_res[3], failed_op_params_res[0] + return (int(failed_op_params_res[3]), + int(failed_op_params_res[0])) elif solidity_error[:10] == "0x22cf94e6": # continue - if failed_op_params_res[2] > 30: + if int(failed_op_params_res[2]) > 30: break - min_gas = failed_op_params_res[0] - max_gas = failed_op_params_res[1] + min_gas = int(failed_op_params_res[0]) + max_gas = int(failed_op_params_res[1]) is_continious = True - elif solidity_error[:10] == "0x59f233d2": + elif solidity_error[:10] == "0x59f233d2": # EstimateCallGasRevertAtMax errorMessage = failed_op_params_res[0] raise ExecutionException( - ExecutionExceptionCode.EXECUTION_REVERTED, errorMessage + ExecutionExceptionCode.EXECUTION_REVERTED, + str(errorMessage) ) - raise ValueError("Gas estimation failed") + raise ValueError( + "Unexpected error during estimate_call_gas_and_verificationgas_limit") async def simulate_handle_op_mod( self, @@ -132,31 +165,35 @@ async def simulate_handle_op_mod( min_gas: int, max_gas: int, is_continious: bool, + is_check_once: bool, state_override_set_dict: dict[str, Any], - ): - # simulateHandleOp(entrypoint solidity function) will always revert - function_selector = "0x433c9308" + ) -> tuple[str, list[int | bytes]]: + # simulateHandleOpMod(entrypoint solidity function) will always revert + function_selector = "0x85085b6b" call_data_params = encode( [ "(address,uint256,bytes,bytes,uint256,uint256,uint256,uint256,uint256,bytes,bytes)", # useroperation - "(uint256,uint256,uint256,bool)", + "(uint256,uint256,uint256,bool,bool)", ], [ user_operation.to_list(), - [min_gas, max_gas, 10_000, is_continious] + [min_gas, max_gas, 10_000, is_continious, is_check_once] ], ) - call_data = function_selector + call_data_params.hex() - default_state_overrides: dict[str, Any] = { - # override the "from" zero address balance with a high value - ZERO_ADDRESS: {"balance": "0x314dc6448d9338c15b0a00000000"}, - entrypoint: { # override the Entrypoint with EntryPointMod - "code": "0x6080604052600436106101395760003560e01c80638f41ec5a116100ab578063bb9fe6bf1161006f578063bb9fe6bf146104ae578063c23a5cea146104c3578063d25ca6ea146104e3578063d6383f9414610512578063ee21942314610532578063fc7e286d1461055257600080fd5b80638f41ec5a14610426578063957122ab1461043b5780639b249f691461045b578063a61935311461047b578063b760faf91461049b57600080fd5b8063205c2878116100fd578063205c28781461020c57806335567e1a1461022c578063433c93081461028a5780634b1d7cf5146102aa5780635287ce12146102ca57806370a08231146103e757600080fd5b80630396cb601461014e5780630bd28e3b146101615780631b2e01b8146101815780631d732756146101cc5780631fad948c146101ec57600080fd5b366101495761014733610607565b005b600080fd5b61014761015c366004613508565b61066e565b34801561016d57600080fd5b5061014761017c36600461354a565b6108fd565b34801561018d57600080fd5b506101b961019c366004613585565b600160209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b3480156101d857600080fd5b506101b96101e736600461377f565b610934565b3480156101f857600080fd5b50610147610207366004613888565b610aa7565b34801561021857600080fd5b506101476102273660046138de565b610c23565b34801561023857600080fd5b506101b9610247366004613585565b6001600160a01b039190911660009081526001602090815260408083206001600160c01b0385168452909152908190205491901b67ffffffffffffffff19161790565b34801561029657600080fd5b506101476102a5366004613923565b610d9f565b3480156102b657600080fd5b506101476102c5366004613888565b610fa3565b3480156102d657600080fd5b5061038f6102e536600461397c565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152506001600160a01b031660009081526020818152604091829020825160a08101845281546001600160701b038082168352600160701b820460ff16151594830194909452600160781b90049092169282019290925260019091015463ffffffff81166060830152640100000000900465ffffffffffff16608082015290565b6040805182516001600160701b03908116825260208085015115159083015283830151169181019190915260608083015163ffffffff169082015260809182015165ffffffffffff169181019190915260a0016101c3565b3480156103f357600080fd5b506101b961040236600461397c565b6001600160a01b03166000908152602081905260409020546001600160701b031690565b34801561043257600080fd5b506101b9600181565b34801561044757600080fd5b50610147610456366004613999565b6113e6565b34801561046757600080fd5b50610147610476366004613a1d565b6114e0565b34801561048757600080fd5b506101b9610496366004613a5e565b61159b565b6101476104a936600461397c565b610607565b3480156104ba57600080fd5b506101476115dd565b3480156104cf57600080fd5b506101476104de36600461397c565b611700565b3480156104ef57600080fd5b506105036104fe366004613a92565b611938565b6040516101c393929190613b45565b34801561051e57600080fd5b5061014761052d366004613b6f565b6119f2565b34801561053e57600080fd5b5061014761054d366004613a5e565b611aed565b34801561055e57600080fd5b506105c161056d36600461397c565b600060208190529081526040902080546001909101546001600160701b0380831692600160701b810460ff1692600160781b9091049091169063ffffffff811690640100000000900465ffffffffffff1685565b604080516001600160701b0396871681529415156020860152929094169183019190915263ffffffff16606082015265ffffffffffff909116608082015260a0016101c3565b6106118134611cc9565b6001600160a01b03811660008181526020818152604091829020805492516001600160701b03909316835292917f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c491015b60405180910390a25050565b33600090815260208190526040902063ffffffff82166106d55760405162461bcd60e51b815260206004820152601a60248201527f6d757374207370656369667920756e7374616b652064656c617900000000000060448201526064015b60405180910390fd5b600181015463ffffffff90811690831610156107335760405162461bcd60e51b815260206004820152601c60248201527f63616e6e6f7420646563726561736520756e7374616b652074696d650000000060448201526064016106cc565b8054600090610753903490600160781b90046001600160701b0316613be6565b90506000811161079a5760405162461bcd60e51b81526020600482015260126024820152711b9bc81cdd185ad9481cdc1958da599a595960721b60448201526064016106cc565b6001600160701b038111156107e25760405162461bcd60e51b815260206004820152600e60248201526d7374616b65206f766572666c6f7760901b60448201526064016106cc565b6040805160a08101825283546001600160701b0390811682526001602080840182815286841685870190815263ffffffff808b16606088019081526000608089018181523380835296829052908a902098518954955194518916600160781b02600160781b600160e81b0319951515600160701b026effffffffffffffffffffffffffffff199097169190991617949094179290921695909517865551949092018054925165ffffffffffff166401000000000269ffffffffffffffffffff19909316949093169390931717905590517fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01906108f0908490879091825263ffffffff16602082015260400190565b60405180910390a2505050565b3360009081526001602090815260408083206001600160c01b0385168452909152812080549161092c83613bfe565b919050555050565b6000805a90503330146109895760405162461bcd60e51b815260206004820152601760248201527f4141393220696e7465726e616c2063616c6c206f6e6c7900000000000000000060448201526064016106cc565b8451604081015160608201518101611388015a10156109b35763deaddead60e01b60005260206000fd5b875160009015610a475760006109d0846000015160008c86611d65565b905080610a455760006109e4610800611d7d565b805190915015610a3f5784600001516001600160a01b03168a602001517f1c4fada7374c0a9ee8841fc38afe82932dc0f8e69012e927f061a8bae611a201876020015184604051610a36929190613c19565b60405180910390a35b60019250505b505b600088608001515a8603019050610a996000838b8b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250889250611da9915050565b9a9950505050505050505050565b610aaf6120a1565b816000816001600160401b03811115610aca57610aca6135ba565b604051908082528060200260200182016040528015610b0357816020015b610af061347e565b815260200190600190039081610ae85790505b50905060005b82811015610b7c576000828281518110610b2557610b25613c32565b60200260200101519050600080610b60848a8a87818110610b4857610b48613c32565b9050602002810190610b5a9190613c48565b856120f9565b91509150610b7184838360006122e4565b505050600101610b09565b506040516000907fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f972908290a160005b83811015610c0657610bfa81888884818110610bc957610bc9613c32565b9050602002810190610bdb9190613c48565b858481518110610bed57610bed613c32565b6020026020010151612480565b90910190600101610bab565b50610c1184826125a8565b505050610c1e6001600255565b505050565b33600090815260208190526040902080546001600160701b0316821115610c8c5760405162461bcd60e51b815260206004820152601960248201527f576974686472617720616d6f756e7420746f6f206c617267650000000000000060448201526064016106cc565b8054610ca29083906001600160701b0316613c69565b81546001600160701b0319166001600160701b0391909116178155604080516001600160a01b03851681526020810184905233917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb910160405180910390a26000836001600160a01b03168360405160006040518083038185875af1925050503d8060008114610d4e576040519150601f19603f3d011682016040523d82523d6000602084013e610d53565b606091505b5050905080610d995760405162461bcd60e51b81526020600482015260126024820152716661696c656420746f20776974686472617760701b60448201526064016106cc565b50505050565b610da761347e565b610db0836126a1565b600080610dbf600086856120f9565b915091506000610dcf838361277c565b9050843560208601356000610dea6080890160608a01613c8e565b610e435760008080610e15610e0260208e018e61397c565b610e0f60608f018f613cab565b88612848565b92509250925082610e3b5780604051632cf919e960e11b81526004016106cc9190613cf1565b509350839150505b60006005610e518585613c69565b610e5b9190613d04565b610e659085613be6565b905060005b83610e7960408c013587613be6565b1015610f455780610e8981613bfe565b915050610e958261294c565b610ec357604051631167ca7360e11b81526004810186905260248101859052604481018290526064016106cc565b600080610eec610ed660208f018f61397c565b8e8060600190610ee69190613cab565b87612848565b5091509150818015610efe5750848110155b15610f0e57839550809450610f1c565b610f19846001613be6565b96505b6002610f288888613c69565b610f329190613d04565b610f3c9088613be6565b93505050610e6a565b8a60c001358960800151610f599190613c69565b60208701516040808901519051633a803a8160e01b8152600481019390935265ffffffffffff9182166024840152166044820152606481018590526084810182905260a4016106cc565b610fab6120a1565b816000805b8281101561111f5736868683818110610fcb57610fcb613c32565b9050602002810190610fdd9190613d26565b9050366000610fec8380613d3c565b90925090506000611003604085016020860161397c565b90506001600160a01b0381166001141561105f5760405162461bcd60e51b815260206004820152601760248201527f4141393620696e76616c69642061676772656761746f7200000000000000000060448201526064016106cc565b6001600160a01b038116156110fc576001600160a01b03811663e3563a4f848461108c6040890189613cab565b6040518563ffffffff1660e01b81526004016110ab9493929190613eea565b60006040518083038186803b1580156110c357600080fd5b505afa9250505080156110d4575060015b6110fc5760405163086a9f7560e41b81526001600160a01b03821660048201526024016106cc565b6111068287613be6565b955050505050808061111790613bfe565b915050610fb0565b506000816001600160401b0381111561113a5761113a6135ba565b60405190808252806020026020018201604052801561117357816020015b61116061347e565b8152602001906001900390816111585790505b506040519091507fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f97290600090a16000805b8481101561128857368888838181106111bf576111bf613c32565b90506020028101906111d19190613d26565b90503660006111e08380613d3c565b909250905060006111f7604085016020860161397c565b90508160005b8181101561126f57600089898151811061121957611219613c32565b6020026020010151905060008061123c8b898987818110610b4857610b48613c32565b9150915061124c848383896122e4565b8a61125681613bfe565b9b5050505050808061126790613bfe565b9150506111fd565b505050505050808061128090613bfe565b9150506111a4565b50600080915060005b858110156113a157368989838181106112ac576112ac613c32565b90506020028101906112be9190613d26565b90506112d0604082016020830161397c565b6001600160a01b03167f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d60405160405180910390a23660006113128380613d3c565b90925090508060005b818110156113895761135d8885858481811061133957611339613c32565b905060200281019061134b9190613c48565b8b8b81518110610bed57610bed613c32565b6113679088613be6565b96508761137381613bfe565b985050808061138190613bfe565b91505061131b565b5050505050808061139990613bfe565b915050611291565b506040516000907f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d908290a26113d786826125a8565b5050505050610c1e6001600255565b831580156113fc57506001600160a01b0383163b155b156114495760405162461bcd60e51b815260206004820152601960248201527f41413230206163636f756e74206e6f74206465706c6f7965640000000000000060448201526064016106cc565b601481106114be5760006114606014828486613f67565b61146991613f91565b60601c9050803b6114bc5760405162461bcd60e51b815260206004820152601b60248201527f41413330207061796d6173746572206e6f74206465706c6f796564000000000060448201526064016106cc565b505b60405162461bcd60e51b815260206004820152600060248201526044016106cc565b604051632b870d1b60e11b81526000906001600160a01b037f0000000000000000000000007fc98430eaedbb6070b35b39d798725049088348169063570e1a36906115319086908690600401613fc6565b6020604051808303816000875af1158015611550573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115749190613fda565b604051633653dc0360e11b81526001600160a01b03821660048201529091506024016106cc565b60006115a68261297b565b6040805160208101929092523090820152466060820152608001604051602081830303815290604052805190602001209050919050565b336000908152602081905260409020600181015463ffffffff166116305760405162461bcd60e51b815260206004820152600a6024820152691b9bdd081cdd185ad95960b21b60448201526064016106cc565b8054600160701b900460ff1661167c5760405162461bcd60e51b8152602060048201526011602482015270616c726561647920756e7374616b696e6760781b60448201526064016106cc565b60018101546000906116949063ffffffff1642613ff7565b60018301805469ffffffffffff00000000191664010000000065ffffffffffff841690810291909117909155835460ff60701b1916845560405190815290915033907ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a90602001610662565b3360009081526020819052604090208054600160781b90046001600160701b0316806117655760405162461bcd60e51b81526020600482015260146024820152734e6f207374616b6520746f20776974686472617760601b60448201526064016106cc565b6001820154640100000000900465ffffffffffff166117c65760405162461bcd60e51b815260206004820152601d60248201527f6d7573742063616c6c20756e6c6f636b5374616b65282920666972737400000060448201526064016106cc565b60018201544264010000000090910465ffffffffffff16111561182b5760405162461bcd60e51b815260206004820152601b60248201527f5374616b65207769746864726177616c206973206e6f7420647565000000000060448201526064016106cc565b60018201805469ffffffffffffffffffff191690558154600160781b600160e81b0319168255604080516001600160a01b03851681526020810183905233917fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda3910160405180910390a26000836001600160a01b03168260405160006040518083038185875af1925050503d80600081146118e2576040519150601f19603f3d011682016040523d82523d6000602084013e6118e7565b606091505b5050905080610d995760405162461bcd60e51b815260206004820152601860248201527f6661696c656420746f207769746864726177207374616b65000000000000000060448201526064016106cc565b600080606060005a9050876001600160a01b031685888860405161195d929190614021565b60006040518083038160008787f1925050503d806000811461199b576040519150601f19603f3d011682016040523d82523d6000602084013e6119a0565b606091505b5090945091505a6119b19082613c69565b92506000846119c057826119d1565b604051806020016040528060008152505b905084848260405163f9bb41fb60e01b81526004016106cc93929190613b45565b6119fa61347e565b611a03856126a1565b600080611a12600088856120f9565b915091506000611a22838361277c565b9050611a2d43600052565b6000611a3b60008a87612480565b9050611a4643600052565b600060606001600160a01b038a1615611abc57896001600160a01b03168989604051611a73929190614021565b6000604051808303816000865af19150503d8060008114611ab0576040519150601f19603f3d011682016040523d82523d6000602084013e611ab5565b606091505b5090925090505b866080015183856020015186604001518585604051630116f59360e71b81526004016106cc96959493929190614031565b611af561347e565b611afe826126a1565b600080611b0d600085856120f9565b915091506000611b24846000015160a00151612994565b845151909150600090611b3690612994565b9050611b55604051806040016040528060008152602001600081525090565b366000611b6560408a018a613cab565b909250905060006014821015611b7c576000611b97565b611b8a601460008486613f67565b611b9391613f91565b60601c5b9050611ba281612994565b93505050506000611bb3868661277c565b9050600081600001519050600060016001600160a01b0316826001600160a01b031614905060006040518060c001604052808b6080015181526020018b6040015181526020018315158152602001856020015165ffffffffffff168152602001856040015165ffffffffffff168152602001611c308c6060015190565b905290506001600160a01b03831615801590611c5657506001600160a01b038316600114155b15611ca85760006040518060400160405280856001600160a01b03168152602001611c8086612994565b81525090508187878a84604051633ebb2d3960e21b81526004016106cc9594939291906140d3565b8086868960405163e0cff05f60e01b81526004016106cc9493929190614153565b6001600160a01b03821660009081526020819052604081208054909190611cfa9084906001600160701b0316613be6565b90506001600160701b03811115611d465760405162461bcd60e51b815260206004820152601060248201526f6465706f736974206f766572666c6f7760801b60448201526064016106cc565b81546001600160701b0319166001600160701b03919091161790555050565b6000806000845160208601878987f195945050505050565b60603d82811115611d8b5750815b604051602082018101604052818152816000602083013e9392505050565b6000805a855190915060009081611dbf826129e3565b60a08301519091506001600160a01b038116611dde5782519350611f86565b809350600088511115611f8657868202955060028a6002811115611e0457611e046141a6565b14611e7657606083015160405163a9a2340960e01b81526001600160a01b0383169163a9a2340991611e3e908e908d908c906004016141bc565b600060405180830381600088803b158015611e5857600080fd5b5087f1158015611e6c573d6000803e3d6000fd5b5050505050611f86565b606083015160405163a9a2340960e01b81526001600160a01b0383169163a9a2340991611eab908e908d908c906004016141bc565b600060405180830381600088803b158015611ec557600080fd5b5087f193505050508015611ed7575060015b611f8657611ee3614203565b806308c379a01415611f3d5750611ef861421f565b80611f035750611f3f565b8b81604051602001611f1591906142a8565b60408051601f1981840301815290829052631101335b60e11b82526106cc9291600401613c19565b505b8a604051631101335b60e11b81526004016106cc9181526040602082018190526012908201527110504d4c081c1bdcdd13dc081c995d995c9d60721b606082015260800190565b5a85038701965081870295508589604001511015611fef578a604051631101335b60e11b81526004016106cc91815260406020808301829052908201527f414135312070726566756e642062656c6f772061637475616c476173436f7374606082015260800190565b60408901518690036120018582611cc9565b6000808c6002811115612016576120166141a6565b1490508460a001516001600160a01b031685600001516001600160a01b03168c602001517f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f8860200151858d8f604051612089949392919093845291151560208401526040830152606082015260800190565b60405180910390a45050505050505095945050505050565b6002805414156120f35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106cc565b60028055565b60008060005a845190915061210e8682612a14565b6121178661159b565b6020860152604081015160608201516080830151171760e087013517610100870135176effffffffffffffffffffffffffffff8111156121995760405162461bcd60e51b815260206004820152601860248201527f41413934206761732076616c756573206f766572666c6f77000000000000000060448201526064016106cc565b6000806121a584612b0d565b90506121b38a8a8a84612b5a565b855160208701519199509193506121ca9190612d93565b6122205789604051631101335b60e11b81526004016106cc918152604060208201819052601a908201527f4141323520696e76616c6964206163636f756e74206e6f6e6365000000000000606082015260800190565b61222943600052565b60a08401516060906001600160a01b0316156122515761224c8b8b8b8587612de0565b975090505b60005a87039050808b60a0013510156122b6578b604051631101335b60e11b81526004016106cc918152604060208201819052601e908201527f41413430206f76657220766572696669636174696f6e4761734c696d69740000606082015260800190565b60408a018390528160608b015260c08b01355a8803018a608001818152505050505050505050935093915050565b6000806122f085613004565b91509150816001600160a01b0316836001600160a01b0316146123565785604051631101335b60e11b81526004016106cc9181526040602082018190526014908201527320a0991a1039b4b3b730ba3ab9329032b93937b960611b606082015260800190565b80156123ae5785604051631101335b60e11b81526004016106cc9181526040602082018190526017908201527f414132322065787069726564206f72206e6f7420647565000000000000000000606082015260800190565b60006123b985613004565b925090506001600160a01b038116156124155786604051631101335b60e11b81526004016106cc9181526040602082018190526014908201527320a0999a1039b4b3b730ba3ab9329032b93937b960611b606082015260800190565b81156124775786604051631101335b60e11b81526004016106cc9181526040602082018190526021908201527f41413332207061796d61737465722065787069726564206f72206e6f742064756060820152606560f81b608082015260a00190565b50505050505050565b6000805a90506000612493846060015190565b905030631d7327566124a86060880188613cab565b87856040518563ffffffff1660e01b81526004016124c994939291906142e6565b6020604051808303816000875af1925050508015612504575060408051601f3d908101601f1916820190925261250191810190614399565b60015b61259c57600060206000803e5060005163deaddead60e01b8114156125675786604051631101335b60e11b81526004016106cc918152604060208201819052600f908201526e41413935206f7574206f662067617360881b606082015260800190565b600085608001515a6125799086613c69565b6125839190613be6565b9050612593886002888685611da9565b9450505061259f565b92505b50509392505050565b6001600160a01b0382166125fe5760405162461bcd60e51b815260206004820152601860248201527f4141393020696e76616c69642062656e6566696369617279000000000000000060448201526064016106cc565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461264b576040519150601f19603f3d011682016040523d82523d6000602084013e612650565b606091505b5050905080610c1e5760405162461bcd60e51b815260206004820152601f60248201527f41413931206661696c65642073656e6420746f2062656e65666963696172790060448201526064016106cc565b3063957122ab6126b46040840184613cab565b6126c1602086018661397c565b6126cf610120870187613cab565b6040518663ffffffff1660e01b81526004016126ef9594939291906143b2565b60006040518083038186803b15801561270757600080fd5b505afa925050508015612718575060015b61277957612724614203565b806308c379a0141561276d575061273961421f565b80612744575061276f565b80511561276957600081604051631101335b60e11b81526004016106cc929190613c19565b5050565b505b3d6000803e3d6000fd5b50565b60408051606081018252600080825260208201819052918101829052906127a284613054565b905060006127af84613054565b82519091506001600160a01b0381166127c6575080515b602080840151604080860151928501519085015191929165ffffffffffff80831690851610156127f4578193505b8065ffffffffffff168365ffffffffffff161115612810578092505b5050604080516060810182526001600160a01b03909416845265ffffffffffff92831660208501529116908201529250505092915050565b60405163692e537560e11b81526000908190606090309063d25ca6ea90612879908a908a908a908a906004016143e8565b6000604051808303816000875af19250505080156128b957506040513d6000823e601f3d908101601f191682016040526128b6919081019061446d565b60015b61293a573d8080156128e7576040519150601f19603f3d011682016040523d82523d6000602084013e6128ec565b606091505b5063f9bb41fb60e01b6128fe826144c6565b6001600160e01b0319161461291257600080fd5b6004810190508080602001905181019061292c919061446d565b919550935091506129429050565b505050600080fd5b9450945094915050565b60005a610f8161295e846110006144fd565b6129689190613d04565b6129749061c350613be6565b1092915050565b6000612986826130c2565b805190602001209050919050565b604080518082018252600080825260208083018281526001600160a01b03959095168252819052919091208054600160781b90046001600160701b031682526001015463ffffffff1690915290565b60c081015160e08201516000919080821415612a00575092915050565b612a0c82488301613195565b949350505050565b612a21602083018361397c565b6001600160a01b0316815260208083013590820152608080830135604083015260a0830135606083015260c0808401359183019190915260e0808401359183019190915261010083013590820152366000612a80610120850185613cab565b90925090508015612b00576014811015612adc5760405162461bcd60e51b815260206004820152601d60248201527f4141393320696e76616c6964207061796d6173746572416e644461746100000060448201526064016106cc565b612aea601460008385613f67565b612af391613f91565b60601c60a0840152610d99565b600060a084015250505050565b60a081015160009081906001600160a01b0316612b2b576001612b2e565b60035b60ff16905060008360800151828560600151028560400151010190508360c00151810292505050919050565b60008060005a8551805191925090612b7f8988612b7a60408c018c613cab565b6131ad565b60a0820151612b8d43600052565b60006001600160a01b038216612bd5576001600160a01b0383166000908152602081905260409020546001600160701b0316888111612bce57808903612bd1565b60005b9150505b606084015160208a0151604051633a871cdd60e01b81526001600160a01b03861692633a871cdd929091612c0f918f91879060040161451c565b60206040518083038160008887f193505050508015612c4b575060408051601f3d908101601f19168201909252612c4891810190614399565b60015b612cd657612c57614203565b806308c379a01415612c895750612c6c61421f565b80612c775750612c8b565b8b81604051602001611f159190614541565b505b8a604051631101335b60e11b81526004016106cc918152604060208201819052601690820152754141323320726576657274656420286f72204f4f472960501b606082015260800190565b95506001600160a01b038216612d80576001600160a01b038316600090815260208190526040902080546001600160701b0316808a1115612d63578c604051631101335b60e11b81526004016106cc9181526040602082018190526017908201527f41413231206469646e2774207061792070726566756e64000000000000000000606082015260800190565b81546001600160701b031916908a90036001600160701b03161790555b5a85039650505050505094509492505050565b6001600160a01b038216600090815260016020908152604080832084821c80855292528220805484916001600160401b038316919085612dd283613bfe565b909155501495945050505050565b82516060818101519091600091848111612e3c5760405162461bcd60e51b815260206004820152601f60248201527f4141343120746f6f206c6974746c6520766572696669636174696f6e4761730060448201526064016106cc565b60a08201516001600160a01b038116600090815260208190526040902080548784039291906001600160701b031689811015612ec4578c604051631101335b60e11b81526004016106cc918152604060208201819052601e908201527f41413331207061796d6173746572206465706f73697420746f6f206c6f770000606082015260800190565b8981038260000160006101000a8154816001600160701b0302191690836001600160701b03160217905550826001600160a01b031663f465c77e858e8e602001518e6040518563ffffffff1660e01b8152600401612f249392919061451c565b60006040518083038160008887f193505050508015612f6557506040513d6000823e601f3d908101601f19168201604052612f629190810190614578565b60015b612ff057612f71614203565b806308c379a01415612fa35750612f8661421f565b80612f915750612fa5565b8d81604051602001611f1591906145be565b505b8c604051631101335b60e11b81526004016106cc918152604060208201819052601690820152754141333320726576657274656420286f72204f4f472960501b606082015260800190565b909e909d509b505050505050505050505050565b6000808261301757506000928392509050565b600061302284613054565b9050806040015165ffffffffffff164211806130495750806020015165ffffffffffff1642105b905194909350915050565b60408051606081018252600080825260208201819052918101919091528160a081901c65ffffffffffff811661308d575065ffffffffffff5b604080516060810182526001600160a01b03909316835260d09490941c602083015265ffffffffffff16928101929092525090565b60608135602083013560006130e26130dd6040870187613cab565b61346b565b905060006130f66130dd6060880188613cab565b9050608086013560a087013560c088013560e08901356101008a013560006131256130dd6101208e018e613cab565b604080516001600160a01b039c909c1660208d01528b81019a909a5260608b019890985250608089019590955260a088019390935260c087019190915260e08601526101008501526101208401526101408084019190915281518084039091018152610160909201905292915050565b60008183106131a457816131a6565b825b9392505050565b8015610d99578251516001600160a01b0381163b156132185784604051631101335b60e11b81526004016106cc918152604060208201819052601f908201527f414131302073656e64657220616c726561647920636f6e737472756374656400606082015260800190565b835160600151604051632b870d1b60e11b81526000916001600160a01b037f0000000000000000000000007fc98430eaedbb6070b35b39d798725049088348169163570e1a3691906132709088908890600401613fc6565b60206040518083038160008887f115801561328f573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906132b49190613fda565b90506001600160a01b0381166133165785604051631101335b60e11b81526004016106cc918152604060208201819052601b908201527f4141313320696e6974436f6465206661696c6564206f72204f4f470000000000606082015260800190565b816001600160a01b0316816001600160a01b0316146133805785604051631101335b60e11b81526004016106cc91815260406020808301829052908201527f4141313420696e6974436f6465206d7573742072657475726e2073656e646572606082015260800190565b6001600160a01b0381163b6133e05785604051631101335b60e11b81526004016106cc91815260406020808301829052908201527f4141313520696e6974436f6465206d757374206372656174652073656e646572606082015260800190565b60006133ef6014828688613f67565b6133f891613f91565b60601c9050826001600160a01b031686602001517fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d83896000015160a0015160405161345a9291906001600160a01b0392831681529116602082015260400190565b60405180910390a350505050505050565b6000604051828085833790209392505050565b6040518060a001604052806134e360405180610100016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160008152602001600081525090565b8152602001600080191681526020016000815260200160008152602001600081525090565b60006020828403121561351a57600080fd5b813563ffffffff811681146131a657600080fd5b80356001600160c01b038116811461354557600080fd5b919050565b60006020828403121561355c57600080fd5b6131a68261352e565b6001600160a01b038116811461277957600080fd5b803561354581613565565b6000806040838503121561359857600080fd5b82356135a381613565565b91506135b16020840161352e565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b60a081018181106001600160401b03821117156135ef576135ef6135ba565b60405250565b61010081018181106001600160401b03821117156135ef576135ef6135ba565b601f8201601f191681016001600160401b038111828210171561363a5761363a6135ba565b6040525050565b60006001600160401b0382111561365a5761365a6135ba565b50601f01601f191660200190565b600081830361018081121561367c57600080fd5b604051613688816135d0565b8092506101008083121561369b57600080fd5b60405192506136a9836135f5565b6136b28561357a565b8352602085013560208401526040850135604084015260608501356060840152608085013560808401526136e860a0860161357a565b60a084015260c085013560c084015260e085013560e084015282825280850135602083015250610120840135604082015261014084013560608201526101608401356080820152505092915050565b60008083601f84011261374957600080fd5b5081356001600160401b0381111561376057600080fd5b60208301915083602082850101111561377857600080fd5b9250929050565b6000806000806101c0858703121561379657600080fd5b84356001600160401b03808211156137ad57600080fd5b818701915087601f8301126137c157600080fd5b81356137cc81613641565b6040516137d98282613615565b8281528a60208487010111156137ee57600080fd5b826020860160208301376000602084830101528098505050506138148860208901613668565b94506101a087013591508082111561382b57600080fd5b5061383887828801613737565b95989497509550505050565b60008083601f84011261385657600080fd5b5081356001600160401b0381111561386d57600080fd5b6020830191508360208260051b850101111561377857600080fd5b60008060006040848603121561389d57600080fd5b83356001600160401b038111156138b357600080fd5b6138bf86828701613844565b90945092505060208401356138d381613565565b809150509250925092565b600080604083850312156138f157600080fd5b82356138fc81613565565b946020939093013593505050565b6000610160828403121561391d57600080fd5b50919050565b60008082840360a081121561393757600080fd5b83356001600160401b0381111561394d57600080fd5b6139598682870161390a565b9350506080601f198201121561396e57600080fd5b506020830190509250929050565b60006020828403121561398e57600080fd5b81356131a681613565565b6000806000806000606086880312156139b157600080fd5b85356001600160401b03808211156139c857600080fd5b6139d489838a01613737565b9097509550602088013591506139e982613565565b909350604087013590808211156139ff57600080fd5b50613a0c88828901613737565b969995985093965092949392505050565b60008060208385031215613a3057600080fd5b82356001600160401b03811115613a4657600080fd5b613a5285828601613737565b90969095509350505050565b600060208284031215613a7057600080fd5b81356001600160401b03811115613a8657600080fd5b612a0c8482850161390a565b60008060008060608587031215613aa857600080fd5b8435613ab381613565565b935060208501356001600160401b03811115613ace57600080fd5b613ada87828801613737565b9598909750949560400135949350505050565b60005b83811015613b08578181015183820152602001613af0565b83811115610d995750506000910152565b60008151808452613b31816020860160208601613aed565b601f01601f19169290920160200192915050565b8315158152826020820152606060408201526000613b666060830184613b19565b95945050505050565b60008060008060608587031215613b8557600080fd5b84356001600160401b0380821115613b9c57600080fd5b613ba88883890161390a565b955060208701359150613bba82613565565b9093506040860135908082111561382b57600080fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115613bf957613bf9613bd0565b500190565b6000600019821415613c1257613c12613bd0565b5060010190565b828152604060208201526000612a0c6040830184613b19565b634e487b7160e01b600052603260045260246000fd5b6000823561015e19833603018112613c5f57600080fd5b9190910192915050565b600082821015613c7b57613c7b613bd0565b500390565b801515811461277957600080fd5b600060208284031215613ca057600080fd5b81356131a681613c80565b6000808335601e19843603018112613cc257600080fd5b8301803591506001600160401b03821115613cdc57600080fd5b60200191503681900382131561377857600080fd5b6020815260006131a66020830184613b19565b600082613d2157634e487b7160e01b600052601260045260246000fd5b500490565b60008235605e19833603018112613c5f57600080fd5b6000808335601e19843603018112613d5357600080fd5b8301803591506001600160401b03821115613d6d57600080fd5b6020019150600581901b360382131561377857600080fd5b6000808335601e19843603018112613d9c57600080fd5b83016020810192503590506001600160401b03811115613dbb57600080fd5b80360383131561377857600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000610160613e1284613e058561357a565b6001600160a01b03169052565b60208301356020850152613e296040840184613d85565b826040870152613e3c8387018284613dca565b92505050613e4d6060840184613d85565b8583036060870152613e60838284613dca565b925050506080830135608085015260a083013560a085015260c083013560c085015260e083013560e0850152610100808401358186015250610120613ea781850185613d85565b86840383880152613eb9848284613dca565b9350505050610140613ecd81850185613d85565b86840383880152613edf848284613dca565b979650505050505050565b6040808252810184905260006060600586901b830181019083018783805b89811015613f5057868503605f190184528235368c900361015e19018112613f2e578283fd5b613f3a868d8301613df3565b9550506020938401939290920191600101613f08565b505050508281036020840152613edf818587613dca565b60008085851115613f7757600080fd5b83861115613f8457600080fd5b5050820193919092039150565b6bffffffffffffffffffffffff198135818116916014851015613fbe5780818660140360031b1b83161692505b505092915050565b602081526000612a0c602083018486613dca565b600060208284031215613fec57600080fd5b81516131a681613565565b600065ffffffffffff80831681851680830382111561401857614018613bd0565b01949350505050565b8183823760009101908152919050565b868152856020820152600065ffffffffffff8087166040840152808616606084015250831515608083015260c060a083015261407060c0830184613b19565b98975050505050505050565b80518252602081015160208301526040810151151560408301526000606082015165ffffffffffff8082166060860152806080850151166080860152505060a082015160c060a0850152612a0c60c0850182613b19565b60006101408083526140e78184018961407c565b915050614101602083018780518252602090810151910152565b845160608301526020948501516080830152835160a08301529284015160c082015281516001600160a01b031660e0820152908301518051610100830152909201516101209092019190915292915050565b60e08152600061416660e083018761407c565b905061417f602083018680518252602090810151910152565b8351606083015260208401516080830152825160a0830152602083015160c0830152613b66565b634e487b7160e01b600052602160045260246000fd5b6000600385106141dc57634e487b7160e01b600052602160045260246000fd5b848252606060208301526141f36060830185613b19565b9050826040830152949350505050565b600060033d111561421c5760046000803e5060005160e01c5b90565b600060443d101561422d5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561425c57505050505090565b82850191508151818111156142745750505050505090565b843d870101602082850101111561428e5750505050505090565b61429d60208286010187613615565b509095945050505050565b75020a09a98103837b9ba27b8103932bb32b93a32b21d160551b8152600082516142d9816016850160208701613aed565b9190910160160192915050565b60006101c08083526142fb8184018789613dca565b9050845160018060a01b03808251166020860152602082015160408601526040820151606086015260608201516080860152608082015160a08601528060a08301511660c08601525060c081015160e085015260e08101516101008501525060208501516101208401526040850151610140840152606085015161016084015260808501516101808401528281036101a0840152613edf8185613b19565b6000602082840312156143ab57600080fd5b5051919050565b6060815260006143c6606083018789613dca565b6001600160a01b03861660208401528281036040840152614070818587613dca565b6001600160a01b038516815260606020820181905260009061440d9083018587613dca565b905082604083015295945050505050565b600082601f83011261442f57600080fd5b815161443a81613641565b6040516144478282613615565b82815285602084870101111561445c57600080fd5b613b66836020830160208801613aed565b60008060006060848603121561448257600080fd5b835161448d81613c80565b6020850151604086015191945092506001600160401b038111156144b057600080fd5b6144bc8682870161441e565b9150509250925092565b805160208201516001600160e01b031980821692919060048310156144f55780818460040360031b1b83161693505b505050919050565b600081600019048311821515161561451757614517613bd0565b500290565b60608152600061452f6060830186613df3565b60208301949094525060400152919050565b6e020a09919903932bb32b93a32b21d1608d1b81526000825161456b81600f850160208701613aed565b91909101600f0192915050565b6000806040838503121561458b57600080fd5b82516001600160401b038111156145a157600080fd5b6145ad8582860161441e565b925050602083015190509250929050565b6e020a09999903932bb32b93a32b21d1608d1b81526000825161456b81600f850160208701613aed56fea2646970667358221220a801bf8ff2746c9061928cb09ab37dd4f1bbb366c2d1df0750e690161ce5528e64736f6c634300080c0033" + ZERO_ADDRESS: { + # override the "from" zero address balance with a high value + "balance": "0x314dc6448d9338c15b0a00000000", }, + entrypoint: { + # override the Entrypoint with EntryPointMod for callGasLimit + # binary search + "code": self.entrypoint_mod_byte_code + } } + call_data = function_selector + call_data_params.hex() # if there is no paymaster, override the sender's balance for gas estimation if len(user_operation.paymaster_and_data) == 0: # if the target is zero, simulate_handle_op is called to estimate @@ -172,9 +209,8 @@ async def simulate_handle_op_mod( "data": call_data, }, "latest", + default_state_overrides | state_override_set_dict ] - if bool(default_state_overrides | state_override_set_dict): - params.append(default_state_overrides | state_override_set_dict) result: Any = await send_rpc_request_to_eth_client( self.ethereum_node_url, "eth_call", params diff --git a/voltaire_bundler/cli_manager.py b/voltaire_bundler/cli_manager.py index 1277188..a1ec7ca 100644 --- a/voltaire_bundler/cli_manager.py +++ b/voltaire_bundler/cli_manager.py @@ -50,6 +50,7 @@ class InitData: bundler_pk: str bundler_address: Address bundler_helper_byte_code: str + entrypoint_mod_byte_code: str chain_id: int is_debug: bool is_unsafe: bool @@ -435,6 +436,18 @@ def init_bundler_helper(): return bundler_helper_byte_code +def init_entrypoint_mod(): + package_directory = os.path.dirname(os.path.abspath(__file__)) + entrypoint_mod_file = os.path.join( + package_directory, "utils", "EntryPointMod.json") + + entrypoint_mod_byte_code_file = open(entrypoint_mod_file) + data = json.load(entrypoint_mod_byte_code_file) + entrypoint_mod_byte_code = data["bytecode"] + + return entrypoint_mod_byte_code + + def init_entrypoint_and_mempool_data(args: Namespace): for ( entrypoint, @@ -527,6 +540,7 @@ async def get_init_data(args: Namespace) -> InitData: bundler_address, bundler_pk = init_bundler_address_and_secret(args) bundler_helper_byte_code = init_bundler_helper() + entrypoint_mod_byte_code = init_entrypoint_mod() if args.ethereum_node_debug_trace_call_url is None: args.ethereum_node_debug_trace_call_url = args.ethereum_node_url @@ -553,6 +567,7 @@ async def get_init_data(args: Namespace) -> InitData: bundler_pk, bundler_address, bundler_helper_byte_code, + entrypoint_mod_byte_code, args.chain_id, args.debug, args.unsafe, diff --git a/voltaire_bundler/main.py b/voltaire_bundler/main.py index 41f1a36..635cff2 100644 --- a/voltaire_bundler/main.py +++ b/voltaire_bundler/main.py @@ -54,6 +54,7 @@ async def main(cmd_args=sys.argv[1:], loop=None) -> None: init_data.bundler_address, init_data.entrypoints, init_data.bundler_helper_byte_code, + init_data.entrypoint_mod_byte_code, init_data.chain_id, init_data.is_unsafe, init_data.is_legacy_mode, diff --git a/voltaire_bundler/utils/EntryPointMod.json b/voltaire_bundler/utils/EntryPointMod.json new file mode 100644 index 0000000..a0567a7 --- /dev/null +++ b/voltaire_bundler/utils/EntryPointMod.json @@ -0,0 +1,5 @@ +{ + "contractName": "EntryPointMod", + "bytecode": "0x6080604052600436106101395760003560e01c80638f41ec5a116100ab578063bb9fe6bf1161006f578063bb9fe6bf146104ae578063c23a5cea146104c3578063d25ca6ea146104e3578063d6383f9414610512578063ee21942314610532578063fc7e286d1461055257600080fd5b80638f41ec5a14610426578063957122ab1461043b5780639b249f691461045b578063a61935311461047b578063b760faf91461049b57600080fd5b8063205c2878116100fd578063205c28781461020c57806335567e1a1461022c5780634b1d7cf51461028a5780635287ce12146102aa57806370a08231146103c757806385085b6b1461040657600080fd5b80630396cb601461014e5780630bd28e3b146101615780631b2e01b8146101815780631d732756146101cc5780631fad948c146101ec57600080fd5b366101495761014733610607565b005b600080fd5b61014761015c366004613597565b61066e565b34801561016d57600080fd5b5061014761017c3660046135d9565b6108fd565b34801561018d57600080fd5b506101b961019c366004613614565b600160209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b3480156101d857600080fd5b506101b96101e736600461380e565b610934565b3480156101f857600080fd5b50610147610207366004613917565b610aa7565b34801561021857600080fd5b5061014761022736600461396d565b610c23565b34801561023857600080fd5b506101b9610247366004613614565b6001600160a01b039190911660009081526001602090815260408083206001600160c01b0385168452909152908190205491901b67ffffffffffffffff19161790565b34801561029657600080fd5b506101476102a5366004613917565b610d9f565b3480156102b657600080fd5b5061036f6102c5366004613999565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152506001600160a01b031660009081526020818152604091829020825160a08101845281546001600160701b038082168352600160701b820460ff16151594830194909452600160781b90049092169282019290925260019091015463ffffffff81166060830152640100000000900465ffffffffffff16608082015290565b6040805182516001600160701b03908116825260208085015115159083015283830151169181019190915260608083015163ffffffff169082015260809182015165ffffffffffff169181019190915260a0016101c3565b3480156103d357600080fd5b506101b96103e2366004613999565b6001600160a01b03166000908152602081905260409020546001600160701b031690565b34801561041257600080fd5b506101476104213660046139cf565b6111e2565b34801561043257600080fd5b506101b9600181565b34801561044757600080fd5b50610147610456366004613a28565b611475565b34801561046757600080fd5b50610147610476366004613aac565b61156f565b34801561048757600080fd5b506101b9610496366004613aed565b61162a565b6101476104a9366004613999565b610607565b3480156104ba57600080fd5b5061014761166c565b3480156104cf57600080fd5b506101476104de366004613999565b61178f565b3480156104ef57600080fd5b506105036104fe366004613b21565b6119c7565b6040516101c393929190613bd4565b34801561051e57600080fd5b5061014761052d366004613bfe565b611a81565b34801561053e57600080fd5b5061014761054d366004613aed565b611b7c565b34801561055e57600080fd5b506105c161056d366004613999565b600060208190529081526040902080546001909101546001600160701b0380831692600160701b810460ff1692600160781b9091049091169063ffffffff811690640100000000900465ffffffffffff1685565b604080516001600160701b0396871681529415156020860152929094169183019190915263ffffffff16606082015265ffffffffffff909116608082015260a0016101c3565b6106118134611d58565b6001600160a01b03811660008181526020818152604091829020805492516001600160701b03909316835292917f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c491015b60405180910390a25050565b33600090815260208190526040902063ffffffff82166106d55760405162461bcd60e51b815260206004820152601a60248201527f6d757374207370656369667920756e7374616b652064656c617900000000000060448201526064015b60405180910390fd5b600181015463ffffffff90811690831610156107335760405162461bcd60e51b815260206004820152601c60248201527f63616e6e6f7420646563726561736520756e7374616b652074696d650000000060448201526064016106cc565b8054600090610753903490600160781b90046001600160701b0316613c75565b90506000811161079a5760405162461bcd60e51b81526020600482015260126024820152711b9bc81cdd185ad9481cdc1958da599a595960721b60448201526064016106cc565b6001600160701b038111156107e25760405162461bcd60e51b815260206004820152600e60248201526d7374616b65206f766572666c6f7760901b60448201526064016106cc565b6040805160a08101825283546001600160701b0390811682526001602080840182815286841685870190815263ffffffff808b16606088019081526000608089018181523380835296829052908a902098518954955194518916600160781b02600160781b600160e81b0319951515600160701b026effffffffffffffffffffffffffffff199097169190991617949094179290921695909517865551949092018054925165ffffffffffff166401000000000269ffffffffffffffffffff19909316949093169390931717905590517fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01906108f0908490879091825263ffffffff16602082015260400190565b60405180910390a2505050565b3360009081526001602090815260408083206001600160c01b0385168452909152812080549161092c83613c8d565b919050555050565b6000805a90503330146109895760405162461bcd60e51b815260206004820152601760248201527f4141393220696e7465726e616c2063616c6c206f6e6c7900000000000000000060448201526064016106cc565b8451604081015160608201518101611388015a10156109b35763deaddead60e01b60005260206000fd5b875160009015610a475760006109d0846000015160008c86611df4565b905080610a455760006109e4610800611e0c565b805190915015610a3f5784600001516001600160a01b03168a602001517f1c4fada7374c0a9ee8841fc38afe82932dc0f8e69012e927f061a8bae611a201876020015184604051610a36929190613ca8565b60405180910390a35b60019250505b505b600088608001515a8603019050610a996000838b8b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250889250611e38915050565b9a9950505050505050505050565b610aaf612130565b816000816001600160401b03811115610aca57610aca613649565b604051908082528060200260200182016040528015610b0357816020015b610af061350d565b815260200190600190039081610ae85790505b50905060005b82811015610b7c576000828281518110610b2557610b25613cc1565b60200260200101519050600080610b60848a8a87818110610b4857610b48613cc1565b9050602002810190610b5a9190613cd7565b85612188565b91509150610b718483836000612373565b505050600101610b09565b506040516000907fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f972908290a160005b83811015610c0657610bfa81888884818110610bc957610bc9613cc1565b9050602002810190610bdb9190613cd7565b858481518110610bed57610bed613cc1565b602002602001015161250f565b90910190600101610bab565b50610c118482612637565b505050610c1e6001600255565b505050565b33600090815260208190526040902080546001600160701b0316821115610c8c5760405162461bcd60e51b815260206004820152601960248201527f576974686472617720616d6f756e7420746f6f206c617267650000000000000060448201526064016106cc565b8054610ca29083906001600160701b0316613cf8565b81546001600160701b0319166001600160701b0391909116178155604080516001600160a01b03851681526020810184905233917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb910160405180910390a26000836001600160a01b03168360405160006040518083038185875af1925050503d8060008114610d4e576040519150601f19603f3d011682016040523d82523d6000602084013e610d53565b606091505b5050905080610d995760405162461bcd60e51b81526020600482015260126024820152716661696c656420746f20776974686472617760701b60448201526064016106cc565b50505050565b610da7612130565b816000805b82811015610f1b5736868683818110610dc757610dc7613cc1565b9050602002810190610dd99190613d0f565b9050366000610de88380613d25565b90925090506000610dff6040850160208601613999565b90506001600160a01b03811660011415610e5b5760405162461bcd60e51b815260206004820152601760248201527f4141393620696e76616c69642061676772656761746f7200000000000000000060448201526064016106cc565b6001600160a01b03811615610ef8576001600160a01b03811663e3563a4f8484610e886040890189613d6e565b6040518563ffffffff1660e01b8152600401610ea79493929190613f19565b60006040518083038186803b158015610ebf57600080fd5b505afa925050508015610ed0575060015b610ef85760405163086a9f7560e41b81526001600160a01b03821660048201526024016106cc565b610f028287613c75565b9550505050508080610f1390613c8d565b915050610dac565b506000816001600160401b03811115610f3657610f36613649565b604051908082528060200260200182016040528015610f6f57816020015b610f5c61350d565b815260200190600190039081610f545790505b506040519091507fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f97290600090a16000805b848110156110845736888883818110610fbb57610fbb613cc1565b9050602002810190610fcd9190613d0f565b9050366000610fdc8380613d25565b90925090506000610ff36040850160208601613999565b90508160005b8181101561106b57600089898151811061101557611015613cc1565b602002602001015190506000806110388b898987818110610b4857610b48613cc1565b9150915061104884838389612373565b8a61105281613c8d565b9b5050505050808061106390613c8d565b915050610ff9565b505050505050808061107c90613c8d565b915050610fa0565b50600080915060005b8581101561119d57368989838181106110a8576110a8613cc1565b90506020028101906110ba9190613d0f565b90506110cc6040820160208301613999565b6001600160a01b03167f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d60405160405180910390a236600061110e8380613d25565b90925090508060005b81811015611185576111598885858481811061113557611135613cc1565b90506020028101906111479190613cd7565b8b8b81518110610bed57610bed613cc1565b6111639088613c75565b96508761116f81613c8d565b985050808061117d90613c8d565b915050611117565b5050505050808061119590613c8d565b91505061108d565b506040516000907f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d908290a26111d38682612637565b5050505050610c1e6001600255565b6111ea61350d565b6111f383612730565b60008061120260008685612188565b915091506000611212838361280b565b905084356020860135600061122d6080890160608a01613fa4565b1580611244575061124460a0890160808a01613fa4565b15611315576000808061127061125d60208e018e613999565b61126a60608f018f613d6e565b886128d7565b925092509250826112965780604051632cf919e960e11b81526004016106cc9190613fc1565b90945084925082906112ae60a08c0160808d01613fa4565b15611311578b60c001358a608001516112c79190613cf8565b60208801516040808a01519051633a803a8160e01b8152600481019390935265ffffffffffff9182166024840152166044820152606481018690526001608482015260a4016106cc565b5050505b600060056113238585613cf8565b61132d9190613fd4565b6113379085613c75565b905060005b8361134b60408c013587613c75565b1015611417578061135b81613c8d565b915050611367826129db565b61139557604051631167ca7360e11b81526004810186905260248101859052604481018290526064016106cc565b6000806113be6113a860208f018f613999565b8e80606001906113b89190613d6e565b876128d7565b50915091508180156113d05750848110155b156113e0578395508094506113ee565b6113eb846001613c75565b96505b60026113fa8888613cf8565b6114049190613fd4565b61140e9088613c75565b9350505061133c565b8a60c00135896080015161142b9190613cf8565b60208701516040808901519051633a803a8160e01b8152600481019390935265ffffffffffff9182166024840152166044820152606481018590526084810182905260a4016106cc565b8315801561148b57506001600160a01b0383163b155b156114d85760405162461bcd60e51b815260206004820152601960248201527f41413230206163636f756e74206e6f74206465706c6f7965640000000000000060448201526064016106cc565b6014811061154d5760006114ef6014828486613ff6565b6114f891614020565b60601c9050803b61154b5760405162461bcd60e51b815260206004820152601b60248201527f41413330207061796d6173746572206e6f74206465706c6f796564000000000060448201526064016106cc565b505b60405162461bcd60e51b815260206004820152600060248201526044016106cc565b604051632b870d1b60e11b81526000906001600160a01b037f0000000000000000000000007fc98430eaedbb6070b35b39d798725049088348169063570e1a36906115c09086908690600401614055565b6020604051808303816000875af11580156115df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116039190614069565b604051633653dc0360e11b81526001600160a01b03821660048201529091506024016106cc565b600061163582612a0a565b6040805160208101929092523090820152466060820152608001604051602081830303815290604052805190602001209050919050565b336000908152602081905260409020600181015463ffffffff166116bf5760405162461bcd60e51b815260206004820152600a6024820152691b9bdd081cdd185ad95960b21b60448201526064016106cc565b8054600160701b900460ff1661170b5760405162461bcd60e51b8152602060048201526011602482015270616c726561647920756e7374616b696e6760781b60448201526064016106cc565b60018101546000906117239063ffffffff1642614086565b60018301805469ffffffffffff00000000191664010000000065ffffffffffff841690810291909117909155835460ff60701b1916845560405190815290915033907ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a90602001610662565b3360009081526020819052604090208054600160781b90046001600160701b0316806117f45760405162461bcd60e51b81526020600482015260146024820152734e6f207374616b6520746f20776974686472617760601b60448201526064016106cc565b6001820154640100000000900465ffffffffffff166118555760405162461bcd60e51b815260206004820152601d60248201527f6d7573742063616c6c20756e6c6f636b5374616b65282920666972737400000060448201526064016106cc565b60018201544264010000000090910465ffffffffffff1611156118ba5760405162461bcd60e51b815260206004820152601b60248201527f5374616b65207769746864726177616c206973206e6f7420647565000000000060448201526064016106cc565b60018201805469ffffffffffffffffffff191690558154600160781b600160e81b0319168255604080516001600160a01b03851681526020810183905233917fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda3910160405180910390a26000836001600160a01b03168260405160006040518083038185875af1925050503d8060008114611971576040519150601f19603f3d011682016040523d82523d6000602084013e611976565b606091505b5050905080610d995760405162461bcd60e51b815260206004820152601860248201527f6661696c656420746f207769746864726177207374616b65000000000000000060448201526064016106cc565b600080606060005a9050876001600160a01b03168588886040516119ec9291906140b0565b60006040518083038160008787f1925050503d8060008114611a2a576040519150601f19603f3d011682016040523d82523d6000602084013e611a2f565b606091505b5090945091505a611a409082613cf8565b9250600084611a4f5782611a60565b604051806020016040528060008152505b905084848260405163f9bb41fb60e01b81526004016106cc93929190613bd4565b611a8961350d565b611a9285612730565b600080611aa160008885612188565b915091506000611ab1838361280b565b9050611abc43600052565b6000611aca60008a8761250f565b9050611ad543600052565b600060606001600160a01b038a1615611b4b57896001600160a01b03168989604051611b029291906140b0565b6000604051808303816000865af19150503d8060008114611b3f576040519150601f19603f3d011682016040523d82523d6000602084013e611b44565b606091505b5090925090505b866080015183856020015186604001518585604051630116f59360e71b81526004016106cc969594939291906140c0565b611b8461350d565b611b8d82612730565b600080611b9c60008585612188565b915091506000611bb3846000015160a00151612a23565b845151909150600090611bc590612a23565b9050611be4604051806040016040528060008152602001600081525090565b366000611bf460408a018a613d6e565b909250905060006014821015611c0b576000611c26565b611c19601460008486613ff6565b611c2291614020565b60601c5b9050611c3181612a23565b93505050506000611c42868661280b565b9050600081600001519050600060016001600160a01b0316826001600160a01b031614905060006040518060c001604052808b6080015181526020018b6040015181526020018315158152602001856020015165ffffffffffff168152602001856040015165ffffffffffff168152602001611cbf8c6060015190565b905290506001600160a01b03831615801590611ce557506001600160a01b038316600114155b15611d375760006040518060400160405280856001600160a01b03168152602001611d0f86612a23565b81525090508187878a84604051633ebb2d3960e21b81526004016106cc959493929190614162565b8086868960405163e0cff05f60e01b81526004016106cc94939291906141e2565b6001600160a01b03821660009081526020819052604081208054909190611d899084906001600160701b0316613c75565b90506001600160701b03811115611dd55760405162461bcd60e51b815260206004820152601060248201526f6465706f736974206f766572666c6f7760801b60448201526064016106cc565b81546001600160701b0319166001600160701b03919091161790555050565b6000806000845160208601878987f195945050505050565b60603d82811115611e1a5750815b604051602082018101604052818152816000602083013e9392505050565b6000805a855190915060009081611e4e82612a72565b60a08301519091506001600160a01b038116611e6d5782519350612015565b80935060008851111561201557868202955060028a6002811115611e9357611e93614235565b14611f0557606083015160405163a9a2340960e01b81526001600160a01b0383169163a9a2340991611ecd908e908d908c9060040161424b565b600060405180830381600088803b158015611ee757600080fd5b5087f1158015611efb573d6000803e3d6000fd5b5050505050612015565b606083015160405163a9a2340960e01b81526001600160a01b0383169163a9a2340991611f3a908e908d908c9060040161424b565b600060405180830381600088803b158015611f5457600080fd5b5087f193505050508015611f66575060015b61201557611f72614292565b806308c379a01415611fcc5750611f876142ae565b80611f925750611fce565b8b81604051602001611fa49190614337565b60408051601f1981840301815290829052631101335b60e11b82526106cc9291600401613ca8565b505b8a604051631101335b60e11b81526004016106cc9181526040602082018190526012908201527110504d4c081c1bdcdd13dc081c995d995c9d60721b606082015260800190565b5a8503870196508187029550858960400151101561207e578a604051631101335b60e11b81526004016106cc91815260406020808301829052908201527f414135312070726566756e642062656c6f772061637475616c476173436f7374606082015260800190565b60408901518690036120908582611d58565b6000808c60028111156120a5576120a5614235565b1490508460a001516001600160a01b031685600001516001600160a01b03168c602001517f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f8860200151858d8f604051612118949392919093845291151560208401526040830152606082015260800190565b60405180910390a45050505050505095945050505050565b6002805414156121825760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106cc565b60028055565b60008060005a845190915061219d8682612aa3565b6121a68661162a565b6020860152604081015160608201516080830151171760e087013517610100870135176effffffffffffffffffffffffffffff8111156122285760405162461bcd60e51b815260206004820152601860248201527f41413934206761732076616c756573206f766572666c6f77000000000000000060448201526064016106cc565b60008061223484612b9c565b90506122428a8a8a84612be9565b855160208701519199509193506122599190612e22565b6122af5789604051631101335b60e11b81526004016106cc918152604060208201819052601a908201527f4141323520696e76616c6964206163636f756e74206e6f6e6365000000000000606082015260800190565b6122b843600052565b60a08401516060906001600160a01b0316156122e0576122db8b8b8b8587612e6f565b975090505b60005a87039050808b60a001351015612345578b604051631101335b60e11b81526004016106cc918152604060208201819052601e908201527f41413430206f76657220766572696669636174696f6e4761734c696d69740000606082015260800190565b60408a018390528160608b015260c08b01355a8803018a608001818152505050505050505050935093915050565b60008061237f85613093565b91509150816001600160a01b0316836001600160a01b0316146123e55785604051631101335b60e11b81526004016106cc9181526040602082018190526014908201527320a0991a1039b4b3b730ba3ab9329032b93937b960611b606082015260800190565b801561243d5785604051631101335b60e11b81526004016106cc9181526040602082018190526017908201527f414132322065787069726564206f72206e6f7420647565000000000000000000606082015260800190565b600061244885613093565b925090506001600160a01b038116156124a45786604051631101335b60e11b81526004016106cc9181526040602082018190526014908201527320a0999a1039b4b3b730ba3ab9329032b93937b960611b606082015260800190565b81156125065786604051631101335b60e11b81526004016106cc9181526040602082018190526021908201527f41413332207061796d61737465722065787069726564206f72206e6f742064756060820152606560f81b608082015260a00190565b50505050505050565b6000805a90506000612522846060015190565b905030631d7327566125376060880188613d6e565b87856040518563ffffffff1660e01b81526004016125589493929190614375565b6020604051808303816000875af1925050508015612593575060408051601f3d908101601f1916820190925261259091810190614428565b60015b61262b57600060206000803e5060005163deaddead60e01b8114156125f65786604051631101335b60e11b81526004016106cc918152604060208201819052600f908201526e41413935206f7574206f662067617360881b606082015260800190565b600085608001515a6126089086613cf8565b6126129190613c75565b9050612622886002888685611e38565b9450505061262e565b92505b50509392505050565b6001600160a01b03821661268d5760405162461bcd60e51b815260206004820152601860248201527f4141393020696e76616c69642062656e6566696369617279000000000000000060448201526064016106cc565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146126da576040519150601f19603f3d011682016040523d82523d6000602084013e6126df565b606091505b5050905080610c1e5760405162461bcd60e51b815260206004820152601f60248201527f41413931206661696c65642073656e6420746f2062656e65666963696172790060448201526064016106cc565b3063957122ab6127436040840184613d6e565b6127506020860186613999565b61275e610120870187613d6e565b6040518663ffffffff1660e01b815260040161277e959493929190614441565b60006040518083038186803b15801561279657600080fd5b505afa9250505080156127a7575060015b612808576127b3614292565b806308c379a014156127fc57506127c86142ae565b806127d357506127fe565b8051156127f857600081604051631101335b60e11b81526004016106cc929190613ca8565b5050565b505b3d6000803e3d6000fd5b50565b6040805160608101825260008082526020820181905291810182905290612831846130e3565b9050600061283e846130e3565b82519091506001600160a01b038116612855575080515b602080840151604080860151928501519085015191929165ffffffffffff8083169085161015612883578193505b8065ffffffffffff168365ffffffffffff16111561289f578092505b5050604080516060810182526001600160a01b03909416845265ffffffffffff92831660208501529116908201529250505092915050565b60405163692e537560e11b81526000908190606090309063d25ca6ea90612908908a908a908a908a90600401614477565b6000604051808303816000875af192505050801561294857506040513d6000823e601f3d908101601f1916820160405261294591908101906144fc565b60015b6129c9573d808015612976576040519150601f19603f3d011682016040523d82523d6000602084013e61297b565b606091505b5063f9bb41fb60e01b61298d82614555565b6001600160e01b031916146129a157600080fd5b600481019050808060200190518101906129bb91906144fc565b919550935091506129d19050565b505050600080fd5b9450945094915050565b60005a610f816129ed8461100061458c565b6129f79190613fd4565b612a039061c350613c75565b1092915050565b6000612a1582613151565b805190602001209050919050565b604080518082018252600080825260208083018281526001600160a01b03959095168252819052919091208054600160781b90046001600160701b031682526001015463ffffffff1690915290565b60c081015160e08201516000919080821415612a8f575092915050565b612a9b82488301613224565b949350505050565b612ab06020830183613999565b6001600160a01b0316815260208083013590820152608080830135604083015260a0830135606083015260c0808401359183019190915260e0808401359183019190915261010083013590820152366000612b0f610120850185613d6e565b90925090508015612b8f576014811015612b6b5760405162461bcd60e51b815260206004820152601d60248201527f4141393320696e76616c6964207061796d6173746572416e644461746100000060448201526064016106cc565b612b79601460008385613ff6565b612b8291614020565b60601c60a0840152610d99565b600060a084015250505050565b60a081015160009081906001600160a01b0316612bba576001612bbd565b60035b60ff16905060008360800151828560600151028560400151010190508360c00151810292505050919050565b60008060005a8551805191925090612c0e8988612c0960408c018c613d6e565b61323c565b60a0820151612c1c43600052565b60006001600160a01b038216612c64576001600160a01b0383166000908152602081905260409020546001600160701b0316888111612c5d57808903612c60565b60005b9150505b606084015160208a0151604051633a871cdd60e01b81526001600160a01b03861692633a871cdd929091612c9e918f9187906004016145ab565b60206040518083038160008887f193505050508015612cda575060408051601f3d908101601f19168201909252612cd791810190614428565b60015b612d6557612ce6614292565b806308c379a01415612d185750612cfb6142ae565b80612d065750612d1a565b8b81604051602001611fa491906145d0565b505b8a604051631101335b60e11b81526004016106cc918152604060208201819052601690820152754141323320726576657274656420286f72204f4f472960501b606082015260800190565b95506001600160a01b038216612e0f576001600160a01b038316600090815260208190526040902080546001600160701b0316808a1115612df2578c604051631101335b60e11b81526004016106cc9181526040602082018190526017908201527f41413231206469646e2774207061792070726566756e64000000000000000000606082015260800190565b81546001600160701b031916908a90036001600160701b03161790555b5a85039650505050505094509492505050565b6001600160a01b038216600090815260016020908152604080832084821c80855292528220805484916001600160401b038316919085612e6183613c8d565b909155501495945050505050565b82516060818101519091600091848111612ecb5760405162461bcd60e51b815260206004820152601f60248201527f4141343120746f6f206c6974746c6520766572696669636174696f6e4761730060448201526064016106cc565b60a08201516001600160a01b038116600090815260208190526040902080548784039291906001600160701b031689811015612f53578c604051631101335b60e11b81526004016106cc918152604060208201819052601e908201527f41413331207061796d6173746572206465706f73697420746f6f206c6f770000606082015260800190565b8981038260000160006101000a8154816001600160701b0302191690836001600160701b03160217905550826001600160a01b031663f465c77e858e8e602001518e6040518563ffffffff1660e01b8152600401612fb3939291906145ab565b60006040518083038160008887f193505050508015612ff457506040513d6000823e601f3d908101601f19168201604052612ff19190810190614607565b60015b61307f57613000614292565b806308c379a0141561303257506130156142ae565b806130205750613034565b8d81604051602001611fa4919061464d565b505b8c604051631101335b60e11b81526004016106cc918152604060208201819052601690820152754141333320726576657274656420286f72204f4f472960501b606082015260800190565b909e909d509b505050505050505050505050565b600080826130a657506000928392509050565b60006130b1846130e3565b9050806040015165ffffffffffff164211806130d85750806020015165ffffffffffff1642105b905194909350915050565b60408051606081018252600080825260208201819052918101919091528160a081901c65ffffffffffff811661311c575065ffffffffffff5b604080516060810182526001600160a01b03909316835260d09490941c602083015265ffffffffffff16928101929092525090565b606081356020830135600061317161316c6040870187613d6e565b6134fa565b9050600061318561316c6060880188613d6e565b9050608086013560a087013560c088013560e08901356101008a013560006131b461316c6101208e018e613d6e565b604080516001600160a01b039c909c1660208d01528b81019a909a5260608b019890985250608089019590955260a088019390935260c087019190915260e08601526101008501526101208401526101408084019190915281518084039091018152610160909201905292915050565b60008183106132335781613235565b825b9392505050565b8015610d99578251516001600160a01b0381163b156132a75784604051631101335b60e11b81526004016106cc918152604060208201819052601f908201527f414131302073656e64657220616c726561647920636f6e737472756374656400606082015260800190565b835160600151604051632b870d1b60e11b81526000916001600160a01b037f0000000000000000000000007fc98430eaedbb6070b35b39d798725049088348169163570e1a3691906132ff9088908890600401614055565b60206040518083038160008887f115801561331e573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906133439190614069565b90506001600160a01b0381166133a55785604051631101335b60e11b81526004016106cc918152604060208201819052601b908201527f4141313320696e6974436f6465206661696c6564206f72204f4f470000000000606082015260800190565b816001600160a01b0316816001600160a01b03161461340f5785604051631101335b60e11b81526004016106cc91815260406020808301829052908201527f4141313420696e6974436f6465206d7573742072657475726e2073656e646572606082015260800190565b6001600160a01b0381163b61346f5785604051631101335b60e11b81526004016106cc91815260406020808301829052908201527f4141313520696e6974436f6465206d757374206372656174652073656e646572606082015260800190565b600061347e6014828688613ff6565b61348791614020565b60601c9050826001600160a01b031686602001517fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d83896000015160a001516040516134e99291906001600160a01b0392831681529116602082015260400190565b60405180910390a350505050505050565b6000604051828085833790209392505050565b6040518060a0016040528061357260405180610100016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160008152602001600081525090565b8152602001600080191681526020016000815260200160008152602001600081525090565b6000602082840312156135a957600080fd5b813563ffffffff8116811461323557600080fd5b80356001600160c01b03811681146135d457600080fd5b919050565b6000602082840312156135eb57600080fd5b613235826135bd565b6001600160a01b038116811461280857600080fd5b80356135d4816135f4565b6000806040838503121561362757600080fd5b8235613632816135f4565b9150613640602084016135bd565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b60a081018181106001600160401b038211171561367e5761367e613649565b60405250565b61010081018181106001600160401b038211171561367e5761367e613649565b601f8201601f191681016001600160401b03811182821017156136c9576136c9613649565b6040525050565b60006001600160401b038211156136e9576136e9613649565b50601f01601f191660200190565b600081830361018081121561370b57600080fd5b6040516137178161365f565b8092506101008083121561372a57600080fd5b604051925061373883613684565b61374185613609565b83526020850135602084015260408501356040840152606085013560608401526080850135608084015261377760a08601613609565b60a084015260c085013560c084015260e085013560e084015282825280850135602083015250610120840135604082015261014084013560608201526101608401356080820152505092915050565b60008083601f8401126137d857600080fd5b5081356001600160401b038111156137ef57600080fd5b60208301915083602082850101111561380757600080fd5b9250929050565b6000806000806101c0858703121561382557600080fd5b84356001600160401b038082111561383c57600080fd5b818701915087601f83011261385057600080fd5b813561385b816136d0565b60405161386882826136a4565b8281528a602084870101111561387d57600080fd5b826020860160208301376000602084830101528098505050506138a388602089016136f7565b94506101a08701359150808211156138ba57600080fd5b506138c7878288016137c6565b95989497509550505050565b60008083601f8401126138e557600080fd5b5081356001600160401b038111156138fc57600080fd5b6020830191508360208260051b850101111561380757600080fd5b60008060006040848603121561392c57600080fd5b83356001600160401b0381111561394257600080fd5b61394e868287016138d3565b9094509250506020840135613962816135f4565b809150509250925092565b6000806040838503121561398057600080fd5b823561398b816135f4565b946020939093013593505050565b6000602082840312156139ab57600080fd5b8135613235816135f4565b600061016082840312156139c957600080fd5b50919050565b60008082840360c08112156139e357600080fd5b83356001600160401b038111156139f957600080fd5b613a05868287016139b6565b93505060a0601f1982011215613a1a57600080fd5b506020830190509250929050565b600080600080600060608688031215613a4057600080fd5b85356001600160401b0380821115613a5757600080fd5b613a6389838a016137c6565b909750955060208801359150613a78826135f4565b90935060408701359080821115613a8e57600080fd5b50613a9b888289016137c6565b969995985093965092949392505050565b60008060208385031215613abf57600080fd5b82356001600160401b03811115613ad557600080fd5b613ae1858286016137c6565b90969095509350505050565b600060208284031215613aff57600080fd5b81356001600160401b03811115613b1557600080fd5b612a9b848285016139b6565b60008060008060608587031215613b3757600080fd5b8435613b42816135f4565b935060208501356001600160401b03811115613b5d57600080fd5b613b69878288016137c6565b9598909750949560400135949350505050565b60005b83811015613b97578181015183820152602001613b7f565b83811115610d995750506000910152565b60008151808452613bc0816020860160208601613b7c565b601f01601f19169290920160200192915050565b8315158152826020820152606060408201526000613bf56060830184613ba8565b95945050505050565b60008060008060608587031215613c1457600080fd5b84356001600160401b0380821115613c2b57600080fd5b613c37888389016139b6565b955060208701359150613c49826135f4565b909350604086013590808211156138ba57600080fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115613c8857613c88613c5f565b500190565b6000600019821415613ca157613ca1613c5f565b5060010190565b828152604060208201526000612a9b6040830184613ba8565b634e487b7160e01b600052603260045260246000fd5b6000823561015e19833603018112613cee57600080fd5b9190910192915050565b600082821015613d0a57613d0a613c5f565b500390565b60008235605e19833603018112613cee57600080fd5b6000808335601e19843603018112613d3c57600080fd5b8301803591506001600160401b03821115613d5657600080fd5b6020019150600581901b360382131561380757600080fd5b6000808335601e19843603018112613d8557600080fd5b8301803591506001600160401b03821115613d9f57600080fd5b60200191503681900382131561380757600080fd5b6000808335601e19843603018112613dcb57600080fd5b83016020810192503590506001600160401b03811115613dea57600080fd5b80360383131561380757600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000610160613e4184613e3485613609565b6001600160a01b03169052565b60208301356020850152613e586040840184613db4565b826040870152613e6b8387018284613df9565b92505050613e7c6060840184613db4565b8583036060870152613e8f838284613df9565b925050506080830135608085015260a083013560a085015260c083013560c085015260e083013560e0850152610100808401358186015250610120613ed681850185613db4565b86840383880152613ee8848284613df9565b9350505050610140613efc81850185613db4565b86840383880152613f0e848284613df9565b979650505050505050565b6040808252810184905260006060600586901b830181019083018783805b89811015613f7f57868503605f190184528235368c900361015e19018112613f5d578283fd5b613f69868d8301613e22565b9550506020938401939290920191600101613f37565b505050508281036020840152613f0e818587613df9565b801515811461280857600080fd5b600060208284031215613fb657600080fd5b813561323581613f96565b6020815260006132356020830184613ba8565b600082613ff157634e487b7160e01b600052601260045260246000fd5b500490565b6000808585111561400657600080fd5b8386111561401357600080fd5b5050820193919092039150565b6bffffffffffffffffffffffff19813581811691601485101561404d5780818660140360031b1b83161692505b505092915050565b602081526000612a9b602083018486613df9565b60006020828403121561407b57600080fd5b8151613235816135f4565b600065ffffffffffff8083168185168083038211156140a7576140a7613c5f565b01949350505050565b8183823760009101908152919050565b868152856020820152600065ffffffffffff8087166040840152808616606084015250831515608083015260c060a08301526140ff60c0830184613ba8565b98975050505050505050565b80518252602081015160208301526040810151151560408301526000606082015165ffffffffffff8082166060860152806080850151166080860152505060a082015160c060a0850152612a9b60c0850182613ba8565b60006101408083526141768184018961410b565b915050614190602083018780518252602090810151910152565b845160608301526020948501516080830152835160a08301529284015160c082015281516001600160a01b031660e0820152908301518051610100830152909201516101209092019190915292915050565b60e0815260006141f560e083018761410b565b905061420e602083018680518252602090810151910152565b8351606083015260208401516080830152825160a0830152602083015160c0830152613bf5565b634e487b7160e01b600052602160045260246000fd5b60006003851061426b57634e487b7160e01b600052602160045260246000fd5b848252606060208301526142826060830185613ba8565b9050826040830152949350505050565b600060033d11156142ab5760046000803e5060005160e01c5b90565b600060443d10156142bc5790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156142eb57505050505090565b82850191508151818111156143035750505050505090565b843d870101602082850101111561431d5750505050505090565b61432c602082860101876136a4565b509095945050505050565b75020a09a98103837b9ba27b8103932bb32b93a32b21d160551b815260008251614368816016850160208701613b7c565b9190910160160192915050565b60006101c080835261438a8184018789613df9565b9050845160018060a01b03808251166020860152602082015160408601526040820151606086015260608201516080860152608082015160a08601528060a08301511660c08601525060c081015160e085015260e08101516101008501525060208501516101208401526040850151610140840152606085015161016084015260808501516101808401528281036101a0840152613f0e8185613ba8565b60006020828403121561443a57600080fd5b5051919050565b606081526000614455606083018789613df9565b6001600160a01b038616602084015282810360408401526140ff818587613df9565b6001600160a01b038516815260606020820181905260009061449c9083018587613df9565b905082604083015295945050505050565b600082601f8301126144be57600080fd5b81516144c9816136d0565b6040516144d682826136a4565b8281528560208487010111156144eb57600080fd5b613bf5836020830160208801613b7c565b60008060006060848603121561451157600080fd5b835161451c81613f96565b6020850151604086015191945092506001600160401b0381111561453f57600080fd5b61454b868287016144ad565b9150509250925092565b805160208201516001600160e01b031980821692919060048310156145845780818460040360031b1b83161693505b505050919050565b60008160001904831182151516156145a6576145a6613c5f565b500290565b6060815260006145be6060830186613e22565b60208301949094525060400152919050565b6e020a09919903932bb32b93a32b21d1608d1b8152600082516145fa81600f850160208701613b7c565b91909101600f0192915050565b6000806040838503121561461a57600080fd5b82516001600160401b0381111561463057600080fd5b61463c858286016144ad565b925050602083015190509250929050565b6e020a09999903932bb32b93a32b21d1608d1b8152600082516145fa81600f850160208701613b7c56fea2646970667358221220edf30c3e1d93b0e3b928337a6755736a5713bb88a3431c1729b77e4fe412687864736f6c634300080c0033" +} + diff --git a/voltaire_p2p/p2p_network/voltaire_version/src/lib.rs b/voltaire_p2p/p2p_network/voltaire_version/src/lib.rs index 1449b1a..24df5eb 100644 --- a/voltaire_p2p/p2p_network/voltaire_version/src/lib.rs +++ b/voltaire_p2p/p2p_network/voltaire_version/src/lib.rs @@ -1,12 +1,12 @@ use target_info::Target; -pub const VERSION: &str = "Voltaire/v0.1.0a27"; +pub const VERSION: &str = "Voltaire/v0.1.0a29"; /// Returns `VERSION`, but with platform information appended to the end. /// /// ## Example /// -/// `Voltaire/v0.1.0a27/x86_64-linux` +/// `Voltaire/v0.1.0a29/x86_64-linux` pub fn version_with_platform() -> String { format!("{}/{}-{}", VERSION, Target::arch(), Target::os()) }