fix: incorporate upstream https://github.com/lightclients/patronum/pull/23
reverts 91144cb5a2
This commit is contained in:
parent
a7f556f998
commit
8b7c85dd61
|
@ -12,13 +12,13 @@
|
|||
"@chainsafe/bls": "7.1.1",
|
||||
"@chainsafe/blst": "0.2.9",
|
||||
"@chainsafe/ssz": "0.11.1",
|
||||
"@ethereumjs/block": "4.3.0",
|
||||
"@ethereumjs/blockchain": "6.3.0",
|
||||
"@ethereumjs/block": "^4.3.0",
|
||||
"@ethereumjs/blockchain": "^6.3.0",
|
||||
"@ethereumjs/common": "^3.2.0",
|
||||
"@ethereumjs/trie": "5.1.0",
|
||||
"@ethereumjs/tx": "4.2.0",
|
||||
"@ethereumjs/util": "8.1.0",
|
||||
"@ethereumjs/vm": "6.5.0",
|
||||
"@ethereumjs/trie": "^5.1.0",
|
||||
"@ethereumjs/tx": "^4.2.0",
|
||||
"@ethereumjs/util": "^8.1.0",
|
||||
"@ethereumjs/vm": "^6.5.0",
|
||||
"@lodestar/config": "1.9.1",
|
||||
"@lodestar/light-client": "1.9.1",
|
||||
"@lodestar/params": "1.9.1",
|
||||
|
|
12
package.json
12
package.json
|
@ -31,13 +31,13 @@
|
|||
"@chainsafe/bls": "7.1.1",
|
||||
"@chainsafe/blst": "0.2.9",
|
||||
"@chainsafe/ssz": "0.11.1",
|
||||
"@ethereumjs/block": "4.3.0",
|
||||
"@ethereumjs/blockchain": "6.3.0",
|
||||
"@ethereumjs/block": "^4.3.0",
|
||||
"@ethereumjs/blockchain": "^6.3.0",
|
||||
"@ethereumjs/common": "^3.2.0",
|
||||
"@ethereumjs/trie": "5.1.0",
|
||||
"@ethereumjs/tx": "4.2.0",
|
||||
"@ethereumjs/util": "8.1.0",
|
||||
"@ethereumjs/vm": "6.5.0",
|
||||
"@ethereumjs/trie": "^5.1.0",
|
||||
"@ethereumjs/tx": "^4.2.0",
|
||||
"@ethereumjs/util": "^8.1.0",
|
||||
"@ethereumjs/vm": "^6.5.0",
|
||||
"@lodestar/config": "1.9.1",
|
||||
"@lodestar/light-client": "1.9.1",
|
||||
"@lodestar/params": "1.9.1",
|
||||
|
|
|
@ -34,6 +34,7 @@ export function headerDataFromWeb3Response(blockInfo: any): HeaderData {
|
|||
baseFeePerGas: blockInfo.baseFeePerGas
|
||||
? BigInt(blockInfo.baseFeePerGas)
|
||||
: undefined,
|
||||
withdrawalsRoot: blockInfo.withdrawalsRoot,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import { IVerifyingProvider } from "#interfaces.js";
|
|||
import _ from "lodash";
|
||||
import { Trie } from "@ethereumjs/trie";
|
||||
import rlp from "rlp";
|
||||
import { Chain, Common } from "@ethereumjs/common";
|
||||
import { Common, Chain, Hardfork } from "@ethereumjs/common";
|
||||
import {
|
||||
Account,
|
||||
Address,
|
||||
|
@ -84,6 +84,7 @@ export default class VerifyingProvider implements IClientVerifyingProvider {
|
|||
) {
|
||||
this.common = new Common({
|
||||
chain,
|
||||
hardfork: chain === Chain.Mainnet ? Hardfork.Shanghai : undefined,
|
||||
});
|
||||
const _blockNumber = BigInt(blockNumber);
|
||||
this.latestBlockNumber = blockNumber;
|
||||
|
@ -576,12 +577,12 @@ export default class VerifyingProvider implements IClientVerifyingProvider {
|
|||
}
|
||||
|
||||
const headerData = headerDataFromWeb3Response(blockInfo);
|
||||
const header = BlockHeader.fromHeaderData(headerData);
|
||||
const header = new BlockHeader(headerData, { common: this.common });
|
||||
|
||||
if (!header.hash().equals(toBuffer(blockHash))) {
|
||||
/* throw new Error(
|
||||
throw new Error(
|
||||
`blockhash doesn't match the blockInfo provided by the RPC`,
|
||||
);*/
|
||||
);
|
||||
}
|
||||
this.blockHeaders[blockHash] = header;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue