Skip to content

fix(reservations): unblock release builds and upgrade-window sweeps - #4385

Open
lrsaturnino wants to merge 5 commits into
reservations-epicfrom
fix/pr-4282-review-findings
Open

lrsaturnino wants to merge 5 commits into
reservations-epicfrom
fix/pr-4282-review-findings

Conversation

@lrsaturnino

Copy link
Copy Markdown
Member

Problem

This stacks on #4282 and fixes two problems found reviewing it at 96530a787. First, binding generation requires ReservationRouter, ReservationVault and the reservation methods in every environment, but the vendored fallbacks and the method patch applied to development only. No published tbtc-v2 package carries the reservations build (mainnet 1.8.2, sepolia 1.6.0-sepolia.6), so make generate environment=mainnet stopped at the missing ReservationRouter.json and release.yml could not build a mainnet image or binary. Sepolia builds failed the same way.

Second, two states of the planned upgrade made every upgraded client refuse every deposit sweep. Between the Bridge upgrade and setReservationRouter, the reservations-build Bridge reverts reservationParameters(), the classifier recognises the reservations build, and the closed-window gate refuses. On mainnet the router can only be set through a new BridgeGovernance, behind its two-day delay. Once an activation block is reached before the Bridge upgrade, both sweep paths ask isReservedDeposit, which the current Bridge lacks.

Solution

The fallback rules and patch-artifacts now apply in every environment, still only to what a package is missing. They substitute no address the client uses: the router binding sits at the Bridge address, the vault binding at the address read from the Bridge, and gen.go embeds neither. The Dockerfile comment now says so.

When the parameters read fails on a reservations build, the adapter reads getReservationRouter() directly, because the regenerated Bridge binding lacks it. A zero router means no vault can have been configured, so it reports no trusted vault. When isReservedDeposit fails on a Bridge whose code proves it predates reservations, the adapter answers "not reserved" and logs a warning. Every other failure still refuses, and the reservations-build WalletProposalValidator still rejects on chain any sweep containing a reserved deposit. docs/plans/reservations/m1-guide.md describes both cases.

Tests

New tests run the generator's artifact preparation for development, sepolia and mainnet against packages shaped like the published ones. Others pin the zero-router, router-failure and pre-reservations isReservedDeposit paths. The new cases fail on the old code. Docker release builds for mainnet and sepolia (the output-bins target) succeed against the published packages, and the binary runs. The Client workflow's jobs were replicated locally and pass, except the public Electrum integration step, which fails on the unchanged branch too and does not gate this branch in CI.

…vironment

None of the published @keep-network/tbtc-v2 packages carries the
reservations build yet: the mainnet and sepolia packages lack
ReservationRouter.json and ReservationVault.json, and their Bridge and
WalletProposalValidator artifacts lack the reservation methods the client
calls. The fallbacks and the method patch applied to the development
environment only, so `make generate environment=mainnet` stopped at the
missing ReservationRouter.json and release.yml could not build a mainnet
image or binary from this tree. Sepolia builds failed the same way.

The fallbacks substitute no address the client uses: the ReservationRouter
binding is attached to the Bridge address, the ReservationVault binding to
the vault address read from the Bridge at runtime, and gen.go embeds
neither address. Both rules and patch-artifacts still act only on what a
package is missing, so a package that publishes the real artifacts is used
as is.

The test runs the generator's artifact preparation for development,
sepolia and mainnet against packages shaped like the published ones, and
checks that published artifacts are left untouched.
Two states of the reservations upgrade made every upgraded client refuse
every deposit sweep although nothing on chain could be reserved.

Between the Bridge upgrade and setReservationRouter, the reservations-build
Bridge answers reservationParameters() through a fallback that reverts while
no router is set. The classifier recognises the reservations build, so the
failed read stayed an unknown state and the closed-window sweep gate
refused. On mainnet the router can only be set through a new
BridgeGovernance, which takes the two-day governance delay. The adapter now
reads getReservationRouter() when the parameters read fails on a
reservations build: a zero router means no reservation vault can have been
configured, since the vault is only set through the router and a reveal is
reserved only when it names a non-zero vault, so it reports no trusted
vault. Any other router, or a router read that fails, still refuses. The
call goes to the selector directly because the Bridge binding the build
image regenerates does not carry getReservationRouter.

