Commit Graph

3731 Commits

Author SHA1 Message Date
xiaolou86 40196b75d0
docs: fix typos (#5571) 2023-11-06 03:56:07 +00:00
Etan Kissling e4dacc30c4
fix validation of blob index against gossip topic (#5569)
In `v1.4.0-alpha.0`, the blob index validation on gossip was changed to
use `compute_subnet_for_blob_sidecar` instead of having a separate topic
for each individual blob. We updated the spec reference in #5363 without
updating the code accordingly. Fixing this now, and also adding the new
`MAX_BLOBS_PER_BLOCK` check from `v1.4.0-beta.3` as it shares the theme.
2023-11-05 09:14:47 +01:00
Etan Kissling 28b84ff93b
extend `hasBlob` to all blocks from same proposer and slot (#5568)
`v1.4.0-beta.4` made the Gossip rules more strict and now requires to
ignore blobs from other branches if there are equivocating blocks.
Those blobs are only requestable via Req/Resp.
2023-11-05 09:13:57 +01:00
Etan Kissling f14389bb84
avoid perpetually sending blobs to peers (#5563)
Fix regression from #4808 where blobs that are already known are issued
ACCEPT verdict, propagating them to peers over and over again.

`validateBlobSidecar` contains the correct IGNORE logic. Moved it above
the expensive checks to retain the performance of the check.
2023-11-04 20:36:12 +01:00
Etan Kissling 87a37a32e3
introduce `BlobId` type for tracking blob subnets (#5560)
Instead of mixing up `SubnetId` (attestation subnet type) for blobs,
introduce dedicated `BlobId` type.
2023-11-04 14:20:34 +00:00
Etan Kissling a05278e263
wrap `kzgs`/`proofs`/`blobs` fields as `BlobsBundle` (#5562)
Less type conversion / copying by keeping the `BlobsBundle` together.
2023-11-04 13:49:58 +00:00
Etan Kissling fb18f09e55
align `Blobs` limit for SSZ transport (#5558)
Capacity should be set to theoretical limit to ensure correct hash root.
Actual length may be shorter. Only use is `ExecutionPayloadForSigning`
so it doesn't matter yet in practice, but still worth fixing.
2023-11-04 10:25:06 +01:00
Eugene Kabanov 8cec3af61c
VC: Obtain randao signature before slot proposal. (#5490)
* Randao calculation caching for VC implementation.

* Add time monitoring for randao signatures process.

* Add delay calculation.

* Address review comments.

* Address review comments.
2023-11-04 08:14:14 +01:00
Etan Kissling 29fe958908
allow to pass trusted node sync options during BN startup (#5545)
Using trusted node sync currently requires to run two commands -
first the `trustedNodeSync` command to initialize the database,
followed by the regular startup command to continue syncing.

The `trustedNodeSync` options are now also available during regular
startup, and are used when the database is empty to simplify setting up
a new Nimbus beacon node. This also aligns behaviour closer with other
Ethereum consensus implementations.

The new logic only applies if the database has not yet been initialized;
same as before. Also, the database needs to be removed under the same
conditions as before when a fresh sync is desired.
2023-11-03 16:07:49 +01:00
Etan Kissling c95f9feec4
remove unused Deneb code (#5556)
The `process_blob_kzg_commitments` step was removed in `v1.4.0-alpha.1`,
but we haven't deleted the now unused functions. Do that now.
2023-11-03 14:37:44 +00:00
Etan Kissling baf81595a7
add `KZG_COMMITMENT_INCLUSION_PROOF_DEPTH` preset constant (#5555)
`v1.4.0-beta.4` added `KZG_COMMITMENT_INCLUSION_PROOF_DEPTH` to preset:

- Spec PR: https://github.com/ethereum/consensus-specs/pull/3531
- Gnosis PR: https://github.com/gnosischain/configs/pull/17
2023-11-03 13:54:21 +00:00
tersec ab89e96265
fill in transactions root and KZG commitments from deneb.BlindedBeaconBlock in state transition (#5553) 2023-11-02 04:56:04 +01:00
tersec 657de2721a
fill blindedblockbody KZG commitments from deneb blinded header (#5550) 2023-11-01 14:00:21 +01:00
tersec ed446b1d5a
replace ValidIpAddress with IpAddress in configurations (#5536) 2023-11-01 08:33:00 +01:00
Eugene Kabanov e1f47bb27a
Address #5539. (#5548) 2023-11-01 08:32:41 +01:00
Eugene Kabanov 1a5bcb479e
Fix `broadcast_validation` handling in `publishBlockV2` (fixes #5531) (#5547)
* Address issue #5531.

* Add more tests.

* Add to resttest ability to check values.
Fix tests.
2023-11-01 08:31:18 +01:00
Eugene Kabanov 70aaeee704
Enable comprehensive reasons when REST server faults to create server. (#5546)
Bump chronos & presto.
2023-11-01 08:27:43 +01:00
tersec 556d5e7114
rm unused code (#5538) 2023-11-01 05:53:09 +01:00
Etan Kissling 173582ad70
initialize KZG crypto before starting network (#5543)
Move KZG trusted setup initialization before `BeaconNode.init` to avoid
edge case where network message is received and processed before crypto
library has been properly initialized. Followup from #4870.
2023-10-31 13:43:46 +01:00
Jacek Sieka 8c81515bf6
log slashing protection database error on failure to load (#5542)
* log slashing protection database error on failure to load

...and fix noreturn warning

* fix the copied one too

* oops

* oops 2
2023-10-31 11:15:38 +01:00
Etan Kissling d289da8cd4
extract trusted node sync trigger into separate function (#5544)
To prepare for calling trusted node sync from the main Nimbus startup
logic, extract the trusted node sync trigger into a separate function.
Further allow passing a pre-opened database, as that will be needed to
check whether trusted node sync needs to be called during regular start.
2023-10-31 01:56:52 +01:00
tersec 62d59daaa7
consensus-spec URL updates to v1.4.0-beta.3 (#5541) 2023-10-30 06:44:43 +00:00
tersec b0d5001571
implement getBlobSidecars Beacon API endpoint (#5530) 2023-10-29 00:06:13 +00:00
tersec 34eade3a99
sign blinded blob sidecars during builder API proposals (#5537) 2023-10-28 05:10:23 +00:00
tersec 922283e2e3
clean up ncli_testnet and reduce `ValidIpAddress` usage (#5529)
* ValidIpAddress -> IpAddress

* clean up ncli_testnet and reduce ValidIpAddress usage
2023-10-26 23:16:15 +00:00
tersec 09df3f32b5
add non-SZ getBlobSidecar and BlobSidecar database tests (#5528) 2023-10-26 03:40:04 +00:00
tersec 41dfc9ed91
add `KZGProof` and `Blob` REST JSON serializations (#5526)
* add KZGProof and Blob REST JSON serializations

* error summary updates

* copyright notice

* consistent integer types for Nim 2.0
2023-10-25 23:50:59 +02:00
Etan Kissling d32fafa2ec
`investigated` -> `inspected` in `libnimbus_lc` docs (#5523)
Consistently use `inspected` instead of `investigted` terminology in
documentation of `libnimbus_lc` functions.
2023-10-24 16:09:44 +00:00
tersec 5aa5095e17
Fix REST JSON KzgCommitment encoding/decoding to use hex strings per spec (#5522) 2023-10-24 15:22:59 +00:00
Etan Kissling 468ee6a7ed
simplify `getBlockSSZ` and `getBlockSZ` implementation (#5521)
Use `forks` sugar to reduce code duplication in `beacon_chain_db.nim`.
2023-10-24 09:15:34 +00:00
tersec 513c9d9637
fix Deneb RestPublishedSignedBlockContents REST JSON decoding (#5520) 2023-10-24 05:50:32 +00:00
tersec 026ad21906
send DenebBlockContents in produceBlockV2 (#5519) 2023-10-24 02:50:26 +00:00
tersec fd21882e24
improve test coverage of post-Bellatrix initialize_beacon_state_from_eth1 (#5517) 2023-10-24 01:58:52 +00:00
tersec b2e81de6db
remove unnecessary Builder API status endpoint usage (#5518) 2023-10-23 23:01:29 +00:00
tersec a986a1bcd8
using deneb_mev for Deneb is less incorrect than using capella_mev (#5516) 2023-10-20 01:39:47 +00:00
tersec 769316d909
construct Deneb blinded blobs from builder API getHeader (#5513) 2023-10-19 17:34:32 +00:00
tersec 4ddd771127
automated consensus spec URL updating to v1.4.0-beta.3 (#5514) 2023-10-19 10:26:38 +00:00
tersec 9fd52ebe9f
use consensus spec v1.4.0-beta.3 test vectors (#5512) 2023-10-19 05:14:02 +00:00
Zahary Karadjov d52e8165d5
Merge branch 'stable' into unstable 2023-10-18 20:10:00 +03:00
tersec 6eb7d481fa
fix Deneb builder API block body type; introduce and use ExecutionPayloadHeaderAndBlindedBlobsBundle (#5509) 2023-10-18 02:54:02 +00:00
andri lim 0f9b52933e
Bump nim-eth: Change block timestamp from std.Time to distinct uint64 (#5510)
* Bump nim-eth: Change block timestamp from std.Time to distinct uint64

Also change tx.maxFeePerBlobGas from GasInt to UInt256
following Cancun latest spec

* Fix EthTime.now from func to proc due to sideeffects
2023-10-18 07:37:57 +07:00
Zahary Karadjov 8b07f4fd4c
Version 23.10.0 2023-10-17 02:35:27 +03:00
zah 35bf03a3fb
Add the --verifying-web3-signer-url configuration option (#5504) 2023-10-13 15:42:00 +03:00
tersec c5028b56bf
change blinded block proposal failures to REST internal errors (#5501) 2023-10-12 23:54:24 +02:00
tersec eeac00d08e
add RPC signature; add type constraints on proposeBlockMEV (#5498) 2023-10-12 11:49:48 +00:00
tersec 40616b6243
update some consensus spec URLs to v1.4.0-beta.2 (#5497) 2023-10-12 05:07:41 +00:00
tersec ec1d98cc3a
implement deneb block and blob unblinding (#5496) 2023-10-12 03:40:15 +00:00
tersec edc5c03230
consistently use SignedBlindedBeaconBlockContents; remove more Bellatrix Builder API remnants (#5493) 2023-10-11 11:48:35 +00:00
tersec 48197e4d55
add/update Deneb Builder API types and RPC signatures (#5492) 2023-10-11 04:25:59 +00:00
tersec 447786518f
ShufflingRef approach to next-epoch validator duty calculation/prediction (#5414)
* ShufflingRef approach to next-epoch validator duty calculation/prediction

* refactor action_tracker.updateActions to take ShufflingRef + beacon_proposers; refactor maybeUpdateActionTrackerNextEpoch to be separate and reused function; add actual fallback logic

* document one possible set of conditions

* check epoch participation flags and inactivity scores to ensure no penalties and MAX_EFFECTIVE_BALANCE to ensure rewards don't matter

* correctly (un)shuffle each proposer index

* remove debugging assertion
2023-10-10 00:02:07 +00:00