277 Commits

Author SHA1 Message Date
Agnish Ghosh
53af511488 add debug for lookupCscFromPeer 2024-09-18 16:34:53 +05:30
Agnish Ghosh
dc4a1df2d7
fix SSZ issues 2024-09-11 10:41:19 +05:30
Agnish Ghosh
c09d801fb2 all fixes related to enr 2024-09-09 22:09:10 +05:30
Agnish Ghosh
d461d3f25f revert Csc to big endian uint64 2024-09-09 02:27:59 +05:30
Agnish Ghosh
3aa85100f9 move lookupCscFromPeer to Eth2Network, add reqColumns check in data column sidecar range request 2024-09-02 16:45:10 +05:30
Agnish Ghosh
547abaacf7 have getLowSubnets accept only BitArrays 2024-08-27 22:17:50 +05:30
Agnish Ghosh
c2962b65c9
turned CscCount to uint8 according to the latest EF spec 2024-08-24 16:23:27 +05:30
Agnish Ghosh
6127bd6ed2 make all csc uint64 2024-08-22 18:34:26 +05:30
Agnish Ghosh
70029545ea added support for customisable custody subnet count on boot, from bn startup flags 2024-08-20 03:58:27 +05:30
Agnish Ghosh
75e1bb616b
handling reconstruction condition internally 2024-08-18 13:35:16 +05:30
Agnish Ghosh
e7610ece97
ignore peers with low csc 2024-08-18 13:10:21 +05:30
Agnish Ghosh
cd5532c078 add filtering to peer pool and protocol, remove filtering from SyncManager level 2024-08-17 20:51:36 +05:30
Agnish Ghosh
1ebba1fac4
add: metadata-v3 for custody subnet count (#6486)
* init: add metadatav3, save progress

* fix import issues

* fix spec version

* fix: metadata_v2 to return altair.MetaData

* update metata function backward compatible now
2024-08-12 21:27:37 +05:30
Agnish Ghosh
5265eeb6ea refactor: sync manager to range request only valid peers if not supernode 2024-07-22 19:04:04 +05:30
Agnish Ghosh
fa5b15436c
add: logic constructing valid set of peers 2024-07-19 13:58:26 +05:30
Agnish Ghosh
b33900bd35
added enr struct 2024-07-15 13:11:09 +05:30
Agnish Ghosh
791d2fb0d1
add: forward and backward syncing for data columns, broadcasting data columns created from blobs, added dc support to sync_queue 2024-06-24 17:32:06 +05:30
Agnish Ghosh
aa2ce79770
fixed upto electra 2024-05-27 18:10:00 +05:30
Jacek Sieka
d191b35e2e
electra: attestatoin sending (#6296) 2024-05-17 17:34:46 +02:00
tersec
c1b9e82502
electra attestation gossip plumbing (#6287) 2024-05-14 19:01:26 +03:00
tersec
3f972a2ca5
add some support for electra aggregated attestations (#6283) 2024-05-14 06:12:35 +02:00
tersec
6b8061b5d6
automated consensus spec URL updating to v1.5.0-alpha.2 (#6279) 2024-05-09 05:03:10 +00:00
Eugene Kabanov
c9b54bf1aa
Enable IPv6 for discovery5 using dualstack support. (#6242)
* Make listen-address default to use dualstack.

* Use correct newProtocol().

* Bump nim-eth.

* Bump nim-eth one more time.

* Use `*` instead of IPv6 address for dualstack sockets.

* Bump chronos and nim-eth.

* Use new constructor.

* Fix listenAddress should be Opt[T] not Option[T].

* Fix options.md.
2024-05-01 19:29:39 +00:00
tersec
d139c92df9
explicitly scope AttesterSlashing and IndexedAttestation types to phase0 (#6224) 2024-04-21 05:49:11 +00:00
tersec
603c83522e
explicitly refer to phase0.{Attestation,TrustedAttestation} rather than sans module name (#6214) 2024-04-17 20:44:29 +00:00
tersec
867995acd1
some consensus spec v1.4.0 spec URL updates (#6208) 2024-04-17 05:51:16 +02:00
Etan Kissling
c57fcb426a
bump nim-libp2p to 89cad5a3ba9088cc721682469a10917903da25a0 (#6199)
- add support for setting protocol handlers with `{.raises.}` annotation
- fix: valueOr and withValue utilities
- fix: remove explicit param from GossipSubParams constructor
2024-04-12 11:12:44 +02:00
Etan Kissling
a561024d88
rank peers by their score instead of their memory address (#6149)
The `<` function to compare peers was not exported, leading to the same
peer be acquired over and over again until kick. `mixin` doesn't pull it
into `peerCmp` without `*` export, and with the export no mixin needed.
2024-04-10 14:09:37 +02:00
diegomrsantos
885989f3df
bump libp2p (#6148) 2024-03-27 15:53:02 +00:00
diegomrsantos
edad7c8a4c
bump libp2p (#6132) 2024-03-27 11:16:57 +01:00
Etan Kissling
991e7cafbc
descore when opening connection fails, same as when reading fails (#6130)
`eth2_network` forgets to descore peers when opening connection times
out. It only descores when opening the connection succeeds and then
there is a subsequent error. The caller cannot distinguish the cases,
so ensure that the descore is also applied if the request fails during
its initial portion.
2024-03-24 05:37:47 +01:00
Etan Kissling
17ee40b39b
make blobs use less quota when other nodes sync from us (#6120)
Each individual blob currently uses as much quota from the network limit
as an entire block does, 128 items per second shared across all peers.
Blobs are 128 KB each instead of up to several MB and are simpler to
encode. There can be multiple per block (6 currently), so allow 2000
blobs per second across all peers. That decreases the cost per block
from `3125 + 3125 * blobs.len` quota (= `[3125, 21875]`) to a lower
`3125 + 200 * blobs.len` quota (= `[3125, 4325]`), accounting for the
slight increase in data transfer and encoding time.
2024-03-22 02:36:08 +01:00
Etan Kissling
9256db2265
use LPProtocol.new instead of LPProtocol() (#6117)
Avoid potenial issue with https://github.com/vacp2p/nim-libp2p/pull/1064#discussion_r1534021691
in a future dependency bump.
2024-03-21 17:53:59 +01:00
Jacek Sieka
032b91c631
extend seen ttl to cover 2 epochs (#6098)
this allows us to drop these useless messages earlier in the pipeline

https://github.com/ethereum/consensus-specs/pull/3627
2024-03-20 08:07:16 +01:00
tersec
0a6d189161
automated consensus spec URL updating to v1.4.0 (#6074) 2024-03-14 07:26:36 +01:00
tersec
fef831d92a
rm unused ForkedTrustedBeaconBlock; add some Electra overloads to consensus_object_pools; Electra BeaconBlock gossip support (#5965) 2024-02-26 06:49:12 +00:00
tersec
a4f4a35845
Revert "initial Electra support skeleton" (#5955)
* Revert "initial Electra support skeleton (#5946)"

This reverts commit d09bf3b587bc4f0c91b8e2f58884665a0ae80e34.

* Update test_signing_node.nim
2024-02-25 19:42:44 +00:00
tersec
d09bf3b587
initial Electra support skeleton (#5946) 2024-02-24 13:44:15 +00:00
tersec
0f155ebf95
some consensus spec v1.4.0-beta.7 spec URL updates (#5945) 2024-02-22 02:42:57 +00:00
tersec
c73d7c6f6f
automated consensus spec URL updating to v1.4.0-beta.7 (#5942) 2024-02-21 19:44:48 +00:00
Jacek Sieka
1ef7d237cc
Shared validator pubkey (#5883)
This PR allows sharing the pubkey data between validators by using a
thread-local cache for pubkey data, netting about a 400mb mem usage
reduction on holesky due to us keeping 3 permanent + several ephemeral
state copies in memory at all times and each state copy holding a full
validator.

The PR also introduces a hash cache for the key which gives ~14% speedup
for a full state `hash_tree_root` - the key makes up for a large part of
the `Validator` htr time.

Finally, the time it takes to copy a state goes down as well from ~80m
ms to ~60, for reasons similar to htr.

We use a `ptr` even if a `ref` could in theory have been used - there is
not much practical benefit to a `ref` (given it's mutable) while a `ptr`
is cheaper and easier to copy (when copying temporary states).

We could go further and cache a cooked pubkey but it turns out this is
quite intrusive - in all the relevant places, we're already using a
cooked key from the immutable validator data so there are no immediate
performance gains of doing so while managing the compressed -> cooked
key mapping would become more difficult - something for a future PR
perhaps.

Co-authored-by: Etan Kissling <etan@status.im>
2024-02-21 20:06:19 +01:00
tersec
8240c1bf34
use decimal representations of engine and builder bid values (#5879) 2024-02-10 05:13:00 +01:00
Jacek Sieka
6cd37f7a47
reduce log level on unexpected errors in network (#5822) 2024-01-24 18:23:12 +02:00
tersec
4fd3177dab
clean up UnusedImport and Deprecated warnings (#5813) 2024-01-22 17:35:19 +01:00
Jacek Sieka
6328c77778
raises for gossip (#5808)
* raises for gossip

* fix light client
2024-01-22 17:34:54 +01:00
tersec
d669eef97b
rm unused code; fix a Deprecated warning; proc to func (#5807) 2024-01-20 21:36:01 +00:00
tersec
042169ac9d
rm some unnecessary stew/shims/net imports to reduce deprecation warnings (#5806) 2024-01-20 16:42:19 +00:00
tersec
6c53dc1e11
automated consensus spec URL updating to v1.4.0-beta.6 (#5804) 2024-01-20 11:19:47 +00:00
Jacek Sieka
3ff9b69bf1
simplify eth2_network error handling (#5765)
This PR gets rid of a bunch of redundant exception handling through
async raises guarantees.

More can be removed once libp2p gets properly annotated.
2024-01-19 21:05:52 +00:00
tersec
cf1bec7670
update some deprecated stew/results to results imports (#5743) 2024-01-16 22:37:14 +00:00