Commit Graph

4306 Commits

Author SHA1 Message Date
tersec 710f16f510
use EF consensus spec test vectors v1.5.0-alpha.9 () 2024-11-24 09:47:36 +01:00
Etan Kissling ddad30f725
Adopt latest changes to request hash computation ()
* Adopt latest changes to request hash computation

The `requestType` of empty lists is no longer part of the requests hash.

- https://github.com/ethereum/EIPs/pull/8989

* Avoid nested computeDigest scopes
2024-11-24 07:36:39 +01:00
Agnish Ghosh 99bb845227
add column support to beacon chain db ()
* add column support to beacon chain db

* slight fix

* fix db util

* fix import issues

* gate fulu columns if fulu fork epoch is far future epoch

* fixed all tests file

* fix comment
2024-11-19 06:53:13 +01:00
Eugene Kabanov bd04dcc3dc
Fix syncing problem introduced by light forward syncing PR. ()
* Fix blobs check response algorithm and add more logging information.

* Add MAX_BLOBS_PER_BLOCK check.
Add tests.

* Adopt AllTests.

* Address review comments.

* One more missed lenu64.
2024-11-19 06:35:09 +01:00
Agnish Ghosh a157760643
Init Fulu fork ()
* fulu

* fix ci

* fix ncli

* attempt to fix ci

* fix wss_sim build

* fix vc api

* updated tests

* resolve merge conflicts

* fix tests

* fix check

* attempt to fix minimal test in CI

* addressed reviews

---------

Co-authored-by: tersec <tersec@users.noreply.github.com>
2024-11-13 10:29:14 +07:00
tersec b7ea6a627e
fix some deprecation warnings () 2024-11-04 12:19:43 +01:00
Eugene Kabanov 7726f39004
VC: Fix forks management behavior. ()
* Fix issue "ignore _VERSION configuration value if _EPOCH == FAR_FUTURE_EPOCH".
Add `OptionalForks` constant which should provide default values for _VERSION/_EPOCH.
Fix Fork schedule should update Fork's configuration with _EPOCH values.

* Fix compilation error.

* Add comment why and how `OptionalForks` should be maintained.
2024-11-02 09:59:07 +00:00
Jacek Sieka 6cf388065d
network: remove unusede p2p macro stuff () 2024-11-01 16:40:13 +01:00
tersec c0f7220ab2
rm unused and obsolete produceBlindedBlock client-side infrastructure () 2024-10-31 03:58:44 +00:00
Agnish Ghosh c4d8ae40b0
fix () 2024-10-30 15:16:02 +01:00
Eugene Kabanov 18409a69e1
Light forward sync mechanism ()
* Initial commit.

* Add hybrid syncing.

* Compilation fixes.

* Cast custom event for our purposes.

* Instantiate AsyncEventQueue properly.

* Fix mistype.

* Further research on optimistic updates.

* Fixing circular deps.

* Add backfilling.

* Add block download feature.

* Add block store.

* Update backfill information before storing block.

* Use custom block verifier for backfilling sync.

* Skip signature verification in backfilling.

* Add one more generic reload to storeBackfillBlock().

* Add block verification debugging statements.

* Add more debugging

* Do not use database for backfilling, part 1.

* Fix for stash.

* Stash fixes part 2.

* Prepare for testing.

* Fix assertion.

* Fix post-restart syncing process.

* Update backfill loading log statement.
Use proper backfill slot callback for sync manager.

* Add handling of Duplicates.

* Fix store duration and block backfilled log statements.

* Add proper syncing state log statement.

* Add snappy compression to beaconchain_file.
Format syncing speed properly.

* Add blobs verification.

* Add `slot` number to file structure for easy navigation over stream of compressed objects.

* Change database filename.

* Fix structure size.

* Add more consistency properties.

* Fix checkRepair() issues.

* Preparation to state rebuild process.

* Add plain & compressed size.

* Debugging snappy encode process.

* Add one more debugging line.

* Dump blocks.

* One more filedump.

* Fix chunk corruption code.

* Fix detection issue.

* Some fixes in state rebuilding process.

* Add more clearance steps.

* Move updateHead() back to block_processor.

* Fix compilation issues.

* Make code more async friendly.

* Fix async issues.
Add more information when proposer verification failed.

* Fix 8192 slots issue.

* Fix Future double completion issue.

* Pass updateFlags to some of the core procedures.

* Fix tests.

* Improve initial sync handling mechanism.

* Fix checkStateTransition() performance improvements.

* Add some performance tuning and meters.

* Light client performance tuning.

* Remove debugging statement.

* Use single file descriptor for blockchain file.

* Attempt to fix LC.

* Fix timeleft calculation when untrusted sync backfilling started right after LC block received.