Once a build sets an activation block that is reached before the Bridge
upgrade, both sweep paths ask isReservedDeposit, which a pre-reservations
Bridge does not have. The adapter now answers "not reserved", with a
warning, when the deployed code proves the Bridge predates reservations,
the same proof the closed-window gate already relies on. Any other failure
is still an error, and the reservations-build WalletProposalValidator
keeps refusing on chain a sweep that contains a reserved deposit.
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a8735c00-4071-424a-9e00-748f030da752

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

client-bench results

Baseline: latest successful push on the target branch. Regressions >12% are advisory on pull requests (hard-fail on push to dev and on the nightly schedule).

benchstat vs baseline
goos: linux
goarch: amd64
pkg: github.com/keep-network/keep-core/pkg/altbn128
cpu: AMD EPYC 7763 64-Core Processor                
                                │ bench-prev/bench.txt │
                                │        sec/op        │
CompressG1-4                              802.2n ± 60%
DecompressG1-4                            41.90µ ±  3%
CompressDecompressRoundTripG1-4           42.17µ ±  3%
CompressDecompressRoundTripG2-4           1.872m ±  1%
geomean                                   40.36µ

                                │ bench-prev/bench.txt │
                                │         B/op         │
CompressG1-4                                224.0 ± 0%
DecompressG1-4                            4.562Ki ± 3%
CompressDecompressRoundTripG1-4           4.785Ki ± 2%
CompressDecompressRoundTripG2-4           1.155Mi ± 2%
geomean                                   8.670Ki

                                │ bench-prev/bench.txt │
                                │      allocs/op       │
CompressG1-4                                5.000 ± 0%
DecompressG1-4                              141.0 ± 6%
CompressDecompressRoundTripG1-4             150.0 ± 7%
CompressDecompressRoundTripG2-4            16.11k ± 2%
geomean                                     203.2

cpu: Intel(R) Xeon(R) 6975P-C
                                │   bench.txt   │
                                │    sec/op     │
CompressG1-4                      230.0n ± 127%
DecompressG1-4                    27.27µ ±   3%
CompressDecompressRoundTripG1-4   27.50µ ±   3%
CompressDecompressRoundTripG2-4   1.322m ±   1%
geomean                           21.85µ

                                │  bench.txt   │
                                │     B/op     │
CompressG1-4                        224.0 ± 0%
DecompressG1-4                    4.566Ki ± 2%
CompressDecompressRoundTripG1-4   4.840Ki ± 3%
CompressDecompressRoundTripG2-4   1.146Mi ± 2%
geomean                           8.678Ki

                                │  bench.txt  │
                                │  allocs/op  │
CompressG1-4                       5.000 ± 0%
DecompressG1-4                     145.5 ± 9%
CompressDecompressRoundTripG1-4    150.0 ± 6%
CompressDecompressRoundTripG2-4   15.96k ± 2%
geomean                            204.3

pkg: github.com/keep-network/keep-core/pkg/beacon/gjkr
cpu: AMD EPYC 7763 64-Core Processor                
                                            │ bench-prev/bench.txt │
                                            │        sec/op        │
MarshalEphemeralPublicKeyMessage-4                     1.273µ ± 7%
UnmarshalEphemeralPublicKeyMessage-4                   51.93µ ± 0%
MarshalEphemeralPublicKeyMessage_64Keys-4              24.20µ ± 1%
UnmarshalEphemeralPublicKeyMessage_64Keys-4            1.624m ± 0%
geomean                                                40.15µ

                                            │ bench-prev/bench.txt │
                                            │         B/op         │
MarshalEphemeralPublicKeyMessage-4                      784.0 ± 0%
UnmarshalEphemeralPublicKeyMessage-4                  1.255Ki ± 0%
MarshalEphemeralPublicKeyMessage_64Keys-4             15.91Ki ± 0%
UnmarshalEphemeralPublicKeyMessage_64Keys-4           32.00Ki ± 0%
geomean                                               4.703Ki

                                            │ bench-prev/bench.txt │
                                            │      allocs/op       │
MarshalEphemeralPublicKeyMessage-4                      16.00 ± 0%
UnmarshalEphemeralPublicKeyMessage-4                    24.00 ± 0%
MarshalEphemeralPublicKeyMessage_64Keys-4               384.0 ± 0%
UnmarshalEphemeralPublicKeyMessage_64Keys-4             584.0 ± 0%
geomean                                                 96.33

cpu: Intel(R) Xeon(R) 6975P-C
                                            │  bench.txt  │
                                            │   sec/op    │
