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

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