327 Commits

Author SHA1 Message Date
tersec
85e1976ac3
automated consensus spec URL updating to v1.4.0-beta.1 (#5280) 2023-08-09 03:58:47 +00:00
tersec
001fbd0970
Revert "Revert "correctly align genesis size (#5244)" (#5253)" (#5254)
This reverts commit 26dcee111b4831ca577f3dec818415985ed52920.
2023-08-04 20:49:12 +00:00
tersec
26dcee111b
Revert "correctly align genesis size (#5244)" (#5253)
This reverts commit 706ce01bb180b4cfbf19ece642fbde17f7a68de9.
2023-08-04 20:11:20 +00:00
Jacek Sieka
706ce01bb1
correctly align genesis size (#5244) 2023-08-04 18:08:15 +03:00
Jacek Sieka
b8a32419b8
async batch verification (+40% sig verification throughput) (#5176)
* async batch verification

When batch verification is done, the main thread is blocked reducing
concurrency.

With this PR, the new thread signalling primitive in chronos is used to
offload the full batch verification process to a separate thread
allowing the main threads to continue async operations while the other
threads verify signatures.

Similar to previous behavior, the number of ongoing batch verifications
is capped to prevent runaway resource usage.

In addition to the asynchronous processing, 3 addition changes help
drive throughput:

* A loop is used for batch accumulation: this prevents a stampede of
small batches in eager mode where both the eager and the scheduled batch
runner would pick batches off the queue, prematurely picking "fresh"
batches off the queue
* An additional small wait is introduced for small batches - this helps
create slightly larger batches which make better used of the increased
concurrency
* Up to 2 batches are scheduled to the threadpool during high pressure,
reducing startup latency for the threads

Together, these changes increase attestation verification throughput
under load up to 30%.

* fixup

* Update submodules

* fix blst build issues (and a PIC warning)

* bump

---------

Co-authored-by: Zahary Karadjov <zahary@gmail.com>
2023-08-03 11:36:45 +03:00
tersec
e9a17fb99f
remove workaround for long-since-fixed Nim bug (#5219) 2023-07-31 22:20:09 +00:00
Philippe Schommers
74c993d616
feat: add support for Chiado (#5208) 2023-07-26 15:54:16 +03:00
tersec
565edfa351
remove unused code (#5158)
* remove unused code

* add copyright header
2023-07-15 16:30:52 +00:00
Jacek Sieka
1bac029935
avoid unnecessary buffer zero:ing (#5178) 2023-07-11 08:01:45 +02:00
tersec
49056c3e39
use v1.3.0 stability subnet behavior when appropriate (#5156) 2023-07-07 04:16:12 +00:00
tersec
1e2d3b12c4
update some consensus-specs ref URLs to v1.4.0-beta.0 (#5163) 2023-07-05 16:02:55 +00:00
henridf
1234900065
Add blob handling to message router (#5106)
* Add blob handling to message router

* address review feedback

* Fix typos
2023-06-28 17:55:31 +00:00
tersec
614202e30d
automated consensus spec URL updating to v1.4.0-beta.0 (#5121) 2023-06-24 15:43:30 +00:00
tersec
b62664915e
consensus spec v1.4.0 attestation stability subnets (#5092) 2023-06-23 09:30:46 +00:00
Tanguy
11d18acfeb
Add Yamux experimental support (#5080) 2023-06-23 09:16:30 +02:00
Etan Kissling
cbc4cef981
bump gnosis-chain-configs to 19060cb894ea0fb8ff3c8ec2fd26c0433f56c52c (#5114)
https://github.com/gnosischain/configs/pull/12

- Schedule shapella for gnosis
2023-06-22 11:14:02 +03:00
Etan Kissling
2722778ce5
reduce nim-eth dependencies just for RNG (#5099)
We have several modules that import `nim-eth` for the sole purpose of
its `keys.newRng` function. This function is meanwhile a simple wrapper
around `nim-bearssl`'s `HmacDrbgContext.new()`, so the import doesn't
really serve a use anymore. Replace `keys.newRng` with the direct call
to reduce `nim-eth` imports.
2023-06-19 22:43:50 +00:00
tersec
591c2246d5
update consensus spec URLs to v1.4.0-alpha.3 (#5088) 2023-06-16 16:45:09 +00:00
Etan Kissling
8eec6ab221
avoid ProveField warning in network_metadata (#5066)
Before assigning to `genesisData` or returning `cfg`, have to check that
metadata is not `incompatible` to avoid `ProveField` warning.
The way how we use it was already correct (`incompatible` unreachable).
Use `case` syntax to silence the warning, and add comments referring to
the existing checks that make `incompatible` unreachable.
2023-06-16 12:15:42 +00:00
Etan Kissling
a6f0a7a55d
broaden SszError catches to SerializationError (#5081)
`nim-serialization` is tagged with `{.raises:[SerializationError].}` so
it is no longer sufficient to catch `SszError` in some situations.
`SszError` inherits from `SerializationError`, so broadening the caught
exception types can be done now, to enable bumping `nim-serialization`.

https://github.com/status-im/nimbus-eth2/pull/5043#issuecomment-1584227993

#5061 is also needed to bump `nim-serialization`.
2023-06-15 16:29:13 +00:00
Tanguy
98ab0afcc3
Bump libp2p (#5079)
* Bump libp2p

* Switch to unstable
2023-06-15 12:59:35 +00:00
tersec
54cc7bb7a1
update some consensus-spec URLs to v1.4.0-alpha.3 (#5074) 2023-06-13 21:07:39 +00:00
tersec
788cdb7133
automated v1.4.0-alpha.2 to v1.4.0-alpha.3 consensus spec URL updates (#5065) 2023-06-13 14:03:49 +00:00
tersec
22208836b1
automated v1.4.0-alpha.1 to v1.4.0-alpha.2 consensus spec URL updates (#5056) 2023-06-10 09:56:54 +00:00
Tanguy
46a12639b8
Read messages before applying quota to avoid mplex backpressure issues (#4697)
* Apply global quota after reading messages

* Also wait quota for failed requests

* Better integration

* comments
2023-06-08 14:20:41 +00:00
Jacek Sieka
8db87a0cfc
bump chronos (#5039)
* separate futures import / Defect cleanups
* unittest2 fix to allow `stackTrace` as a symbol name generally
2023-06-08 13:42:19 +00:00
tersec
30c859e8a4
update some consensus-spec URLs to v1.4.0-alpha.1 (#5035) 2023-06-06 17:09:48 +00:00
jangko
a24f3cde7e
more flexible compile time resource path 2023-06-05 12:52:25 +07:00
tersec
f86febc111
update consensus spec URLs to v1.4.0-alpha.1 (#5027) 2023-06-04 10:32:50 +00:00
tersec
ee71b6cc36
update consensus spec URLs to v1.4.0-alpha.0 (#5022) 2023-06-02 12:59:38 +00:00
tersec
1f535336da
automated v1.3.0 to v1.4.0-alpha.0 consensus spec URL updates (#4996)
* automated v1.3.0 to v1.4.0-alpha.0 consensus spec URL updates

* add copyright year headers
2023-05-26 00:14:28 +02:00
Jacek Sieka
74b670a4c9
reenable incbin on 64-bit platforms (#4988)
turns out we're still making releases for 32-bit platforms 😲
2023-05-24 23:43:41 +03:00
Jacek Sieka
c14d396718
harden req/resp peer scoring (#4966) 2023-05-19 15:01:27 +03:00
Zahary Karadjov
4c3850f7df
Disable the use of incbin as it breaks the retail build on Linux/ARM 2023-05-19 04:08:02 +03:00
Jacek Sieka
938d21f1ed
fix linking / compile warnings on pie/etc (#4939)
* fix linking / compile warnings on pie/etc

* oops

* too much nim of late

* quotes
2023-05-12 07:57:49 +00:00
Jacek Sieka
b3c6320d56
embed genesis states using incbin (#4905) 2023-05-11 11:11:00 +00:00
tersec
d3929cbb45
update some beacon API spec URLs; fix some Name and DuplicateModuleImport hints (#4929) 2023-05-10 10:20:55 +00:00
Etan Kissling
508819633a
more consensus-specs v1.3.0 bumps (#4898)
Updates more consensus-specs references to v1.3.0.
This PR only includes updates for sections otherwise unmodified.
2023-05-05 20:38:51 +00:00
Zahary Karadjov
e6a6019ef9
Fix the cross-compilation for Windows 2023-04-27 16:28:10 +03:00
tersec
b390911e93
automatic update of v1.3.0-rc.5 consensus spec URLs to v1.3.0 (#4848) 2023-04-21 18:52:43 +00:00
tersec
464e680efc
detect missing network definitions at compile-time (#4784) 2023-04-03 15:39:12 +00:00
tersec
aa04d45335
use canonical, standalone sepolia network definition repository (#4762) 2023-03-29 11:37:14 +03:00
Zahary Karadjov
813fddee8c
Capella hard-fork epoch for Mainnet 2023-03-21 23:33:06 +02:00
tersec
2f634c10a4
automated consensus spec URL updating from v1.3.0-rc.4 to rc.5 (#4756) 2023-03-21 00:42:22 +00:00
tersec
ec77116414
automated consensus spec URL updating from v1.3.0-rc.3 to rc.4 (#4742) 2023-03-17 01:10:31 +00:00
Etan Kissling
e4b5478fff
rename ForkDigests.eip4844 > ForkDigests.deneb (#4715) 2023-03-10 17:13:40 +00:00
tersec
a47f0b054e
finish eip4844 to deneb module rename (#4705) 2023-03-09 01:34:17 +01:00
tersec
2c0762013e
bump eth2-networks to include goerli/prater capella fork epoch (#4699) 2023-03-07 05:03:47 +00:00
zah
8771e91d53
Support for driving multiple EL nodes from a single Nimbus BN (#4465)
* Support for driving multiple EL nodes from a single Nimbus BN

Full list of changes:

* Eth1Monitor has been renamed to ELManager to match its current
  responsibilities better.

* The ELManager is no longer optional in the code (it won't have
  a nil value under any circumstances).

* The support for subscribing for headers was removed as it only
  worked with WebSockets and contributed significant complexity
  while bringing only a very minor advantage.

* The `--web3-url` parameter has been deprecated in favor of a
  new `--el` parameter. The new parameter has a reasonable default
  value and supports specifying a different JWT for each connection.
  Each connection can also be configured with a different set of
  responsibilities (e.g. download deposits, validate blocks and/or
  produce blocks). On the command-line, these properties can be
  configured through URL properties stored in the #anchor part of
  the URL. In TOML files, they come with a very natural syntax
  (althrough the URL scheme is also supported).

* The previously scattered EL-related state and logic is now moved
  to `eth1_monitor.nim` (this module will be renamed to `el_manager.nim`
  in a follow-up commit). State is assigned properly either to the
  `ELManager` or the to individual `ELConnection` objects where
  appropriate.

  The ELManager executes all Engine API requests against all attached
  EL nodes, in parallel. It compares their results and if there is a
  disagreement regarding the validity of a certain payload, this is
  detected and the beacon node is protected from publishing a block
  with a potential execution layer consensus bug in it.

  The BN provides metrics per EL node for the number of successful or
  failed requests for each type Engine API requests. If an EL node
  goes offline and connectivity is resoted later, we report the
  problem and the remedy in edge-triggered fashion.

* More progress towards implementing Deneb block production in the VC
  and comparing the value of blocks produced by the EL and the builder
  API.

* Adds a Makefile target for the zhejiang testnet
2023-03-05 01:40:21 +00:00
henridf
1de3cf5246
Remove SignedBeaconBlockAndBlobsSidecar (#4683)
This commit removes SignedBeaconBlockAndBlobsSidecar and all remaining
references.
2023-03-02 15:12:04 +01:00