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

Implement EIP-2124 #11456

Merged
merged 9 commits into from
Feb 6, 2020
Merged

Implement EIP-2124 #11456

merged 9 commits into from
Feb 6, 2020

Conversation

vorot93
Copy link

@vorot93 vorot93 commented Feb 5, 2020

Closes #11116

@parity-cla-bot
Copy link

It looks like @vorot93 signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

Copy link
Collaborator

@ordian ordian left a comment

Choose a reason for hiding this comment

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

This looks like a great start!

The thing I'm not sure about is where it should live in a separate crate or be part of util/network-devp2p.
We also want to add integration with config like this https://github.com/ethereum/go-ethereum/blob/976a0f5558e20ed7cb7ba2cd68d7429d1ef01db9/core/forkid/forkid.go#L205 so we can use the test cases from https://eips.ethereum.org/EIPS/eip-2124.

util/EIP-2124/src/lib.rs Outdated Show resolved Hide resolved
util/EIP-2124/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

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

A few comments, looks good.

As for @ordian's question if this merits its own crate or not, I guess it depends a bit on what the rest of the code turns out to be. I'm not against mini-crates, but maybe it's just easier to keep this with the rest of the networking code. If your plan is to continue with the rest of the implementation in this PR then I guess it'll pan out where it should live as work continues?

@@ -135,4 +135,5 @@ members = [
"chainspec",
"ethcore/wasm/run",
"evmbin",
"util/EIP-2124"
Copy link
Collaborator

Choose a reason for hiding this comment

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

The only reason crates get listed here is if they provide binaries that need to be built as part of the whole, like evmbin, chainspec etc.

Other crates in the repo are dependencies of one or more of the above so they don't need to appear here.

(It's a perfectly fine thing to do while working on it ofc)

Copy link
Author

Choose a reason for hiding this comment

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

I agree and it is only listed here to make Cargo work before it is included in parity dependency tree.

Copy link
Collaborator

Choose a reason for hiding this comment

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

this can be removed when it's used in the main binary

util/EIP-2124/src/lib.rs Outdated Show resolved Hide resolved
util/EIP-2124/src/lib.rs Outdated Show resolved Hide resolved
@vorot93
Copy link
Author

vorot93 commented Feb 5, 2020

This is just a draft PR, since the actual compatibility check is WIP. I didn't know where to place the code, devp2p or higher up the stack, so temporarily settled on making it a separate crate.

@vorot93 vorot93 marked this pull request as ready for review February 5, 2020 22:07
@vorot93
Copy link
Author

vorot93 commented Feb 5, 2020

It's done, the only question is where to move it to.

Copy link
Collaborator

@ordian ordian left a comment

Choose a reason for hiding this comment

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

The code looks good, but we should have some docs.

util/EIP-2124/src/lib.rs Show resolved Hide resolved
util/EIP-2124/src/lib.rs Show resolved Hide resolved
util/EIP-2124/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@ordian ordian left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@ordian ordian added A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust. labels Feb 6, 2020
@ordian ordian added this to the 2.8 & .. milestone Feb 6, 2020
util/EIP-2124/src/lib.rs Outdated Show resolved Hide resolved
util/EIP-2124/src/lib.rs Show resolved Hide resolved
util/EIP-2124/src/lib.rs Outdated Show resolved Hide resolved
util/EIP-2124/src/lib.rs Outdated Show resolved Hide resolved
util/EIP-2124/src/lib.rs Show resolved Hide resolved
@vorot93 vorot93 requested a review from dvdplm February 6, 2020 11:45
Copy link
Collaborator

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

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

LGTM.

Don't forget to cleanup Cargo.toml! :)

CI seems to have some kind of problem atm, I kicked off a retry.

As for the continuation of this work, perhaps it would be useful if you wrote up an issue with a tentative implementation plan so we have a place for discussion, wdyt?

@vorot93
Copy link
Author

vorot93 commented Feb 6, 2020

Do you want it to stay as a separate crate or should I move the code elsewhere?

@dvdplm
Copy link
Collaborator

dvdplm commented Feb 6, 2020

Do you want it to stay as a separate crate or should I move the code elsewhere?

I think it can be where it is for the time being. If it fits better elsewhere we can move it to the proper place in the next PR. Works for you?

@vorot93
Copy link
Author

vorot93 commented Feb 6, 2020

@dvdplm Sure!

@ordian ordian merged commit 090c332 into openethereum:master Feb 6, 2020
@vorot93 vorot93 deleted the eip-2124 branch February 6, 2020 14:02
dvdplm added a commit that referenced this pull request Feb 8, 2020
…pstream

* master:
  upgrade some of the dependencies (#11467)
  Some more release track changes to README.md (#11465)
  Update simple one-line installer due to switching to a single stable release track (#11463)
  update Dockerfile (#11461)
  Implement EIP-2124 (#11456)
  [eth classic chainspec]: remove `balance = 1` (#11459)
  just to make sure we don't screw up this again (#11455)
  backwards compatible call_type creation_method (#11450)
  gcc to clang (#11453)
  Avoid copies (#11451)
  Cargo.lock: cargo lock translate (#11448)
dvdplm added a commit that referenced this pull request Feb 10, 2020
* master:
  Use parity-crypto updated to use upstream rust-secp256k1 (#11406)
  Cleanup some code in Aura (#11466)
  upgrade some of the dependencies (#11467)
  Some more release track changes to README.md (#11465)
  Update simple one-line installer due to switching to a single stable release track (#11463)
  update Dockerfile (#11461)
  Implement EIP-2124 (#11456)
ordian added a commit that referenced this pull request Feb 11, 2020
* master:
  upgrade some of the dependencies (#11467)
  Some more release track changes to README.md (#11465)
  Update simple one-line installer due to switching to a single stable release track (#11463)
  update Dockerfile (#11461)
  Implement EIP-2124 (#11456)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement EIP-2124
4 participants