MarshalEphemeralPublicKeyMessage-4            924.2n ± 0%
UnmarshalEphemeralPublicKeyMessage-4          47.42µ ± 0%
MarshalEphemeralPublicKeyMessage_64Keys-4     17.29µ ± 0%
UnmarshalEphemeralPublicKeyMessage_64Keys-4   1.481m ± 0%
geomean                                       32.55µ

                                            │  bench.txt   │
                                            │     B/op     │
MarshalEphemeralPublicKeyMessage-4              784.0 ± 0%
UnmarshalEphemeralPublicKeyMessage-4          1.255Ki ± 0%
MarshalEphemeralPublicKeyMessage_64Keys-4     15.91Ki ± 0%
UnmarshalEphemeralPublicKeyMessage_64Keys-4   32.00Ki ± 0%
geomean                                       4.703Ki

                                            │ bench.txt  │
                                            │ allocs/op  │
MarshalEphemeralPublicKeyMessage-4            16.00 ± 0%
UnmarshalEphemeralPublicKeyMessage-4          24.00 ± 0%
MarshalEphemeralPublicKeyMessage_64Keys-4     384.0 ± 0%
UnmarshalEphemeralPublicKeyMessage_64Keys-4   584.0 ± 0%
geomean                                       96.33

pkg: github.com/keep-network/keep-core/pkg/bitcoin
cpu: AMD EPYC 7763 64-Core Processor                
                                  │ bench-prev/bench.txt │
                                  │        sec/op        │
ComputeSignatureHashes_1Input-4              1.405µ ± 0%
ComputeSignatureHashes_5Inputs-4             4.300µ ± 1%
ComputeSignatureHashes_20Inputs-4            14.95µ ± 1%
geomean                                      4.486µ

                                  │ bench-prev/bench.txt │
                                  │         B/op         │
ComputeSignatureHashes_1Input-4               752.0 ± 0%
ComputeSignatureHashes_5Inputs-4            2.367Ki ± 0%
ComputeSignatureHashes_20Inputs-4           8.672Ki ± 0%
geomean                                     2.470Ki

                                  │ bench-prev/bench.txt │
                                  │      allocs/op       │
ComputeSignatureHashes_1Input-4               18.00 ± 0%
ComputeSignatureHashes_5Inputs-4              72.00 ± 0%
ComputeSignatureHashes_20Inputs-4             270.0 ± 0%
geomean                                       70.47

cpu: Intel(R) Xeon(R) 6975P-C
                                  │  bench.txt  │
                                  │   sec/op    │
ComputeSignatureHashes_1Input-4     1.061µ ± 0%
ComputeSignatureHashes_5Inputs-4    3.201µ ± 0%
ComputeSignatureHashes_20Inputs-4   11.15µ ± 0%
geomean                             3.358µ

                                  │  bench.txt   │
                                  │     B/op     │
ComputeSignatureHashes_1Input-4       752.0 ± 0%
ComputeSignatureHashes_5Inputs-4    2.367Ki ± 0%
ComputeSignatureHashes_20Inputs-4   8.672Ki ± 0%
geomean                             2.470Ki

                                  │ bench.txt  │
                                  │ allocs/op  │
ComputeSignatureHashes_1Input-4     18.00 ± 0%
ComputeSignatureHashes_5Inputs-4    72.00 ± 0%
ComputeSignatureHashes_20Inputs-4   270.0 ± 0%
geomean                             70.47

pkg: github.com/keep-network/keep-core/pkg/bls
cpu: AMD EPYC 7763 64-Core Processor                
                     │ bench-prev/bench.txt │
                     │        sec/op        │
Sign-4                          196.5µ ± 1%
Verify-4                        1.991m ± 1%
AggregateBLS/N=10-4             1.899m ± 0%
AggregateBLS/N=50-4             2.002m ± 1%
AggregateBLS/N=100-4            2.114m ± 0%
ThresholdVerify-4               3.219m ± 0%
geomean                         1.471m

                     │ bench-prev/bench.txt │
                     │         B/op         │
Sign-4                         14.16Ki ± 0%
Verify-4                       95.27Ki ± 0%
AggregateBLS/N=10-4            82.36Ki ± 0%
AggregateBLS/N=50-4            82.36Ki ± 0%
AggregateBLS/N=100-4           82.36Ki ± 0%
ThresholdVerify-4              359.4Ki ± 0%
geomean                        80.44Ki

                     │ bench-prev/bench.txt │
                     │      allocs/op       │
