Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.

Updating ethereum version from fork #68

Merged
merged 17 commits into from
Jul 11, 2019
Merged

Conversation

austinabell
Copy link

Previously used a fork of Ethereum as the version of the evm, and this updates the evm to v1.8.27 and does not require using a fork.

Caveats include using a relative version of cosmos-sdk where I had fixed their replace directive to allow the evm to use golang.org/x/crypto instead of having to replace it in this directory. Also I have more or less duplicated partial logic for applyDAOHardFork and applyDAOHardFork as the types that are used in the functions currently were not possible to just use the overridden StateDB interface, but I will look into removing either or both.

To note, I had updated the go-ethereum version to the current master branch in commit ChainSafe@ef38c33 which I had to revert back to the release version, but if we want to update to the next release, I can refer to these changes to reapply the updates.

local version of the cosmos sdk is https://github.com/ChainSafe/cosmos-sdk (I just committed to master branch) which has a PR in but am waiting on that PR to pass to replace relative dependency with that update before merging this in, but all tests pass with a local version (ignore CI, I'm not updating to pull the fork to get it to pass temporarily).

@austinabell austinabell marked this pull request as ready for review July 9, 2019 22:27
@austinabell austinabell requested a review from ansermino July 9, 2019 22:27
@austinabell
Copy link
Author

Good timing on the 1.9 release: https://blog.ethereum.org/2019/07/10/geth-v1-9-0/

🎉

Reverts the reverting functionality from commit ChainSafe@3eae07c in PR 😂

// ApplyDAOHardFork modifies the state database according to the DAO hard-fork
// rules, transferring all balances of a set of DAO accounts to a single refund
// contract.
func applyDAOHardFork(statedb *evmtypes.CommitStateDB) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is from the geth codebase lets add a reference. This is a link set to the 1.9 commit so it won't change: https://github.com/ethereum/go-ethereum/blob/52f2461774bcb8cdd310f86b4bc501df5b783852/consensus/misc/dao.go#L74

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably also worth mentioning why we had to copy it

// for the transaction, gas used and an error if the transaction failed,
// indicating the block was invalid.
func applyTransaction(config *ethparams.ChainConfig, bc ethcore.ChainContext, author *ethcmn.Address, gp *ethcore.GasPool, statedb *evmtypes.CommitStateDB, header *ethtypes.Header, tx *ethtypes.Transaction, usedGas *uint64, cfg ethvm.Config) (*ethtypes.Receipt, uint64, error) {
msg, err := tx.AsMessage(ethtypes.MakeSigner(config, header.Number))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@austinabell austinabell merged commit 9803c1b into development Jul 11, 2019
@austinabell austinabell deleted the austin/ethdepupdate branch July 11, 2019 18:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants