reverts 91144cb5a2
This commit is contained in:
Derrick Hammer 2023-07-24 10:44:25 -04:00
parent a7f556f998
commit 8b7c85dd61
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
4 changed files with 18 additions and 16 deletions

12
npm-shrinkwrap.json generated
View File

@ -12,13 +12,13 @@
"@chainsafe/bls": "7.1.1", "@chainsafe/bls": "7.1.1",
"@chainsafe/blst": "0.2.9", "@chainsafe/blst": "0.2.9",
"@chainsafe/ssz": "0.11.1", "@chainsafe/ssz": "0.11.1",
"@ethereumjs/block": "4.3.0", "@ethereumjs/block": "^4.3.0",
"@ethereumjs/blockchain": "6.3.0", "@ethereumjs/blockchain": "^6.3.0",
"@ethereumjs/common": "^3.2.0", "@ethereumjs/common": "^3.2.0",
"@ethereumjs/trie": "5.1.0", "@ethereumjs/trie": "^5.1.0",
"@ethereumjs/tx": "4.2.0", "@ethereumjs/tx": "^4.2.0",
"@ethereumjs/util": "8.1.0", "@ethereumjs/util": "^8.1.0",
"@ethereumjs/vm": "6.5.0", "@ethereumjs/vm": "^6.5.0",
"@lodestar/config": "1.9.1", "@lodestar/config": "1.9.1",
"@lodestar/light-client": "1.9.1", "@lodestar/light-client": "1.9.1",
"@lodestar/params": "1.9.1", "@lodestar/params": "1.9.1",

View File

@ -31,13 +31,13 @@
"@chainsafe/bls": "7.1.1", "@chainsafe/bls": "7.1.1",
"@chainsafe/blst": "0.2.9", "@chainsafe/blst": "0.2.9",
"@chainsafe/ssz": "0.11.1", "@chainsafe/ssz": "0.11.1",
"@ethereumjs/block": "4.3.0", "@ethereumjs/block": "^4.3.0",
"@ethereumjs/blockchain": "6.3.0", "@ethereumjs/blockchain": "^6.3.0",
"@ethereumjs/common": "^3.2.0", "@ethereumjs/common": "^3.2.0",
"@ethereumjs/trie": "5.1.0", "@ethereumjs/trie": "^5.1.0",
"@ethereumjs/tx": "4.2.0", "@ethereumjs/tx": "^4.2.0",
"@ethereumjs/util": "8.1.0", "@ethereumjs/util": "^8.1.0",
"@ethereumjs/vm": "6.5.0", "@ethereumjs/vm": "^6.5.0",
"@lodestar/config": "1.9.1", "@lodestar/config": "1.9.1",
"@lodestar/light-client": "1.9.1", "@lodestar/light-client": "1.9.1",
"@lodestar/params": "1.9.1", "@lodestar/params": "1.9.1",

View File

@ -34,6 +34,7 @@ export function headerDataFromWeb3Response(blockInfo: any): HeaderData {
baseFeePerGas: blockInfo.baseFeePerGas baseFeePerGas: blockInfo.baseFeePerGas
? BigInt(blockInfo.baseFeePerGas) ? BigInt(blockInfo.baseFeePerGas)
: undefined, : undefined,
withdrawalsRoot: blockInfo.withdrawalsRoot,
}; };
} }

View File

@ -3,7 +3,7 @@ import { IVerifyingProvider } from "#interfaces.js";
import _ from "lodash"; import _ from "lodash";
import { Trie } from "@ethereumjs/trie"; import { Trie } from "@ethereumjs/trie";
import rlp from "rlp"; import rlp from "rlp";
import { Chain, Common } from "@ethereumjs/common"; import { Common, Chain, Hardfork } from "@ethereumjs/common";
import { import {
Account, Account,
Address, Address,
@ -84,6 +84,7 @@ export default class VerifyingProvider implements IClientVerifyingProvider {
) { ) {
this.common = new Common({ this.common = new Common({
chain, chain,
hardfork: chain === Chain.Mainnet ? Hardfork.Shanghai : undefined,
}); });
const _blockNumber = BigInt(blockNumber); const _blockNumber = BigInt(blockNumber);
this.latestBlockNumber = blockNumber; this.latestBlockNumber = blockNumber;
@ -576,12 +577,12 @@ export default class VerifyingProvider implements IClientVerifyingProvider {
} }
const headerData = headerDataFromWeb3Response(blockInfo); const headerData = headerDataFromWeb3Response(blockInfo);
const header = BlockHeader.fromHeaderData(headerData); const header = new BlockHeader(headerData, { common: this.common });
if (!header.hash().equals(toBuffer(blockHash))) { if (!header.hash().equals(toBuffer(blockHash))) {
/* throw new Error( throw new Error(
`blockhash doesn't match the blockInfo provided by the RPC`, `blockhash doesn't match the blockInfo provided by the RPC`,
);*/ );
} }
this.blockHeaders[blockHash] = header; this.blockHeaders[blockHash] = header;
} }