Sign-4                           710.0 ± 0%
Verify-4                        1.452k ± 0%
AggregateBLS/N=10-4              764.0 ± 0%
AggregateBLS/N=50-4              764.0 ± 0%
AggregateBLS/N=100-4             764.0 ± 0%
ThresholdVerify-4               9.118k ± 0%
geomean                         1.270k

                  │ bench-prev/bench.txt │
                  │      p50-sec/op      │
ThresholdVerify-4            3.177m ± 0%

                  │ bench-prev/bench.txt │
                  │      p95-sec/op      │
ThresholdVerify-4            3.520m ± 2%

                  │ bench-prev/bench.txt │
                  │      p99-sec/op      │
ThresholdVerify-4            3.693m ± 2%

cpu: Intel(R) Xeon(R) 6975P-C
                     │  bench.txt  │
                     │   sec/op    │
Sign-4                 133.0µ ± 0%
Verify-4               1.338m ± 1%
AggregateBLS/N=10-4    1.287m ± 0%
AggregateBLS/N=50-4    1.351m ± 0%
AggregateBLS/N=100-4   1.433m ± 0%
ThresholdVerify-4      2.323m ± 0%
geomean                1.005m

                     │  bench.txt   │
                     │     B/op     │
Sign-4                 14.16Ki ± 0%
Verify-4               95.27Ki ± 0%
AggregateBLS/N=10-4    82.36Ki ± 0%
AggregateBLS/N=50-4    82.36Ki ± 0%
AggregateBLS/N=100-4   82.36Ki ± 0%
ThresholdVerify-4      359.4Ki ± 0%
geomean                80.44Ki

                     │  bench.txt  │
                     │  allocs/op  │
Sign-4                  710.0 ± 0%
Verify-4               1.452k ± 0%
AggregateBLS/N=10-4     764.0 ± 0%
AggregateBLS/N=50-4     764.0 ± 0%
AggregateBLS/N=100-4    764.0 ± 0%
ThresholdVerify-4      9.118k ± 0%
geomean                1.270k

                  │  bench.txt  │
                  │ p50-sec/op  │
ThresholdVerify-4   2.298m ± 0%

                  │  bench.txt  │
                  │ p95-sec/op  │
ThresholdVerify-4   2.525m ± 0%

                  │  bench.txt  │
                  │ p99-sec/op  │
ThresholdVerify-4   2.601m ± 1%

pkg: github.com/keep-network/keep-core/pkg/net/libp2p
cpu: AMD EPYC 7763 64-Core Processor                
                               │ bench-prev/bench.txt │
                               │        sec/op        │
ChannelDeliver_SingleHandler-4            17.23n ± 2%
ChannelDeliver_10Handlers-4               147.9n ± 1%
ProcessPubsubMessage-4                    297.8n ± 1%
geomean                                   91.22n

                               │ bench-prev/bench.txt │
                               │         B/op         │
ChannelDeliver_SingleHandler-4           0.000 ± 0%
ChannelDeliver_10Handlers-4              80.00 ± 0%
ProcessPubsubMessage-4                   192.0 ± 0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

                               │ bench-prev/bench.txt │
                               │      allocs/op       │
ChannelDeliver_SingleHandler-4           0.000 ± 0%
ChannelDeliver_10Handlers-4              1.000 ± 0%
ProcessPubsubMessage-4                   3.000 ± 0%
geomean                                             ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) 6975P-C
                               │  bench.txt  │
                               │   sec/op    │
ChannelDeliver_SingleHandler-4   16.87n ± 0%
ChannelDeliver_10Handlers-4      94.56n ± 0%
ProcessPubsubMessage-4           209.4n ± 0%
geomean                          69.39n

                               │  bench.txt   │
                               │     B/op     │
ChannelDeliver_SingleHandler-4   0.000 ± 0%
ChannelDeliver_10Handlers-4      80.00 ± 0%
ProcessPubsubMessage-4           192.0 ± 0%
geomean                                     ¹
¹ summaries must be >0 to compute geomean

                               │  bench.txt   │
                               │  allocs/op   │
ChannelDeliver_SingleHandler-4   0.000 ± 0%
ChannelDeliver_10Handlers-4      1.000 ± 0%
ProcessPubsubMessage-4           3.000 ± 0%
geomean                                     ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/keep-network/keep-core/pkg/net/retransmission
cpu: AMD EPYC 7763 64-Core Processor                
                       │ bench-prev/bench.txt │
                       │        sec/op        │
