Skip to content
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

util: deprecation tasks (object.ts, bnToRlp) #1767

Closed
wants to merge 16 commits into from
Closed

Conversation

ScottyPoi
Copy link
Contributor

@ScottyPoi ScottyPoi commented Mar 7, 2022

#1745

Executes on 2 Util package deprecations.

  1. Deletes object.ts
  2. Deletes object.spec.ts
  3. Removes deprecated bnToRlp() method from util/src/types.ts

jochem-brouwer and others added 15 commits February 23, 2022 11:55
* vm: add codeHash db prefix to stateManager

* vm: tests: make tests use StateManager instead of trie at utilization
vm: tests: remove now passing test from skipTests

* vm: fix tests / fix runBlock/runBlockchain tests

* vm: tests: fix cleaning up untouched accounts in tests

* vm -> StateManager: added comment on CODEHASH_PREFIX

Co-authored-by: holgerd77 <Holger.Drewes@gmail.com>
Co-authored-by: steveluscher <github@steveluscher.com>
…orks to VM (#1649)

* common: remove onlySupported and onlyActive hf options

* vm: move supportedHardforks option from common

* common: remove supportedHardforks option

* common: update README for supportedHardforks removal

* vm: update README for supportedHardforks addition

* common: cleanup in src/index.ts

* vm: refactor supportedHardforks per PR feedback

* common: remove _chooseHardfork method per PR feedback

* vm: updated README per PR feedback

* vm: supportedHardforks local variable, switch to enum
* 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 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()
* 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>
* Tx: Remove baseTransaction.transactionType

* tx: remove get senderR()

* tx: remove test for senderR()

* tx: remove senderS()

* tx: remove test for senderS()

* tx: remove yParity / replace with v

* tx: remove test for yParity()

* Tx: remove fromRlpSerializedTx()

* Tx: remove test for fromRlpSerializedTx()

* Tx: remove _unsignedTxImplementsEIP155

* Tx: Remove _signedTxImplementsEIP155()

* Tx: Remove TransactionFactory.getTransactionClass

* Tx: Remove test for .getTransactionClass()
* common: set default hardfork to london

* vm: set default hardfork to london

* vm: update tests after default hardfork change

* vm: update default hardfork in tester config

* block: update default hardfork and fix tests

* blockchain: fix tests for london as default hardfork

* tx: set default hardfork to london

* block: fix for uncles at hardfork transition test

* blockchain: fix for hardfork in reorg test

* ethash: fix ethash tests for default hardfork change

* tx: remove README section about hardforks

* client: fix client tests for default hardfork change

* block: rename testdata files for pre-london

* blockchain: rename testdata files for pre-london

* vm: fix examples for London hardfork change

Co-authored-by: Emerson Macro <emersonmacro@gmail.com>
* common: rename hardforkIsActiveOnChain to isIncludedHardfork

* common: remove activeHardfork and activeHardforks

* common: adapt _getHardfork, remove isIncludedHardfork

* common: type fixes in forkHash
* add modifyAccountFields method and tests
* use new method in eei
* update usage in various tests
@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #1767 (fddf718) into develop (3619d7b) will decrease coverage by 0.10%.
The diff coverage is n/a.

Impacted file tree graph

Flag Coverage Δ
block 85.44% <ø> (ø)
blockchain 83.55% <ø> (ø)
common 94.59% <ø> (ø)
devp2p 82.63% <ø> (-0.40%) ⬇️
ethash 90.76% <ø> (ø)
trie 86.53% <ø> (ø)
tx 93.53% <ø> (ø)
util 89.85% <ø> (-0.07%) ⬇️
vm 81.74% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@ryanio ryanio changed the title Util dep tasks util: deprecation tasks (object.ts, bnToRlp) Mar 7, 2022
@ScottyPoi
Copy link
Contributor Author

I don't think the client test fail has anything to do with these changes.

@ryanio
Copy link
Contributor

ryanio commented Mar 7, 2022

I don't think the client test fail has anything to do with these changes.

it doesn't, i have a pending PR to fix on develop

@holgerd77
Copy link
Member

Ok, thanks, let's wait with merging this as well until #1771 is merged into develop.

@holgerd77
Copy link
Member

This would need a PR resubmission only taking in the added commits, now that #1771 has been merged.

@acolytec3 acolytec3 mentioned this pull request Mar 23, 2022
@holgerd77
Copy link
Member

Continued in #1809 will close.

@holgerd77 holgerd77 closed this Mar 23, 2022
@holgerd77 holgerd77 deleted the util-dep-tasks branch June 30, 2022 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants