Commit Graph

12 Commits

Author SHA1 Message Date
protolambda 2d636ddf5a
BLS withdrawal byte is formatted as int now, but still one byte. Justin changed spec, now fix tests + configs 2019-06-11 17:27:34 +02:00
protolambda e86771250b
Fix tests to use new constant name 2019-06-11 17:16:02 +02:00
Danny Ryan e68b495ada
Merge branch 'dev' into master-port 2019-06-10 10:53:13 -06:00
Carl Beekhuizen d761b6f041
Implements new SSZ types 2019-06-05 15:29:26 +02:00
protolambda 33233c98ff
fix ssz imports 2019-06-01 01:51:09 +02:00
Danny Ryan 8b65b95bd4
port deposit test from #1133 2019-05-31 13:54:58 -06:00
Carl Beekhuizen 28d98b5cf4
PEP8 cleanups 2019-05-31 13:20:10 +02:00
Carl Beekhuizen 5155bc6c4f
Makes everything pass around 2019-05-30 22:57:18 +02:00
Michael Sproul cc5b172da3 Test deposit top-up with inconsistent withdrawal credentials (#1133)
* Simplify deposits

* Avoid divisions by zero

Possible fix to avoid four cases of divisions by zero:

* `return state.validator_registry[index].effective_balance // adjusted_quotient // BASE_REWARDS_PER_EPOCH`
* `rewards[index] += get_base_reward(state, index) * attesting_balance // total_balance`
* `validator.effective_balance * min(total_penalties * 3, total_balance) // total_balance`
* `rewards[index] += base_reward * attesting_balance // committee_balance`

See also #1107.

* fix deposit test for new index handling

* tests: deposit with inconsistent withdrawal credentials

* Update README.md

* Update 0_beacon-chain.md

* Fix linter errors

* Update test_process_deposit.py

* fix deposit test

* fix lint
2019-05-29 20:38:55 -06:00
protolambda 62999d8ded
import fixes + fix import loop + fix minor signing things 2019-05-17 20:31:21 +02:00
protolambda 8a43ec0132
add signing methods 2019-05-15 19:31:02 +02:00
protolambda 51c82c5b81
clean up helpers, make helpers pkg 2019-05-15 18:36:32 +02:00