BackoffStrategyTick-4             5.303n ± 0%
StandardStrategyTick-4           0.6250n ± 0%
geomean                           1.821n

                       │ bench-prev/bench.txt │
                       │         B/op         │
BackoffStrategyTick-4            0.000 ± 0%
StandardStrategyTick-4           0.000 ± 0%
geomean                                     ¹
¹ summaries must be >0 to compute geomean

                       │ bench-prev/bench.txt │
                       │      allocs/op       │
BackoffStrategyTick-4            0.000 ± 0%
StandardStrategyTick-4           0.000 ± 0%
geomean                                     ¹
¹ summaries must be >0 to compute geomean

cpu: Intel(R) Xeon(R) 6975P-C
                       │  bench.txt   │
                       │    sec/op    │
BackoffStrategyTick-4     13.26n ± 0%
StandardStrategyTick-4   0.3469n ± 0%
geomean                   2.145n

                       │  bench.txt   │
                       │     B/op     │
BackoffStrategyTick-4    0.000 ± 0%
StandardStrategyTick-4   0.000 ± 0%
geomean                             ¹
¹ summaries must be >0 to compute geomean

                       │  bench.txt   │
                       │  allocs/op   │
BackoffStrategyTick-4    0.000 ± 0%
StandardStrategyTick-4   0.000 ± 0%
geomean                             ¹
¹ summaries must be >0 to compute geomean

pkg: github.com/keep-network/keep-core/pkg/tbtc
cpu: AMD EPYC 7763 64-Core Processor                
                                │ bench-prev/bench.txt │
                                │        sec/op        │
GetRecentWindows_100Windows-4              69.21µ ± 2%
GetRecentWindows_1000Windows-4             802.4µ ± 1%
GetSummary_100Windows-4                    60.99µ ± 1%
GetSummary_1000Windows-4                   723.7µ ± 1%
CleanupOldWindows_1000Windows-4            114.8µ ± 1%
geomean                                    194.9µ

                                │ bench-prev/bench.txt │
                                │         B/op         │
GetRecentWindows_100Windows-4             90.87Ki ± 0%
GetRecentWindows_1000Windows-4            906.7Ki ± 0%
GetSummary_100Windows-4                   89.94Ki ± 0%
GetSummary_1000Windows-4                  898.6Ki ± 0%
CleanupOldWindows_1000Windows-4           8.056Ki ± 0%
geomean                                   139.9Ki

                                │ bench-prev/bench.txt │
                                │      allocs/op       │
GetRecentWindows_100Windows-4               804.0 ± 0%
GetRecentWindows_1000Windows-4             8.004k ± 0%
GetSummary_100Windows-4                     801.0 ± 0%
GetSummary_1000Windows-4                   8.001k ± 0%
CleanupOldWindows_1000Windows-4             3.000 ± 0%
geomean                                     658.4

cpu: Intel(R) Xeon(R) 6975P-C
                                │  bench.txt  │
                                │   sec/op    │
GetRecentWindows_100Windows-4     53.46µ ± 1%
GetRecentWindows_1000Windows-4    580.7µ ± 0%
GetSummary_100Windows-4           47.11µ ± 1%
GetSummary_1000Windows-4          560.7µ ± 1%
CleanupOldWindows_1000Windows-4   91.21µ ± 1%
geomean                           149.5µ

                                │  bench.txt   │
                                │     B/op     │
GetRecentWindows_100Windows-4     90.87Ki ± 0%
GetRecentWindows_1000Windows-4    906.7Ki ± 0%
GetSummary_100Windows-4           89.94Ki ± 0%
GetSummary_1000Windows-4          898.6Ki ± 0%
CleanupOldWindows_1000Windows-4   8.056Ki ± 0%
geomean                           139.9Ki

                                │  bench.txt  │
                                │  allocs/op  │
GetRecentWindows_100Windows-4      804.0 ± 0%
GetRecentWindows_1000Windows-4    8.004k ± 0%
GetSummary_100Windows-4            801.0 ± 0%
GetSummary_1000Windows-4          8.001k ± 0%
CleanupOldWindows_1000Windows-4    3.000 ± 0%
geomean                            658.4

