1213 Commits

Author SHA1 Message Date
Etan Kissling
659be0b08e
bump nim-kzg4844 to 057f7c653e1abe91cca9aac2f94832f39228ea98 (#6067)
- bump `c-kzg-4844` to `v1.0.0`
2024-03-12 18:32:04 +01:00
Etan Kissling
79b230828d
bump nim-unittest2 to e96f3215030cbfa13abc2f5827069b6f8ba87e38 (#6063)
- release `v0.2.2`
2024-03-12 03:35:37 +01:00
Etan Kissling
1a9cafd3dd
bump nim-libp2p to 28609597d104a9be880ed5e1648e1ce18ca9dc38 (#6062)
- fix: allFuturesThrowing compilation issue on daily
- feat: Yamux timeout
- Fix empty path crash issue for MultiAddresses `unix`, `ip6zone`, `dns***`.
- fix: move transport interop tests to nim-libp2p repo
- use chronos 4.0.0
- fix typo in `ProtoMessage.toString()`
- increase tolerance of `simple heartbeat` test
- remove unused `MultiBase.encode(..., Cid)` function
- move `allFutureThrowing` helper to tests
- use new Chronos `trackCounter` APIs for leaks checks in tests
- remove unused `LPStreamError` types
- change `SecioError` and `NoiseError` to descendants of `LPStreamError`
- do not log yamux buffers without sanitization (trace log level)
- don't forget closing the stream when final `{Fin}` fails in yamux
- use `race` instead of `or` to avoid lockup
- in yamux, do not write `{Rst}` packet to stream that's in use
- avoid `KeyError` in edge case of yamux handler
- avoid triple lookup in `m.flushed` yamux table
- catch `WebSocketError` in `wstransport`
- define proper parent error type for `YamuxError`
- document known `--mm:orc` crash
- add `{.async: (raises).}` to `libp2p/stream` modules
2024-03-12 03:28:51 +01:00
Jacek Sieka
65c47c7769
Reapply "ssz: bump (#5996)" (#6037) (#6051)
* Reapply "ssz: bump (#5996)" (#6037)

This reverts commit a299d17fe7c385c5d08d7b28bc108efbe338c8ae.

Fixed in https://github.com/status-im/nim-faststreams/pull/51

* bump
2024-03-09 10:25:39 +01:00
Kim De Mey
513ccc1e0d
Bump eth2-networks for fixed LH bootstrap nodes on mainnet (#6052) 2024-03-08 20:02:28 +01:00
Etan Kissling
a0bc3fff86
fix /eth/v1/beacon/deposit_snapshot for EIP-4881 (#6038)
Fix the `/eth/v1/beacon/deposit_snapshot` API to produce proper EIP-4881
compatible `DepositTreeSnapshot` responses. The endpoint used to expose
a Nimbus-specific database internal format.

Also fix trusted node sync to consume properly formatted EIP-4881 data
with `--with-deposit-snapshot`, and `--finalized-deposit-tree-snapshot`
beacon node launch option to use the EIP-4881 data. Further ensure that
`ncli_testnet` produces EIP-4881 formatted data for interoperability.
2024-03-08 14:22:03 +01:00
Etan Kissling
f0f63c2c53
bump nim-kzg4844 to 9d4b32e3fbadd77526e7faefa50ab6f507fe8583 (#6043)
- bump `c-kzg-4844` to `v0.4.3`
2024-03-08 12:17:47 +00:00
Etan Kissling
6f7138e7d0
bump nim-libp2p to aa4ebb0b3c58ef26561741e355467d248ed7bf0d (#6045)
- fix(hole-punching-interop): update nim to 1.6.16
- fix: compilation issue when `libp2p_expensive_metrics` is enabled.
- fix: more metrics issues when libp2p_expensive_metrics is enabled
- tests(flaky): Increase check timeouts
- docs: add comments and improve yamux readability
- test(flaky): Log checkExpiring failure
- fix: yamux metrics
- improvement: enhanced checkExpiring macro with custom timeout
- docs(general): Improve docs
2024-03-08 03:58:36 +00:00
Etan Kissling
8be52de557
bump nim-libbacktrace to a6746c4df8dd8550ae5e75f4740f4470d5ed9aad (#6044)
- bump `libbacktrace` to `f41cf1fecbc01966e0a3c32a1a54ff9cb0a19bb9`
2024-03-08 03:28:53 +00:00
Etan Kissling
d1935376e3
bump nim-json-rpc to a20ba207d25a9ab496518e84ec0c28b2d8d25ad7 (#6042)
- Introduce custom application error with optional data object
2024-03-08 01:53:09 +00:00
Etan Kissling
6d91305a7b
bump nim-chronos to 17b7a76c7e40c89f31351cd1a5faf76f177b30ac (#6041)
- fix conversion error with `or` on futures with `{.async: (raises: []).}`
- Fix `or` deadlock issue.
- Ensure that `OwnCancelSchedule` flag will not be removed from `wait()` and `withTimeout()`.
- Add missing parts of defaults buffer size increase.
- Avoid `ValueError` effect in varargs `race`/`one`
- fix circular reference in timer
- Ensure `transp.reader` is reset to `nil` on error
2024-03-08 01:42:19 +00:00
Etan Kissling
96ebc32f26
bump nim-bearssl to 86f212c6a5d76b52e20fad2e318cc5436d04fc26 (#6040)
- release `v0.2.2`
2024-03-08 01:56:25 +01:00
Etan Kissling
5f641d09ff
bump goerli to e3c0766b1cf5ddc22fe017e1389c6f60f0f9a468 (#6039)
- Delete `genesis_deposit_contract_snapshot.ssz` file
2024-03-08 01:33:28 +01:00
Etan Kissling
a299d17fe7
Revert "ssz: bump (#5996)" (#6037)
This reverts commit 21601f59e21a8c6c9583738c4d79fb3ffd54f11d.

Reason: `/eth/v1/beacon/light_client/updates?start_period=0&count=128`
provides malformed data. Reverting fixes it locally.

Download JSON and SSZ, then use this script to validate (Holesky).
Need to export some symbols for parsing.

```nim
import
  stew/io2,
  ./beacon_chain/spec/[digest, forks, helpers, presets],
  ./beacon_chain/spec/eth2_apis/[eth2_rest_serialization, rest_light_client_calls]

let jsonBytes = io2.readAllBytes("/Users/etan/Downloads/json_updates.json").get()

let
  (cfg, unknowns) = readRuntimeConfig("/Users/etan/Documents/Repos/nimbus-eth2/vendor/holesky/custom_config_data/config.yaml")
  genesis_validators_root = Eth2Digest.fromHex("0x9143aa7c615a7f7115e2b6aac319c03529df8242ae705fba9df39b79c59fa8b1")
  forkDigests = newClone ForkDigests.init(cfg, genesis_validators_root)

let updates = seq[ForkedLightClientUpdate].decodeJsonLightClientObjects(jsonBytes, cfg, forkDigests)

var entries = newSeqOfCap[RestVersioned[ForkedLightClientUpdate]](updates.len)
for update in updates:
  let
    contextEpoch = withForkyUpdate(update):
      when lcDataFork > LightClientDataFork.None:
        forkyUpdate.contextEpoch
      else:
        continue
    contextFork = cfg.consensusForkAtEpoch(contextEpoch)
  entries.add RestVersioned[ForkedLightClientUpdate](
    data: update,
    jsonVersion: contextFork,
    sszContext: forkDigests[].atconsensusFork(contextFork))

let res =
  block:
    var default: seq[byte]
    try:
      var stream = memoryOutput()
      for e in entries:
        withForkyUpdate(e.data):
          when lcDataFork > LightClientDataFork.None:
            var cursor = stream.delayFixedSizeWrite(sizeof(uint64))
            let initPos = stream.pos
            stream.write e.sszContext.data
            var writer = SszWriter.init(stream)
            writer.writeValue forkyUpdate
            cursor.finalWrite (stream.pos - initPos).uint64.toBytesLE()
      stream.getOutput(seq[byte])
    except SerializationError:
      default
    except IOError:
      default

let sszBytes = io2.readAllBytes("/Users/etan/Downloads/ssz_updates.ssz").get()

let sszUpdates = seq[ForkedLightClientUpdate].decodeSszLightClientObjects(res, cfg, forkDigests)
doAssert updates.len == sszUpdates.len
for i in 0 ..< updates.len:
  doAssert updates[i].kind == sszUpdates[i].kind
  withForkyUpdate(updates[i]):
    when lcDataFork > LightClientDataFork.None:
      doAssert forkyUpdate == sszUpdates[i].forky(lcDataFork)

doAssert sszBytes == res
```
2024-03-07 22:37:03 +00:00
Etan Kissling
d158c0cb2f
bump goerli to 4cd051913c95afba2e702c51cab2a156d0dde5b8 (#6024)
- remove Nimbus bootstrap nodes
2024-03-04 21:19:06 +01:00
Etan Kissling
bb8c6cda18
bump nim-web3 to 747001250a27278e0f0f1706fe1dec88ad3ede8d (#6020)
- Remove error field from AccessListResult
- Add optional yParity field to TransactionObject
2024-03-03 17:17:06 +01:00
Etan Kissling
649f0165b8
bump nim-eth to d66a29db7ca4372dba116928f979e92cb7f7661f (#6017)
- avoid `XDeclaredButNotUsed` in `kvstore_sqlite3` with empty tuple
2024-03-03 14:40:57 +01:00
Etan Kissling
7527b3a152
bump nim-results to 193d3c6648bd0f7e834d4ebd6a1e1d5f93998197 (#6019)
- test refc in CI in Nim 2.0 and later
2024-03-03 02:44:39 +00:00
Etan Kissling
6788c08869
bump nim-json-serialization to 7516a92eb8339f8fc1de7dd16cfa3d77bce87cd2 (#6018)
- avoid `XDeclaredButNotUsed` when no field `isnot JsonVoid`
- Fix JsonValueRef.Object comparison
2024-03-03 02:49:57 +01:00
Etan Kissling
45c283c256
bump nim-sqlite3-abi to 6d99f874d610d9ddac3c5b63ca5d0a341049c2ed (#5976)
- validate SHA3 hash
- bump `sqlite-amalgamation` to `3.41.2`
- bump `sqlite-amalgamation` to `3.42.0`
- apply nimble update and git commit in `update.sh`
- bump `sqlite-amalgamation` to `3.43.0`
- bump `sqlite-amalgamation` to `3.43.1`
- bump `sqlite-amalgamation` to `3.43.2`
- bump `sqlite-amalgamation` to `3.44.0`
- bump `sqlite-amalgamation` to `3.44.1`
- bump `sqlite-amalgamation` to `3.44.2`
- bump `sqlite-amalgamation` to `3.45.0`
- bump `sqlite-amalgamation` to `3.45.1`
2024-03-01 18:08:53 +01:00
Jacek Sieka
21601f59e2
ssz: bump (#5996)
Avoids 25k allocations and >100mb memory overhead when saving a state
(etc everywhere else)
2024-02-29 12:03:10 +01:00
Etan Kissling
d77af57ce0
bump nim-websock to 6db6088792bde0998c2b84c2d8e231f1d0507e49 (#5980)
- test refc in CI in Nim 2.0 and later
2024-02-28 16:39:19 +00:00
Etan Kissling
ac11f50b77
bump nim-toml-serialization to 24bbfcb8e4e256883fc959dc6f5c15fe7a84fca5 (#5979)
- Upgrade github actions to v4
2024-02-28 11:19:59 +00:00
Etan Kissling
1f48795e91
bump nim-taskpools to d4c43137c0590cb47f893a66ca8cb027fa6c217e (#5978)
- test refc in CI in Nim 2.0 and later
2024-02-27 23:55:18 +00:00
Etan Kissling
80ed64d2ff
bump nim-stint to 7bb0ccc7842577243edc3b8d61f75bf498551a7a (#5977)
- Upgrade github actions to v4
2024-02-27 22:49:28 +00:00
Etan Kissling
170036af18
bump nim-snappy to 984bdad602e977ea6c461c28201422fdeeccfb7c (#5975)
- use non-EOL macOS version for GitHub Actions CI
2024-02-27 20:46:31 +00:00
Etan Kissling
3a74821d1e
bump nim-results to dfeef8ba705d7bab3e2073bb44549f0a2562df70 (#5974)
- Formatted with nph v0.4-0-g537f1ce
- Add 592e0dcba157da84e2cced2309fa27dc67b667f3 to .git-blame-ignore-revs
- restore 1.2 compat in tests
2024-02-27 21:06:42 +01:00
Etan Kissling
a38e17cd8d
bump nim-presto to 223aadeb82d35b57e6dae99f0b325ec6345ce7ff (#5973)
- test refc in CI in Nim 2.0 and later
- use non-EOL macOS version for GitHub Actions CI
- Add implementation of PRESTO middleware.
2024-02-27 19:36:37 +00:00
Etan Kissling
0356eda0db
bump nim-nat-traversal to d423ff9e436b8a8219926f4e3350b09108e42847 (#5972)
- bump `miniupnp` to `miniupnpc_2_2_6`
2024-02-27 18:02:23 +00:00
Etan Kissling
9d6be476cf
bump nim-kzg4844 to 39bee1b4c91a476ddcce04cd31e095063e993c2c (#5970)
- Upgrade github actions to v4
2024-02-27 17:48:56 +00:00
Etan Kissling
78b1514745
bump nim-blscurve to d091a579a2e7c4668140e675a6fb2c78b8c6dc57 (#5969)
- remove MIRACL Core backend
2024-02-27 16:50:10 +00:00
Eugene Kabanov
95280e6766
Fix stint parser to raise ValueError instead of RangeDefect. (#5967) 2024-02-27 03:46:12 +01:00
Etan Kissling
97527e2ca5
bump nim-web3 to 15325bd844a38234e4f705b3399d0bbfa3b63a12 (#5938)
- Replace eth_getBlockReceipts return type with Opt[T] instead of Option[T]
- use non-EOL macOS version and fix spelling
- test refc in CI in Nim 2.0 and later
2024-02-22 13:09:25 +00:00
Etan Kissling
1cf9d87137
bump nim-nat-traversal to a48100fa23b3f07895683f3ca30c6be2bac22ca0 (#5934)
- bump `miniupnp` to `miniupnpc_2_2_5`
- require minimum of Nim 1.6
2024-02-22 13:02:48 +00:00
Etan Kissling
fd54423a0a
bump nim-serialization to afae13adac25b6fa98bacf4b9f38458dc64317b0 (#5935)
- Upgrade to github actions v4
- Silence the infamous Conversion from itself warnings
2024-02-22 12:28:42 +00:00
Etan Kissling
c5cb0ea3f6
bump nim-testutils to ae476c67314ac4b294d21040315e0f716189a70e (#5936)
- Resolve ambiguity between chronicles and macros on nim v2
- Upgrade github action to v3
- use non-EOL macOS version for GitHub Actions CI
2024-02-22 11:46:45 +00:00
Etan Kissling
cce8f25263
bump nim-unittest2 to b5028a44710f0317c5e710c80cec90127aa7e77c (#5937)
- unittest2.nim: ensure the testTeardownIMPL is performed at the end
- Add test for PR #35
- only run `teardown` if `setup` completed
- Fix allow break in test body regression
- Upgrade github actions to v4
- use non-EOL macOS version for GitHub Actions CI
2024-02-22 10:36:25 +00:00
Etan Kissling
7642b0c04f
bump nim-zxcvbn to d0fb557f74a28912ff129ce0ba24008b00b1019b (#5939)
- use non-EOL macOS version for GitHub Actions CI
2024-02-22 08:49: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
Etan Kissling
86aee03bcf
bump nim-libbacktrace to 008de2cd425cbca19f7d922e4e8b209d92313752 (#5931)
- bump `whereami` to `c5f6b015c36964790493841b9b4623184c0f7c3f`
- require minimum of Nim 1.6
2024-02-21 14:26:18 +00:00
Etan Kissling
0c745e2f92
bump nim-http-utils to be57dbc902d36f37540897e98c69aa80f868cb45 (#5928)
- test refc in CI in Nim 2.0 and later
- use non-EOL macOS version for GitHub Actions CI
2024-02-21 14:16:03 +00:00
Etan Kissling
e5ba18c55d
bump nim-zlib to 45b06fca15ce0f09586067d950da30c10227865a (#5933)
- bump `csources` to `v1.3.1`
- test refc in CI in Nim 2.0 and later
- use non-EOL macOS version for GitHub Actions CI
2024-02-21 12:06:51 +00:00
Etan Kissling
c4535f5bb6
bump nim-metrics to 0e768ca7fb7df4798649145a403e7db65cae1f8b (#5932)
- Upgrade to github actions v4
- Fix 'value' template compilation error
- fix missing import
- Partial instantiation of 'value' template
2024-02-21 11:15:00 +00:00
Etan Kissling
d1bce17109
bump nim-json-rpc to 8682bb6c858fbcff2f0070c241ce6aae030753a3 (#5930)
- align maximum body size between Websock and HTTP transports
2024-02-21 08:04:36 +00:00
Etan Kissling
1beb603c67
bump nim-faststreams to 8ff78919aa5a23aecaf4a647e23cfa8ecda6736a (#5927)
- test refc in CI in Nim 2.0 and later
- use supported version of macOS
- stop testing Nim C++ backend in GitHub Actions
2024-02-21 05:40:25 +00:00
Etan Kissling
3e2c320b70
bump nim-eth to d8209f623f837d14c43a9e3fd464b0e199c5d180 (#5926)
- Refactor p2pProtocol internals
- Fix chronos related deprecated warnings in discv5 and uTP
- normalise nimble, ci
- Fix chronos related deprecated warnings in uTP code part II
- Remove usage of stew/shim/net
- Upgrade github actions to v4
- Fix two bugs in Receipts RLP encoding/decoding
- Move Ethereum specific RLP encoding tests under tests/common
- Reduce compiler warnings in rlp
- test refc in CI in Nim 2.0 and later
- test Nim 2.0 in CI and use non-EOL macOS version
- Use asyncraises in p2p
- Don't auto write p2pProtocol macro expansion to file
- Fix improper yield usage in rlpx and refine exception handling
2024-02-21 04:31:07 +00:00
Etan Kissling
6d741467f0
bump nim-confutils to 0adf3b7db70736061bf12fa23c2fc51f395b289e (#5925)
- Dynlib fix for status-go integration
- Add ORC testing for the devel branch
- Upgrade github actions to v4
- Add copyright to source code
- Add push raises
- add missing `{.raises.}` to `addConfigFileContent`
2024-02-21 03:54:43 +00:00
Etan Kissling
50872b2fd4
bump nimcrypto to 0c6ddab03a99805239b7875f71d2ca95fbed6f85 (#5924)
- use non-EOL macOS version for GitHub Actions CI and rm AppVeyor and Travis configs
2024-02-21 02:44:24 +00:00
Etan Kissling
2a1bf9944d
bump nim-json-rpc to 9c65df305390ab01a13788af5aea78cd62dceb2a (#5923)
- Client also handle error message if id is null
- Client pass meaningful error to newFut when processMessage failed
- Refactoring: extract rpc handler from HTTP and WebSocket server
- Use pragma push/pop pair to disable warning
- http server better exception handling
- Fix CI badge url
- Upgrade github actions to v4
- Revert "Fix CI badge url"
- HttpAuthHook use async raises
- Move CancelledError handling to outer try/except of RpcWebsocketServer
- Implement RPC batch call both in servers and clients
- v0.4.0
- Should compile if chronicles log turned on
- Add framework to support more optional types
- v0.4.2
- test refc in CI in Nim 2.0 and later
- use non-EOL macOS version for GitHub Actions CI
- avoid failing uninitialized `Future`
- Improve batch call example and wrapper comments
- Fix ws and socket client error handling and add test to #212
- Add build test with chronicles to json enabled
2024-02-20 21:27:06 +01:00
Etan Kissling
eefe8841ef
bump nim-stew to 1662762c0144854db60632e4115fe596ffa67fca (#5921)
- Add push raises to shims/macros module
- rename `RangeError` -> `RangeDefect` in test name
2024-02-20 21:21:09 +01:00