Commit Graph

573 Commits

Author SHA1 Message Date
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
Hsiao-Wei Wang 781cd83f09
fix typo 2023-06-16 17:21:34 +08:00
Hsiao-Wei Wang 66eca39533
Merge branch 'dev' into pr3311 2023-06-16 16:24:55 +08:00
Paul Harris 5576d0e685
Moved configuration into network preset instead of constants. (#3394)
* Moved configuration into network preset instead of constants.

Now that `MAX_CHUNK_SIZE` and `GOSSIP_MAX_SIZE` are in configuration, we no longer need separate constants to represent them in the spec when they change in Bellatrix.

I've changed the usage, and put the values into the presets, but I'm not sure if I've updated the descriptions in the best way...

This is following on from the work in #3375 where a number of constants got moved into configuration, so we no longer need these constants to be separately represented, they can simply be updated in presets.

* Update presets/minimal/bellatrix.yaml

Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>

* Update presets/mainnet/bellatrix.yaml

Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>

* Moved preset items into the correct section and updated TOC.

It looked like the items listed in configuration about the max size and chunk size were no longer needed since we're updating preset values now and the preset changes seem to only be listed in the changes at the top.

* review feedback

* hopefully correct this time!  Moved the 2 fields from configs into presets completely as suggested.

* WIP - changing back to being in config and updating the phase 0 value... I think this should be close but want to see what's outstanding.

* fix intellij's formatting of table.

* more fixes

---------

Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2023-06-09 23:12:38 +08:00
djrtwo 68ce45b305 move epoch subscription length to config 2023-05-23 13:56:09 -06:00
Hsiao-Wei Wang f87e1436bf
Add networking configs to config files 2023-05-19 22:39:18 +08:00
Danny Ryan 363209d650
Merge pull request #3312 from AgeManning/attnets-revamp
Attnet revamp: Subnet backbone structure based on beacon nodes
2023-05-10 08:22:02 -06:00
dapplion 680b026d59 Add add_validator_to_registry fn 2023-05-09 19:18:42 +09:00
Hsiao-Wei Wang 5cb2733ed5
Add custom types `NodeID` and `SubnetID` and constant `NODE_ID_BITS` 2023-05-04 18:50:13 +08:00
Hsiao-Wei Wang 79b8a9abec
Apply suggestions from code review 2023-05-04 18:09:01 +08:00
Hsiao-Wei Wang a044c0c805
Merge branch 'dev' into pr3308 2023-05-01 16:31:45 +08:00
Hsiao-Wei Wang 745d529598
Add `compute_subscribed_subnets` unittests and fix typing errors 2023-04-25 12:57:49 +08:00
Ben Edgington b7f3d37a52 Move is_previous_epoch_justified 2023-04-21 09:16:51 +01:00
Hsiao-Wei Wang 03a3e4082a
Fix p2p-interface.md ToC 2023-04-19 19:10:46 +08:00
Roberto Saltini ffb84598cf Fixed doc in get_checkpoint_block 2023-04-18 16:03:10 +10:00
Roberto Saltini c985605973 Fix copy and past error 2023-04-18 13:49:08 +10:00
Roberto Saltini 36fcb81b88 Break long statement into two statements 2023-04-18 13:26:16 +10:00
Roberto Saltini 334114d9d3 Rename get_ancestor_at_epoch_boundary to get_checkpoint_block 2023-04-18 13:14:53 +10:00
Age Manning 6e423f6c42
Stagger node rotations 2023-04-12 11:29:48 +10:00
Roberto Saltini 41386092b7 Apply changes to p2p-interface.md 2023-04-08 14:00:01 +10:00
Age Manning a0d03378fa
Correct subnet subscription duration variable 2023-04-06 12:40:55 +10:00
Hsiao-Wei Wang 4cac761818
make linter happy 2023-04-05 11:38:20 +08:00
Hsiao-Wei Wang cdcf45855a
Merge branch 'dev' into pr3308 2023-04-05 11:19:09 +08:00
Suphanat Chunhapanya 912c9b37a1 Fix typos 2023-04-04 13:33:42 +07:00
Hsiao-Wei Wang 0dd8db76cd
Make linter happy. Add `SUBNET_DURATION_IN_EPOCHS` definition. 2023-03-30 14:51:41 +08:00
Age Manning 7cb1630902
Attnet revamp draft 2023-03-30 15:32:35 +11:00
Roberto Saltini c7029ce19e Rename get_epoch_boundary_block to get_ancestor_at_epoch_boundary 2023-03-29 12:40:58 +11:00
Roberto Saltini ddbd82e1be Add toc 2023-03-28 15:51:34 +11:00
Roberto Saltini 201f113b50 Introduce get_epoch_boundary_block 2023-03-28 15:43:48 +11:00
omahs 3115d1140b
Fix: typos 2023-03-25 13:14:57 +01:00
Danny Ryan a0eb23f108
Merge pull request #3290 from ethereum/fork-choice-upgrade
Fork choice upgrade
2023-03-15 10:51:09 -06:00
Aditya Asgaonkar 1a2967a542 Apply suggestions from @djrtwo 2023-03-14 14:49:41 -07:00
Aditya Asgaonkar 3de96f7a19
Apply suggestions from code review
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2023-03-14 13:54:57 -07:00
Danny Ryan b53392b463
Merge pull request #3177 from mkalinin/deposits
In-protocol deposits flow (no queue approach)
2023-03-14 11:33:36 -06:00
Aditya Asgaonkar 23c5b7c66e fix typo 2023-03-13 13:48:34 -07:00
Aditya Asgaonkar e9551715d5 large fork choice upgrade 2023-03-13 11:52:43 -07:00
Ben Edgington 7f74a08a6c Fix trailing whitespace 2023-03-09 11:07:01 +00:00
Mikhail Kalinin 13f3654296 Apply suggestions from @djrtwo 2023-03-02 17:29:22 +06:00
Ben Edgington 7637158a2f Change get_latest_attesting_balances() to get_weight() 2023-02-15 11:39:33 +00:00
Potuz 86962b9437 Simplify commitee weight computation 2023-02-10 11:43:38 -03:00
Hsiao-Wei Wang 127edf3af1
Merge pull request #3221 from benjaminion/fc-on-attester-slashing
Add on_attester_slashing() to handlers list
2023-01-27 21:49:34 +08:00
Ben Edgington 8a0de1c595 Add on_attester_slashing() to handlers list 2023-01-24 13:25:40 +00:00
Ben Edgington d54c87a5c0 Add genesis_block to get_forkchoice_store() params 2023-01-24 13:08:41 +00:00
Dustin Brody b5bcec8d34
deprecate phase 0-only versions of beacon_blocks_by_{range,root} 2022-09-26 15:01:45 +00:00
Hsiao-Wei Wang d133dae471
Fix codespell errors (#2975) 2022-08-18 22:08:44 +08:00
David Theodore c51e67a059 fixed typo in on_block() definition 2022-07-29 00:13:32 -07:00
fradamt 67d62025d9
fix typo and specify something
- committee_index is used as an input to compute_subnet_for_attestation but it's not previously defined
- attestation.data.committee_index is incorrect, the field is "index"
2022-06-27 14:20:25 +02:00
Jacek Sieka 0e6a7cd39a
deprecate `BeaconBlocksByRange.step` (#2856)
* deprecate `BeaconBlocksByRange.step`

The `step` parameter has not seen much implementation in real life
clients which instead opt to request variations on a few epochs at a
time (instead of interleaving single blocks, entire epochs are
interleaved).

At the same time, supporting `step` on the server side brings several
complications: more complex bounds checking logic, more complex loading
of blocks from linear storage (which presumably stores all blocks and
not just certain increments).

This PR suggests that we deprecate the whole idea. Backwards
compatibility is kept by simply responding with a single block when
`step > 0` - this is allowed by the spec and should thus be handled
gracefully by requesting clients already, should there exist any that
use larger step counts.

Removing `step` now allows simplifying the EL-CL protocol for serving
execution data from the EL to avoid double storage.

* Update specs/phase0/p2p-interface.md

Co-authored-by: Danny Ryan <dannyjryan@gmail.com>

Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2022-05-20 13:18:24 -06:00
Caspar Schwarz-Schilling 72f7b88f2a
Update PROPOSER_SCORE_BOOST to 40 percent (#2895) 2022-05-20 13:15:40 -06:00
Mikhail Kalinin d62ebaeaca
Run on_tick before picking the head for proposal (#2897) 2022-05-19 07:56:49 -06:00