Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Conversation

karlfloersch
Copy link
Member

@karlfloersch karlfloersch commented May 4, 2017

This PR ports simple_casper_tester to use tester2 from Pyethereum state_revamp.

This PR requires the changes to tester2 proposed in ethereum/pyethereum#717

Changes

  • simple_casper.v.py now checks for blockhashes before awarding rewards.
  • Includes the one-line fix added in Fix bug: not subtracting entire validator_deposit #10
  • Adds helper functions epoch_blockhash() and mine_and_init_epochs()
  • Adds a test checking if the rewards are actually given after a prepare & after a commit.
  • Turns the init sequence into a function which is called twice, once for each series of tests. This will likely be replaced by a function inside of casper_utils.py in pyethereum. However, there were some organizational issues I faced when trying to include it there, and so I'm holding off for now. This is a pretty simple change which shouldn't add too much to the code complexity.

* Add mine_and_init_epoch()
* Add epoch_blockhash() for getting the blockhash at a specific epoch
* Change t.k0 to just k0
* Change a few tests to pass
*Turn the Casper chain setup into a method to allow it to be reused when
initializing the chain during test 2
*Port second round of tests
*Change tester2 to raise TransactionFailed() if a tx doesn't go through. This
allows us to distinguish between a contract returning False and a tx exception
*Remove a few unneeded t.mine() statements
@djrtwo
Copy link
Contributor

djrtwo commented Mar 5, 2018

@karlfloersch Looks like this PR should probably be closed

@djrtwo
Copy link
Contributor

djrtwo commented Mar 27, 2018

This PR still references compare/commit.
Closing

@djrtwo djrtwo closed this Mar 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants