Commit Graph

2734 Commits

Author SHA1 Message Date
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
Danny Ryan 0fd29f7fe9
Merge pull request #1122 from ethereum/JustinDrake-patch-13
Simplify deposits
2019-05-29 20:17:18 -06:00
Danny Ryan f0314bec52
Merge branch 'dev' into JustinDrake-patch-13 2019-05-29 20:15:17 -06:00
Danny Ryan 2aea4b93d0
Merge pull request #1123 from ethereum/JustinDrake-patch-14
Avoid divisions by zero
2019-05-29 20:14:23 -06:00
Danny Ryan f4afb7c1b4
Merge pull request #1134 from terencechain/patch-75
Fix Test Formats Broken Links
2019-05-29 20:13:13 -06:00
Danny Ryan 1eebbf545b
Merge pull request #1136 from ethereum/fix_lint
Fix linter errors
2019-05-29 20:00:04 -06:00
Hsiao-Wei Wang 6ec59867ef
Fix linter errors 2019-05-30 09:53:46 +08:00
Justin 1c416541e1
Update 0_beacon-chain.md 2019-05-29 23:40:46 +03:00
terence tsao 12a7e26453
Update README.md 2019-05-28 20:57:18 -07:00
Danny Ryan 6286fb3fb5
Merge branch 'dev' into JustinDrake-patch-13 2019-05-28 18:15:33 -06:00
Danny Ryan c2f0f7e4d8
Merge pull request #1108 from ethereum/eth1_error
minor fix to how eth1 data is counted in validator guide
2019-05-28 16:09:04 -06:00
Danny Ryan 4183d8440b
Merge pull request #1069 from sigp/bn-vc-api-rfc
Beacon Node API for Validator
2019-05-28 16:07:51 -06:00
Danny Ryan a994a5d835
Merge pull request #1131 from ethereum/v06x-to-dev
V06x to dev
2019-05-28 15:59:49 -06:00
Danny Ryan 5a64b4a909
Merge pull request #1130 from ethereum/v06x
Release V06x into master
2019-05-28 15:58:47 -06:00
protolambda 6e8fb529d2
Merge branch 'ssz_static_format' into v06x-to-dev 2019-05-28 18:32:38 +02:00
protolambda 3781614f20
SSZ format update, to facilitate more efficient parsing 2019-05-28 18:28:37 +02:00
protolambda 25cc393180
Merge in fix of bls-setting doc, rm old comments 2019-05-28 18:04:16 +02:00
protolambda d036b5a87a
Remove some old comments about BLS setting. Description is shared in main readme now. 2019-05-28 18:02:09 +02:00
protolambda 8737984e19
introduce back assert, modified to allow valid but non-effective calls 2019-05-28 16:05:25 +02:00
protolambda 401dba3230
Merge branch 'bls-setting' into v06x-to-dev 2019-05-28 15:38:08 +02:00
protolambda 6ffd41650b
suggestion from hww, reduce into one bls_setting key 2019-05-28 15:35:00 +02:00
Luke Anderson c32328fdf2
Fixed swagger URL so that the version number isn't specified (defaults to latest). 2019-05-28 10:49:40 +10:00
Luke Anderson 56698602ab
Updated all absolute URLs to the eth2.0-specs repo so that they point to the master branch (instead of dev). 2019-05-28 10:48:41 +10:00
Danny Ryan 47f3df6d0a
fix deposit test for new index handling 2019-05-27 16:40:00 -06:00
Diederik Loerakker 2a7fcb6ffa
Merge pull request #1132 from ethereum/fix-build-script
fix dev branch build script, missing quotes
2019-05-28 00:09:09 +02:00
protolambda c99fa52d9f
fix dev branch build script, missing quotes 2019-05-27 23:56:17 +02:00
Danny Ryan d3d8b36365
Merge branch 'dev' into v06x-to-dev 2019-05-27 11:09:52 -06:00
Danny Ryan 405b34225f
D be list instead of set in validator eth1 data counting 2019-05-27 09:37:30 -06:00
Danny Ryan 31c02ebcab
Merge pull request #1116 from ethereum/hwwhww/phase1_withdrawable
Clean up `process_penalties_and_exits` and fix ToC
2019-05-27 09:33:43 -06:00
Danny Ryan 7327f12296
Merge pull request #1126 from michaelsproul/sort-attester-slashings
Sort attester slashing indices to avoid arbitrary ordering
2019-05-27 09:14:13 -06:00
Danny Ryan d54b6848de
Merge pull request #1114 from ethereum/finish-state-tests-intro
Finish state tests intro
2019-05-27 08:46:02 -06:00
Danny Ryan 8d420c0780
fix prestate for process registry updates 2019-05-27 08:38:37 -06:00
Michael Sproul a82a6f9a1a
Sort attester slashing indices to avoid arbitrary ordering
Closes #1125
2019-05-27 17:36:20 +10:00
Luke Anderson fa177e0355
Bumped API version number to 0.2.0 2019-05-27 13:01:36 +10:00
Luke Anderson af798a3065
Minor updates.
- Fixed spelling (and made American English)
 - Clarified the schema for the new poc_bit field, and description.
