-
Notifications
You must be signed in to change notification settings - Fork 240
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
Pyspec framework #219
Pyspec framework #219
Conversation
There's going to be a lot wrong with this. The documentation is laughably sparse. The type annotations are loose at best, and completely bonkers at worst. I haven't actually tried to validate a block, so this commit probably breaks everything... At least the scaffolding is in place though!
Review feedback
Add upstream links to sphinx templates
Since the docstrings are rendered as HTML, there's really no reason to include them in the code snippets. This commit adds a dependency on undocliteral, a hacky tool to strip docstrings when using literalinclude. This commit also removes the types from parameters in docstrings. The signatures are annotated and checked with mypy, so including the types in the docstrings is just duplicated information that can get out of sync.
Hide docstrings in included source code
…tioning - Add RLP encoding for the custom dataclasses in rlp module - Improve tests so that it verifies rlp and hash values for blocks and headers - Verify state post state transition by blocks
Verify transaction root and ommers hash in header before state transitioning
I would nominate that this get merged soon so that additional changes can be done in smaller units and directly targeting this repository rather than the quilt fork. |
Agreed! None of us can actually do the merge though. |
Implement refund counter for SSTORE
* add step to build docs in ci * make sure ci fails when docs don't build * make sure ci passes when docs are fixed
Create a tox command for live preview
Rename project to 'ethereum'
Still seeing a stream of commits coming in. You wanna give me a poke when you're ready with something stable. |
@pipermerriam we can keep it stable until Monday if someone wants to merge this. I'm guessing by then, we'll have some more PRs that we'll want to get merged. |
@lightclient happy to merge this now if you think it's ready to go! |
@timbeiko it's ready! :) |
This is the initial framework for an eth1 pyspec.
Ethereum 1.0 lacks a comprehensive and accessible specification. This creates several pain points, but the most prevalent is that intricate core changes must spend a significant amount of time describing the current state of Ethereum, before even defining the proposed changes.
The Ethereum 2.0 spec has been a great example of "spec driven development". Eventually, we'd like to merge the two specs into a uniform, all encompassing specification. Until then, we've taken the liberty to experiment with a couple slightly different approaches than the eth2 specs:
1.x.x
would be Frontier,2.x.x
would be Homestead, etc. We plan to write a handler program that runs specific releases up until a fork block and then shuttle the current state of the chain into the next release.So, with that said, we are currently working on implementing the Frontier release of Ethereum. This is very much a work-in-progress still and everything is up for discussion. We feel the sooner this work is in the open, the sooner we can get feedback from the community and potentially find additional contributors.
As of this PR, we've successfully:
add
+sstore
testWe'll generally try to avoid writing our own tests wherever possible and instead rely on the
ethereum/tests
format. We plan to support thet8n
interface so that the spec can generate test cases. We'd also like to eventually sync mainnet, but that may require some work arounds.We're excited to hear people's thoughts and feedback :)