Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

Explicitly initialize Common instances with chainstart HF #113

Merged
merged 2 commits into from
Jun 2, 2020

Conversation

holgerd77
Copy link
Member

Fixes ethereumjs/ethereumjs-monorepo#757

This was triggered (repeatedly) during block synchronization:

INFO [05-28|17:50:53] Imported blocks count=256 number=45441 hash=97e6df8e... peers=2
INFO [05-28|17:50:53] Imported blocks count=128 number=45697 hash=cec4ec8f... peers=2
INFO [05-28|17:50:54] Imported blocks count=128 number=45825 hash=b48ff3a6... peers=2
INFO [05-28|17:50:54] Imported blocks count=128 number=45953 hash=09765b76... peers=2
ERROR [05-28|17:50:55] Error: Method called with neither a hardfork set nor provided by param
    at Common._chooseHardfork (/ethereumjs-client/node_modules/ethereumjs-common/dist/index.js:114:23)
    at Common.hardforkGteHardfork (/ethereumjs-client/node_modules/ethereumjs-common/dist/index.js:228:26)
    at Common.gteHardfork (/ethereumjs-client/node_modules/ethereumjs-common/dist/index.js:255:21)
    at Transaction._validateV (/ethereumjs-client/node_modules/ethereumjs-tx/dist/transaction.js:301:27)
    at new Transaction (/ethereumjs-client/node_modules/ethereumjs-tx/dist/transaction.js:138:14)
    at new module.exports (/ethereumjs-client/node_modules/ethereumjs-block/index.js:75:14)
    at /ethereumjs-client/lib/blockchain/chain.js:208:30
    at Array.map (<anonymous>)
    at Chain.putBlocks (/ethereumjs-client/lib/blockchain/chain.js:208:21)
    at BlockFetcher.store (/ethereumjs-client/lib/sync/fetcher/blockfetcher.js:89:22)

@coveralls
Copy link

coveralls commented May 29, 2020

Coverage Status

Coverage remained the same at 92.672% when pulling 08f212c on fix-undefined-transaction-state-on-block-addition into 22a72f4 on master.

@holgerd77 holgerd77 requested a review from cgewecke June 1, 2020 08:47
@holgerd77 holgerd77 mentioned this pull request Jun 1, 2020
10 tasks
@holgerd77
Copy link
Member Author

Will make an exception here and do an admin merge, since this is currently blocking further work on the library and I think in this get-things-going period this should hopefully be acceptable, will eventually also do on selected other PRs during the week. Better to have a review though of course.

@holgerd77 holgerd77 merged commit 2d86f29 into master Jun 2, 2020
@holgerd77 holgerd77 deleted the fix-undefined-transaction-state-on-block-addition branch June 2, 2020 07:26
@evertonfraga
Copy link
Contributor

Consider it late-reviewed 😉

@holgerd77 holgerd77 mentioned this pull request Jun 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tx initialization on the block library crashes on initialization with only chain set on Common
3 participants