Commit Graph

156 Commits

Author SHA1 Message Date
dapplion 38f269ca12 Update spec with @mkalinin suggestions 2024-03-05 20:58:05 +08:00
dapplion accee2b8be Merge remote-tracking branch 'upstream/dev' into attestation-index 2024-03-05 17:19:49 +08:00
Mikhail Kalinin 3e2650811e
Introduce UINT64_MAX_SQRT 2024-02-16 13:39:46 +06:00
Hsiao-Wei Wang e3d91d8e2a
Rename `MAX_UINT_64` -> `UINT64_MAX` 2024-02-15 15:00:56 +08:00
Hsiao-Wei Wang 7076fb2b75
Handle `integer_squareroot` bound case 2024-02-14 17:18:05 +08:00
dapplion e8e00f332a move attestation index outside signed message 2023-12-05 14:16:07 +02:00
Lion - dapplion cc4c810b8f
Whisk: complete TODO items in fork logic (#3427)
* Complete TODO items in fork logic

* Simpler underflow protection

* Add saturating_sub
2023-06-19 17:08:51 +03:00
dapplion 680b026d59 Add add_validator_to_registry fn 2023-05-09 19:18:42 +09:00
omahs 3115d1140b
Fix: typos 2023-03-25 13:14:57 +01:00
Mikhail Kalinin 13f3654296 Apply suggestions from @djrtwo 2023-03-02 17:29:22 +06:00
Alex Stokes 5337da5dff
use python syntax for bitwise AND operation (#2894) 2022-05-17 07:14:19 -06:00
Alex Stokes 20a90f1df7
Add new `DomainType` for application usage (#2884) 2022-05-16 08:08:15 -06:00
Alex Stokes 2b45496fe4
clean up unused argument from `phase0` 2022-01-13 11:39:36 -08:00
Danny Ryan 395fdd4566
Merge pull request #2730 from ethereum/proposer-score-boost
Proposer LMD Score Boosting
2021-11-23 11:39:07 -07:00
Ben Edgington 44fec310b3
Eth1 block hashes have type Hash32 (#2693)
* Eth1 block hashes have type Hash32

* Modify other forks as well

Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-11-23 08:20:26 -07:00
Danny Ryan cebe6ba7e7
minor formatting cleanups 2021-11-22 11:31:17 -07:00
Danny Ryan 4c1156d504
rename eth1 and eth2 throughout specs and readme where reasonable 2021-08-18 17:13:24 -06:00
Hsiao-Wei Wang 43a1617ffa
Ensure that the given PKs are valid PKs + fix typos 2021-08-04 21:25:37 +08:00
protolambda ff021da551
change line formatting, new refence as config var implicitly takes more space 2021-05-19 17:21:30 +02:00
protolambda 291168e1e3
clarify config/preset separation, address review comments by @djrtwo 2021-05-19 17:15:34 +02:00
protolambda 2c7a68406f
update config section markdown table header 2021-05-18 09:55:25 +02:00
protolambda e4593d2d0c
update with configs<>presets separation 2021-05-18 09:55:20 +02:00
protolambda b9ffd8f640
Phase0 constant/config/preset separation 2021-05-18 09:20:41 +02:00
Danny Ryan c7166a37af
change eth1data block_hash type to Hash32 in phase 0 2021-04-15 06:47:11 -05:00
protolambda 07b7774241
misc. phase1 modules refactor updates 2021-03-30 01:46:02 +02:00
Alex Vlasov 020895e35d
Typing problems fixes (#2271)
* Typing problem fixed: `process_block_header` passes `Bytes32()` to `state_root` of `BeaconBlockHeader`, which type is `Root`

* Typing problem fixed in `initialize_beacon_state_from_eth1`: `len` returns an `int` value, while `deposit_count=uint64` of `Eth1Data` has type `uint64`

* Typing problem fixed in `process_rewards_and_penalties`: `numerator` of type `int` passed to `weight` parameter of `get_flag_index_deltas`, which has type `uint64`

* Typing problem fixed in `process_attestation`; `False` passes as `crosslink_success` parameter of `PendingAttestation`, which has type `boolean`. `False` is an instance of `(python.)bool` and is not an instance of `(ssz.)boolean`

* Typing problem fixed: `shard_data_roots` of `ShardTransition` has type `List[Bytes32]`, but its elements are used as if they were `Root` values, e.g. in `process_chunk_challenge` method: passed to `data_root` of `CustodyChunkChallengeRecord` which has type `Root`

* Typing problem fixed in `process_custody_final_updates`: `index` has type `int`, while `validator_indices_in_records` has type `Set[ValidatorIndex]`, so tesing whether `index in validator_indices_in_records` can be risky, depending on implementation details. `ValidatorIndex(index) in validator_indices_in_records` is a safer variant.

* Typing problem fixed: `slashed` parameter of `pack_compact_validator` has type `(python.)bool`, however in `committee_to_compact_committee` a value of `(ssz.)boolean` is passed as a value of the parameter

* Typing problem fixed: `inactivity_scores` is a `List[uint64,...]`, while it is intialized/appended with values of `(python.)int` type

* fixed according to @protolambda suggestions

* changed types of _WEIGHT constants and appropriate variables/parameters, according to @protolambda suggestions

* revert code formatting back

* Introduced ZERO_ROOT according to @protolambda 's suggestion

* Reverted back to , according to @protolambda comments
2021-03-25 22:03:21 +01:00
Danny Ryan bb85ef5a57
pr cleanup 2021-03-22 10:53:26 -06:00
protolambda 493dd17cc4
reduce justification and finalization Altair diff 2021-03-21 04:22:45 +01:00
Justin Drake e7ebd08d69 Altair cosmetic cleanups plus a couple substantive changes 2021-03-15 11:08:41 +00:00
Danny Ryan 8ec082fcf9
Merge pull request #2149 from ethereum/0x01-creds
Eth1 withdrawal credentials (0x01)
2021-02-16 13:06:34 -06:00
Hsiao-Wei Wang 1b00c10ed3
Apply @michaelsproul's feedback 2021-01-27 14:47:52 +08:00
Hsiao-Wei Wang e53213a585
Minor refactor 2021-01-20 13:06:24 +08:00
Hsiao-Wei Wang daa4798704
Break down process_final_updates 2021-01-19 21:41:55 +08:00
Ben Edgington 452e3301be Fix typo 2020-12-21 10:22:04 +00:00
Justin ef3802b8e7
Cleaner section title
"Withdrawal prefixes" matches `[BLS]/[ETH1_ADDRESS]_WITHDRAWAL_PREFIX`
2020-12-12 20:40:59 +00:00
Justin 784e567d4b
Fix table for withdrawal credentials prefixes
Minor cosmetic fixes (misformated table, section title).
2020-12-12 20:38:40 +00:00
Danny Ryan 6b728c1880
add eth1 withdrawal credentials to spec 2020-12-11 15:03:58 -07:00
Justin f2fe390638
secret_key => privkey 2020-12-08 09:20:50 +00:00
Justin 0b9e80d1eb
grammar 2020-12-07 23:15:34 +08:00
Justin 56048cbf56
Cosmetic cleanups to BLS signatures section
Miscellaneous cosmetic cleanups to the " BLS signatures" section:

1) fix section capitalisation for spec consistency
2) avoid uncapitalised "eth2" for spec consistency
3) avoid contractions (such as `PK` for `pubkey`) for spec consistency
4) various copyedits
2020-12-07 07:28:01 -07:00
Hsiao-Wei Wang 64412be0d7
Minor update ToC 2020-12-07 11:10:19 +08:00
Danny Ryan 7589af8e8d
remove wip notice on phase 0 specs 2020-11-04 09:30:29 -06:00
Danny Ryan cd7b1056b4
add mainnet deposit contract address and min genesis time 2020-11-04 09:11:52 -06:00
Hsiao-Wei Wang 7fb9226ec6
Make `state_transition` not return post state; the given pre state should have been mutated to post state. 2020-10-15 15:58:26 +08:00
Danny Ryan 91deacbf9c
double eth1data params 2020-10-07 18:52:47 -06:00
Hsiao-Wei Wang d264ad8af7
Merge pull request #2080 from ethereum/bls_v4
Bump IETF BLS spec version draft 03 -> draft 04
2020-10-05 22:12:52 +08:00
Danny Ryan 157f7e8ef4
upgrade config to mainnet values 2020-09-28 12:56:08 -06:00
Hsiao-Wei Wang ad4ad2d8b4
Bump IETF BLS spec version draft 03 -> draft 04 2020-09-25 15:01:41 +08:00
Hsiao-Wei Wang 899927af30
Remove note 2020-09-15 23:43:07 +08:00
Hsiao-Wei Wang cfc69e47e6
Bump IETF BLS standard version to -03 2020-09-11 17:17:51 +08:00