Commit Graph

561 Commits

Author SHA1 Message Date
bhartnett 6e7e63adf5
Fluffy: Make the Kademlia concurrency factor configurable via a debug parameter (#2868) 2024-11-25 20:16:27 +08:00
andri lim fbfc1611d7
Implement EIP-7702: Set EOA account code (#2631)
* Implement EIP-7702 part 1: Behavior

* Implement EIP-7702 part 2: Tx validation

* Implement EIP-7702 part 3: Delegation Designation and Gas Costs
2024-11-25 11:28:03 +01:00
bhartnett 78c5770b2f
Fluffy State Bridge: Support skipping gossip when content is found in the network (#2867) 2024-11-25 11:40:09 +08:00
Kim De Mey 453cb2f33e
portal_bridge: Add concurrency to the history content gossip (#2855) 2024-11-21 15:30:42 +01:00
Kim De Mey 107db3ae16
fluffy: revert iplimit/bitperhop debug flags (#2860)
Revert for now to their previous names to avoid fluffy fleet
breakage.
2024-11-21 13:36:18 +01:00
bhartnett 4b63cdeaac
Remove direct local content lookup from PortalRpcClient. (#2857) 2024-11-21 20:20:09 +08:00
bhartnett 508ce79cdd
Fluffy: Log nodeId when receiving offers (#2856)
* Log nodeId when receiving offers.
2024-11-21 20:17:38 +08:00
Kim De Mey b671499fdc
fluffy: Make concurrent offers configurable at cli (#2854) 2024-11-21 04:05:33 +07:00
Kim De Mey 3ea5c531d1
portal_bridge history: fully support gossip of block by number (#2853)
+ some minor cleanup & reuse of code
2024-11-20 14:07:36 +01:00
Kim De Mey d496793fa6
fluffy/portal: Add missing imports (#2851)
Would/could fail compilation when using portal_node as module,
depending on import order.
2024-11-19 15:38:10 +01:00
Kim De Mey 32b5b8a173
Fluffy guide: fix formatting for development status docs (#2850) 2024-11-18 10:30:23 +01:00
Kim De Mey d643556d4b
fluffy.guide: Update development status (#2846) 2024-11-07 17:17:40 +01:00
bhartnett 9dceb58ad0
Fluffy: Prioritize nodes that have radius in range of target content in lookup (#2841)
* Prioritize nodes that have radius in range of target content in content lookup.
2024-11-07 16:59:59 +08:00
Kim De Mey eaf98dccb1
Change some spammy info/error logs to debug (#2840)
These logs are not really usful to an end user, and are rather
for developers, so we move them to debug.
2024-11-06 15:44:20 +01:00
Kim De Mey cff7091826
Fix flaky portal tests - part II (#2829)
* Remove two simple sleeps from history network test

Replace simple sleeps in test_history_network with retries +
sleeps. Current simple sleep setting would occasionally still
fail on CI.

* Increase retries on test_portal_testnet from 2 to 3.

* Add 1 second sleep after headers with proof get gossiped
2024-11-06 11:10:31 +01:00
Kim De Mey 6374bfb39c
Refactor/clean-up/prepping history network code (#2836)
- Move any validation related code to new file
- Move any type conversion related code to new file
- Prepare validation code for adding different type of canonical
proofs
- Prepare for validation code for json-rpc api
- several other clean-ups and renames

Sort of a first pass as the validation code specifically can
use some further changes.
2024-11-06 08:49:55 +01:00
Kim De Mey 226d084e90
Fix flaky test_portal_testnet CI test with retries (#2808)
* Add two, not so great, quick fix attempts for flaky CI

* Another attempt

* Remove the increased sleep in test_history_network

Need something better here.
2024-11-04 18:02:56 +01:00
Kim De Mey 73b228fb1d
Remove EpochRecord getContent (#2828)
EpochRecord type is removed from the network.

And avoid a deprecation warning in portal_bridge.
2024-11-04 16:53:37 +01:00
bhartnett 22653c83dd
Fluffy: Implement contains db handler to improve lookup performance when accepting offers (#2815)
* Remove getSszDecoded from ContentDb.

* Update ContentDb get to use onData callback to reduce copies.

* Use templates for helper procs in ContentDb.

* Add contains handler to portal protocol.

* Improve performance of DbGetHandler.
2024-11-04 22:02:51 +08:00
tersec 73661fd8a4
switch to Nim v2.0.12 (#2817)
* switch to Nim v2.0.12

* fix LruCache capitalization for styleCheck

* KzgProof/KzgCommitment for styleCheck

* TxEip4844 for styleCheck

* styleCheck issues in nimbus/beacon/payload_conv.nim

* ENode for styleCheck

* isOk for styleCheck

* some more styleCheck fixes

* more styleCheck fixes

---------

Co-authored-by: jangko <jangko128@gmail.com>
2024-11-01 19:06:26 +00:00
Kim De Mey 8be105ceaa
Default enable Portal beacon subnetwork (#2806) 2024-10-30 23:26:49 +01:00
Kim De Mey bef4c05561
Add custom json-rpc method to initialize the trusted block root (#2805) 2024-10-30 18:32:36 +01:00
bhartnett 8d8f62bf67
Fluffy: Improve logging and add offer metrics to status logs. (#2802)
* Set offer processing logs to debug level and add offer counts to state network.

* Use metrics instead of int counters and remove from logs.

* More logging improvements. Make decoding and validation failures use error log level.

* Add protocol_id to metrics.
2024-10-30 21:17:16 +08:00
Kim De Mey e038a383c1
Add pruning of bootstraps/updates in Portal beacon network (#2779) 2024-10-30 12:51:00 +01:00
Kim De Mey 85d8ed7be1
Adjust ForkDigest dynamically in Portal beacon content tests (#2778)
Also iterates over multiple dirs now to run tests for each fork.
2024-10-27 08:34:50 +01:00
Jacek Sieka 6b2d341ebb
simplify genesis generation code (#2786)
* remove redundant abstraction
* fix misleading raises - the implementation actually swallows errors or
panics (depending on how many other layers of abstraction we penetrate
before detecting it)
2024-10-26 16:26:38 +07:00
bhartnett ca24dd915f
Fluffy: Make content request retries configurable (#2770)
* Make content request retries configurable and add to state network and history network.

* Set retries to 1. Use uint to prevent negative values. Make contentRequestRetries a debug parameter.
2024-10-25 15:15:01 +08:00
Kim De Mey 3d31911f1d
Portal beacon: Remove unneeded and confusing (fork specific) imports (#2776) 2024-10-24 20:31:17 +02:00
Jacek Sieka 5fc4c13ab1
Increase JSON-RPC limits, bump json-rpc (#2759)
* blocks can be bigger than the default 1mb when json-rpc-encoded - this
happens on sepolia for example
* json-rpc bump improves debug logging and fixes a number of bugs
* json-serialization bump fixes a crash on invalid arrays in json data

At some point, it would probably be better to compute the maximum block
size from actual block constraints, though this is somewhat tricky and
depends on gas limits etc. Until then, 16mb should be plenty.

With this, sepolia can be synced :)
2024-10-23 10:26:56 +02:00
andri lim 133387e6a7
Rework EIP-6110, EIP-7002, and EIP-7251: Pectra execution requests (#2734)
* Rework EIP-6110, EIP-7002, and EIP-7251

* Bump nimbus-eth2
2024-10-18 16:38:18 +07:00
bhartnett 47337593c9
Fluffy: Enable content cache for history network (#2745)
* Cache content after lookups in history network.

* Cleanup config in PortalProtocol.

* Use local content lookup in history network to enable using cache.
2024-10-17 16:25:53 +08:00
bhartnett 54528fb24b
Fluffy: Enable content cache for state network (#2739)
* Enable content cache for state network.

* Update state json-rpc endpoints to return local content which uses cache if enabled.

* Add content cache metrics.

* Make content cache configurable.

* Add content cache tests.
2024-10-16 21:05:39 +08:00
Kim De Mey 4191f95527
Add Docker quickstart page for Fluffy + minor docs fixes (#2744) 2024-10-16 14:56:52 +02:00
Kim De Mey b885f822d0
More clean-up since eth types refactor (#2742) 2024-10-16 14:18:02 +02:00
Kim De Mey f797d55c35
Fix, improve and update some of the fluffy docs (#2743) 2024-10-16 13:48:34 +02:00
andri lim 1126c7700d
Bump nim-eth and nimbus-eth2 (#2741)
* Bump nim-eth and nimbus-eth2

* Fix ambiguous identifier
2024-10-16 13:51:38 +07:00
Chirag Parmar 2838191c4f
replace deprecated types (#2704)
* partial commit

* fixes

* remove converters too

* revert changes on nimbus_verified_proxy

* revert changes in converter

* revert changes(re-xport) in rpc_types

* update copyright year

* replace types in other binaries

* chain config bug

* fix rebase conflict imcomplete buffer

* fix more rebase buffers

* remove ditto types and converters

* fix the tests

* update copyright year
2024-10-16 08:34:12 +07:00
Kim De Mey 9c9a41a16d
More verbose error handling for Portal stream content reading (#2737) 2024-10-14 11:53:28 +02:00
bhartnett bdbea9853e
Rename Fluffy rpc methods to match updated spec (#2735) 2024-10-14 16:46:35 +08:00
Kim De Mey 3e36f52fd7
Rename the debug docker files + add a simpler/faster one for Linux (#2731)
Also update related documentation
2024-10-13 18:07:17 +02:00
bhartnett 9db31ac17b
Fluffy: Fix state validation issue causing portal hive test failure (#2732) 2024-10-13 00:51:50 +08:00
Kim De Mey 6e114dc950
Fix JSON encoding for NodeId, no leading zeroes dropped (#2730)
Portal JSON-RPC API specifications dictate that the NodeId must be
the 32 byte identifier. We had leading zeroes being dropped in
our implementation.
2024-10-11 16:43:06 +02:00
Kim De Mey 0ebab78136
Update Grafana dashboard for Portal (#2727) 2024-10-10 20:11:04 +02:00
Kim De Mey a5f0b12bd1
Remove old portal_debug API for seeding data into the network (#2726)
This was the first API created for this, it has been superseded
by the API that makes use of era1 files and/or the portal_bridge.

Only usage was still in test_portal_testnet which has now been
altered to make use if API calls from Portal specification.
2024-10-10 16:42:57 +02:00
bhartnett 4ae87e6d19
Fluffy: Add validation and local storage of content in remaining state portal rpc methods (#2723)
* Add validation functions to be used in state portal rpc.

* Add validation to remaining state portal rpc methods.

* Lookup local content in recursiveFindContent rpc methods.

* portal_stateFindContent and portal_stateOffer no longer store in db.
2024-10-10 21:24:39 +08:00
bhartnett b13f06fcfb
Fluffy state portal rpc validation (#2719)
* Validate content key in portal_stateLocalContent.

* Add additional validation to stateStore rpc method.
2024-10-09 20:23:46 +08:00
Kim De Mey 5edb0b320f
Allow Portal beacon LC sync to start from a stored LC bootstrap (#2715)
Portal beacon LC sync can be started now from a provided trusted
block root or, in case it has been running before, from a
previously verified and stored LC bootstrap.

This required altering the the beacon db on how the bootstraps
are stored.
2024-10-09 10:21:00 +02:00
Jacek Sieka 11646ad3c4
Ordered trie (#2712)
Speed up trie computations and remove redundant ways of performing this
operation.

Co-authored-by: jangko <jangko128@gmail.com>
2024-10-09 09:44:15 +02:00
bhartnett 72ee610826
Rename Fluffy debug rpc methods (#2710)
* Rename Fluffy debug rpc methods.

* Organize portal json-rpc errors.
2024-10-08 15:21:27 +08:00
andri lim 22134fcf4c
Move premix's downloader and parser to fluffy/tools/eth_data_exporter (#2709)
* Move premix's downloader and parser to fluffy/tools/eth_data_exporter

* Run nph formatter
2024-10-08 03:07:24 +00:00