Commit Graph

4293 Commits

Author SHA1 Message Date
Advaita Saha c9f97e6cd6
Fix blobs (#2762)
* add blobGasUsed calculation

* enable old tests

* add blob tests in kurtosis

* add blobGasUsed validation

* revert

* introduce blobs in test

* fix: kzg setup

* prevent regression
2024-10-22 09:07:43 +07:00
Jordan Hrycaj 070f117d3c
Suppress beacon sync unless potential actions (#2765)
* Update comments & logs

* Do not start beacon sync unless there is possibly something to do

why:
  It would continue polling without having any effect other than
  logging. Now it will not start unless there is RPC available
  or there was a previously interrupted sync to be resumed.
2024-10-21 18:01:45 +00:00
Jacek Sieka 693ad315b3
Simplify verified proxy (#2754)
Reuse helpers from nimbus/web3/eth to simplify verifying proxy
implementation.
2024-10-21 03:10:41 +00:00
Jacek Sieka 503dcd40c4
aristo: remove `replicate` (#2758)
Not used, not tested, mostly obsolete due to how key table has become a
cache
2024-10-20 17:25:12 +02:00
Jacek Sieka 2decb618c8
fix Nim build on upgrade (#2760) 2024-10-20 17:24:49 +02:00
Chirag Parmar 2b705bb363
revert proc/func changes from 2704 (#2757) 2024-10-19 15:51:31 +07:00
Advaita Saha c5573fb0aa
fix rpc for old blocks in db (#2756) 2024-10-19 06:57:37 +07:00
Jacek Sieka d4bb2088ea
txpool: use common txroot computation (#2755)
Avoids CoreDb overhead for this simple operation
2024-10-19 06:39:33 +07: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
andri lim 0d4a5e87d2
engine_newPayloadV4 accepts ExecutionPayloadV3 (#2749) 2024-10-18 16:35:56 +07:00
Jordan Hrycaj 0b93236d1b
Beacon sync block import via forked chain (#2747)
* Accept finalised hash from RPC with the canon header as well

* Reorg internal sync descriptor(s)

details:
  Update target from RPC to provide the `consensus header` as well as
  the `finalised` block number

why:
  Prepare for using `importBlock()` instead of `persistBlocks()`

* Cosmetic updates

details:
+ Collect all pretty printers in `helpers.nim`
+ Remove unused return codes from function prototype

* Use `importBlock()` + `forkChoice()` rather than `persistBlocks()`

* Update logging and metrics

* Update docu
2024-10-17 17:59:50 +00:00
Jordan Hrycaj 7d41a992e6
Update fork choice import for resuming after stop (#2746)
* Update `ForkedChainRef` constructor

why:
  Initialisation is based on the canonical head which is always zero
  after resuming a stopped `ForkedChainRef` based import.

* Update new-base calculator

why:
  There is some ambiguous code which might not do what the comment
  implies. In short, an unsigned condition like `2u - 3u < 1u => false`
  is coded where the comment suggests that `2 - 3 < 1 => true` is meant.

  This patch fixes notorious crashes when resuming import after a stop.
2024-10-17 12:14:09 +00: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
Pedro Miranda bc0f1ba904
Rename nimbus binary to nimbus_execution_client (#2728)
* rename nimbus binary to nimbus_execution_client

* additional replacements

* makefile and dockerfile

* fix ci building errors

* github workflows

* improved Makefile target

---------

Co-authored-by: Pedro Miranda <pedro.miranda@nimbus.team>
2024-10-15 09:37:54 +00: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
tersec eec41bc0e8
test with aarch64 macOS (#2729) 2024-10-13 08:20:05 +07:00
Advaita Saha 1858d55748
shift kurtosis + assertor to stable release (#2733) 2024-10-13 08:19:33 +07: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
andri lim 59dde39d95
Run t8n test in CI (#2724)
* Enable t8n test to run in CI

* Disable trace test for evmc
2024-10-10 20:25:27 +07:00
tersec 266b72698d
rm obsolete MergeTracker (#2725) 2024-10-10 20:25:12 +07: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
tersec 69f646f417
bump nim-eth1 for updated Sepolia and Holesky bootnodes (#2722) 2024-10-09 22:45:33 +00:00
Jordan Hrycaj f937f57838
Beacon sync targets cons head rather than finalised block (#2721)
* Fix fringe condition clarifying how to handle an empty range

why:
  The `interval_set` module would treat an undefined interval construct
  `[2,1]` as`[2,2]` (the right bound being `max(2,1)`.)

* Use the `consensus head` rather than the `finalised` block as sync target

why:
  The former is ahead of the `finalised` block.

* In ctx descriptor rename `final` field to `target`

* Update docu, rename `F` -> `T`
2024-10-09 18:00:00 +00: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
andri lim e59d2825f4
Bump nim-stew (#2718) 2024-10-09 11:47:27 +07:00
andri lim 52e3e20643
Bump nim-unittest2 (#2717) 2024-10-09 11:47:15 +07:00
andri lim fe4527617f
Bump nim-eth (#2716) 2024-10-09 11:47:02 +07: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 6f9fc3eced
Fix eth/common related deprecation warnings for t8n and evmstate tools (#2711)
* Fix eth/common related deprecation warnings for t8n

* Fix eth/common related deprecation warnings for evmstate
2024-10-08 12:52:32 +07: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
andri lim 76c2a75a53
Proof-of-stakiness based on block header (#2682)
* Proof-of-stakiness based on block header

* Remove unnecessary PoS check from test_txpool2

* Fix engine api simulator

* Fix indentation

* Fix vmstate debug util

* Fix MainNet ForkId calculation issue
2024-10-08 09:37:36 +07:00
Kim De Mey a3bb5d4428
Small clean-up of the differen Portal json-rpc APIs (#2708)
Clean-up removing:
- no longer relevant comments
- unused types
- unused imports
2024-10-08 09:15:29 +08:00
Kim De Mey 833719a866
Remove usage of aliases for Hash32 such as BlockHash (#2707)
These create only confusion as if they are actual different types
and it is within their usage already clear what they are about
because of the name of the variable or the function.

They are also nowhere aliased like this in any of the Portal
specification.
2024-10-07 22:39:07 +02:00
Kim De Mey e1c942ccef
Remove unneeded w3Hash and similar calls (#2706) 2024-10-07 20:54:48 +02:00
bhartnett 344a236c31
Fluffy: Create separate portal rpc handlers for each sub-network (#2705)
* Create separate portal rpc handlers for each sub-network.

* Remove random gossip from history and state networks.

* Move shared portal rpc endpoints into common handler.

* Use enum instead of network string.
2024-10-07 16:33:02 +02:00
Kim De Mey 778c1d589f
Adapt portal_*Offer method to the latest specification (#2689) 2024-10-07 10:49:04 +02:00
tersec 1ac6ee1aef
use macos-13 builders; macos-12 EOL (#2703) 2024-10-06 17:17:57 +00:00