You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,11 @@
2
2
3
3
A library to turn an unreliable remote source of Ethereum blocks into a reliable stream of blocks. Handles block and log removals on chain reorganization and block and log backfills on skipped blocks.
4
4
5
+
# Requirements for supported Ethereum node
6
+
Blockstream requires support for [EIP-234](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-234.md) in the configured Ethereum node. EIP-234 was merged Jul 28, 2018 and implemented in Geth and Parity shortly after. Versions that provide the needed functionality:
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "ethereumjs-blockstream",
3
-
"version": "5.0.0",
3
+
"version": "6.0.1",
4
4
"description": "A library to turn an unreliable remote source of Ethereum blocks into a reliable stream of blocks with removals on re-orgs and backfills on skips.",
if(headBlockNumber>newLogBlockNumber)thrownewError(`received log for a block (${newLogBlockNumber}) older than current head log's block (${headBlockNumber})`);
59
58
if(headBlockNumber!==newLogBlockNumber)return;
60
-
constheadLogIndex=parseInt(headLog.logIndex,16);
61
-
constnewLogIndex=parseInt(newLog.logIndex,16);
59
+
constheadLogIndex=parseHexInt(headLog.logIndex);
60
+
constnewLogIndex=parseHexInt(newLog.logIndex);
62
61
if(headLogIndex>=newLogIndex)thrownewError(`received log with same block number (${newLogBlockNumber}) but index (${newLogIndex}) is the same or older than previous index (${headLogIndex})`);
// FIXME: This technique for verifying we got the right logs will not work if there were no logs present in the block! This means it is possible to miss logs. Can be fixed once https://eips.ethereum.org/EIPS/eip-234 is implemented
67
-
logs.forEach(log=>{
68
-
if(log.blockHash!==block.hash)thrownewError(`Received log for block hash ${log.blockHash} when asking for logs of block ${block.hash}.`);
0 commit comments