Commit Graph

226 Commits

Author SHA1 Message Date
Mikhail Kalinin d0889b9001 Hardcode terminal total difficulty 2021-09-17 16:20:25 +06:00
Danny Ryan 43e79a7ee0
add process_registry_updates tests for scaled churn limit 2021-09-07 20:34:28 -06:00
Mikhail Kalinin 96334e3ee7 Switch to suggested td computation formula 2021-06-07 22:21:36 +06:00
Mikhail Kalinin 6226be9e1e Implement TransitionStore and transition total difficulty computation 2021-06-01 16:28:30 +06:00
Diederik Loerakker 6193c7c255
Update configs/README.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-05-19 19:08:59 +02:00
protolambda 291168e1e3
clarify config/preset separation, address review comments by @djrtwo 2021-05-19 17:15:34 +02:00
protolambda 6f68913e11
implement pyspec build targets 2021-05-18 12:12:01 +02:00
protolambda e4593d2d0c
update with configs<>presets separation 2021-05-18 09:55:20 +02:00
protolambda fcf37895ba
remove duplicate sharding config var, fix minimal-sharding-config fork epoch name 2021-05-18 00:48:59 +02:00
Danny Ryan 699a3f837e
pr feedback 2021-05-13 13:38:43 -06:00
Danny Ryan 57e13fd5b2
add INACTIVITY_SCORE_RECOVERY_RATE to configs 2021-05-13 10:59:29 -06:00
Danny Ryan dd9fb06d25
Merge branch 'dev' into vbuterin-patch-12 2021-05-10 07:38:32 -06:00
Danny Ryan b979ea144a
Merge pull request #2378 from ralexstokes/update-altair-sync-protocol
Updates to Altair light client sync protocol
2021-05-06 12:50:52 -06:00
Danny Ryan 13409dc1bc
Merge branch 'dev' into adjust-sync-comm-params 2021-05-06 12:43:11 -06:00
Alex Stokes 4c73fec88e
convert `LightClientStore` to python object instead of SSZ object
this avoids the type overhead of having to define a max size for
the object's data and skips the overhead of serialization/consensus
for a type that does not need it
2021-05-06 10:52:48 -07:00
Hsiao-Wei Wang 6a9b3671f0
Fix the type of `EPOCHS_PER_SYNC_COMMITTEE_PERIOD` and update the config files 2021-05-05 19:53:37 +08:00
Alex Stokes 165c960cf1
Update config value to reflect spec 2021-05-04 13:47:46 -07:00
Alex Stokes 3b80324119
Compute `LIGHT_CLIENT_UPDATE_TIMEOUT` in lieu of maintaining a constant 2021-05-04 13:47:46 -07:00
Alex Stokes 7b33c1119a
simplify sync committee pubkey aggregation in altair 2021-05-04 12:19:33 -07:00
Alex Stokes 68d6e4319a
Adjust sync committee size and duration 2021-05-01 16:30:23 -07:00
Hsiao-Wei Wang 66e1a2858f
Use `ALTAIR_FORK_EPOCH` instead of `ALTAIR_FORK_SLOT` 2021-04-21 00:24:44 +08:00
Hsiao-Wei Wang 26f54d6f22
Remove `CONFIG_NAME` from the config files. And add it back to pyspec context for testing 2021-04-15 15:49:29 +08:00
Alex Stokes 3ea897d531
Add sync committee aggregation constant to config 2021-04-12 15:27:04 -07:00
protolambda 2cbc52b9dc
Implement review suggestions
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-04-06 03:17:07 +02:00
protolambda f7069510e6
update shard blob and headers types, implement shard blob slashings, update shard gossip validation 2021-04-06 02:23:43 +02:00
Danny Ryan b81c64fa15
Merge pull request #2287 from mbaxter/altair/change-altair-fork-default
Set tmp ALTAIR_FORK_SLOT to max value
2021-04-01 06:39:14 -06:00
Hsiao-Wei Wang 3391f991ac
Minor wording fixes 2021-03-30 13:48:40 +08:00
protolambda 7344442618
update merge and sharding configs to reflect fork slot placeholder, as in #2287 2021-03-30 01:53:36 +02:00
protolambda 07b7774241
misc. phase1 modules refactor updates 2021-03-30 01:46:02 +02:00
Diederik Loerakker 430627f290
Apply suggestions from @djrtwo
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-03-30 01:33:17 +02:00
Meredith Baxter 346454627d Set altair fork slot to max value 2021-03-29 13:45:41 -04:00
protolambda 2bc3e814b0
rename to custody game 2021-03-27 01:58:39 +01:00
protolambda c225813f7d
split phase1 configs into feature configs 2021-03-27 00:46:04 +01:00
Hsiao-Wei Wang ae258bc335
Update config files, add `DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF` and `DOMAIN_CONTRIBUTION_AND_PROOF` 2021-03-23 20:52:03 +08:00
Danny Ryan d49cddc1d8
Merge pull request #2255 from ralexstokes/update-subcommittee-name
Use different name for constant for sync committee aggregates
2021-03-22 11:34:32 -06:00
protolambda 4a82a375ae
avoid altair fork version collision, update test prep, fix genesis state creator bug 2021-03-21 22:07:28 +01:00
Alex Stokes 484fae3c2b
update constant name 2021-03-19 07:59:49 -06:00
Alex Stokes 208a658305
Use different name for constant for sync committee aggregates 2021-03-18 15:53:57 -06:00
Danny Ryan 4afb6533a2
suffix ALTAIR on update constants 2021-03-15 11:46:53 -06:00
Danny Ryan b8bf7f0f80
Merge pull request #2236 from ethereum/justin_altair_cleanups
Altair cosmetic cleanups plus a couple substantive changes
2021-03-15 08:57:35 -06:00
Justin Drake e7ebd08d69 Altair cosmetic cleanups plus a couple substantive changes 2021-03-15 11:08:41 +00:00
Hsiao-Wei Wang 1824bdf181
Update Altair configs 2021-03-13 01:21:04 +08:00
Danny Ryan 65dcf897c2
Merge pull request #2147 from ethereum/lightclient-sync-exe
Make `sync-protocol.md` pass the linter and add basic tests
2021-03-12 07:52:45 -07:00
Hsiao-Wei Wang c34eae33d0
Merge branch 'dev' into lightclient-sync-exe 2021-03-12 00:49:29 +08:00
Danny Ryan 79f351cfca
Merge branch 'dev' into leak-scores 2021-03-11 09:28:58 -07:00
Hsiao-Wei Wang b44e576e95
LIGHTCLIENT_PATCH/HF1 -> ALTAIR 2021-03-11 21:32:00 +08:00
Hsiao-Wei Wang 69489d1541
Rename folders and file names to `altair` 2021-03-11 21:12:46 +08:00
Hsiao-Wei Wang 2de64cbda1
Add `process_light_client_update` tests 2021-03-11 21:06:58 +08:00
Danny Ryan e2abdb74ae
port testing 2021-03-09 15:41:28 -07:00
Danny Ryan deace8768e
port @justindrake's general cleanups from #2212 2021-03-01 19:41:28 -07:00
Danny Ryan 2b8b0d9e2b
update penalty config values for hf1 2021-02-11 15:55:43 -07:00
Hsiao-Wei Wang 002dfaa891
Set minimal config's `SYNC_COMMITTEE_SIZE` to 32 2021-01-13 19:15:32 +08:00
Hsiao-Wei Wang 50765edc30
Set minimal config's `EPOCHS_PER_SYNC_COMMITTEE_PERIOD` to 8 2021-01-13 15:11:38 +08:00
Hsiao-Wei Wang acfe49e3f3
executable light client patch: beacon-chain.md (#2141)
* Bump remerkleable to 0.1.18

* Disable `sync-protocol.md` for now. Make linter pass

* Enable lightclient tests

* Use *new* `optional_fast_aggregate_verify`

* Fix ToC and codespell

* Do not run phase1 tests with Lightclient patch

* Fix the Eth1Data casting bug. Add a workaround.

* Fix `run_on_attestation` testing helper

* Revert

* Rename `optional_fast_aggregate_verify` to `eth2_fast_aggregate_verify`

* Apply Proto's suggestion

* Apply Danny's suggestion

* Fixing tests

* Fix after rebasing

* Rename `LIGHTCLIENT` -> `LIGHTCLIENT_PATCH`

* New doctoc

* Add lightclient patch configs

* fix gitignore light client patch generator output

* Upgrade state for light client patch

* Add `lightclient-fork.md` to deal the fork boundary and fix
`process_block_header`

* Misc cleanups

1) Add a summary note for every function that is changed.
2) Avoid changing `process_block` (instead only change `process_block_header`).
3) Rename `G2_INFINITY_POINT_SIG` to `G2_POINT_AT_INFINITY` to avoid `SIG` contraction.
4) Misc cleanups

