prysm-pulse/contracts/validator-registration-contract
terence tsao b7bf48bc3e Fixed NewSimulatedBackend (#405)
* sync functions for active and crystallized states

* make pb structure more semantic

* use run func to consolidate to one main routine

* remove mainchain package

* remove smc. yay!

* fixed NewSimulatedBackend

* added smc tests back

* race = off

* used latest commit from bazel-go-ethereum

* changed testoutput to all

* output test.log after failure

* disable race

* restore travis config to original state, add race=off to blockchain workspace

* added issue number and fixed typo
2018-08-16 15:37:53 -06:00
..
deployVRC client: Clean Up Client Project, Update Docs, Eliminate Unnecessary Items (#399) 2018-08-14 19:21:49 -06:00
.soliumignore Remove Contract Package from Client (#396) 2018-08-12 15:50:42 -07:00
BUILD.bazel Remove Contract Package from Client (#396) 2018-08-12 15:50:42 -07:00
README.md Remove Contract Package from Client (#396) 2018-08-12 15:50:42 -07:00
validator_registration_test.go Fixed NewSimulatedBackend (#405) 2018-08-16 15:37:53 -06:00
validator_registration.go Remove Contract Package from Client (#396) 2018-08-12 15:50:42 -07:00
validator_registration.sol Remove Contract Package from Client (#396) 2018-08-12 15:50:42 -07:00

Validator Registration Contract

For beacon chain design, a validator will deposit 32 ETH to the main chain smart contract. The deposit is considered to be burned. As you burn the 32 ETH to participate, the beacon chain will see it and will credit the validator with the validator bond, and the validator can begin to validate. At some point in the future, after a hard fork, the original deposit + interest can be withdrawn back on one of the shards.

How to execute tests

go test ./...

Run with -v option for detailed log output

go test ./... -v
=== RUN   TestSetupAndContractRegistration
--- PASS: TestSetupAndContractRegistration (0.01s)
=== RUN   TestRegisterWithLessThan32Eth
--- PASS: TestRegisterWithLessThan32Eth (0.00s)
=== RUN   TestRegisterWithMoreThan32Eth
--- PASS: TestRegisterWithMoreThan32Eth (0.00s)
=== RUN   TestRegisterTwice
--- PASS: TestRegisterTwice (0.01s)
=== RUN   TestRegister
--- PASS: TestRegister (0.01s)
PASS
ok      beacon-chain/contracts  0.151s