Skip to content

Switch to multicall3 for startup - #83

Merged
jshufro merged 17 commits into
masterfrom
jms/multicall3
Jul 27, 2025
Merged

Switch to multicall3 for startup#83
jshufro merged 17 commits into
masterfrom
jms/multicall3

Conversation

@jshufro

@jshufro jshufro commented Jul 26, 2025

Copy link
Copy Markdown
Contributor

All the statelessness of rp's multicall logic, but with substantially less requested data.

Startup takes ten seconds:

2025-07-26T16:19:50.990-0400    INFO    executionlayer/execution-layer.go:572   Warming up the cache
2025-07-26T16:19:51.833-0400    INFO    executionlayer/execution-layer.go:583   Loaded nodes    {"count": 3977, "block": 23005663}
2025-07-26T16:20:00.443-0400    INFO    executionlayer/execution-layer.go:590   Loaded minipools        {"count": 3977, "block": 23005663}
2025-07-26T16:20:00.466-0400    INFO    executionlayer/execution-layer.go:635   Loaded odao nodes       {"count": 13, "block": 23005663}
2025-07-26T16:20:00.466-0400    INFO    executionlayer/execution-layer.go:640   Pre-loaded nodes and minipools  {"nodes": 3977, "minipools": 41895, "odao nodes": 13}
2025-07-26T16:20:00.466-0400    INFO    rescue-proxy/service.go:114     Starting CL monitor
2025-07-26T16:20:00.466-0400    INFO    rescue-proxy/service.go:105     Starting EL monitor

This is sufficiently fast that we can also stop using the ws event subscription in the go-ethereum library, which has been buggy in the past.

Instead we can RCU a pointer with the multicall results.

Incidentally, this improves the testability of the el abstraction, because we can stop mocking the evm

@github-actions

Copy link
Copy Markdown

Coverage Report

@github-actions

Copy link
Copy Markdown

Coverage Report

@github-actions

Copy link
Copy Markdown

Coverage Report

@github-actions

Copy link
Copy Markdown

Coverage Report

@github-actions

Copy link
Copy Markdown

Coverage Report

@github-actions

Copy link
Copy Markdown

Coverage Report

@github-actions

Copy link
Copy Markdown

Merging this branch changes the coverage (2 decrease, 1 increase)

Impacted Packages Coverage Δ 🤖
github.com/Rocket-Rescue-Node/rescue-proxy 0.00% (ø)
github.com/Rocket-Rescue-Node/rescue-proxy/config 0.00% (ø)
github.com/Rocket-Rescue-Node/rescue-proxy/executionlayer 26.49% (-1.88%) 👎
github.com/Rocket-Rescue-Node/rescue-proxy/executionlayer/dataprovider 0.50% (+0.50%) 👍
github.com/Rocket-Rescue-Node/rescue-proxy/executionlayer/stakewise 3.55% (-0.12%) 👎
github.com/Rocket-Rescue-Node/rescue-proxy/router 31.52% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/Rocket-Rescue-Node/rescue-proxy/config/config.go 0.00% (ø) 644 0 644
github.com/Rocket-Rescue-Node/rescue-proxy/executionlayer/cache.go 0.00% (-40.00%) 5 0 (-2) 5 (+2) 💀 💀 💀 💀
github.com/Rocket-Rescue-Node/rescue-proxy/executionlayer/dataprovider/interface.go 0.00% (ø) 0 0 0
github.com/Rocket-Rescue-Node/rescue-proxy/executionlayer/dataprovider/multicall.go 0.50% (+0.50%) 1394 (+1394) 7 (+7) 1387 (+1387) 👍
github.com/Rocket-Rescue-Node/rescue-proxy/executionlayer/execution-layer.go 24.07% (-4.83%) 511 (-1205) 123 (-373) 388 (-832) 👎
github.com/Rocket-Rescue-Node/rescue-proxy/executionlayer/maps-cache.go 35.26% (-0.49%) 156 (-37) 55 (-14) 101 (-23) 👎
github.com/Rocket-Rescue-Node/rescue-proxy/executionlayer/stakewise/eth-priv-vault-encoding.go 6.82% (-0.50%) 88 (+6) 6 82 (+6) 👎
github.com/Rocket-Rescue-Node/rescue-proxy/executionlayer/stakewise/vaults-registry-encoding.go 6.82% (-0.50%) 88 (+6) 6 82 (+6) 👎
github.com/Rocket-Rescue-Node/rescue-proxy/executionlayer/stakewise/vaults.go 0.00% (ø) 162 (-1) 0 162 (-1)
github.com/Rocket-Rescue-Node/rescue-proxy/router/router.go 31.07% (ø) 1075 334 741
github.com/Rocket-Rescue-Node/rescue-proxy/service.go 0.00% (ø) 475 (+37) 0 475 (+37)

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/Rocket-Rescue-Node/rescue-proxy/executionlayer/execution-layer_test.go

@jshufro
jshufro merged commit bb5fb4c into master Jul 27, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant