Danny Ryan
6570340e04
Merge branch 'master' into master-to-dev
2019-10-28 15:27:41 +09:00
Denis Bogdanas
c108d1a356
test for initialize_beacon_state_from_eth1, case when some small deposits don't contribute to active balance.
2019-10-07 13:54:35 +03:00
dankrad
b345dc0f5f
Legendre custody construction ( #1305 )
...
* Stab at Legendre custody construction + some tests
* Fix some problems and fix function puller to remove phase0 only lines in phase1
* Pass the linter
* Add headings
* Fix domain for BLS stub
* Change Jacobi to Legendre
* n -> q to clarify notation
* Headings
* Another missing heading
* Custody subchunks via padding
* Fix max_reveal_lateness stuff
* Better names for reveal period functions
* Better parametrization of max_reveal_lateness computation and tests for custody reveal processing
* Fix linter
* Allow challenging for one period after the custody reveal, shorter periods for minimal tests
* Fix lint
* Fix linter error
2019-08-11 13:05:17 -04:00
Hsiao-Wei Wang
b29c751cb7
Merge branch 'dev' into last-minute-cleanups-2
2019-07-01 09:25:06 +08:00
Justin Drake
aeba6ee8fb
compute_domain for consistency with get_domain
2019-07-01 00:35:09 +01:00
protolambda
b7e8733812
fix usage of bls withdrawal byte in tests
2019-07-01 00:36:24 +02:00
Carl Beekhuizen
0fd1d38417
`Misc` function rename
2019-06-30 20:58:02 +02:00
Justin Drake
369c457d76
WIP2
2019-06-30 10:11:23 +01:00
Hsiao-Wei Wang
56caa48314
Should use Sequence
2019-06-30 03:27:25 +08:00
Hsiao-Wei Wang
125660c5af
Update input `deposits` type from `Sequence[Deposit]` to `List[Deposit, 2**DEPOSIT_CONTRACT_TREE_DEPTH` and fix tests
2019-06-30 03:20:11 +08:00
protolambda
ff185c3486
fix deposit state mocking for tests
2019-06-29 20:40:25 +02:00
protolambda
fb165dc14e
fixes a few tests, not all
2019-06-29 20:33:11 +02:00
protolambda
e4eebef3a4
fix broken deposits test, now same error as others
2019-06-29 20:09:43 +02:00
Hsiao-Wei Wang
354cd1c1e1
Clean up leftover and linter
2019-06-30 02:02:05 +08:00
Hsiao-Wei Wang
1b66323806
head to 1229
2019-06-30 01:44:17 +08:00
Hsiao-Wei Wang
d4755653ff
Merge branch 'deposit-root' into test_genesis
2019-06-30 01:33:29 +08:00
Justin Drake
f0a8e39243
WIP
2019-06-29 17:29:21 +01:00
Hsiao-Wei Wang
7bc6a46eaa
Fix `build_deposit`
2019-06-29 02:51:24 +08:00
Hsiao-Wei Wang
cb2bfd67dc
Apply Proto's feedback of list(map(...))
2019-06-29 02:27:48 +08:00
Hsiao-Wei Wang
4dc526fbb7
In the end, `get_merkle_root` is back
2019-06-29 02:16:49 +08:00
protolambda
a0c2f5c6b5
fix genesis testing code, add missing constant temporarily, fix py Generator/map/list problems
2019-06-27 01:57:30 +02:00
Hsiao-Wei Wang
7468fd034f
Add more test
2019-06-21 21:50:36 -06:00
Hsiao-Wei Wang
7a16db144c
Add test_genesis
2019-06-21 15:59:18 -06:00
Danny Ryan
a6230425b8
Merge branch 'dev' into container-cleanup
2019-06-14 10:36:41 -06:00
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
Justin Drake
565f61dfaa
Cleanup containers
2019-06-09 20:41:21 +01: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