* Workaround for `chronicles` + `results` `error` issue.
Remove some compilation warnings.
Fix `CatchableError` leaks on Windows.

* Address review comments.

* Address review comments part 2.

* Address review comments part 1.

* Rebase and fix the issues.

* Address review comments part 3.

* Add tests and fix some issues in auto-repair mechanism.

* Add tests to all_tests.

* Rename binary test file to pass restrictions.

* Add `bin` extension to excluded list.
Recover binary test data.

* Rename fixture file to .bin again.

* Update AllTests.

* Address review comments part 4.

* Address review comments part 5 and fix tests.

* Address review comments part 6.

* Eliminate foldl and combine from blobs processing.
Add some tests to ensure that checkResponse() also checks for correct order.

* Fix forgotten place.

* Post rebase fixes.

* Add unique slots tests.

* Optimize updateHead() code.

* Add forgotten changes.

* Address review comments on state as argument.
2024-10-30 05:38:53 +00:00
tersec 00f276eacf
Merge remote-tracking branch 'origin/stable' into unstable 2024-10-29 07:29:04 +00:00
tersec c4037d6361
version v24.10.0 2024-10-29 00:27:43 +00:00
tersec f85521230f
stop checking for irrelevant unsigned wraparound in Electra deposit codepath () 2024-10-28 17:18:01 +01:00
tersec 4565c029e1
make Eth2Digest isZero 8x faster ()
* make Eth2Digest isZero 8x faster

* use staticFor and copyMem

* branchless with or
2024-10-28 05:21:18 +00:00
tersec 58a34e00a1
fix inconsistent aggregation bits len in Electra () 2024-10-25 16:04:35 +02:00
Eugene Kabanov a3d4a3ee5e
BN: Fix el_manager timeouts issue in block processing. ()
* Fix el_manager + block_processor NEWPAYLOAD_TIMEOUT timeouts issue.
Use predefined array of exponential timeouts when all the requests to EL has been failed.

* Increase timeout value to (next_slot.start_time - 1.second)

* Address review comments.

* Do not repeat requests when node is optimistically synced.
2024-10-23 00:42:46 +00:00
Etan Kissling 117fecad99
Bump nim-web3 to `c76ddefea96e7763c3cc5b28ec5cbac1adefc4e7` ()
- Fix AuthorizationObject fields name to v, r, s
2024-10-22 18:13:36 +02:00
andri lim 5d940b4c1e
Bump nim-eth to 66297c5c0a8c22ec3f16c899e902d79aa00df575 () 2024-10-22 14:15:33 +02:00
Agnish Ghosh 250a80eb0c
add gossip validation for dc, and data column quarantine strategy ()
* add gossip validation for dc

* review 1

* rm callback

* review 2

* added custody columns as a global entity

* alpha 8

* few typosA
2024-10-22 05:19:34 +00:00
Etan Kissling 3cb7b9140a
Remove request details from LC ()
Requests are no longer exposed by execution data, remove from LC API.
2024-10-22 03:41:01 +00:00
Etan Kissling 6f6de8d9dc
Implement latest EIP-7685 `requestsHash` method ()
It's now this weird one-off hashing method so that EL can partially
forget in some modules what the data schema is.
2024-10-21 17:09:26 +02:00
tersec 7e5338deb3
disable optimistic Electra EL block hash verification () 2024-10-21 05:09:33 +02:00
Caleb Omoniyi eb993ffcee
Fix comment to reflect correct validator balance count transition () 2024-10-21 00:40:14 +00:00
tersec 84eaa57f82
don't use {.noinit.} with case objects () 2024-10-21 01:22:16 +02:00
tersec 2d3614ff69
update to devnet-4-compatible engine API () 2024-10-17 16:53:37 +02:00
tersec f7ae15e107
rm experimental Yamux support () 2024-10-17 00:23:13 +00:00
Etan Kissling bd94c20325
fix migration of `blob_gas_used`/`excess_blob_gas` from Deneb to Electra ()
`blob_gas_used` and `excess_blob_gas` were reset on fork transition
from Deneb to Electra, which is not according to spec. Fix it.
2024-10-17 00:15:34 +00:00
Eugene Kabanov fcf72a6e8e
VC: Electra fixes. ()
* Initial commit.

* Add aggregated attestation processing.

* Add missing presets file.

* Fix compilation error.

* Fix post-rebase compilation error.

* Satisfy push raises requirement.

* Fix sync committee duties retrieval process.

* Fix forks configuration management.

* Fix deposits to use new fork configuration scheme.

* Fix /eth/v2/validator/aggregate_attestation implementation.

* Fix RANDAO preparation loop to handle blocks at epoch boundary properly.

