prysm-pulse/contracts
Preston Van Loon 9ac88d11da sharding: Local networked P2P! (#222)
Former-commit-id: d22d05529bb0050b8a03053a28d876e3e458bbff [formerly 284a04699110aa285a42f5b0ad244ca9bd77d2df]
Former-commit-id: 83cd9c8a48fb5ce9c57ff8ef6c2b1741a4d05130
2018-07-17 13:39:04 -05:00
..
deployVRC sharding: Local networked P2P! (#222) 2018-07-17 13:39:04 -05:00
BUILD.bazel Fix Bazel Build Rules for Visibility, Move LICENSE to Top-Level (#253) 2018-07-12 12:00:37 -05:00
README.md Fix Bazel Build Rules for Visibility, Move LICENSE to Top-Level (#253) 2018-07-12 12:00:37 -05:00
validator_registration_test.go Fix Bazel Build Rules for Visibility, Move LICENSE to Top-Level (#253) 2018-07-12 12:00:37 -05:00
validator_registration.go sharding: Local networked P2P! (#222) 2018-07-17 13:39:04 -05:00
validator_registration.sol Fix Bazel Build Rules for Visibility, Move LICENSE to Top-Level (#253) 2018-07-12 12:00:37 -05: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