pkg: github.com/keep-network/keep-core/pkg/tecdsa/dkg
cpu: AMD EPYC 7763 64-Core Processor                
                                             │ bench-prev/bench.txt │
                                             │        sec/op        │
MarshalEphemeralPublicKeyMessage-4                      1.111µ ± 1%
UnmarshalEphemeralPublicKeyMessage-4                    51.98µ ± 0%
MarshalEphemeralPublicKeyMessage_100Keys-4              28.26µ ± 2%
UnmarshalEphemeralPublicKeyMessage_100Keys-4            2.544m ± 0%
RoundTripDKGMessage-4                                   2.427µ ± 1%
geomean                                                 25.16µ

                                             │ bench-prev/bench.txt │
                                             │         B/op         │
MarshalEphemeralPublicKeyMessage-4                       624.0 ± 0%
UnmarshalEphemeralPublicKeyMessage-4                   1.396Ki ± 0%
MarshalEphemeralPublicKeyMessage_100Keys-4             14.33Ki ± 0%
UnmarshalEphemeralPublicKeyMessage_100Keys-4           46.17Ki ± 0%
RoundTripDKGMessage-4                                  1.422Ki ± 0%
geomean                                                3.807Ki

                                             │ bench-prev/bench.txt │
                                             │      allocs/op       │
MarshalEphemeralPublicKeyMessage-4                       12.00 ± 0%
UnmarshalEphemeralPublicKeyMessage-4                     24.00 ± 0%
MarshalEphemeralPublicKeyMessage_100Keys-4               402.0 ± 0%
UnmarshalEphemeralPublicKeyMessage_100Keys-4             908.0 ± 0%
RoundTripDKGMessage-4                                    25.00 ± 0%
geomean                                                  76.55

cpu: Intel(R) Xeon(R) 6975P-C
                                             │  bench.txt  │
                                             │   sec/op    │
MarshalEphemeralPublicKeyMessage-4             773.9n ± 0%
UnmarshalEphemeralPublicKeyMessage-4           47.38µ ± 0%
MarshalEphemeralPublicKeyMessage_100Keys-4     18.71µ ± 0%
UnmarshalEphemeralPublicKeyMessage_100Keys-4   2.323m ± 0%
RoundTripDKGMessage-4                          1.622µ ± 0%
geomean                                        19.16µ

                                             │  bench.txt   │
                                             │     B/op     │
MarshalEphemeralPublicKeyMessage-4               624.0 ± 0%
UnmarshalEphemeralPublicKeyMessage-4           1.396Ki ± 0%
MarshalEphemeralPublicKeyMessage_100Keys-4     14.33Ki ± 0%
UnmarshalEphemeralPublicKeyMessage_100Keys-4   46.17Ki ± 0%
RoundTripDKGMessage-4                          1.422Ki ± 0%
geomean                                        3.807Ki

                                             │ bench.txt  │
                                             │ allocs/op  │
MarshalEphemeralPublicKeyMessage-4             12.00 ± 0%
UnmarshalEphemeralPublicKeyMessage-4           24.00 ± 0%
MarshalEphemeralPublicKeyMessage_100Keys-4     402.0 ± 0%
UnmarshalEphemeralPublicKeyMessage_100Keys-4   908.0 ± 0%
RoundTripDKGMessage-4                          25.00 ± 0%
geomean                                        76.55

pkg: github.com/keep-network/keep-core/pkg/tecdsa/signing
cpu: AMD EPYC 7763 64-Core Processor                
                                             │ bench-prev/bench.txt │
                                             │        sec/op        │
MarshalEphemeralPublicKeyMessage-4                      1.072µ ± 0%
UnmarshalEphemeralPublicKeyMessage-4                    51.97µ ± 0%
MarshalEphemeralPublicKeyMessage_100Keys-4              27.77µ ± 0%
UnmarshalEphemeralPublicKeyMessage_100Keys-4            2.541m ± 0%
MarshalSigningShareMessage-4                            1.097µ ± 0%
UnmarshalSigningShareMessage-4                          1.159µ ± 0%
RoundTripEphemeralKey-4                                 53.39µ ± 0%
geomean                                                 15.98µ

                                             │ bench-prev/bench.txt │
                                             │         B/op         │
