Commit Graph

6996 Commits

Author SHA1 Message Date
tersec 97bfca4b88
implement Electra beacon API getBlindedBlock (#6183) 2024-04-08 14:49:03 +02:00
tersec 361be082ae
add Electra toSignedBlindedBlock tests (#6182) 2024-04-08 10:34:15 +02:00
tersec 937cc62b85
block_sim runs electra (#6181) 2024-04-07 09:58:11 +02:00
tersec 27921406e9
remove some debugRaiseAsserts and fill in Electra functionality (#6179) 2024-04-06 15:11:47 +02:00
tersec 0d534224b3
remove some debugRaiseAsserts and fill in Electra functionality (#6178) 2024-04-06 07:46:02 +00:00
tersec 06894dd2f6
remove some debugRaiseAsserts and fill in Electra functionality (#6177) 2024-04-05 21:30:06 +02:00
Etan Kissling 86a265308a
filter out `nil` values when iterating peers (#6151)
Iterating peers should only yield peers present in registry, otherwise
`nil` pointers are returned and depending on comparison function it will
break, see #6149.
2024-04-05 16:38:04 +02:00
tersec 08d6dc347e
rm payload transaction value calculation for Bellatrix engine API (#6173) 2024-04-04 06:33:08 +02:00
tersec 0b6f75b88b
remove some debugRaiseAsserts and fill in actual Electra functionality (#6172) 2024-04-04 05:17:31 +02:00
tersec 13a70e9d69
rm built-in Goerli beacon chain support (#6057) 2024-04-03 23:25:36 +00:00
Etan Kissling df0ff5f0fb
fix initialization of sync committee cache after loading non-epoch state (#6160)
When initializing from a state that's not aligned to an epoch boundary,
an earlier state is loaded that's epoch aligned, and subsequently topped
up with the missing blocks. `dag.headSyncCommittee` is initialized prior
to topping up the missing blocks, though. If the sync committee changes
while applying the blocks (e.g., a sync committee period boundary hits),
the cached information becomes unlinked from `dag.head`, leading to
valid blocks based on that chain being rejected. To fix this, move cache
initialization after the top up with blocks. This has been observed on
Goerli by initializing from 7919502 and attempting to top up 7920111.
The block gets rejected with an invalid state root on nodes that have
restarted after setting 7920111 as head, while it gets accepted by all
other nodes. Error message is `block: state root verification failed`.
The incorrect initialization behaviour was introduced in #4592, before
which the sync committee cache was initialized after applying blocks.
2024-04-03 23:03:06 +02:00
Etan Kissling 96e27d9d35
avoid modifying blobless collection during iteration in edge case (#6168)
The fallback when blobless quarantine contains a block with all blobs
modifies collection while iterating, potentially asserting if reachable.
Using a second loop to process this situation resolves that.
2024-04-03 23:02:24 +02:00
dependabot[bot] 67ade106cc
Bump pillow from 10.2.0 to 10.3.0 in /ncli (#6171)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.2.0 to 10.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.2.0...10.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-03 18:56:42 +00:00
Etan Kissling 8d0a4a87e7
add function to import blobs to `ncli_db` (#6166)
* add function to import blobs to `ncli_db`

`ncli_db` does not support importing blobs, making it impossible to
complete the database solely from dumped files. Add the missing support.

* pass `cfg`
2024-04-03 18:55:53 +00:00
tersec 7fa32b7f02
add Electra to ConsensusFork enum (#6169)
* add Electra to ConsensusFork enum

* fix gnosis check
2024-04-03 16:43:43 +02:00
tersec c2a2b76f93
allow Jenkins to specify Nim version to use (#6162) 2024-04-03 10:47:32 +00:00
Etan Kissling 6a318d0f1a
avoid rejecting empty era file in verification (#6163)
`batchVerify`'s precondition is a non-empty signature list:

```nim
  if input.len == 0:
    # Spec precondition
    return false
```

This means that in eras without any blocks (as has happened on Goerli),
calling it leads to era files being reported as invalid.
2024-04-03 10:06:21 +02:00
Etan Kissling 0000f81df0
remove unused and redundant `PayloadID` type definition (#6165)
`PayloadID` is defined in `nim-web3` and our own Bellatrix definition
can be removed.
2024-04-03 07:27:00 +02:00
tersec 27ec2893ff
rm unused parameters of get_state_exit_queue_info() (#6167) 2024-04-03 01:45:57 +00:00
Etan Kissling 5f4fa9ae69
avoid code repetition across forks for signed block contents (#6150)
Use forks sugar to make `RestPublishedSignedBlockContents` more concise.
2024-04-03 02:05:29 +02:00
tersec 109007dc93
avoid quadratic behavior exiting validators (#6161)
* avoid quadratic behavior exiting validators

* fix libnfuzz callers
2024-04-02 12:18:40 +00:00
tersec 4457334dd0
Add support for Pectra ExecutionPayload representations (#6158) 2024-03-29 13:37:27 +01:00
tersec 54ccb24782
Revert "bump nim-libbacktrace handle special characters in source paths (#6142)" (#6157)
This reverts commit f590970fd3.
2024-03-29 06:15:11 +00:00
tersec c42a1f2863
Merge remote-tracking branch 'origin/stable' into unstable 2024-03-29 02:47:44 +00:00
tersec dc19b082a9
update release date for v24.3.0 2024-03-29 02:26:30 +00:00
Jacek Sieka 79898934dc
ssz: bump (#6155)
should fix `dereferencing pointer to incomplete type` errors seen on
some gcc versions
2024-03-29 01:17:35 +00:00
Jacek Sieka 0495c15a23
ssz: bump (#6155)
should fix `dereferencing pointer to incomplete type` errors seen on
some gcc versions
2024-03-29 00:09:43 +01:00
Etan Kissling e677d98119
fix check docs stage in jenkins (#6156)
Ignore color information when checking consistency of options.md with
the built binary.
2024-03-28 21:37:21 +01:00
Jakub Sokołowski 0fa363e022
ci: move help docs check script to its own file (#6140)
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2024-03-28 10:01:15 +01:00
tersec 3ceb26ba23
Merge remote-tracking branch 'origin/stable' into unstable 2024-03-28 06:19:26 +00:00
tersec b21bc1d478
Version v24.3.0 2024-03-28 05:23:23 +00:00
tersec 17279f261b
detect invalid REST blocks (#6152) 2024-03-28 03:34:06 +00:00
tersec df9112d663
detect invalid REST blocks (#6152) 2024-03-28 03:32:33 +00:00
diegomrsantos 885989f3df
bump libp2p (#6148) 2024-03-27 15:53:02 +00:00
Jacek Sieka 6f063c068c
chronos: bump to 4.0.2
* removes `sink` due to upstream bugs
* nim-2.0-compatible `Raising` macros
2024-03-27 13:15:28 +01:00
diegomrsantos edad7c8a4c
bump libp2p (#6132) 2024-03-27 11:16:57 +01:00
tersec 0e9b3dbad0
bump nim-kzg4844 to get c-kzg Nim bindings allowing special build path chars (#6147) 2024-03-27 10:15:12 +00:00
tersec 7a3edb6961
more initialize_validator_exit optimization (#6146) 2024-03-27 09:18:50 +01:00
tersec ad2299cd8c
bump nim-web3 for Prague engine API types (#6145) 2024-03-27 07:58:26 +01:00
tersec f9e5294802
dump EL-INVALID blocks if requested the same way as CL-INVALID blocks; optimize epoch transition validator exit (#6144) 2024-03-27 04:34:56 +01:00
tersec 605bf99344
remove macOS/aarch64 workaround from proposeBlockAux (#6138) 2024-03-26 23:05:49 +00:00
tersec 54d56995a3
bump nimbus-build-system to quote include and library paths for use in passc/passl to allow embedded spaces (#6143) 2024-03-26 22:12:56 +00:00
tersec f590970fd3
bump nim-libbacktrace handle special characters in source paths (#6142) 2024-03-26 22:57:30 +01:00
tersec 21daaad754
support special characters in network metadata paths (#6141) 2024-03-26 22:47:42 +01:00
tersec c9f59083a4
bump nim-chronicles for clang 15/16 workaround (#6137) 2024-03-26 07:11:45 +01:00
Etan Kissling 9ad8ea0f7a
fix missing space in `block_sim` output (#6134)
In #5906, the `strformat` use was replaced with simply passing the parts
of the string as `varargs` to `echo`. A space got lost from output as
part of the transformation. Re-add it.
2024-03-25 20:26:14 +01:00
Etan Kissling 2dbe24c740
move split view catchup to research branch (#6133)
Using a dedicated branch for researching the effectiveness of split view
scenario handling simplifies testing and avoids having partial work on
`unstable`. If we want, we can reintroduce it under a `--debug` flag at
a later time. But for now, Goerli is a rare opoprtunity to test this,
maybe just for another week or so.

- https://github.com/status-im/infra-nimbus/pull/179
2024-03-25 19:09:31 +01:00
Etan Kissling fc9bc1da3a
add branch discovery module for supporting chain stall situation (#6125)
In split view situation, the canonical chain may only be served by a
tiny amount of peers, and branches may span long durations. Minority
branches may still have a large weight from attestations and should
be discovered. To assist with that, add a branch discovery module that
assists in such a situation by specifically targeting peers with unknown
histories and downloading from them, in addition to sync manager work
which handles popular branches.
2024-03-24 08:41:47 +00:00
Etan Kissling 66a9304fea
use separate state when catching up to perform validator duties (#6131)
There are situations where all states in the `blockchain_dag` are
occupied and cannot be borrowed.

- headState: Many assumptions in the code that it cannot be advanced
- clearanceState: Resets every time a new block gets imported, including
  blocks from non-canonical branches
- epochRefState: Used even more frequently than clearanceState

This means that during the catch-up mechanic where the head state is
slowly advanced to wall clock to catch up on validator duties in the
situation where the canonical head is way behind non-canonical heads,
we cannot use any of the three existing states. In that situation,
Nimbus already consumes an increased amount of memory due to all the
`BlockRef`, fork choice states and so on, so experience is degraded.
It seems reasonable to allocate a fourth state temporarily during that
mechanic, until a new proposal could be made on the canonical chain.

Note that currently, on `unstable`, proposals _do_ happen every couple
hours because sync manager doesn't manage to discover additional heads
in a split-view scenario on Goerli. However, with the branch discovery
module, new blocks are discovered all the time, and the clearanceState
may no longer be borrowed as it is reset to different branch too often.

The extra state could also find other uses in the future, e.g., for
incremental computations as in reindexing the database, or online
collection of historical light client data.
2024-03-24 07:18:33 +01:00
Etan Kissling c4a5bca629
update block quarantine eviction order to FIFO (#6129)
Use the same eviction policy for blocks as already the case for blobs.
FIFO makes more sense, because it favors keeping ancestors of blocks
which need to be applied to the DAG before their children get eligible.
2024-03-24 06:03:51 +01:00