Hsiao-Wei Wang
1d2ef9f8cb
Merge pull request #2938 from etan-status/lc-testsuite
...
Add functions for deriving light client data
2022-07-20 14:47:05 +08:00
dankrad
02a2b71d64
WIP implementation of Danksharding ( #2792 )
...
* Rough structure
* Most of the KZG checks in
* Fixes suggested by Vitalik
* Add low degree check for commitments
* Remove -1 check from degree proof (not needed)
* Require block builders to be validators to simplify things
* remove verify_intermediate_block_bid_commitment
* Rename back to process_block
* Degree check formula corrections
* Updated TOC, bid processing corrections
* Link to latest sharding doc
* Add shard samples + P2P
* Add validator guide for attestations and reconstruction
* Update specs/sharding/beacon-chain.md
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Update specs/sharding/beacon-chain.md
Co-authored-by: vbuterin <v@buterin.com>
* Update specs/sharding/beacon-chain.md
Co-authored-by: vbuterin <v@buterin.com>
* Refactor polynomial operations into separate file
* Add missing polynomial functions
* Fix polynomial commitment file toc levels
* Refactor the payload to make better use of unions
* Add reverse bit order convention
* Correct inequality in verify_degree_proof
* Small fix
* Fix polynomial evaluation
* Update specs/sharding/beacon-chain.md
Co-authored-by: George Kadianakis <desnacked@riseup.net>
* MAX_BEACON_BLOCKS_BETWEEN_INTERMEDIATE_BLOCKS definition added
* Sample reconstruction estimate
* Update specs/sharding/beacon-chain.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Fix return value of roots_of_unity()
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/beacon-chain.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/beacon-chain.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/beacon-chain.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Intermediate block -> Builder block
* Some small omissions in intermediate -> builder
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: George Kadianakis <desnacked@riseup.net>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: George Kadianakis <desnacked@riseup.net>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* Z1 -> inf_G1
* Fix degree proof bound
* SignedShardSample -> ShardSample
* Typo
* Don't allow 0 for `next_power_of_two`
* Remove unused `ROOT_OF_UNITY` constant
* Throwaway variable name
* Fix function documentation of `bls_modular_inverse`
* Builder block bid increase by at least 1%, no RANDAO processing in builder blocks
* Fix tocs
* Fix tocs
* Fix typo
* Update specs/sharding/polynomial-commitments.md
Co-authored-by: George Kadianakis <desnacked@riseup.net>
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: vbuterin <v@buterin.com>
Co-authored-by: George Kadianakis <desnacked@riseup.net>
2022-07-18 11:20:25 -06:00
Etan Kissling
0941114acf
Merge branch 'dev' into lc-testsuite
2022-07-18 18:19:07 +02:00
Hsiao-Wei Wang
a1546fdf4f
Merge branch 'dev' into fix-capella-genesis
2022-07-18 14:48:02 +08:00
Hsiao-Wei Wang
647e9d0ec0
PR feedback from @ralexstokes
2022-07-18 14:45:00 +08:00
Etan Kissling
c9f0927d8b
Merge branch 'dev' into lc-testsuite
2022-07-17 06:34:52 +02:00
Etan Kissling
63816debcc
Merge commit '9c798806355f67a32704a8cd5a98d90deccb8f69' into lc-testsuite
2022-07-15 21:38:18 +02:00
Hsiao-Wei Wang
185f51ec0e
Merge branch 'dev' into pr2937
2022-07-16 01:40:39 +08:00
Hsiao-Wei Wang
ec980dae4c
Rework `blobs_sidecar` propagation guide
2022-07-16 01:13:31 +08:00
Hsiao-Wei Wang
400e1e54c1
Fix EIP4844 `create_genesis_state`, `EIP4844_FORK_VERSION`, and `config_fork_epoch_overrides`
...
`config_fork_epoch_overrides`: since Capella and EIP4844 are in parallel, need to check if the field exists
Update `compute_fork_version`
2022-07-16 01:13:25 +08:00
Hsiao-Wei Wang
808f9c7f7f
Use `validate_*` for the valdiation functions that return `None`
2022-07-16 00:54:01 +08:00
Hsiao-Wei Wang
4176781123
PR feedback from @djrtwo
2022-07-15 23:37:32 +08:00
Hsiao-Wei Wang
a205e9314d
Make block proposal direction more clear
2022-07-15 23:33:31 +08:00
Hsiao-Wei Wang
9c79880635
Fix genesis testing tool and add Capella version `initialize_beacon_state_from_eth1` helper
2022-07-15 22:22:19 +08:00
Etan Kissling
a126f22cd9
Sync tocs
2022-07-15 13:49:19 +02:00
Etan Kissling
de15971ae8
Cleanups
2022-07-15 13:45:34 +02:00
Etan Kissling
88206117c6
Extract full node specifics to separate doc
2022-07-15 13:37:27 +02:00
Etan Kissling
d06f44ef55
Move `sync-protocol.md` into `light-client` subdir
2022-07-15 13:22:14 +02:00
Etan Kissling
6146f01400
Flip order of `assert` and assignment
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-15 12:03:44 +02:00
Etan Kissling
dbefbcf326
Explicitly mention optional `finalized_block`
2022-07-15 12:01:49 +02:00
Etan Kissling
95c07575b1
Hide `build_proof` and `get_backing` from spec
2022-07-15 11:54:47 +02:00
Etan Kissling
86fe93ca96
Add functions for deriving light client data
...
Adds `create_light_client_bootstrap` and `create_light_client_update`
functions as a reference implementation for serving light client data.
This also enables a new test harness to verify that light client data
gets applied to a `LightClientStore` as expected.
2022-07-14 09:36:09 +02:00
Etan Kissling
66325d0e9b
Use helper variables to make ifs more readable
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-13 14:08:51 +02:00
George Kadianakis
5b9bf41de6
EIP-4844: Further improvements on the spec
...
- Move constants around
- Implement missing functions to make the spec executable
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-13 13:13:30 +03:00
George Kadianakis
221f3687bd
EIP-4844: Improve the cryptographic parts of the spec
...
- Move more code into polynomial-commitments.md
- Implement aggregated sidecar verification logic from PR #2915
- Rename `kzgs` to `kzg_commitments`
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-13 13:12:31 +03:00
Etan Kissling
6048f1abf6
More concise finality ranking
2022-07-12 07:37:12 +02:00
Etan Kissling
654970c605
Add `LightClientBootstrap`
...
Introduces a new `LightClientBootstrap` structure to allow setting up a
`LightClientStore` with the initial sync committee and block header from
a user-configured trusted block root.
This leads to new cases where the `LightClientStore` is only aware of
the current but not the next sync committee. As a side effect of these
new cases, the store's `finalized_header` may now advance into the next
sync committee period before a corresponding `LightClientUpdate` with
the new sync committee is obtained, improving responsiveness.
Note that so far, `LightClientUpdate.attested_header.slot` needed to be
newer than `LightClientStore.finalized_header.slot`. However, it is now
necessary to also consider certain older updates to try and backfill the
`next_sync_committee`. The `is_better_update` helper is also updated to
improve `best_valid_update` tracking.
2022-07-12 07:27:00 +02:00
Etan Kissling
b7a0e532e4
Prefix update `period` variables
2022-07-10 22:05:18 -07:00
Etan Kissling
2ddb3833ff
Extend documentation for forced updates
2022-07-08 22:25:33 -07:00
Etan Kissling
33f572c98d
More concise sync committee finality ranking
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-08 22:05:48 -07:00
Etan Kissling
fa85648385
`==` on new line
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-08 22:04:05 -07:00
Etan Kissling
35f5010de7
More concise finality ranking
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-07-08 22:01:56 -07:00
Etan Kissling
aa8caee2e3
Add `compute_sync_committee_period_at_slot`
2022-07-08 21:59:09 -07:00
Etan Kissling
c67ad597f0
Reorder helpers to group ones operating on updates
2022-07-08 21:46:34 -07:00
Etan Kissling
c4dbd241ac
Root `next_sync_committee` in `attested_header`
...
`LightClientUpdate` structures currently use different merkle proof root
depending on the presence of `finalized_header`. By always rooting it in
the same state (the `attested_header.state_root`), logic gets simpler.
Caveats:
- In periods of extended non-finality, `update.finalized_header` may now
be outdated by several sync committee periods. The old implementation
rejected such updates as the `next_sync_committee` in them was stale,
but the new implementation can properly handle this case.
- The `next_sync_committee` can no longer be considered finalized based
on `is_finality_update`. Instead, waiting until `finalized_header` is
in the `attested_header`'s sync committee period is now necessary.
- Because `update.finalized_header > store.finalized_header` no longer
holds (for updates with finality), an `is_better_update` helper is
added to improve `best_valid_update` tracking (in the past, finalized
updates with supermajority participation would always directly apply)
This PR builds on prior work from:
- @hwwhww at https://github.com/ethereum/consensus-specs/pull/2829
2022-07-01 14:49:24 -07:00
Etan Kissling
f5f3031c5e
Allow passing redundant `next_sync_committee`
...
The producer of `LightClientUpdate` structures usually does not know how
far the `LightClientStore` on the client side has advanced. Updates are
currently rejected when including a redundant `next_sync_committee` not
advancing the `LightClientStore`. Behaviour is changed to allow this.
2022-06-29 13:16:03 +02:00
Hsiao-Wei Wang
f810b6714b
Merge pull request #2924 from etan-status/lc-genesis
...
Allow `LightClientUpdate` with genesis finality
2022-06-29 13:12:58 +02:00
Etan Kissling
65cfedef22
Update finality update documentation
2022-06-27 22:36:55 +02:00
Etan Kissling
99e30328a8
Switch condition order for readability
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-06-27 22:26:35 +02: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
Etan Kissling
c10daf1709
Allow `LightClientUpdate` with genesis finality
...
When `state.finalized_checkpoint` references the genesis slot, it points
to an empty `root`, instead of the actual genesis block hash. This patch
updates the `LightClientUpdate` logic to allow including finality proofs
for genesis `finalized_checkpoint.root`, better supporting non-mainnet.
When including such a finality proof, the proof is for the empty `root`,
but `finalized_header` is kept zeroed out to signify this edge case.
2022-06-27 12:10:40 +02:00
Hsiao-Wei Wang
a40a64440c
Merge pull request #2916 from etan-status/lc-forkversion
2022-06-27 06:38:11 +02:00
Hsiao-Wei Wang
d4a2bdcea0
Merge pull request #2915 from asn-d6/consensus-4844-proofs-optimization
...
Optimizing EIP-4844 block validation (using KZG proofs)
2022-06-26 13:55:17 +02:00
Hsiao-Wei Wang
a3339c7b7f
PR suggestion from @Inphi
2022-06-25 00:13:20 +08:00
Etan Kissling
840733ffd2
Move `compute_fork_version` to `fork.md`
2022-06-23 21:03:24 +02:00
Hsiao-Wei Wang
94da861d9c
Fix ToC
2022-06-23 18:44:37 +08:00
Hsiao-Wei Wang
0ab280d396
minor suggestions
2022-06-23 18:40:09 +08:00
George Kadianakis
e7e520791d
Use Python's pow() in bls_modular_inverse().
2022-06-22 15:42:03 +03:00
George Kadianakis
534a9d1d95
Move EIP-4844 cryptography code to its own file
2022-06-22 15:42:03 +03:00
Hsiao-Wei Wang
8a70295a84
Fix ToC
2022-06-20 21:26:41 +08:00
Etan Kissling
0b8ab23bd4
Remove `fork_version` from `LightClientUpdate`
...
The `fork_version` field in `LightClientUpdate` can be derived from the
`update.signature_slot` value by consulting the locally configured fork
schedule. The light client already needs access to the fork schedule to
determine the `GeneralizedIndex` values used for merkle proofs, and the
memory layouts of the structures (including `LightClientUpdate`). The
`fork_version` itself is network dependent and doesn't reveal that info.
2022-06-16 17:17:24 +02:00
Hsiao-Wei Wang
8cc008d11c
Merge pull request #2805 from etan-status/lc-period
...
Allow light client to verify signatures at period boundary
2022-06-16 16:53:12 +02:00
George Kadianakis
4be0b9d6bc
Add needed math/crypto functions to validate KZG aggregated proofs
...
All code pretty much straight up copied from https://github.com/ethereum/EIPs/pull/5088
2022-06-14 16:37:08 +03:00
George Kadianakis
e4c75d67ce
Introduce high-level logic of new efficient block validation
2022-06-14 16:37:08 +03:00
inphi
dbac7b1582
EIP-4844: Remove shard field from BlobsSidecar
2022-06-13 16:32:18 -04:00
Danny Ryan
74489d5523
Partial withdrawals ( #2862 )
...
* t push base design for partial withdrawals
* moor tests
* clean up withdrawals naming
* make partial withdrawal randomized tests better
* Apply suggestions from code review
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
* fix mainnet brokn test
* name swap
* lint
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-06-08 13:16:12 -06:00
Murphy Law
a3128b8c57
EIP-4844: fix a typo ( #2898 )
2022-05-31 08:40:06 -06: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
Alex Stokes
5337da5dff
use python syntax for bitwise AND operation ( #2894 )
2022-05-17 07:14:19 -06:00
Jacek Sieka
bab5e402df
Ignore subset aggregates ( #2847 )
...
* Ignore subset aggregates
When aggregates are propagated through the network, it is often the case
that a better aggregate has already been seen - in particular, this
happens when an aggregator has not been able to include itself in the
mesh and therefore publishes an aggregate with only its own
attestations.
This new ignore rule allows dropping all aggregates that are
(non-strict) subsets of aggregates that have already been seen on the
network. In particular, it does not mandate dropping aggregates where a
union of previous aggregates would cause it to become a subset).
The logic for allowing this is based on the premise that any aggregate
that has already been seen by a peer will also have been seen by its
neighbours - a subset aggregate (strict or not) brings no new value to
the aggregation algorithm, except in the extreme edge case where you
could combine several such sparse aggregates into a single, more dense
"combined" aggregate and thus use less block space.
Further, as a small benefit, computing the `hash_tree_root` of the full
aggregate is generally not done -however, `hash_tree_root(data)` is
already done for other purposes as this is used as index in the beacon
API.
* add subset ignore rule to sync contributions as well
* typo
2022-05-17 07:05:22 -06:00
Alex Stokes
20a90f1df7
Add new `DomainType` for application usage ( #2884 )
2022-05-16 08:08:15 -06:00
Danny Ryan
af1fbab181
Merge pull request #2888 from casparschwa/update-proposer-score-boost
...
Update proposer score boost
2022-05-16 08:06:59 -06:00
terencechain
ec7bb23697
bellatrix-p2p: fix a typo
2022-05-14 10:30:20 -07:00
Danny Ryan
c0a8178fff
minor patch to bytes formatting in capella
2022-05-10 09:37:01 -06:00
Danny Ryan
242f286f6e
Merge pull request #2878 from michaelsproul/forkchoice-b4-propose
...
Require fork choice to run before proposal
2022-05-10 09:23:16 -06:00
Caspar Schwarz-Schilling
712a4f9cf1
Fix linting
2022-05-09 15:05:05 +02:00
Caspar Schwarz-Schilling
f5303ca58e
Update PROPOSER_SCORE_BOOST to 33 percent
2022-05-09 10:17:24 +02:00
Danny Ryan
c1d0836936
Merge pull request #2855 from ethereum/00-to-01
...
00 to 01 cred change
2022-05-05 07:31:49 -06:00
Michael Sproul
3f76792ee3
Require fork choice to run before proposal
2022-05-05 11:21:55 +10:00
Etan Kissling
5653649ca8
Allow light client to verify signatures at period boundary
...
As the sync committee signs the previous block, the situation arises at
every sync committee period boundary, that the new sync committee signs
a block in the previous sync committee period. The light client cannot
reliably detect this condition (e.g., assume that this is the case when
it is currently on the last slot of a sync committee period), because
the last couple slots of a sync committee period may not have a block.
For example, when receiving a `LightClientUpdate` that is constructed
as in the following illustration, it is unknown whether `sync_aggregate`
was signed by the current or next sync committee at `attested_header`.
```
slot N N + 1 | N + 2 (slot not sent!)
|
+-----------------+ \ / | +----------------+
| attested_header | <--- X ----|---- | sync_aggregate |
+-----------------+ / \ | +----------------+
missed |
|
sync committee
period boundary
```
This patch addresses this edge case by including the slot at which the
`sync_aggregate` was created into the `LightClientUpdate` object.
Note that the `signature_slot` cannot be trusted beyond the purpose of
signature verification, as it could be manipulated to any other slot
within the same sync committee period and fork version, without making
the `sync_aggregate` invalid.
2022-05-02 13:08:20 +02:00
Etan Kissling
f125538122
Fix param order in `prepare_execution_payload`
...
Documentation on how to call `prepare_execution_payload` had the params
for `safe_block_hash` and `finalized_block` hash flipped compared to the
function definition. Also updated tests for consistency.
2022-04-25 16:49:00 +02:00
Hsiao-Wei Wang
83ac38c183
Merge pull request #2872 from benjaminion/patch-1
2022-04-17 08:00:33 -07:00
Ben Edgington
eca7237b27
Correct typo: BLSCommitment -> KZGCommitment
...
The consensus chain counterpart to https://github.com/ethereum/EIPs/pull/4992 . The same comment from there applies here as well.
2022-04-13 15:04:55 +01:00
Hsiao-Wei Wang
dcf41ef5e2
Merge branch 'dev' into eip4844-typo
2022-04-12 22:14:37 +08:00
Hsiao-Wei Wang
5978c86f3a
Typo fix: `ksg_to_version_hash` -> `kzg_to_versioned_hash`
2022-04-10 18:41:49 +08:00
Hsiao-Wei Wang
6576cab612
Fix Capella `prepare_execution_payload`
2022-04-06 18:13:39 +08:00
Danny Ryan
1bfefe301d
Merge pull request #2858 from mkalinin/justified-to-safe-block
...
Bellatrix: pass justified as a safe block
2022-03-30 12:19:21 -06:00
Danny Ryan
c87fc48053
minor typo
2022-03-30 12:04:23 -06:00
Mikhail Kalinin
b13a9f0f8a
Apply suggestions as per review
2022-03-30 15:36:01 +06:00
terence tsao
eb26a1d74c
EIP4844: fix a minor typo
2022-03-26 08:26:52 -07:00
Danny Ryan
19613ac7cd
Merge pull request #2854 from ralexstokes/update-0x01-creds
...
Update 0x01 withdrawal credentials.
2022-03-25 16:27:41 -06:00
Mikhail Kalinin
bd66114f4a
Clarify names and move get_safe_block_hash to safe-block.md
2022-03-26 02:02:38 +06:00
Mikhail Kalinin
c97cc6f4dc
Add separate get_safe_beacon_block function
2022-03-24 17:22:11 +06:00
Mikhail Kalinin
bc95973232
Reorder params
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-03-24 16:35:28 +06:00
Danny Ryan
4ac4158b42
move bls chang operation to end of block body
2022-03-23 10:54:40 -06:00
Hsiao-Wei Wang
8a388f2226
toc
2022-03-23 15:38:17 +08:00
Danny Ryan
2017b61265
test address_change
2022-03-22 13:37:17 -06:00
Mikhail Kalinin
046eaf2ea0
Bellatrix: remove a comment about safe head stub
2022-03-22 22:53:47 +06:00
Mikhail Kalinin
95a2327800
Bellatrix: add get_safe_block_hash to validator.md
2022-03-22 22:51:45 +06:00
Mikhail Kalinin
d195e066ad
Fix toc
2022-03-22 20:41:42 +06:00
Mikhail Kalinin
199398c503
Bellatrix: pass justified as a safe block
2022-03-22 20:26:09 +06:00
Danny Ryan
38496ba021
toc
2022-03-22 08:23:59 -06:00
Danny Ryan
702ed9f39a
Merge branch 'withdrawals-push' into 00-to-01
2022-03-22 08:23:34 -06:00
Danny Ryan
b469593219
toc
2022-03-22 08:22:35 -06:00
Danny Ryan
0da78ebc4b
Merge branch 'withdrawals-push' into 00-to-01
2022-03-22 08:19:31 -06:00
Danny Ryan
a2db44693b
build
2022-03-22 08:14:38 -06:00
Danny Ryan
c10d219664
Merge branch 'dev' into withdrawals-push
2022-03-22 08:11:09 -06:00
Danny Ryan
43ce98b541
Merge branch 'withdrawals-push' of github.com:ethereum/eth2.0-specs into withdrawals-push
2022-03-22 08:10:53 -06:00
Danny Ryan
03f9503de0
Apply suggestions from code review
...
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
2022-03-22 08:03:55 -06:00
Danny Ryan
9a8ff4f3ab
topo sort
2022-03-22 08:00:53 -06:00
Danny Ryan
493b169022
refine naming for withdrawals
2022-03-22 07:55:45 -06:00
terence tsao
36b0044569
EIP4844: fix a minor typo
2022-03-20 08:20:08 -07:00
Danny Ryan
79cdb88e66
wip 00 to 01 cred change
2022-03-16 15:41:37 -06:00
Danny Ryan
36aae1d848
add tests for process_withdrawals
2022-03-16 13:35:29 -06:00
Danny Ryan
255e942f64
add validator and fork-choice mods for withdrawals in capella
2022-03-16 12:01:42 -06:00
Mikhail Kalinin
cc347c6ff4
Merge pull request #2851 from mkalinin/safe-head
...
Add safe_block_hash to notify_forkchoice_updated
2022-03-16 13:29:23 +06:00
Alex Stokes
0afa7e1b38
update language to reflect latest work on withdrawals
2022-03-15 18:01:47 -06:00
Danny Ryan
80292f7957
Update specs/bellatrix/validator.md
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-03-15 13:14:40 -06:00
protolambda
dc5f9dffa0
eip4844: process_blob_kzgs - move TODO to issue, add missing input argument
2022-03-14 21:50:07 +01:00
protolambda
9b760dfb54
eip4844: beacon doc - update TOC
2022-03-14 19:08:50 +01:00
protolambda
45e207be4d
EIP-4844 consensus-specs review fixes
...
Co-Authored-By: terenc3t <terence@prysmaticlabs.com>
Co-Authored-By: djrtwo <dannyjryan@gmail.com>
2022-03-14 18:57:11 +01:00
Mikhail Kalinin
84ab086d94
Add safe_block_hash to notify_fc_updated
2022-03-14 19:09:21 +06:00
Danny Ryan
3dd83cf4ee
minor withdrawals renamings
2022-03-10 12:30:51 -07:00
Danny Ryan
507f550cb1
Merge branch 'dev' into withdrawals-push
2022-03-10 10:27:20 -07:00
protolambda
8ec4773339
EIP-4844: consensus layer changes
2022-03-10 06:52:27 +01:00
Danny Ryan
825a39577e
Merge pull request #2845 from ethereum/discard-equivocations
...
Remove equivocating validators from fork choice consideration
2022-03-08 11:41:04 -07:00
Danny Ryan
bd6d2ad4ce
minor copy edit
2022-03-08 11:33:59 -07:00
Danny Ryan
0197a1464c
Merge pull request #2846 from nisdas/patch-2
...
Ignore Aggregates Which Are Following the Wrong Finalized Checkpoint
2022-03-08 11:28:20 -07:00
Aditya Asgaonkar
a0ba6b2a1a
Add note about syncing
2022-03-08 06:52:03 -08:00
Aditya Asgaonkar
1e10e7dc1c
Fix UPDATE_TIMEOUT unit typo
2022-03-03 20:16:32 -08:00
Danny Ryan
e1b9cf97e2
add withdrawal index to wihdrawal transaction
2022-03-03 14:02:52 -07:00
Danny Ryan
15a90407ef
minor comment change
2022-03-03 13:50:05 -07:00
Aditya Asgaonkar
37b8a89bb1
Apply code review from @djrtwo
2022-03-03 11:43:52 -08:00
Nishant Das
70e8243450
Update p2p-interface.md
2022-03-02 12:39:21 +08:00
Aditya Asgaonkar
7f31c80b8f
Fix lint & CI
2022-03-01 11:47:45 -08:00
Aditya Asgaonkar
4fbe162655
Add on_attester_slashing() and related test
2022-03-01 11:42:49 -08:00
Danny Ryan
72d4597131
Merge pull request #2828 from ethereum/is_finality_update
...
Refactoring: add `is_finality_update` helper
2022-02-28 08:39:38 -07:00
Danny Ryan
3f2d5ecda7
Merge pull request #2838 from ethereum/revert-dupe-condition
...
revert removal of aggregate deduplication condition from #2183
2022-02-28 08:19:45 -07:00
Danny Ryan
bbdb50278c
Merge pull request #2830 from status-im/ignore-atts
...
Ignore attestations voting for the wrong finalized checkpoint
2022-02-25 11:18:41 -07:00
Danny Ryan
03f0f6762a
revert removal of aggregate deduplication condition from #2183
2022-02-25 10:25:27 -07:00
Danny Ryan
0a55f062d7
fix execution paylaod tests
2022-02-24 15:38:23 -07:00
Danny Ryan
f5dab5b666
fix fully withdrawal tests
2022-02-24 15:06:31 -07:00
Danny Ryan
d513f5cf17
fix lint
2022-02-24 14:26:15 -07:00
Alex Stokes
0b89c7fb18
Update specs/capella/beacon-chain.md
2022-02-24 12:43:57 -07:00
Danny Ryan
e49f73c9a4
fix tx type
2022-02-23 15:15:24 -07:00
Danny Ryan
2026103bb9
Merge branch 'dev' into withdrawals-push
2022-02-23 15:08:29 -07:00
Danny Ryan
e80a142d83
modified withdrawals for push
2022-02-23 15:05:55 -07:00
Mikhail Kalinin
1280fe2a02
Bellatrix: random -> prev_randao
2022-02-22 17:16:33 +06:00
Jacek Sieka
9fb2dd16c1
Ignore attestations voting for the wrong finalized checkpoint
...
When nodes are syncing but have not yet reached the canonical `head`,
they cannot determine whether nodes they are connected to serve a valid
history or are making bogus claims in their `Status` advertisement.
Thus, the best course of action that a client can take is to vote for
its "current" best synced head, regardless of whether it's connected to
peers that claim to have other heads or not.
However, in the p2p spec, we penalize such peers with a `REJECT` - this
should be an `IGNORE` instead because this vote is correct per the spec,
albeit "late" according to the validating clients' view of the chain.
2022-02-11 17:12:13 +01:00
Hsiao-Wei Wang
6d11d627f8
Refactoring: add `is_finality_update` helper
2022-02-09 18:13:51 -07:00
Danny Ryan
5a09b5f8a8
Merge pull request #2814 from etan-status/lc-opt-fin
...
Ensure light client `optimistic_header` to be at head
2022-02-09 10:06:57 -07:00
Danny Ryan
824ff970f5
Merge pull request #2818 from etan-status/err-unavailable
...
Update reserved libp2p error documentation
2022-02-03 09:00:34 -07:00
Hsiao-Wei Wang
f2fd673a66
Merge pull request #2807 from etan-status/compute-sync-period
...
Consistently use `compute_sync_committee_period`
2022-02-01 16:05:58 -08:00
Etan Kissling
20c8d0d641
Update reserved libp2p error documentation
...
The spec reserves the libp2p error code range `[3, 127]` for future use
but actually defines error code `3` as `ResourceUnavailable`. This patch
updates the reserved range to `[4, 127]`.
2022-01-28 00:33:38 +01:00
Mikhail Kalinin
eb4497fae7
Bellatrix: Rename execute_payload to notify_new_payload
2022-01-27 15:24:53 +06:00
Danny Ryan
b517092770
Merge pull request #2812 from tersec/intervals_per_slot
...
use INTERVALS_PER_SLOT in sync committee specs
2022-01-25 15:18:53 -07:00
Danny Ryan
d5e4828aec
Merge pull request #2770 from sigp/opt-sync-2
...
Optimistic Sync
2022-01-25 10:26:29 -07:00
Etan Kissling
0e9460b8dd
Ensure light client `optimistic_header` to be at head
...
When a light client updates its `finalized_header` using a forced update
because of the timeout, and the new header was not signed by enough sync
committee participants to pass `get_safety_threshold(store)`, it may
occur that `store.finalized_header.slot > store.optimistic_header.slot`.
This patch ensures that the `optimistic_header` is updated to the latest
`finalized_header` if that happens, so that it always indicates the
latest known and accepted head.
2022-01-25 10:09:10 +01:00
Dustin Brody
182e4496c3
use INTERVALS_PER_SLOT in sync committee specs
2022-01-21 19:01:56 +00:00
Danny Ryan
2232d76735
Merge pull request #2808 from ethereum/receipts-root
...
receipt_root -> receipts_root
2022-01-20 08:37:57 -07:00
Alex Stokes
02b32100ed
Merge pull request #2803 from ralexstokes/clean-up-linter
...
add `pylint` to catch unused args
2022-01-18 09:29:54 -06:00
Danny Ryan
f77fc055f8
Update specs/bellatrix/beacon-chain.md
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2022-01-18 07:19:00 -07:00
Paul Hauner
092f3e0b16
Propose -> Propagate
2022-01-18 11:22:07 +11:00
Paul Hauner
6225236a52
Specify about EL/CL scoring rules
2022-01-18 11:20:52 +11:00
Paul Hauner
b1ec9bcfbc
Update gossip conditions
2022-01-18 11:12:55 +11:00
Paul Hauner
15ef2f30d2
Apply suggestions from @djrtwo review
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2022-01-18 09:30:01 +11:00
Danny Ryan
671c4f0e3a
receipt_root -> receipts_root
2022-01-17 13:42:10 -07:00
Etan Kissling
8319d07084
Consistently use `compute_sync_committee_period`
...
There were a couple instances where a division was used on an epoch
to derive the corresponding sync committee period instead of calling the
`compute_sync_committee_period` function.
These instances were changed to also use the function.
2022-01-17 17:38:24 +01:00
Etan Kissling
fd89b72c6b
`doctoc` on `custody_game` specs
...
This updates the TOC in `custody_game/beacon-chain.md` using
`make doctoc specs`.
2022-01-17 12:56:51 +01:00
Alex Stokes
2b45496fe4
clean up unused argument from `phase0`
2022-01-13 11:39:36 -08:00
Hsiao-Wei Wang
16c350ebcd
Merge pull request #2796 from etan-status/lc-aggregate
...
Rename `sync_committee_aggregate` > `sync_aggregate`
2022-01-13 21:07:50 +08:00
Paul Hauner
0c2e416a6e
Run doctoc
2022-01-13 06:56:32 +11:00
Paul Hauner
90fb7f6871
Add rationale
2022-01-12 19:04:43 +11:00
Paul Hauner
e97335a09a
Merge branch 'dev' into opt-sync-2
2022-01-12 16:22:05 +11:00
Paul Hauner
1228e01883
Update p2p-networking
2022-01-12 16:18:53 +11:00
Danny Ryan
7b435bd470
Merge pull request #2797 from etan-status/lc-update-doc
...
Fix light client docs to match function signature
2022-01-11 06:57:19 -07:00
Etan Kissling
79c456b9f4
Fix light client docs to match function signature
...
In the light client docs a mentioning of a function trigger is lacking
the `genesis_validators_root` argument. This patch adds that argument
to the documentation to match the real function signature. It also
slightly improves the grammar.
2022-01-11 12:10:30 +01:00
Etan Kissling
212eb00fc1
Document light client constants
...
This adds documentation about the unit and actual value of light client
specific constants, consistently with the rest of the spec.
2022-01-11 12:10:09 +01:00
Etan Kissling
48e19b15ae
Rename `sync_committee_aggregate` > `sync_aggregate`
...
This renames the `sync_committee_aggregate` field of `LightClientUpdate`
to `sync_aggregate` for consistency with the terminology in the rest of
the spec.
2022-01-11 11:22:39 +01:00
Hsiao-Wei Wang
171a9ccc81
Resolve conflicts
2021-12-27 18:30:12 +08:00
Hsiao-Wei Wang
3970fa7a75
PR feedback from @ralexstokes
2021-12-24 01:38:33 +08:00
Hsiao-Wei Wang
8c226013fd
minor fix
2021-12-23 17:32:15 +08:00
Hsiao-Wei Wang
41af639517
PR feedback from @mkalinin
2021-12-23 17:26:48 +08:00
Hsiao-Wei Wang
8facc0a095
Merge -> Bellatrix
2021-12-23 14:25:43 +08:00
Hsiao-Wei Wang
2fa396f67d
Merge pull request #2746 from ethereum/vbuterin-patch-12
...
Simplify sync protocol and update to calculate optimistic heads
2021-12-16 00:12:36 +08:00
Hsiao-Wei Wang
de892382db
Minor style fixes
2021-12-15 23:44:29 +08:00
Hsiao-Wei Wang
25d88fee24
Fix `process_light_client_update`
2021-12-14 22:05:09 +08:00
Hsiao-Wei Wang
2f618f7b48
Fix lint and presets
2021-12-14 21:38:58 +08:00
vbuterin
916193bd69
Updates in response to comments
2021-12-10 07:48:14 -06:00
Hsiao-Wei Wang
200ed58dd9
Merge branch 'dev' into ex-ante-tests
2021-12-07 18:29:48 +08:00
Danny Ryan
3a9777eebc
Update specs/phase0/fork-choice.md
2021-12-02 14:00:06 -07:00
Danny Ryan
180abb90ec
clean up some withdrawal logic and add tests
2021-12-02 11:56:33 -07:00
Aditya Asgaonkar
0d8fab3986
Apply Danny's suggestion
2021-12-02 09:57:28 -08:00
Danny Ryan
3024dc8ba8
add withdrawn_epoch to capella validators
2021-12-02 10:52:56 -07:00
Danny Ryan
ca74094605
Apply suggestions from code review
...
Co-authored-by: Mikhail Kalinin <noblesse.knight@gmail.com>
2021-12-02 10:31:56 -07:00
Aditya Asgaonkar
6f3379c7be
Apply HWW's suggestion
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-12-01 20:11:52 -08:00
Aditya Asgaonkar
3e2890bb3e
Apply proposer boost to ancestors correctly
2021-12-01 18:03:40 -08:00
Danny Ryan
4f24fe455b
basic capella withdrawal in place
2021-12-01 11:37:30 -07:00
Danny Ryan
4d35748ff0
Merge pull request #2754 from ethereum/dankrad-patch-1
...
Correct primitive root
2021-12-01 08:15:27 -07:00
dankrad
ad588d79f6
Update beacon-chain.md
...
5 is not a primitive root of the BLS field, it needs to be 7
2021-11-30 22:52:16 +00:00
realbigsean
0bc0769767
Simplify logic in calculating proposer score
2021-11-30 15:44:56 -05:00
Hsiao-Wei Wang
d7f6a42729
[WIP] Add ex-ante fork choice test cases
2021-12-01 02:37:22 +08:00
Hsiao-Wei Wang
402c663b51
Fix function name leftover
2021-11-30 21:57:43 +08:00
vbuterin
c30662b696
Consistently use sum instead of count(1)
2021-11-30 06:39:25 -06:00
Hsiao-Wei Wang
7de1495a42
Fix lint ( #2750 )
2021-11-30 06:38:42 -06:00
vbuterin
6fa19705fb
Clarified next sync committee comment
2021-11-29 07:05:01 -06:00
vbuterin
06af6296c5
Updated in response to comments
2021-11-29 07:04:05 -06:00
vbuterin
c4f70970c4
Update specs/altair/sync-protocol.md
...
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-11-28 08:31:48 -06:00
vbuterin
77188726de
Fixed ToC and get_active_header positioninf
2021-11-27 07:27:16 -06:00
vbuterin
e104164960
Rework data structures ( #2747 )
...
1. Replace `header` and `finality_header` with `attested_header` (always the header signed by the committee) and `finailzed_header` (always the header verified by the Merkle branch)
2. Remove `LightClientSnapshot`, fold its fields into `LightClientStore` for simplicity
2021-11-27 07:25:27 -06:00
vbuterin
013e814d2d
Update sync-protocol.md
2021-11-26 15:32:37 -06:00
vbuterin
25f2efab19
Simplify sync protocol and update to calculate optimistic heads
...
1. Simplify `valid_updates` to `best_valid_update` so the `LightClientStore` only needs to store O(1) data
2. Track an optimistic head, by looking for the highest-slot header which passes a safety threshold
2021-11-26 15:11:19 -06:00
Danny Ryan
e1356aec83
Merge pull request #2745 from mkalinin/clarify-forkchoice-updated
...
Bring more clarity to notify_forkchoice_updated calls
2021-11-26 06:54:37 -07:00
Danny Ryan
d237491dfe
minor typo
2021-11-26 06:47:05 -07:00
Mikhail Kalinin
7a8f236679
Fix notify_forkchoice_updated description as per review
2021-11-25 16:33:30 +06:00
Mikhail Kalinin
b4377333fa
Polish notify_forkchoice_updated description as per review
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-11-25 16:27:59 +06:00
Mikhail Kalinin
6ece777ff5
Bring more clarity to notify_forkchoice_updated calls
2021-11-24 20:32:27 +06:00
Mikhail Kalinin
00bede5908
Remove client-settings.md
2021-11-24 17:00:32 +06:00
Danny Ryan
69e7f586ac
Merge pull request #2738 from ethereum/fix-names
...
is_merge -> is_merge_transition
2021-11-23 14:52:05 -07:00
Danny Ryan
a0d008bb86
is_merge -> is_merge_transition
2021-11-23 14:45:03 -07:00
Danny Ryan
32e8ca26a0
Merge pull request #2737 from ethereum/test_prepare_execution_payload
...
Fix spec typo and add `test_prepare_execution_payload` unit tests
2021-11-23 14:25:48 -07: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
Hsiao-Wei Wang
8050de384e
Fix spec typo and add `test_prepare_execution_payload` unit tests
2021-11-24 02:23:24 +08:00
Aditya Asgaonkar
2a5c9d8dc5
Set PROPOSER_SCORE_BOOST to 70%
2021-11-23 07:23:59 -08: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
Aditya Asgaonkar
a0b5a809d5
Apply HWW code's review - fix is_before_attesting_interval
2021-11-23 07:02:04 -08:00
Aditya Asgaonkar
1d835c5198
Apply Danny's code review & suggestions
2021-11-22 14:44:52 -08:00
Danny Ryan
ea09df50db
toc
2021-11-22 11:39:08 -07:00
Danny Ryan
282d85b9e7
simplify on_tick proposer boost update
2021-11-22 11:31:44 -07:00
Danny Ryan
cebe6ba7e7
minor formatting cleanups
2021-11-22 11:31:17 -07:00
Aditya Asgaonkar
88c76abd7f
Apply Danny's code review
2021-11-22 11:12:25 -07:00
Aditya Asgaonkar
859bbf4358
This reverts commit 4c726cdff39a10c5d096b294fb562cfc99c1f068.
2021-11-22 11:12:24 -07:00
Aditya Asgaonkar
3b20e3ea02
Apply suggestions from code review
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-11-22 11:12:24 -07:00
Aditya Asgaonkar
b0fb861cf5
Make PROPOSER_SCORE_BOOST a percentage value
2021-11-22 11:12:24 -07:00
Aditya Asgaonkar
504d82cc1a
Add datatype to new parameters
2021-11-22 11:12:24 -07:00
Aditya Asgaonkar
47fa6d108a
Add parameter for score boost value
2021-11-22 11:12:24 -07:00
Aditya Asgaonkar
281c1b2d1a
Update validator guide with ATTESTATION_OFFSET_QUOTIENT
2021-11-22 11:12:24 -07:00
Aditya Asgaonkar
2d161b4244
Add proposer score boosting & related tests
2021-11-22 11:12:24 -07:00
Danny Ryan
bbdb0d8fba
Merge pull request #2727 from ethereum/fc-dev-validate_target_epoch_scope-patch
...
always atomically update justified and finalized
2021-11-22 09:42:20 -07:00
Danny Ryan
97e6d5c6d6
Merge branch 'fc-dev-validate_target_epoch_scope-patch' into dev
2021-11-22 08:32:32 -07:00
Danny Ryan
3c25da8218
Merge pull request #2726 from ethereum/get_pow_block_at_ttd-tests
...
Fix `get_pow_block_at_terminal_total_difficulty` and add unit tests
2021-11-19 09:37:11 -07:00
Danny Ryan
8333514422
Update specs/merge/validator.md
2021-11-19 09:26:43 -07:00
Danny Ryan
dc14b79a52
Merge pull request #2720 from paulhauner/patch-34
...
Remove `difficulty` from `PowBlock`
2021-11-18 15:49:27 -07:00
Mikhail Kalinin
58968f9286
Rename coinbase to fee_recipient
2021-11-18 19:23:52 +06:00
Danny Ryan
3d4ece44df
port phase0 forkchocie changes to merge
2021-11-17 18:37:45 -07:00
Danny Ryan
eb00f8f735
cleanup forkchoice tests
2021-11-17 18:24:47 -07:00
Hsiao-Wei Wang
28762096d3
PR feedback from @mkalinin
2021-11-17 23:45:41 +08:00
Hsiao-Wei Wang
e56bbb8c44
Fix `get_pow_block_at_terminal_total_difficulty` and add unit tests
2021-11-17 18:00:35 +08:00
Paul Hauner
16aaf74cfc
Remove `difficulty` from `PowBlock`
2021-11-16 10:28:04 +11:00
Hsiao-Wei Wang
d9e8306c5a
Refactoring
2021-11-13 18:38:53 +08:00
Hsiao-Wei Wang
f643554aa5
Fix issue around on_attestation validation by skipping epoch scope
...
validation if attestation is from a block message
2021-11-13 18:28:05 +08:00
Danny Ryan
cd3d2ce692
working through test issues
2021-11-12 12:43:54 -07:00
Danny Ryan
61207c5b61
Apply suggestions from code review
2021-11-11 07:29:38 -07:00
Paul Hauner
6cfd38e800
Patch for genesis blocks
2021-11-11 11:47:01 +11:00
Fredrik Svantes
46f7845c42
Fixed link to Attesting in beacon chain responsibilities
2021-11-06 16:28:13 +01:00
Mikhail Kalinin
c6381345e2
Fixes TBH activation epoch check
2021-11-05 15:00:39 +06:00
Danny Ryan
116017d4cb
Merge pull request #2710 from terencechain/patch-129
...
`validate_merge_block ` uses correct block hash
2021-11-04 11:24:46 -06:00
terence tsao
0ae9a10123
Proper return after second assertion
2021-11-04 06:59:13 -07:00
Mikhail Kalinin
a3380db597
Fix toc
2021-11-04 16:30:23 +06:00
Mikhail Kalinin
0ad344bf72
Make notify_forkchoice_updated return payload id value
2021-11-04 15:58:48 +06:00
terence tsao
c144844279
Lint fails, it should be assert?
2021-11-03 20:31:31 -07:00
terence tsao
c9d7b8533c
Use correct payload block hash
2021-11-03 20:13:18 -07:00
Mikhail Kalinin
948d476fd1
Polish TBH handling functionality
2021-11-02 20:20:40 +06:00
Alex Stokes
79d005e6ed
Merge pull request #2702 from ethereum/merge-preset
...
Set execution params to presets
2021-11-02 09:47:24 +01:00
Mikhail Kalinin
7d411a2acd
Merge pull request #2703 from mkalinin/attest-after-execution
...
State that validator must consider only fully validated blocks
2021-11-01 21:06:38 +06:00
Mikhail Kalinin
16cabb2881
Note the Proof-of-Custody for execution in validator.md
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-11-01 21:00:49 +06:00
Danny Ryan
7e3ccb706d
remove block_number validation from CL
2021-11-01 07:57:49 -06:00
Danny Ryan
879bd2f3e9
remove etra gas constants and p2p validations
2021-11-01 07:39:14 -06:00
Danny Ryan
52a97ab494
remove gas validations from CL
2021-11-01 07:39:13 -06:00
Mikhail Kalinin
dce6b09f51
State that validator must consider only fully validated blocks
2021-11-01 19:31:51 +06:00
Hsiao-Wei Wang
3ba3915396
Set execution params to presets and add builder checks.
2021-11-01 12:11:15 +08:00
Danny Ryan
77fe450f21
Merge pull request #2698 from ethereum/merge-penalties
...
update penalty params for Merge
2021-10-31 09:59:54 -06:00
Danny Ryan
d5f5f8bf61
add modified in merge
2021-10-31 09:47:58 -06:00
Danny Ryan
6d1be4af3d
Merge pull request #2676 from ethereum/get_pow_block-not-found
...
Clarify `get_pow_block` block-not-found case
2021-10-29 13:21:37 -06:00
Danny Ryan
78040ac3ae
update penalty params for Merge
2021-10-29 12:41:38 -06:00
Danny Ryan
2fc0564a5a
Merge pull request #2686 from ethereum/tx-limits
...
fix gossip and tx size limits for the merge
2021-10-28 14:18:38 -06:00
Hsiao-Wei Wang
d0bcf294a8
Fix typo
2021-10-28 18:42:16 +08:00
Hsiao-Wei Wang
8ecbffa821
Minor comment fix
2021-10-28 16:06:58 +08:00
Hsiao-Wei Wang
60163475d7
PR feedback from @mkalinin
2021-10-28 16:00:01 +08:00
Hsiao-Wei Wang
79bf3481d2
Merge branch 'dev' into get_pow_block-not-found
2021-10-28 15:46:47 +08:00
Danny Ryan
d58b1c57ef
bump up MAX_CHUNK_SIZE at the merge as well
2021-10-27 10:48:38 -06:00
Danny Ryan
bda07e15ad
remove extraneous gossip condition
2021-10-26 15:47:07 -06:00
Danny Ryan
dae5b87c2b
increase TX sizes to account for very high gas limits
2021-10-26 15:46:08 -06:00
Danny Ryan
3e320dacff
fix gossip and tx size limits for the merge
2021-10-26 15:46:08 -06:00
Hsiao-Wei Wang
62504d9efd
Update `pow_chain` to dict and reuse it instead of calling `get_pow_block`
2021-10-26 21:59:33 +08:00
Hsiao-Wei Wang
71d315950f
Fix typo
...
Co-authored-by: Mikhail Kalinin <noblesse.knight@gmail.com>
2021-10-26 21:38:22 +08:00
Hsiao-Wei Wang
5b9652bf93
Merge branch 'dev' into get_pow_block-not-found
2021-10-26 21:37:08 +08:00
Danny Ryan
edb5a023c8
remove extraneous p2p condition
2021-10-20 12:24:00 -06:00
Danny Ryan
8a27a7cb5d
remove union type for eecution-payload txs
2021-10-19 15:46:18 -06:00
Danny Ryan
e787da3954
Apply suggestions from code review
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-10-19 14:35:30 -06:00
Danny Ryan
4bf88ba89e
Merge pull request #2683 from ethereum/remove-prepare-payload
...
remove prepare_payload
2021-10-19 09:41:44 -06:00
Danny Ryan
def46dd16c
Merge pull request #2682 from ethereum/TBH-epoch
...
add TBH_ACTIVATION_EPOCH
2021-10-19 09:36:33 -06:00
Danny Ryan
8023edc94b
cleanup some copy relatedto removal of prepare_payload
2021-10-19 09:28:52 -06:00
Danny Ryan
294b60a48b
pr feedback
2021-10-19 09:24:07 -06:00
Hsiao-Wei Wang
34335e0334
Remove `prepare_payload` leftover
2021-10-19 15:30:49 +08:00
Hsiao-Wei Wang
ba582b3e3a
Fix setup.py parser and rename `TBH_ACTIVATION_EPOCH` -> `TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH`
2021-10-19 11:26:53 +08:00
Danny Ryan
d5be6b5d68
remove prepare_payload in favor of a unification with notify_forkchoice_updated
2021-10-18 18:12:11 -06:00
Danny Ryan
3bfdc917e1
ad TBH_ACTIVATION_EPOCH
2021-10-18 13:38:08 -06:00
Danny Ryan
190ef9fb50
call notify_forkchoice_updated with finalized_block_hash == 0x00..00 if not yet finalized
2021-10-18 12:07:33 -06:00
Hsiao-Wei Wang
cd5cf60deb
Clarify `get_pow_block` block-not-found case
2021-10-18 14:05:40 +08:00
Danny Ryan
da240340b2
Merge pull request #2661 from ethereum/fix-gas-uint
...
base_fee_per_gas to uint256
2021-10-12 08:18:44 -06:00
Diederik Loerakker
aa592b008c
Merge pull request #2645 from paulhauner/patch-31
...
Specify format for --terminal-total-difficulty
2021-10-12 02:15:40 +03:00
Danny Ryan
e5bbbc5191
base_fee_per_gas to uint256
2021-10-11 16:25:01 -06:00
Danny Ryan
130b81bf55
remove notify_consensus_validated in accordance with POS_CONSENSUS_VALIDATED removal from eip 3675
2021-10-10 10:47:59 -04:00
Paul Hauner
9ed907727e
Specify format for --terminal-total-difficulty
2021-10-05 20:00:45 +11:00
Hsiao-Wei Wang
f1f082fbe7
Remove the unused stub constants
2021-10-04 00:30:01 +08:00
Hsiao-Wei Wang
e235aa8296
Clean up. Add `execution_payload_header` to initialization `meta.yaml`
2021-10-03 22:38:05 +08:00
Danny Ryan
789eea0060
fix tests. add new generator
2021-10-03 16:19:50 +03:00
Danny Ryan
af262bec07
make initialize_beacon_state_from_eth1 work for pre-transition merge
2021-10-03 15:16:44 +03:00
Danny Ryan
f221674be4
Merge pull request #2634 from ethereum/fix-initialize-merge-state
...
Fix `initialize_beacon_state_from_eth1` previous_version
2021-09-30 16:08:10 -06:00
Hsiao-Wei Wang
1f7040b42b
Make previous_version=current_version
2021-09-30 16:41:05 +08:00
Hsiao-Wei Wang
2d169adfc7
Fix `initialize_beacon_state_from_eth1` previous_version
2021-09-29 01:10:09 +08:00
terence tsao
2ea262f7d6
Update specs/merge/beacon-chain.md
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-09-28 07:53:29 -07:00
terence tsao
6d81440b10
Fix a comment typo in `execute_payload`
2021-09-27 21:19:03 -07:00
Danny Ryan
757ad7851a
Merge branch 'dev' into terminal_blockhash_override_2
2021-09-27 11:24:48 -06:00
Danny Ryan
d34b79f4de
Merge pull request #2630 from ethereum/tests/merge-clean-up
...
#2598 + cleanups
2021-09-27 11:23:30 -06:00
Danny Ryan
08ea4348c5
Merge branch 'dev' into terminal_blockhash_override_2
2021-09-27 11:01:10 -06:00
Danny Ryan
adfcb79815
Merge pull request #2625 from ethereum/altair-fork
...
add ALTAIR_FORK_EPOCH for mainnet configuration
2021-09-27 07:57:09 -06:00
Mark Mackey
8a76a4143d
Fixed Validation Conditions (Function Renamed)
2021-09-24 14:15:42 -05:00
lsankar4033
9353c71a6d
Fix spelling
2021-09-24 11:57:58 -07:00
Danny Ryan
af5eef37b2
fix am/pm issue
2021-09-24 12:29:34 -06:00
Danny Ryan
9f037180ba
add ALTAIR_FORK_EPOCH for mainnet configuration
2021-09-24 12:14:39 -06:00
Danny Ryan
995e928f42
Merge pull request #2621 from ethDreamer/fix_gossip_block_validation_conditions
...
Modify Merge Gossip Block Validation Conditions
2021-09-24 06:33:05 -06:00
Danny Ryan
a48a6f46c4
fix lint
2021-09-24 06:32:08 -06:00
Danny Ryan
35a42c9d45
Apply suggestions from code review
2021-09-24 06:23:59 -06:00
Danny Ryan
d7665681a2
simplify merge block gossip conditions
2021-09-24 06:08:01 -06:00
Danny Ryan
940d6b1cc5
Merge pull request #2613 from mkalinin/execution-engine-update
...
Update execution engine calls
2021-09-24 05:57:27 -06:00
Mikhail Kalinin
11840ce51f
Map EE calls on the PoS events defined in EIP-3675
2021-09-24 16:31:09 +06:00
Dmitrii Shmatko
8ae078a4f5
Merge branch 'dev' into tests/merge
2021-09-23 22:24:33 +03:00
Dmitrii Shmatko
b1aa227983
Added `on_merge_block` client tests
2021-09-23 22:22:34 +03:00
Mark Mackey
d9a183b5cb
Modify Merge Gossip Block Validation Conditions
2021-09-23 13:30:43 -05:00
Mark Mackey
08ca12ba97
Fixed Altair p2p-interface.md Link
2021-09-23 13:16:57 -05:00
lsankar4033
1ccb7d0a52
Inline TERMINAL_BLOCK_HASH and TERMINAL_TOTAL_DIFFICULTY usages
2021-09-23 09:52:02 -07:00
Lakshman Sankar
9d1cdf5ce1
Bytes32 -> Hash32
...
Co-authored-by: Mikhail Kalinin <noblesse.knight@gmail.com>
2021-09-23 09:31:43 -07:00
Mikhail Kalinin
0e2eb50675
Fix spelling
2021-09-23 15:30:14 +06:00
Mikhail Kalinin
41e06aec1b
Introduce PayloadId type
2021-09-23 15:03:43 +06:00
Mikhail Kalinin
7d577ed422
Introduce ExecutionAddress type
2021-09-23 14:35:55 +06:00
Mikhail Kalinin
b7deef1629
Clarity which state should be used in prepare_payload in a better way
2021-09-23 13:50:46 +06:00
Mikhail Kalinin
7ef938da77
Add notify_ prefix to EE functions sending notifications
2021-09-23 13:37:52 +06:00
Mikhail Kalinin
c815f695cd
Polish comment in get_payload body
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-09-23 13:17:55 +06:00
Mikhail Kalinin
eada985e9e
Better wording for consensus_validated
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-09-23 13:16:18 +06:00
lsankar4033
56fc984333
Re-run doctoc
2021-09-22 11:24:05 -07:00
lsankar4033
df6a834889
Add TERMINAL_BLOCK_HASH override
2021-09-22 11:18:41 -07:00
Mikhail Kalinin
f4bd37a108
Fix spelling 2
2021-09-22 23:58:04 +06:00
Mikhail Kalinin
38a4fd907e
Fix spelling
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-09-22 23:56:10 +06:00
Mikhail Kalinin
24bacafeee
Update consensus_validated description
2021-09-22 23:52:15 +06:00
Anton Nashatyrev
df01588464
Return back `proposer_index` validation for Gossip messages
2021-09-22 18:40:10 +03:00
Mikhail Kalinin
06107ce7d8
Polish the description of execution engine functions
2021-09-22 18:29:58 +06:00
Mikhail Kalinin
8cecf405cb
Merge branch 'dev' into execution-engine-update
2021-09-22 17:47:02 +06:00
Mikhail Kalinin
18bfe3555f
Apply suggestions from code review
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-09-22 17:45:26 +06:00
Anton Nashatyrev
b292f0b7b3
Remove beacon_block_root field from ShardBlob
2021-09-21 18:04:39 +03:00
Danny Ryan
e2af59c8cd
ensure random is validated for all payloads including transition
2021-09-20 23:18:39 +06:00
Mikhail Kalinin
cb9e65ab85
Bring on extra_data field
2021-09-20 23:18:39 +06:00
Mikhail Kalinin
b530e01761
Update calls to execution_engine
2021-09-20 20:57:45 +06:00
Mikhail Kalinin
9ca8c592c5
Add TBD for TTD and add the value to the configs
2021-09-18 12:39:54 +06:00
Mikhail Kalinin
a48ea83ab8
Fix toc
2021-09-17 16:54:06 +06:00
Mikhail Kalinin
d0889b9001
Hardcode terminal total difficulty
2021-09-17 16:20:25 +06:00
Mikhail Kalinin
df657f7c93
Merge branch 'dev' into set-random-to-prev-randao-mix
2021-09-17 14:41:43 +06:00
Mikhail Kalinin
6f78e6a3ee
Remove randao_reveal from validator.md
2021-09-16 11:28:04 +06:00
Danny Ryan
c396ee1e3f
Merge pull request #2595 from mkalinin/terminal-pow-block-verification
...
Verify terminal PoW block after call to state_transition
2021-09-15 17:11:27 -06:00
Alex Stokes
899bde0873
Rename client_settings.md to client-settings.md
2021-09-13 06:31:11 -07:00
Mikhail Kalinin
960a49afc9
Verify terminal PoW block after call to state_transition
2021-09-10 16:07:26 +06:00
lsankar4033
879a60a169
Run doctoc
2021-09-09 08:45:21 -07:00
Lakshman Sankar
83471fe461
Apply suggestions from code review
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-09-09 08:38:33 -07:00
Lakshman Sankar
252f4ea14a
Wording change
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-09-09 08:37:39 -07:00
Lakshman Sankar
771933d1a7
Stronger language around usage of the setting
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-09-09 08:37:27 -07:00
Lakshman Sankar
385ee12ef0
'should' -> 'must'
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-09-09 08:36:54 -07:00
Lakshman Sankar
de1487564a
Wording change
...
Co-authored-by: Mikhail Kalinin <noblesse.knight@gmail.com>
2021-09-09 08:36:42 -07:00
Lakshman Sankar
10f4ea4b51
Wording change
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-09-09 08:36:25 -07:00
lsankar4033
a542a07578
Fix links
2021-09-08 13:06:22 -07:00
lsankar4033
0f7d8e5552
Add notes in merge/fork.md
2021-09-08 13:03:05 -07:00
lsankar4033
01fe3cdb08
Add note about default behavior
2021-09-08 12:57:49 -07:00
lsankar4033
49d225bb78
Add new --terminal-total-difficulty-override client_setting
2021-09-08 12:34:33 -07:00
Mikhail Kalinin
02057cb13e
Fix spelling
2021-09-01 20:59:16 +06:00
Mikhail Kalinin
6ba1f22404
Set ExecutionPayload.random to the previous randao_mix
2021-09-01 18:42:58 +06:00
Mikhail Kalinin
5a84224d1a
Change transition_td to terminal_td in the merge spec
2021-08-30 18:23:25 +06:00
Danny Ryan
dfef7fc442
Merge pull request #2565 from ericsson49/ericsson49/fix_typos_in_sharding_2
...
Fix typos in `sharding/beacon-chain.md`
2021-08-23 12:14:12 -06:00
ericsson
34d42b640d
Fix typo in `get_start_shard`
2021-08-23 20:09:41 +03:00
ericsson
33552279bf
Fix typos in `get_shard_proposer_index`: `beacon_state` vs `state`
2021-08-23 20:09:01 +03:00
ericsson
96c05adcf8
Fix typing problem: `is_merge_block` accepts `BeaconBlockBody` as a second argument, while `BeaconBlock` is provided
2021-08-23 18:52:09 +03:00
Hsiao-Wei Wang
15a6c48a46
Merge pull request #2518 from ethereum/fix-store-justified-checkpoint
...
Fix fork choice store checkpoints inconsistency issue
2021-08-23 23:41:11 +08:00
ericsson
43a6beceb6
make doctoc happy
2021-08-23 14:46:06 +03:00
ericsson
fe1b9961ff
Fix typos in sharding.md
2021-08-23 14:21:38 +03:00
Danny Ryan
a3953a10fe
minor format
2021-08-19 10:11:02 -06:00
Hsiao-Wei Wang
206126644f
More fixes
2021-08-19 23:34:54 +08:00
Hsiao-Wei Wang
59d8ee34f9
Update some "1.0" "2.0" wording
2021-08-19 23:24:04 +08:00
Danny Ryan
911a4169fe
spelling
...
Co-authored-by: Diederik Loerakker <proto@protolambda.com>
2021-08-19 07:59:05 -06: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
6ffc735642
Merge branch 'dev' into fix-store-justified-checkpoint
2021-08-17 21:28:42 +08:00
Mikhail Kalinin
e3cad13497
Make base_fee_per_gas little-endian
2021-08-16 18:35:11 +06:00
Mikhail Kalinin
301157c027
Change base_fee_per_gas type to Bytes32
2021-08-13 14:21:37 +06:00
Anton Nashatyrev
68db644ae9
Rename DataCommitment.length field to samples_count and fix degree_proof validation
2021-08-11 15:11:37 +02:00
Danny Ryan
c404cd144a
Merge pull request #2533 from mkalinin/rebase-with-london
...
Rebase Merge spec with London
2021-08-10 16:37:32 -06:00
Danny Ryan
08210fe067
Merge pull request #2531 from ethereum/merge-p2p
...
add base merge p2p spec
2021-08-10 16:29:33 -06:00
Danny Ryan
c5b958e9d0
Merge pull request #2486 from ethereum/shard-building
...
Shard builder <> proposer separation
2021-08-10 16:15:24 -06:00
protolambda
da893c123e
update p2p shard blob/header/tx propagation windows
2021-08-10 23:18:59 +02:00
Diederik Loerakker
d005fee67d
sharding p2p code review fixes
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-08-10 13:48:26 +02:00
Mikhail Kalinin
ef71a4af1d
Polishing as per code review
2021-08-10 17:15:07 +06:00
Danny Ryan
600f55ba7f
add basic execution-layer p2p beacon_block validations
2021-08-09 17:50:56 -06:00
Hsiao-Wei Wang
93af122b2d
PR feedback from @ralexstokes and add single pubkey aggregate tests
2021-08-05 12:09:30 +08:00
Hsiao-Wei Wang
56c92136f2
Merge branch 'dev' into altair-bls-tests
2021-08-05 11:18:41 +08:00
protolambda
fc3e651817
samples -> samples_length
2021-08-04 23:25:25 +02:00
Hsiao-Wei Wang
43a1617ffa
Ensure that the given PKs are valid PKs + fix typos
2021-08-04 21:25:37 +08:00
Diederik Loerakker
424f838747
Update specs/sharding/beacon-chain.md
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-08-04 12:44:42 +02:00
Hsiao-Wei Wang
b262854bb1
Rename the `eth2_*` functions to `eth_`
2021-08-03 21:51:02 +08:00
protolambda
322f072703
sharding: remove outdated comment, timely shard attesters are marked in attestation-processing, no need for epoch processing additions
2021-07-31 13:22:26 +02:00
protolambda
2d17c8c3c4
move back INITIAL_ACTIVE_SHARDS to preset, avoid changing mainnet config
2021-07-30 22:22:43 +02:00
protolambda
add5810d71
remove unused pending attestation fields
2021-07-30 22:06:04 +02:00
protolambda
ab78339350
fix variable name of summary field
2021-07-30 21:54:55 +02:00
Mikhail Kalinin
f1982d4fc3
Replace underflow check with respective comment
2021-07-30 16:18:05 +06:00
Mikhail Kalinin
d58ffc7dfc
Add genesis settings section
2021-07-30 16:10:33 +06:00
Mikhail Kalinin
5d5a9e392b
Rename GAS_LIMIT_DIVISOR to GAS_LIMIT_DENOMINATOR
2021-07-30 12:43:54 +06:00
Mikhail Kalinin
c311712bca
Apply suggestions from code review
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-07-30 12:36:02 +06:00
protolambda
0daaafbc98
fix union value retrieval, thanks @terencechain
2021-07-28 22:00:23 +02:00
protolambda
d47d2f92cc
shard fees: implement review suggestions from @nashatyrev
2021-07-27 14:48:21 +02:00
protolambda
756eb90bfe
consider per-slot sample target adjustment, to avoid racing and ordering problems
2021-07-26 16:27:19 +02:00
Mikhail Kalinin
789e10ea7c
Update toc
2021-07-26 20:09:57 +06:00
Mikhail Kalinin
9a1a30c3d4
Rebase Merge spec with London
2021-07-26 19:55:35 +06:00
protolambda
1a966d1e37
work in progress new sharding fee mechanism
2021-07-26 15:26:55 +02:00
Danny Ryan
35df4b2d4f
rephrase context enum for blocks_by requests
2021-07-23 07:54:26 -06:00
protolambda
a7f58ef08a
fix comment + handle missing pending headers
2021-07-23 12:56:01 +02:00
protolambda
f791fe7d1c
implement review suggestions
...
Co-authored-by: Anton Nashatyrev <anton.nashatyrev@gmail.com>
2021-07-23 12:56:01 +02:00
protolambda
b25afc88fd
update networking spec with aggregate proposer/builder types, update TOCs
2021-07-23 12:56:00 +02:00
protolambda
5034e2d7bc
update shard spec wording + fix shard slashings
2021-07-23 12:56:00 +02:00
protolambda
5726cb9374
aggregate builder and proposer for simplified typing and optimized verification
2021-07-23 12:56:00 +02:00
protolambda
2a105f4581
fix toc
2021-07-23 12:56:00 +02:00
protolambda
b3d5858cc9
update data fee payment, todo
2021-07-23 12:55:59 +02:00
protolambda
9e10f58299
update networking spec
2021-07-23 12:55:59 +02:00
protolambda
4b25239617
builders make blobs, proposers make blocks
2021-07-23 12:55:59 +02:00
protolambda
bc936768c7
global selection of shard proposers
2021-07-23 12:55:55 +02:00
Anton Nashatyrev
06b8bb1a57
Simplify get_start_shard function
2021-07-23 12:45:03 +02:00
protolambda
bf6ad465ce
remove old BeaconState extension
2021-07-22 20:01:50 +02:00
protolambda
bb0848b6f6
carry over current and previous_sync_committee in Merge state upgrader, review from @djrtwo
2021-07-22 19:58:10 +02:00
Danny Ryan
3b34f16e5a
add base merge p2p spec
2021-07-22 11:09:36 -06:00
protolambda
17fad2dea2
rebase The Merge onto Altair base functionality
2021-07-22 16:36:41 +02:00
Danny Ryan
f7a2a973ac
Update specs/altair/p2p-interface.md
...
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
2021-07-21 15:51:59 -06:00
Danny Ryan
02a9fc460e
require aggregation bits to have at least one participant in sync contributions
2021-07-21 11:10:09 -06:00
Mikhail Kalinin
65f6aa1b33
Replace PyUnion with Optional
2021-07-20 17:37:52 +06:00
Mikhail Kalinin
add00ad2e0
Replace get_pow_chain_head with get_pow_block_at_total_difficulty in validator.md
2021-07-17 12:33:06 +06:00
Mikhail Kalinin
a4a050e97a
Enforce terminal PoW block to be on the cusp
2021-07-16 19:16:32 +06:00
Hsiao-Wei Wang
63ca480ea3
Add condition check in `on_tick` to ensure that `store.justified_checkpoint` is a descendant of `store.finalized_checkpoint`
2021-07-14 20:02:28 +08:00
Danny Ryan
6d0deddbe5
modify target sync committee aggregators to more sound 16
2021-07-12 09:03:43 -06:00
Danny Ryan
8140a789c4
Merge pull request #2509 from terencechain/patch-124
...
Rename a few instances of `signature` to `message`
2021-07-08 10:09:12 -06:00
Danny Ryan
88bb7562aa
Update specs/altair/beacon-chain.md
2021-07-07 16:11:58 -06:00
terence tsao
6f31077afa
Update `get_next_sync_committee` notes
2021-07-07 10:42:52 -07:00
terence tsao
3a59c1b789
Rename a few instances of signature to message
2021-07-07 10:04:26 -07:00
Justin
c8d22b1d91
fix minor cosmetic typo
2021-07-07 13:44:22 +01:00
Danny Ryan
00afb341de
Merge pull request #2479 from mkalinin/randao_in_execution_payload
...
Add randao to execution payload
2021-06-23 08:30:21 -06:00
Danny Ryan
c61eeb8a27
optimize sync committee message gossip and caches
2021-06-22 12:31:02 -06:00
Mikhail Kalinin
ac19aa3e2d
Accept polishing suggested by Justin
2021-06-22 14:23:26 +06:00
Danny Ryan
8107d0d582
Merge pull request #2485 from nisdas/patch-1
...
Make The Nature of Validator Sync Committee Assignments Clearer
2021-06-21 16:51:11 -05:00
Danny Ryan
fc1012b632
typo
2021-06-21 12:49:41 -06:00
Danny Ryan
a61aa7968d
clean up
2021-06-21 12:48:44 -06:00
Mikhail Kalinin
199d6aee58
Merge remote-tracking branch 'origin/dev' into randao_in_execution_payload
2021-06-19 00:28:38 +06:00
Justin
878b15df6a
polish merge/beacon-chain.md ( #2472 )
...
Polish `merge/beacon-chain.md` with mostly non-substantive changes.
**Non-substantive changes**
* rename `MAX_EXECUTION_TRANSACTIONS` to `MAX_TRANSACTIONS_PER_PAYLOAD`
- rename "execution transaction" to just "transaction" as per discussion with Danny
* rename `compute_time_at_slot` to `compute_timestamp_at_slot`
- the function returns a Unix timestamp
- "timestamp" matches `execution_payload.timestamp`
* be explicit about `ExecutionEngine.execution_state` for clarity
* rename `ExecutionPayload.number` to `ExecutionPayload.block_number`
- more specific ("number" is pretty vague)
- consistent with `ExecutionPayload.block_hash`
* rename `new_block` to `on_payload`
- the `on_` prefix is consistent with other event handlers (e.g. see `on_tick`, `on_block`, `on_attestation` [here](https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/fork-choice.md#handlers ))
- the `_payload` suffix is more to the point given the function accepts an `execution_payload`
- avoids conflict with `on_block` which is already used in the fork choice
* rework the table of contents for consistency
* order `is_execution_enabled` after `is_transition_completed` and `is_transition_block`
- `is_execution_enabled` refers to `is_transition_completed` and `is_transition_block`
* rename "transition" to "merge"
- "transition" is a bit vague—we will have other transitions at future hard forks
- there is no need for two words to refer to the same concept
* add a bunch of inline comments, e.g. in `process_execution_payload`
* make the `process_execution_payload` signature consistent with the other `process_` functions in `process_block` which take as arguments `state` and `block.body`
* remove `TRANSITION_TOTAL_DIFFICULTY`
- to be put in `merge/fork-choice.md` where it is used
* various misc cleanups
**Substantive changes**
* reorder `ExecutionPayload` fields
- for consistency with yellow paper and Eth1
- same for `ExecutionPayloadHeader`
- added comments separating out the execution block header fields from the extra fields (cosmetic)
2021-06-18 11:09:30 +01:00
protolambda
dadcb2a06a
Merge branch 'dev' into ericsson49/fix_reset_pending_shard_work
2021-06-17 18:54:29 +02:00
Diederik Loerakker
c68ce56407
Merge pull request #2483 from ericsson49/ericsson49/fix_append_in_process_shard_header
...
Fix typing problem: append is invoked on a ShardWork instance
2021-06-17 18:50:40 +02:00
Mikhail Kalinin
6e86d8a696
Rename randao->random, other fixes as per review
2021-06-17 21:20:17 +06:00
Nishant Das
67f1c2c2bd
Update validator.md
2021-06-17 23:05:23 +08:00
ericsson
22b2a73615
convert `int` to `CommitteeIndex` when passing to `get_beacon_committee`
2021-06-16 19:07:24 +03:00
ericsson
5b4f89875c
use `List[PendingShardHeader,...]` instead of `MutableSequence`, since `remerkleable.List` does not implement the latter
2021-06-16 14:06:17 +03:00
ericsson
d83ca352d5
Fix typing problem: `append` is invoked on a `ShardWork` instance
2021-06-16 13:33:56 +03:00
ericsson
27889860f0
fix typo: sometimes `change()` invoked on `ShardWork` itself, should be invoked on its `status` field
2021-06-16 12:03:20 +03:00
Mikhail Kalinin
cc20b80103
Fix linter, add more test helpers
2021-06-15 14:55:06 +06:00
Mikhail Kalinin
2e87a6b44e
Apply review comments
2021-06-11 22:50:11 +06:00
Mikhail Kalinin
7d617bc7c0
Fix timestamp passed to produce_execution_payload
2021-06-11 22:46:24 +06:00
Mikhail Kalinin
95775e1b90
Add randao to execution payload
2021-06-11 16:05:19 +06:00
protolambda
5140b59c57
add missing parenthesis
2021-06-08 21:51:26 +02:00
Diederik Loerakker
8f8b5ab648
Merge pull request #2475 from ralexstokes/discriminate-sync-comm-msg
...
Add `message.topic` to gossipsub `message-id` in Altair
2021-06-08 21:47:06 +02:00
Alex Stokes
a343680fd4
Add implementation note on message id fn
2021-06-08 14:29:08 -05:00
Alex Stokes
f60f13964c
Harden topic serialization
2021-06-08 14:15:57 -05:00
Alex Stokes
25a2e3463e
Update specs/altair/p2p-interface.md
...
Co-authored-by: Diederik Loerakker <proto@protolambda.com>
2021-06-08 12:06:02 -07:00
Alex Stokes
d64b4e7d24
Add `message.topic` to gossipsub `message-id` in Altair
2021-06-08 13:44:06 -05:00
Alex Stokes
c7980d3cd0
Clarify p2p validation conditions for Altair sync committees
2021-06-08 13:34:16 -05:00
Danny Ryan
5d9d786499
Merge pull request #2462 from mkalinin/merge-transition-with-dynamic-ttd
...
Merge transition process with computed transition total difficulty
2021-06-08 09:55:10 -06:00
Mikhail Kalinin
5228dc814f
Redefine initialize_beacon_state_from_eth1
2021-06-08 18:44:53 +06:00
Mikhail Kalinin
6350e27366
Add difficulty field to PowBlock
2021-06-08 17:56:07 +06:00
Mikhail Kalinin
038edb5b34
Rename SECONDS_SINCE_MERGE_FORK -> TARGET_SECONDS_TO_MERGE
2021-06-08 17:16:52 +06:00
Mikhail Kalinin
3a6a565a8f
Replace fractional division with integer one
...
Co-authored-by: vbuterin <v@buterin.com>
2021-06-08 15:03:59 +06:00
protolambda
64f217d3e1
update sync aggregate processing reference in validator doc
2021-06-08 01:05:50 +02:00
Danny Ryan
cfc66a3794
patch tests
2021-06-07 16:36:18 -06:00
Danny Ryan
09b6fb0e64
ensure consistency about sync committees vs aggregates in naming throughout
2021-06-07 16:17:46 -06:00
Mikhail Kalinin
96334e3ee7
Switch to suggested td computation formula
2021-06-07 22:21:36 +06:00
Danny Ryan
30f2a07637
Merge pull request #2438 from ralexstokes/add-aggregate-pks-fn
...
Move BLS extensions to new file in Altair
2021-06-07 07:18:31 -06:00
Danny Ryan
335d7ce1dc
Merge pull request #2446 from ethereum/SyncCommitteeSignature-to-SyncCommitteeMessage
...
Rename `SyncCommitteeSignature` to `SyncCommitteeMessage` to avoid name conflicts
2021-06-07 07:06:14 -06:00
Danny Ryan
1d5c4ecffb
Merge pull request #2453 from ethereum/vbuterin-patch-11
...
Modify sync committee logic and parameters to reduce variance
2021-06-04 12:23:16 -06:00
Diederik Loerakker
44f6453ce3
Merge pull request #2452 from Nashatyrev/fix/no-committee-for-shard-case
...
[Sharding] Handle the case when committee count < active shards
2021-06-04 18:19:33 +02:00
Diederik Loerakker
f679a0a086
Merge pull request #2455 from ethereum/sharding-state
...
New union-based shard headers/commitments representation
2021-06-04 18:18:43 +02:00
Anton Nashatyrev
0ae9a85b17
Adopt shard_blob gossip validation on top of PR #2455 : here the `compute_committee_index_from_shard` raises an error if no committee assigned to a shard
2021-06-04 18:48:09 +03:00
Anton Nashatyrev
071abfa846
Revert beacon-chain changes as they are handled in PR #2455
2021-06-04 18:44:35 +03:00
Anton Nashatyrev
116c1c0f3a
Merge remote-tracking branch 'EF/dev' into fix/no-committee-for-shard-case
...
# Conflicts:
# specs/sharding/p2p-interface.md
2021-06-04 18:43:12 +03:00
protolambda
9050897cb2
fix committee work status and commitment references
2021-06-03 19:11:47 +02:00
Diederik Loerakker
d4f6459108
Define missing header_root
...
Co-authored-by: Anton Nashatyrev <Nashatyrev@users.noreply.github.com>
2021-06-03 18:00:51 +02:00
protolambda
c0af420130
shard work status enum, prefix instead of suffix + move full committee balance init line
2021-06-03 17:32:35 +02:00
Hsiao-Wei Wang
45d554aee8
Merge branch 'dev' into SyncCommitteeSignature-to-SyncCommitteeMessage
2021-06-03 22:13:53 +08:00
Mikhail Kalinin
7f64757b51
Fix Optional[TransitionStore] issue to satisfy linter
2021-06-03 16:08:56 +06:00
Mikhail Kalinin
6872c01682
Add an extra line between function def
2021-06-03 12:31:59 +06:00
Danny Ryan
b3f2635ce7
Merge pull request #2466 from terencechain/patch-123
...
Altair: missing `block_root` in `SyncCommitteeSignature`
2021-06-02 16:09:13 -06:00
Danny Ryan
45a71eb267
line length lint
2021-06-02 15:58:51 -06:00
terence tsao
65f48178b7
Include block_root in SyncCommitteeSignature
2021-06-02 14:41:24 -07:00
Mikhail Kalinin
6604830729
Apply suggestions after the review
2021-06-02 15:00:01 +06:00
protolambda
417dda8326
fix committee index assertion
2021-06-01 22:38:36 +02:00
Justin
d87e076ce3
Minor Altair cosmetic polishing
2021-06-01 17:05:12 +01:00
Hsiao-Wei Wang
65f8d3d296
Merge branch 'dev' into SyncCommitteeSignature-to-SyncCommitteeMessage
2021-06-01 22:05:10 +08:00
Mikhail Kalinin
db32c8b013
Fix linter errors
2021-06-01 17:44:58 +06:00
Mikhail Kalinin
6226be9e1e
Implement TransitionStore and transition total difficulty computation
2021-06-01 16:28:30 +06:00
protolambda
2545c3e2d0
update pending header weights after epoch transition, fix committee index loop, fix header processing status assert, add todos for Altair-like shard attestation rewards
2021-05-31 18:55:08 +02:00
Diederik Loerakker
5a235d0251
Review suggestions
...
Co-authored-by: Anton Nashatyrev <Nashatyrev@users.noreply.github.com>
2021-05-31 17:03:06 +02:00
Mikhail Kalinin
fd4369dc7c
Add merge/fork.md with upgrade_to_merge definition
2021-05-31 19:30:54 +06:00
protolambda
bb3d581b13
update shard processing naming and doc structure
2021-05-29 23:55:16 +02:00
protolambda
31f48b7b3b
update sharding presets
2021-05-29 22:39:25 +02:00
protolambda
3665dbea8b
name (slot, shard) union wrapper ShardWork
2021-05-29 21:28:00 +02:00
Diederik Loerakker
482b028b88
Merge pull request #2436 from terencechain/patch-122
...
Sharding p2p: minor fixes
2021-05-28 22:09:58 +02:00
protolambda
72215412fa
For slow shard confirmation, assuming it is available via DAS, we could confirm the best pending header
2021-05-28 21:56:13 +02:00
protolambda
38a0f4f211
update to wrap the union, clean up initialization and typing
2021-05-28 21:27:05 +02:00
protolambda
e5521af1f8
new union-based shard headers/commitments representation
2021-05-28 20:18:29 +02:00
Alex Stokes
b0500c3de1
Update specs/altair/beacon-chain.md
2021-05-27 12:06:01 -07:00
Alex Stokes
4d5bc83af4
Re-org files
2021-05-27 11:59:15 -07:00
Alex Stokes
3cd842a94d
Update specs/altair/beacon-chain.md
2021-05-27 11:39:29 -07:00
vbuterin
a89ecced1c
Modify sync committee logic and parameters to reduce variance
...
Sync committee rewards as currently implemented significantly increase variance in proposer rewards: https://github.com/ethereum/eth2.0-specs/issues/2448
For example, if there are 200000 validators (6.4m ETH staked), then during each 1/4-eek (~54 hour) period there is a chance of 512/200000 that a validator will get accepted into the sync committee, so on average that will happen once every 200000/512 * 1/4 = 97.6 eeks, or close to two years. The payout of this "lottery" is 1/8 of that, or ~12.2 eeks (a bit less than four months) of revenue. This is much more severe than block proposing (a chance of 1/200000 per slot, or a lottery worth ~0.38 eeks of revenue once every ~3.05 eeks).
This PR makes three changes to cut make the sync committee lottery less drastic and bring variance closer in line with what is available from block proposing:
* Reduce the `SYNC_REWARD_WEIGHT` from 8 to 2
* Add a penalty for not participating in the sync committee, so that despite the first change the total net reward for participating vs not participating is only cut down by 2x
* Reduce the sync committee period from 1/4 eek to 1/8 eek (~27 hours)
With these three factors combined, the lottery reduces to ~1.5 eeks of revenue, on average occurring every ~48 eeks. Validators who are maximally unlucky (ie. never become part of a sync committee) only lose ~3.12% of their rewards instead of ~12.5%.
The compromises that this approach makes are:
* In the extreme case where >50% of proposers are operating efficiently, being in a sync committee becomes a net burden. However, this should be extremely rare, and in such cases validators would likely be suffering inactivity leak penalties anyway.
* Incentive to participate in a sync committee decreased by 2x (but this is IMO an improvement; sync committees are _not_ as important as proposals and deserve to have lower rewards)
* Minimum data syncing needed to maintain a light client increases by 2x (from 24 kB per 54 hours to 24 kB per 27 hours). A burden for on-chain light clients, but still insignificant for others.
2021-05-27 09:02:51 -06:00
Danny Ryan
d50a12cb18
Merge pull request #2449 from ethereum/fix-sharding-comments
...
add/update comments on shard blob/header/reference body field
2021-05-27 08:06:32 -06:00
Anton Nashatyrev
414ef614cb
Handle the case when a shard may not have a committee at slot.
...
Block is invalid if contains ShardBlobHeader lacking committee
Reject Gossip ShardBlobHeader and ShardBlob messages which lacks committee
2021-05-27 15:13:13 +03:00
Paul Hauner
48f989070d
Remove naughty space
2021-05-27 15:30:44 +10:00
Paul Hauner
103d029a1a
Add clock disparity tolerance for sync subnets
2021-05-27 15:28:51 +10:00
protolambda
1360860d1e
add/update comments on shard blob/header/reference body field
2021-05-27 03:57:59 +02:00
Alex Stokes
a08d23189e
Update specs/altair/validator.md
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-05-26 15:51:22 -07:00
Hsiao-Wei Wang
a25bc832b9
Update section headers
2021-05-26 03:01:38 +08:00
Hsiao-Wei Wang
0142978b60
Rename `SyncCommitteeSignature` to `SyncCommitteeMessage`
2021-05-26 02:36:54 +08:00
Alex Stokes
41ca149429
Explicitly define `bls.AggregatePKs`
2021-05-24 11:56:10 -07:00
terence tsao
71d0d45343
Align table
2021-05-24 06:57:09 -07:00
terence tsao
814c7696d9
shard_blob_header -> shard_header
2021-05-24 06:55:17 -07:00
terence tsao
4a5947d49e
Proto's suggestion
2021-05-24 06:54:38 -07:00
terence tsao
96352726bb
Sharding p2p: minor typo fixes
2021-05-22 10:31:10 -07:00
Danny Ryan
bca467c926
fmt
2021-05-21 14:36:43 -06:00
Danny Ryan
5bf01c4298
add resourceunavailable error code with more guidance
2021-05-21 14:24:58 -06:00
protolambda
e50d8d4391
Merge branch 'dev' into config-rework
2021-05-20 23:31:49 +02: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
terence tsao
c03c72a543
Altair fork: add a link
2021-05-18 13:50:46 -07:00
Danny Ryan
248363ce21
Merge pull request #2419 from terencechain/patch-120
...
Fix `PARTICIPATION_FLAG_WEIGHTS` to use correct head weight
2021-05-18 11:27:36 -06:00
ericsson
441992c779
Fix typing problem in `sharding.process_block`
2021-05-18 14:14:43 +03:00
protolambda
ef8d6003d3
fix inactivity penalties markdown table
2021-05-18 10:07:35 +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
c1f1adb4d1
Custody Game constant/preset/config separation
2021-05-18 09:33:07 +02:00
protolambda
4941a97829
Sharding constant/preset/config separation
2021-05-18 09:33:05 +02:00
protolambda
7d59016bb8
Merge constant/preset/config separation
2021-05-18 09:31:07 +02:00
protolambda
7689ebb2bd
Altair constant/preset/config separation
2021-05-18 09:28:09 +02:00
protolambda
b9ffd8f640
Phase0 constant/config/preset separation
2021-05-18 09:20:41 +02:00
terence tsao
a7344b3ee1
Fix `PARTICIPATION_FLAG_WEIGHTS` to use correct head weight
2021-05-17 21:35:43 -07:00
protolambda
fcf37895ba
remove duplicate sharding config var, fix minimal-sharding-config fork epoch name
2021-05-18 00:48:59 +02:00
terence tsao
abda2dd5fa
Sharding: move `get_committee_count_per_slot` to the outside
2021-05-14 12:02:46 -07:00
Danny Ryan
c87333face
minor review from dankrad on release pr
2021-05-14 10:05:54 -06:00
Danny Ryan
110e6b38ee
remove resourceunavailable for more discussion
2021-05-14 08:07:08 -06:00
Diederik Loerakker
5984fd74b3
Merge pull request #2393 from Nashatyrev/cosmetics/blob-subnet-name
...
[Sharding] Network: Calculate {subnet_id} for shard_blob_ subnets
2021-05-14 14:49:09 +02:00
Diederik Loerakker
a1e64c1ceb
Merge pull request #2368 from Nashatyrev/fix/root-for-empty-shard-header
...
[Sharding] Calc the right root with respect to (slot, shard) for an empty PendingShardHeader
2021-05-14 14:44:56 +02:00
Danny Ryan
4cd9a6c710
Merge pull request #2385 from ethereum/execution-payload-testing
...
Execution payload tests
2021-05-14 06:40:40 -06:00
Diederik Loerakker
86792b9232
Merge pull request #2411 from ethereum/order-indices
...
ensure indices are ordered [source, target, head] everywhere
2021-05-14 14:38:26 +02:00