MarshalEphemeralPublicKeyMessage-4                       624.0 ± 0%
UnmarshalEphemeralPublicKeyMessage-4                   1.396Ki ± 0%
MarshalEphemeralPublicKeyMessage_100Keys-4             14.33Ki ± 0%
UnmarshalEphemeralPublicKeyMessage_100Keys-4           46.17Ki ± 0%
MarshalSigningShareMessage-4                             592.0 ± 0%
UnmarshalSigningShareMessage-4                           864.0 ± 0%
RoundTripEphemeralKey-4                                2.005Ki ± 0%
geomean                                                2.463Ki

                                             │ bench-prev/bench.txt │
                                             │      allocs/op       │
MarshalEphemeralPublicKeyMessage-4                       12.00 ± 0%
UnmarshalEphemeralPublicKeyMessage-4                     24.00 ± 0%
MarshalEphemeralPublicKeyMessage_100Keys-4               402.0 ± 0%
UnmarshalEphemeralPublicKeyMessage_100Keys-4             908.0 ± 0%
MarshalSigningShareMessage-4                             12.00 ± 0%
UnmarshalSigningShareMessage-4                           13.00 ± 0%
RoundTripEphemeralKey-4                                  36.00 ± 0%
geomean                                                  48.04

cpu: Intel(R) Xeon(R) 6975P-C
                                             │  bench.txt  │
                                             │   sec/op    │
MarshalEphemeralPublicKeyMessage-4             763.5n ± 0%
UnmarshalEphemeralPublicKeyMessage-4           47.40µ ± 0%
MarshalEphemeralPublicKeyMessage_100Keys-4     18.62µ ± 0%
UnmarshalEphemeralPublicKeyMessage_100Keys-4   2.327m ± 0%
MarshalSigningShareMessage-4                   771.6n ± 0%
UnmarshalSigningShareMessage-4                 804.2n ± 0%
RoundTripEphemeralKey-4                        48.54µ ± 0%
geomean                                        12.48µ

                                             │  bench.txt   │
                                             │     B/op     │
MarshalEphemeralPublicKeyMessage-4               624.0 ± 0%
UnmarshalEphemeralPublicKeyMessage-4           1.396Ki ± 0%
MarshalEphemeralPublicKeyMessage_100Keys-4     14.33Ki ± 0%
UnmarshalEphemeralPublicKeyMessage_100Keys-4   46.17Ki ± 0%
MarshalSigningShareMessage-4                     592.0 ± 0%
UnmarshalSigningShareMessage-4                   864.0 ± 0%
RoundTripEphemeralKey-4                        2.005Ki ± 0%
geomean                                        2.463Ki

                                             │ bench.txt  │
                                             │ allocs/op  │
MarshalEphemeralPublicKeyMessage-4             12.00 ± 0%
UnmarshalEphemeralPublicKeyMessage-4           24.00 ± 0%
MarshalEphemeralPublicKeyMessage_100Keys-4     402.0 ± 0%
UnmarshalEphemeralPublicKeyMessage_100Keys-4   908.0 ± 0%
MarshalSigningShareMessage-4                   12.00 ± 0%
UnmarshalSigningShareMessage-4                 13.00 ± 0%
RoundTripEphemeralKey-4                        36.00 ± 0%
geomean                                        48.04

The Dockerfile's TODO said to drop the vendored reservation fallbacks once
the development package publishes the reservation contracts. Sepolia and
mainnet release builds now depend on the same fallbacks, so removing them
on that condition alone would break those builds again. The condition now
names the development, sepolia and mainnet tags, and the comment refers to
the methods the client binds against.
A zero getReservationRouter() answer clears a failed reservation-parameters
read only after the deployed code proves the reservations build. The
classifier table stubs a non-zero router in every case, so a change that
read the router for a deployment that could not be classified would have
passed every test. The new cases (no code, unreadable implementation code,
a beacon proxy) require the reservation state to stay unknown while the
router reads zero.
The sweep gate's doc, the leader's comment on the per-deposit check and
the follower's interface doc still described the behaviour from before the
adapter handled the two upgrade-window states: they said a
pre-reservations Bridge never receives the per-deposit call and that the
pre-reservations case is the gate's only exception. An open activation
window does not prove the Bridge has been upgraded, and an unset router
reaches the gate as "no trusted vault" rather than as an error. The
comments and the M1 guide now say which failed reads let a sweep through
and which refuse it.
@lrsaturnino
lrsaturnino marked this pull request as ready for review November 30, 2026 06:53
@lrsaturnino lrsaturnino mentioned this pull request Nov 30, 2026
7 tasks done

This branch has not been deployed

No deployments
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.

2 participants