* Simplification of RANDAO fix.

* Fix typo.

* Address review comments and fix tests.

* Fix incorrect status codes in REST test.

* Rework attestation and aggregated attestations processing code.

* Address review comments.

* Fill committee_index in RegisteredAttestation construction code.

* Address review comments part 2.

* Address review comments part 3.

* use Deneb fork epoch

* Add transition from Deneb to Electra into CI finalization test.

---------

Co-authored-by: tersec <tersec@users.noreply.github.com>
2024-10-16 17:20:39 +00:00
Etan Kissling c4be5f677a
bump nim-eth to `171531fbf1a308c1bf4d2f6b88c6ee6924657437` ()
- rm Goerli bootnodes
- update Sepolia and Holesky bootnodes
- Fix Authorization fields name to v, r, s
- Add helper for recovering authority
2024-10-15 21:47:17 +00:00
tersec acad28d05b
avoid combining multiple aggregates from same committee () 2024-10-15 06:02:36 +02:00
Miran 585deb8f90
use types from `eth/common/eth_types` ()
* bump nim-eth

* use types from `eth/common/eth_types`
2024-10-14 14:55:56 +00:00
tersec c01cf6601a
attestation and aggregated attestation BN fixes for Electra ()
* attestation and aggregated attestation BN fixes for Electra

* disable electra transition for this PR

* use cleaned-up verification function everywhere
2024-10-14 14:20:26 +00:00
tersec bc51ba3077
styleCheck tweaks () 2024-10-12 00:51:28 +02:00
tersec 5608a803d7
update beacon_validators to be more Nim 2.2-compatible () 2024-10-11 15:39:45 +02:00
tersec 181f5f984d
use Deneb genesis for local testnet; add Electra forking support to local tesnet ()
* use Deneb genesis for local testnet; add Electra forking support to local tesnet

* deneb -> electra in ncli_testnet help
2024-10-10 15:48:05 +00:00
tersec 9ba31fb5e6
adjust isomorphicCast to be Nim 2.2-compatible () 2024-10-10 12:23:23 +00:00
tersec 3868365ac0
automated consensus spec URL updating to v1.5.0-alpha.8 () 2024-10-09 08:37:35 +02:00
tersec b8a424991d
use EF consensus spec v1.5.0-alpha.8 test vectors () 2024-10-09 04:33:17 +00:00
Eugene Kabanov fc2b232b9e
Fix indefinite loop when when validators are present, but VC does not know indices yet. ()
Fix block pruning when no validators seen.
2024-10-09 03:00:06 +02:00
Jacek Sieka 7990cc2d1c
Ordered trie for trie root computations ()
Gives a 100x speed boost for this operation which happens during
optimistic sync when computing the block hash.

Co-authored-by: Etan Kissling <etan@nimbus.team>
2024-10-08 22:10:50 +02:00
Eugene Kabanov a25afaed5a
Increase number of web3 signer requests before signaling failure to 4. ()
Decrease number of pre-computed slots from 32 to 2.
Add validator field to some log statements.
2024-10-08 05:37:00 +02:00
Miran 3f37caa0da
fix deprecated warnings () 2024-10-08 01:54:02 +00:00
Eugene Kabanov 5d11c5229b
Add Web3signer electra support ()
* Add Electra support to nimbus_signing_node.
Add tests.
Annotate nimbus_signing_node with asyncraises.

* Update AllTests.
2024-10-07 23:31:16 +00:00
tersec b370112fe0
some manual updates to EF consensus-specs v1.5.0-alpha.7 URLs () 2024-10-07 12:30:09 +02:00
tersec 50eed81dcf
electra BN attestation aggregating () 2024-10-07 07:53:38 +00:00
tersec 17d66118e8
automated consensus spec URL updating to v1.5.0-alpha.7 () 2024-10-06 14:03:56 +00:00
tersec 9c9f3707a1
use EF consensus spec v1.5.0-alpha.7 test vectors () 2024-10-06 13:15:56 +02:00
Pedro Miranda ff0cc8e62e
Electra - Filter aggregated attestations by root/committee ()
* Filter aggregated attestations by root/committee

* fixed validator api documentation link

---------

Co-authored-by: Pedro Miranda <pedro.miranda@nimbus.team>
2024-10-04 05:15:48 +00:00
tersec eb30b741d9
bump nimbus-build-system to use Nim v2.0.10 ()
* bump nimbus-build-system to use Nim v2.0.10

* fix `CatchableError` leak on Windows

* define ERROR_INVALID_ACCESS

* trigger finding correct hashes for nix build

* check checksums checksum

* update nix nimble checksum

* csources didn't change
2024-10-03 17:13:44 +02:00