diff --git a/.github/workflows/nimbus_verified_proxy.yml b/.github/workflows/nimbus_verified_proxy.yml index b6d73cbcc..aa186575f 100644 --- a/.github/workflows/nimbus_verified_proxy.yml +++ b/.github/workflows/nimbus_verified_proxy.yml @@ -238,7 +238,7 @@ jobs: # Updating nph version should be accompanied with running the new # version on the fluffy directory. run: | - VERSION="v0.4.1" + VERSION="v0.5.1" ARCHIVE="nph-linux_x64.tar.gz" curl -L "https://github.com/arnetheduck/nph/releases/download/${VERSION}/${ARCHIVE}" -o ${ARCHIVE} tar -xzf ${ARCHIVE} diff --git a/nimbus_verified_proxy/nimbus_verified_proxy.nim b/nimbus_verified_proxy/nimbus_verified_proxy.nim index d6048491a..6e67bbb73 100644 --- a/nimbus_verified_proxy/nimbus_verified_proxy.nim +++ b/nimbus_verified_proxy/nimbus_verified_proxy.nim @@ -97,10 +97,9 @@ proc run*( raiseAssert "Invalid baked-in state: " & err.msg genesisTime = getStateField(genesisState[], genesis_time) - beaconClock = - BeaconClock.init(genesisTime).valueOr: - error "Invalid genesis time in state", genesisTime - quit QuitFailure + beaconClock = BeaconClock.init(genesisTime).valueOr: + error "Invalid genesis time in state", genesisTime + quit QuitFailure getBeaconTime = beaconClock.getBeaconTimeFn() @@ -150,7 +149,7 @@ proc run*( lightClient = createLightClient( network, rng, lcConfig, cfg, forkDigests, getBeaconTime, genesis_validators_root, - LightClientFinalizationMode.Optimistic + LightClientFinalizationMode.Optimistic, ) verifiedProxy.installEthApiHandlers() @@ -243,7 +242,7 @@ proc run*( targetGossipState = getTargetGossipState( slot.epoch, cfg.ALTAIR_FORK_EPOCH, cfg.BELLATRIX_FORK_EPOCH, - cfg.CAPELLA_FORK_EPOCH, cfg.DENEB_FORK_EPOCH, isBehind + cfg.CAPELLA_FORK_EPOCH, cfg.DENEB_FORK_EPOCH, isBehind, ) template currentGossipState(): auto = diff --git a/nimbus_verified_proxy/rpc/rpc_eth_api.nim b/nimbus_verified_proxy/rpc/rpc_eth_api.nim index d8f7d5b52..47a5880a1 100644 --- a/nimbus_verified_proxy/rpc/rpc_eth_api.nim +++ b/nimbus_verified_proxy/rpc/rpc_eth_api.nim @@ -124,7 +124,7 @@ proc installEthApiHandlers*(lcProxy: VerifiedRpcProxy) = let accountResult = getAccountFromProof( executionPayload.stateRoot, proof.address, proof.balance, proof.nonce, - proof.codeHash, proof.storageHash, proof.accountProof + proof.codeHash, proof.storageHash, proof.accountProof, ) if accountResult.isOk(): @@ -165,7 +165,7 @@ proc installEthApiHandlers*(lcProxy: VerifiedRpcProxy) = let accountResult = getAccountFromProof( executionPayload.stateRoot, proof.address, proof.balance, proof.nonce, - proof.codeHash, proof.storageHash, proof.accountProof + proof.codeHash, proof.storageHash, proof.accountProof, ) if accountResult.isOk(): @@ -184,7 +184,7 @@ proc installEthApiHandlers*(lcProxy: VerifiedRpcProxy) = proof = await lcProxy.rpcClient.eth_getProof(address, @[], blockId(blockNumber)) accountResult = getAccountFromProof( executionPayload.stateRoot, proof.address, proof.balance, proof.nonce, - proof.codeHash, proof.storageHash, proof.accountProof + proof.codeHash, proof.storageHash, proof.accountProof, ) if accountResult.isErr(): diff --git a/nimbus_verified_proxy/tests/test_proof_validation.nim b/nimbus_verified_proxy/tests/test_proof_validation.nim index 108616fe1..3cfcea372 100644 --- a/nimbus_verified_proxy/tests/test_proof_validation.nim +++ b/nimbus_verified_proxy/tests/test_proof_validation.nim @@ -65,7 +65,7 @@ suite "Merkle proof of inclusion validation": hexToSeqByte( "0xf8749e2070b0cf62febcfb17abd5e2189b6e0029e0f9b9a1aabf0e670469d6ab74b853f8518301175e8a3d25780abb5f0a89b7daa056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" ) - ) + ), ] check: @@ -117,7 +117,7 @@ suite "Merkle proof of inclusion validation": hexToSeqByte( "0xf8679e20da5951bceaed385c03546f45f276b83d86bc0755e045f92f1d9071f431b846f8440180a07bb85da974b0ee4efcb379f528bcf7e947a55901d5a2c0d38bc9cc16c851e785a03b45ab254ec24f2bcb75a922f15031796bc433ea5a4514783705d185321e5f82" ) - ) + ), ], balance: UInt256.fromHex("0x0"), codeHash: FixedBytes[32].fromHex( @@ -143,7 +143,7 @@ suite "Merkle proof of inclusion validation": hexToSeqByte( "0xf7a0390decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563959425a92a5853702f199bb2d805bba05d67025214a8" ) - ) + ), ], ) ], diff --git a/nimbus_verified_proxy/validate_proof.nim b/nimbus_verified_proxy/validate_proof.nim index 1ad190bd7..fd5aec260 100644 --- a/nimbus_verified_proxy/validate_proof.nim +++ b/nimbus_verified_proxy/validate_proof.nim @@ -97,7 +97,7 @@ proc getStorageData*( let account = ?getAccountFromProof( stateRoot, proof.address, proof.balance, proof.nonce, proof.codeHash, - proof.storageHash, proof.accountProof + proof.storageHash, proof.accountProof, ) if account.storageRoot == etypes.EMPTY_ROOT_HASH: