Skip to content
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

Test-generator: operations from blocks #927

Closed
59 of 60 tasks
protolambda opened this issue Apr 15, 2019 · 2 comments
Closed
59 of 60 tasks

Test-generator: operations from blocks #927

protolambda opened this issue Apr 15, 2019 · 2 comments

Comments

@protolambda
Copy link
Collaborator

protolambda commented Apr 15, 2019

Since the generators are now (waiting for #851 merge) integrated into the PySpec and hosted in this repository, we can push for much more completeness in YAML testing.

This issue is to track the progress of providing test-cases for block-operations ("transactions" previously).
Suggestions for test-cases are welcome. And better, open up a PR with implementation (once #851 is ready)

  • Deposits
    • Valid new deposit
    • Valid top-up
    • Invalid: deposit index
    • Invalid: deposit proof
    • Valid new deposit but invalid signature (proof of possession)
  • Proposer slashings
    • Valid proposer slashing
    • Invalid proposer index
    • Invalid: different epoch
    • Invalid: Same block headers
    • Invalid: Non-slashable proposer (not activated) [TODO: correct, maybe just slash them anyway,
      since they signed it?]
    • Invalid: Non-slashable proposer (slashed)
    • Invalid: Non-slashable proposer (withdrawn)
    • Invalid: Invalid signatures (either header, or both)
  • Attester slashings
    • Invalid: Same attestation
    • Valid: double vote
    • Valid: surround vote
    • Invalid: no double or surround vote
    • Invalid: either attestation has invalid indexed form (custody bit indices wrong)
    • Invalid: no slashable indices
    • Invalid: invalid signatures (either attestation, or both)
  • Attestations (inclusion)
    • Valid attestation
    • Valid previous epoch
    • Invalid: shard out of range
    • Invalid: incorrect source epoch (previous and current epoch)
    • Invalid: incorrect source root (previous and current epoch)
    • Invalid: non-zero crosslink root
    • Invalid: incorrect previous crosslink root with state (previous)
    • Invalid: source root is target root
    • Invalid: attestation references non-zero custody bitfield
    • Invalid: current and previous root switched
    • Invalid: mismatch in participants/custody bits
    • Invalid: invalid signature
  • Voluntary Exits
    • Valid exit
    • Exit queue
    • Invalid: out of range validator index
    • Invalid: not active (activation phase)
    • Invalid: already exited
    • Invalid: voluntary exit is in the future
    • Invalid: exit is too soon
    • Invalid: invalid signature
  • Transfers
    • Valid transfer from not yet activated validator
    • Valid transfer from withdrawable validator
    • Valid transfer, above effective balance
    • Valid transfer, above effective balance, just fee
    • Invalid: active, transfer past effective balance
    • Invalid: transfer past effective balance, by fee
    • Invalid: balance less than transfer amount
    • Invalid: balance less than fee amount
    • Invalid: transfer slot is not the current state slot
    • Invalid: withdrawal credentials are incorrect
    • Invalid: sender account is dust afterwards
    • Invalid: recipient account is dust afterwards
    • Invalid: incorrect signature

staged tests (i.e. need review/update):

  • Invalid: incorrect previous crosslink root with state (current epoch)
@JustinDrake
Copy link
Collaborator

Can this be closed Proto?

@protolambda
Copy link
Collaborator Author

Yes. I'm running coverage reports on ZRNT, and it's looking good for most parts of the spec, but will open another issue with remaining tests to be written later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants