Compare commits

...

3 Commits

5 changed files with 28 additions and 19 deletions

View File

@ -1,3 +1,10 @@
# [0.1.0-develop.47](https://git.lumeweb.com/LumeWeb/libethsync/compare/v0.1.0-develop.46...v0.1.0-develop.47) (2023-07-24)
### Bug Fixes
* incorporate upstream https://github.com/lightclients/patronum/pull/23 ([8b7c85d](https://git.lumeweb.com/LumeWeb/libethsync/commit/8b7c85dd61c585d96e711deca5d0e014a5aa1d12))
# [0.1.0-develop.46](https://git.lumeweb.com/LumeWeb/libethsync/compare/v0.1.0-develop.45...v0.1.0-develop.46) (2023-07-23)

16
npm-shrinkwrap.json generated
View File

@ -1,24 +1,24 @@
{
"name": "@lumeweb/libethsync",
"version": "0.1.0-develop.46",
"version": "0.1.0-develop.47",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/libethsync",
"version": "0.1.0-develop.46",
"version": "0.1.0-develop.47",
"dependencies": {
"@chainsafe/as-sha256": "^0.3.1",
"@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",

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/libethsync",
"version": "0.1.0-develop.46",
"version": "0.1.0-develop.47",
"type": "module",
"repository": {
"type": "git",
@ -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",

View File

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

View File

@ -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;
}