* 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
- 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.
* 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.
* 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.
* 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>
* 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.
* 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)
* 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.
* 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 :)
* Cache content after lookups in history network.
* Cleanup config in PortalProtocol.
* Use local content lookup in history network to enable using cache.
* 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.
* 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
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.
* 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.
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.
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.