How to write tests for the consensus layer#2700
How to write tests for the consensus layer#2700djrtwo merged 47 commits intoethereum:devfrom qbzzt:dev
Conversation
protolambda
left a comment
There was a problem hiding this comment.
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. |
djrtwo
left a comment
There was a problem hiding this comment.
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.
| * `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.
| propose a hash for the head of the assigned shard. |
There was a problem hiding this comment.
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.