-
Notifications
You must be signed in to change notification settings - Fork 998
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
How to write tests for the consensus layer #2700
Conversation
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 Ori, nice to find you here in the consensus specs repo, thanks for the help documenting testing!
Some nitpicks in review, but generally this is very helpful, thank you 👍
Nice to find you here too. Yes, I've been writing helping out EF with documentation and testing for a while now, long before I've even heard of Optimism. I'm glad it helps. It's always difficult to know how much detail to put in a tutorial. |
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.
nice! just a handful of review comments
|
||
This type of test receives two parameters: | ||
|
||
* `specs`: The protocol specifications |
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.
* `specs`: The protocol specifications | |
* `spec`: The protocol specification (constants, functions, object definitions, etc) |
tests/README.md
Outdated
|
||
For every slot a validator is randomly selected as the proposer. Currently the proposer proposes the hash | ||
for the current head of the beacon chain (the previous block). When shards are added, the proposer will also | ||
propose a hash for the head of the assigned shard. |
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.
propose a hash for the head of the assigned shard. |
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.
I would just cut out a lot of the sharding stuff. There are actually separate proposrs that build the shard chains and it's probably not worth getting in the nuance here.
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
No description provided.