2019-05-27 11:21:23 +10:00
Justin cdfb886c22
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.
2019-05-26 18:42:37 +03:00
Danny Ryan dd091724d0
Merge pull request #1120 from ethereum/phase1-candidate-bug
a number of minor fixes in phase 1
2019-05-25 07:18:53 -06:00
Luke Anderson edf0b9d05f
Addressed some of @djrtwo's suggestions.
- Rewording of specification goal paragraph
 - Clarify get duties description regarding chain reorgs.
 - Add epoch parameter to get duties, and new error 406
 - Block publishing action is clarified around validation, with a new status code 202
 - The validator pubkey and PoC bit are passed to produce attestation
 - Attestation publishing action is clarified around validation, new status code 202
 - Rewording of genesis_time, 'block' -> 'slot'
 - Update Crosslink to latest spec
 - Added missing signature field to IndexedAttestation
2019-05-25 07:59:35 +10:00
Justin d805fb5084
Simplify deposits 2019-05-25 00:35:17 +03:00
Danny Ryan c3de576c8f
Merge pull request #1121 from ralexstokes/v06x
update version used in test generators to get SHA-256 hash
2019-05-24 13:07:38 -06:00
Alex Stokes cff9c7fe67
update version used in test generators to get SHA-256 hash 2019-05-24 11:05:07 -07:00
Danny Ryan 28b76bcd4c
a number of minor fixes in phsae 1 2019-05-24 11:59:22 -06:00
Danny Ryan b0a3b436e3
Merge pull request #1117 from ralexstokes/update-py-ecc-version
update version used in test generators to get SHA-256 hash
2019-05-24 11:33:23 -06:00
Danny Ryan 3539e608f7
Merge pull request #1118 from AgeManning/typo-fixes
Fix typo in libp2p-standardization
2019-05-24 10:46:24 -06:00
protolambda e9a01a276d
epoch processing formatting 2019-05-24 18:39:12 +02:00
protolambda b12031b48d
not signed by default 2019-05-24 18:38:51 +02:00
Diederik Loerakker b6b5787931
Update specs/test_formats/epoch_processing/README.md
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
2019-05-24 12:24:42 -04:00
protolambda 321baf79f4
fix missing imports from earlier code suggestion 2019-05-24 15:03:03 +02:00
protolambda 73f0f74fb0
run process yield-from test pattern 2019-05-24 14:58:06 +02:00
Diederik Loerakker f2e3cd01aa
Update test_libs/pyspec/eth2spec/test/epoch_processing/test_process_crosslinks.py
Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>
2019-05-24 08:34:14 -04:00