-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Common method deprecations (new) #1698
Conversation
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
to nextHardforkBlockBN()
4e4615a
to
0767936
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Scotty,
thanks a lot, this looks fantastic 👍, super clean and great to review.
We still need the final renaming here, so e.g. nextHardforkBlockBN
-> nextHardforkBlock
, but I guess this can be addressed in a follow-up PR.
Will approve and merge.
* common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates
* common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates
* common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates
* common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates
* common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates
author acolytec3 <17355484+acolytec3@users.noreply.github.com> 1648139433 -0400 committer Gabriel Rocheleau <contact@rockwaterweb.com> 1648407705 -0400 Revert process code changes Common: method deprecations (new) (#1698) * common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates Common: Rename *BN methods to non-BN names (#1709) * common: rename nextHardforkBlockBN() to nextHardforkBlock() * common/tests: rename nextHardforkBlockBN() to nextHardforkBlock() * client: rename common.nextHardforkBlockBN() to common.nextHardforkBlock() * devp2p: rename common.nextHardforkBlockBN() to common.nextHardforkBlock() * common: rename hardforkBlockBN() to hardforkBlock() * common/tests: rename common.hardforkBlockBN() to common.hardforkBlock() * block: rename common.hardforkBlockBN() to common.hardforkBlock() * client: rename common.hardforkBlockBN() to common.hardforkBlock() * blockchain: rename common.hardforkBlockBN() to common.hardforkBlock() * devp2p: rename common.hardforkBlockBN() to common.hardforkBlock() * vm: rename common.hardforkBlockBN() to common.hardforkBlock() * common: rename chainIdBN() to chainId() * common/tests: rename common.chainIdBN() to common.chainId() * client: rename common.chainIdBN() to common.chainId() * blockchain: rename common.chainIdBN() to common.chainId() * devp2p: rename common.chainIdBN() to common.chainId() * tx: rename common.chainIdBN() to common.chainId() * vm: rename common.chainIdBN() to common.chainId() * common: rename networkIdBN() to networkId() * common/test: rename common.networkIdBN() to common.networkId() * client: rename common.networkIdBN() to common.networkId() * block: rename common.networkIdBN() to common.networkId() VM: Replace BN.js with bigints, Util helpers (#1671) * Replace BN.js with bigints in VM * Fix byteLength computation in EXP handler * Fix toTwos helper * Compute TWO_POWE256 using math instead of hex * Update packages/util/src/constants.ts Co-authored-by: Ryan Ghods <ryan@ryanio.com> * Remove unused variable * Fix exponent byte length calc * Fix exp overflow * Fix precompile bigint conversions * Fix more bigint conversions * Fix EXP opcode handler * Fix logic bug in signextend * vm/gas: fix EXTCODECOPY gas * vm/gas: fix sha256 gas * vm/gas: sha256 const -> let * vm: lint * vm/logic: fix sdiv/smod and fromTwos/toTwos * vm/logic: fix SIGNEXTEND * vm/logic: fix CALLDATALOAD padding * vm/logic: remove weird comment * Fix SAR opcode handler * Use bufferToBigInt in Push opcode handler * use bufferToBigInt everywhere * Fix missing bufferToBigInt import * Check for edge case in expmod * Ignore prettier * Update browser tsconfig to es2020 lib * Remove dup ES2020 targets * attempt to dedupe "target" and "lib" tsconfig values * Update karma config to target es2020 in parser * Various test fixes * Lint and BN fixes * Add bigint helpers to util * lint fixes * various bigint helper additions * Lint fixes * Fix bnToBigInt * Lint/test fixes * Switch Xn to BigInt(X) * lint * lint * More Xn to BigInt(X) moves Co-authored-by: Ryan Ghods <ryan@ryanio.com> Co-authored-by: Jochem Brouwer <jochem.brouwer@nslogin.nl> Co-authored-by: Jochem Brouwer <jochembrouwer96@gmail.com> monorepo: develop rebase 2022-02-23 fixes Develop Rebase Fixes (2022-03-05) Convert bn to bigint (#1771) * util: use bigints. Expose new secp constants * common: use bigints * tx: use bigints * lint: fix util, tx, common * tx: fix isSigned * update comment block style to be picked up by vscode * remove doc typo (extra `) * tx: add isSigned() tests to base.spec.ts to iterate across txTypes * block: bn to bigint changes wip block: finish header changes block: test updates block: test fixes Partial difficulty fixes * block: fix homestead difficulty * block: fix >= Byzantium difficulty * BigInt conversion fixes * block: update st.ok to st.equals * Update readme to use bigints * ethash: bn to bigint * blockchain: wip bn to bigint changes * devp2p: bn to bigint * vm: wip remaining bn -> bigint * vm: more test fixes * fix runTx negative value args test, ensure balance does not go negative when using skipBalance * vm: lint:fix * re-add newline * Blockchain: small rebase fix * vm: Fix API tests * client: bn to bigint updates in source * client: various fixes * client: last fixes * client: integration test fixes * replace st.ok usage with st.equal * normalize st.equals to st.equal * update toType cases * nits, lint * fix vm benchmarks * client: fix fullEthereumService tests * touch ups, fix miner integration test * use prefix increment * client: fix full sync test * test fixes * Fix reorg logic bug * bnTo... function renaming and cleanup * Goodbye bn.js * reverse changelog changes * nits * remove more BN, more nits * turn off restrict-plus-operands and remove disable overrides (does not work properly) * more nits, update package-lock * fix build errors, re-add @types/bn.js for rlp v2 export to fix build (will be removed in subsequent PR for rlp) * replace miller-rabin (bn.js) with bigint-crypto-utils isProbablyPrime * more nits / fixes * Fix misplaced paren * Fix miner test * more nits * fix buffer to big int * set expectedTests back to >= comparison * last fixes * Removed re-introduced Common methods Co-authored-by: Paul Miller <paul@paulmillr.com> Co-authored-by: Ryan Ghods <ryan@ryanio.com> Co-authored-by: acolytec3 <17355484+acolytec3@users.noreply.github.com> Co-authored-by: Jochem Brouwer <jochembrouwer96@gmail.com>
* common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates
* common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates
* common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates
* common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates
* common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates
* common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates
* common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates
* common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates
* common: delete deprecated hardforkBlock method * common: adapt tests to use hardforkBlockBN * common: delete deprecated nextHardforkBlock method * common/tests: rename nextHardforkBlock() calls to nextHardforkBlockBN() * common: adapt tests to use BN.eqn(number) * common: delete deprecated networkId() method * common: delete tests for networkId() * common: delete deprecated chainId() method * common: delete tests for .chainId() * delete deprecated forCustomChain meethod * common: delete forCustomChain() test * blockchain: switch forCustomChain to Common.custom * client: switch fromCustomChain to Common.custom * tx: switch forCustomChain to Common.custom * VM: switch forCustomChain to Common.custom * common: internalize _getInitializedChains() method * common: delete deprecaed chains/index.ts file * client: switch to Common._getInitializedChains * common: remove genesisStates/index.ts * common: remove test for genesisStates
#1633