* Update block.py

* Update beacon-chain.md

* Fix typo "minimal" -> "mainnet"

Co-authored-by: Marin Petrunić <mpetrunic@users.noreply.github.com>

* Use the new `BeaconBlockHeader` instead of phase 0 version

* Update config files

* Move `sync_committee_bits` and `sync_committee_signature` back to `BeaconBlockBody`

Co-authored-by: protolambda <proto@protolambda.com>
Co-authored-by: Justin <drakefjustin@gmail.com>
Co-authored-by: Marin Petrunić <mpetrunic@users.noreply.github.com>
2020-12-15 13:18:20 +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
Danny Ryan 91deacbf9c
double eth1data params 2020-10-07 18:52:47 -06:00
Danny Ryan 157f7e8ef4
upgrade config to mainnet values 2020-09-28 12:56:08 -06:00
Hsiao-Wei Wang 5374890da0
Merge branch 'dev' into testgenphase1 2020-09-17 21:11:49 +08:00
Hsiao-Wei Wang 2befe90032
Remove the unused `MAX_EPOCHS_PER_CROSSLINK` 2020-09-15 13:23:42 +08:00
protolambda 28137a6176
Merge branch 'dev' into testgenphase1 2020-09-09 23:43:26 +02:00
Hsiao-Wei Wang c995da420e
Update config files 2020-09-03 21:39:00 +08:00
Hsiao-Wei Wang 6289664260
Update testing context
1. Add `with_configs` decorator to assign available configs
2. Add `only_full_crosslink` decorator to detect if the configuation can
do full crosslinking
3. Add `context.is_pytest` flag: True if calling via pytest. False if
calling from test generator.
2020-08-12 21:50:14 +08:00
Hsiao-Wei Wang bd5346b624
Merge pull request #1989 from ethereum/enable-bls-citest
Enable Milagro BLS in CI
2020-07-29 23:54:53 +08:00
Hsiao-Wei Wang b58633ce5d
Quick fix the phase 1 configurations and tests (#1990)
* Quick fix the configurations

* Remove the unused `CUSTODY_RESPONSE_DEADLINE`
2020-07-29 02:06:25 +08:00
Hsiao-Wei Wang b1eb157539
Merge branch 'dev' into hwwhww/phase-1-fork-slot 2020-07-28 23:59:19 +08:00
Danny Ryan 9193a23f8e
add chain id and netowrk id to config 2020-07-23 12:05:22 -06:00
Hsiao-Wei Wang cf42fd4828
Rename `PHASE_1_GENESIS_SLOT` to `PHASE_1_FORK_SLOT` and set it to `Slot(0)` for testing. 2020-07-16 23:58:47 +08:00
Danny Ryan 759185632f
Merge branch 'dev' into phase1-validator 2020-06-16 16:07:20 -06:00
Hsiao-Wei Wang 5e5a951c6f
Fix conflicts 2020-06-16 23:49:41 +08:00
Danny Ryan a0175ca1b3
Merge branch 'dankrad-custody-256bit' into dankrad-custody-0.01bit 2020-06-16 07:15:00 -06:00
Danny Ryan 97d50b381b
minor fixes in config comments 2020-06-15 08:11:15 -06:00
Hsiao-Wei Wang 458d343497
Fix configs and put domain types to the same table 2020-06-15 21:15:11 +08:00
Hsiao-Wei Wang 8697b30eea
Fix configuration 2020-06-15 15:30:32 +08:00
Hsiao-Wei Wang e80f6727dc
Merge branch 'dev' into dankrad-custody-256bit 2020-06-15 15:13:45 +08:00
Dankrad Feist f6d7dac30c
Change to 2**14 epoch (73 day) custody periods as per #1888 2020-06-13 15:15:37 +01:00
Hsiao-Wei Wang aa75fb0b69
Fix `MAX_SHARDS` and move config files to `configs/{network}/{fork}` 2020-06-12 00:47:36 +08:00
Hsiao-Wei Wang 85ec791935
Sync with beacon-chain spec 2020-06-11 01:04:14 +08:00
Hsiao-Wei Wang 6502cc1149
Separate config files by phases 2020-06-11 01:04:10 +08:00
Dankrad Feist e46d5effe4
Add test for slashing after failing to respond to custody chunk challenge 2020-06-10 17:20:42 +01:00
Hsiao-Wei Wang 41cfa7fdf6
Merge branch 'dev' into dankrad-custody-256bit 2020-06-09 01:39:51 +08:00
Hsiao-Wei Wang eb21648146
Merge pull request #1858 from ethereum/hwwhww/get_start_shard
`get_start_shard` proposal
2020-06-04 00:46:12 +08:00
Hsiao-Wei Wang 68e934bf15
Add `get_start_shard` unittests and update minimal config
1. Add unittests for testing `get_start_shard` with better granularity
2. Change `INITIAL_ACTIVE_SHARDS` from `4` to `2` for tight crosslinking
2020-06-03 23:08:38 +08:00
Raw Pong Ghmoa d5ed78e974
reflect changes in minimal.yaml 2020-06-02 10:55:35 -06:00
Raw Pong Ghmoa b3f2d81ad5
reflect changes in mainnet.yaml 2020-06-02 10:55:25 -06:00
Danny Ryan 3a4db69a20
Merge branch 'dev' into dankrad-custody-256bit 2020-06-01 18:45:22 -06:00
Danny Ryan 3f0e58a8ed
add chunk challenge and response to block and operations 2020-05-19 07:50:05 -06:00
Danny Ryan 1137e0332d
move MAX_ATTESTER_SLASHINGS to 2, add multiple slashings per block tests 2020-05-08 10:43:11 -06:00
Danny Ryan 38f29ba0a8
remove PERSISTENT_COMMITTEE_PERIOD in favor of SHARD_COMMITTEE_PERIOD 2020-05-05 11:44:53 -06:00
Danny Ryan b2c36112f6
Merge branch 'dev' into v012x 2020-05-05 09:44:27 -06:00
Hsiao-Wei Wang ee4c866575
Merge branch 'dev' into dankrad-custody-256bit-merging 2020-05-05 15:22:36 +08:00
Hsiao-Wei Wang 85d5a9abaf
[squashed] shard chain updates wip
PR feedback from Danny and some refactor

1. Add stub `PHASE_1_GENESIS_SLOT`
2. Rename `get_updated_gasprice`  to `compute_updated_gasprice`
3. Rename `compute_shard_data_roots` to `compute_shard_body_roots`

Apply shard transition for the skipped slots

Refactor `shard_state_transition`

Get `beacon_parent_root` from offset slot

Add more test

Add `verify_shard_block_message`

Add `> 0`

Keep `beacon_parent_block` unchanged in `is_valid_fraud_proof`

Remove some lines

Fix type

Refactor + simplify skipped slot processing
2020-05-02 02:31:54 +08:00
Dankrad Feist 0e2931b9b3
All tests passed 2020-04-28 01:09:20 +01:00
Hsiao-Wei Wang d311248d35
Increase `EPOCHS_PER_ETH1_VOTING_PERIOD` from `2` to `4` for testing eth1 votes consensus 2020-04-27 22:18:43 +08:00
Dankrad Feist ab2ee0e2c2
Restoring chunk challenges and testing 2020-04-24 17:06:27 +01:00
Hsiao-Wei Wang c10e59bdf7
Fix `INACTIVITY_PENALTY_QUOTIENT`
The amount of inactivity penalty was adjusted to half since we were applying penalty for missing FFG target and source. But now we only apply it for missing target, so `INACTIVITY_PENALTY_QUOTIENT` should be `2**24`.
2020-04-08 10:32:16 +08:00
Hsiao-Wei Wang 071f6b5126
Gasprice rework: use `MIN_GASPRICE` as the initial gasprice and change `MIN_GASPRICE` to 8 gwei 2020-03-31 22:09:20 +08:00
Danny Ryan 3b7704a78f
Merge pull request #1649 from ethereum/eth1-voting-period-in-epochs
Eth1 voting period in epochs [updated for configs/phase1/tests compat.]
2020-03-10 13:24:03 -06:00
protolambda 2d7a292d36
eth1 vote period constant in epochs: update configs, phase1, tests 2020-03-10 18:36:53 +01:00
Danny Ryan 33e7680836
make hysteresis calculations configurable 2020-03-03 10:58:47 -07:00