ChainSafe / lodestar

🌟 TypeScript Implementation of Ethereum Consensus
https://lodestar.chainsafe.io
Apache License 2.0
1.18k stars 290 forks source link

[META] Startup Bug Tracking #200

Closed GregTheGreek closed 5 years ago

GregTheGreek commented 5 years ago

Current branch: greg/expirement/start-beacon-chain

I've begun to spin up lodestar with deposits, and tracking how the process of processing blocks. I'll be using this thread to document the issues I find along the way. Expect this thread to update frequently.

List of bugs

Detailed Bugs

Deposit

ETH1 Validator Deposit balance

Beacon --db flag

Total Deposits

GregTheGreek commented 5 years ago

Found another bug, running the same config as above.

It seems that validator deposits are returning 0 from the ETH1 contract

GregTheGreek commented 5 years ago

EFFECTIVE_BALANCE_INCREMENT needs to be a Big number due BN.js issues when modding a number

GregTheGreek commented 5 years ago

Bug found with G2 Point in BLS-JS

(node:83779) UnhandledPromiseRejectionWarning: Error: The serialised input does not have the C flag set.
    at Function.fromCompressedBytes (/Users/gregmarkou/Jobs/code/github.com/ChainSafe/lodestar/node_modules/@chainsafe/bls-js/lib/helpers/g2point.js:126:15)
    at Function.fromCompressedBytes (/Users/gregmarkou/Jobs/code/github.com/ChainSafe/lodestar/node_modules/@chainsafe/bls-js/lib/signature.js:54:45)
    at Object.verify (/Users/gregmarkou/Jobs/code/github.com/ChainSafe/lodestar/node_modules/@chainsafe/bls-js/lib/index.js:95:34)
    at verify (/Users/gregmarkou/Jobs/code/github.com/ChainSafe/lodestar/src/chain/stateTransition/block/deposits.ts:65:14)
    at /Users/gregmarkou/Jobs/code/github.com/ChainSafe/lodestar/src/chain/genesis.ts:118:5

@mpetrunic

mpetrunic commented 5 years ago

Probably empty signatures, but true, verify method should catch invali signature and return false, will fix :)

GregTheGreek commented 5 years ago

Our deposit contract is out of date which was causing issues

GregTheGreek commented 5 years ago

Logs out of order:

Chain initialized. happened before all the deposits occured

2019-05-24 14:21:10 info: Setting up configurations...
2019-05-24 14:21:10 info: Starting eth2 beacon node - LODESTAR!
2019-05-24 14:21:10 info: Connected to LevelDB database at test-db
2019-05-24 14:21:10 info: Started listening on eth1 events on chain 1558722058821
2019-05-24 14:21:10 info: Listening for ETH2 genesis event...
2019-05-24 14:21:27 info: Received Eth2Genesis event. blockNumber=11, time=1558828800
2019-05-24 14:21:27 info: Initializing beacon chain...
2019-05-24 14:21:28 info: Received validator deposit event index=0
2019-05-24 14:21:28 info: Chain initialized.
2019-05-24 14:21:28 info: Received validator deposit event index=1
2019-05-24 14:21:28 info: Received validator deposit event index=2
2019-05-24 14:21:28 info: Received validator deposit event index=3
2019-05-24 14:21:29 info: Received validator deposit event index=4
2019-05-24 14:21:29 info: Received validator deposit event index=5
2019-05-24 14:21:29 info: Received validator deposit event index=6
2019-05-24 14:21:29 info: Received validator deposit event index=7
2019-05-24 14:21:29 info: Received validator deposit event index=8
2019-05-24 14:21:29 info: Received validator deposit event index=9
mpetrunic commented 5 years ago

Logs out of order:

I thinks this is just because ganache is too fast and log processing takes longer than emitting genesis event. Won't happen with real network (except for deposit that triggered genesis maybe)

GregTheGreek commented 5 years ago

Closing as this is out of date