You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ethfinalizer currently requires a concrete wallet, which prevents using a signer whose private key lives outside the process. Add a context-aware Signer interface for initial transactions and fee replacements, plus NewWalletSigner for local wallets.
Existing callers can continue setting FinalizerOptions.Wallet; callers using an external signer set Signer instead. Construction requires exactly one. Persisted signed transactions are rebroadcast without signing again.
Validation: go test -race ./ethfinalizer passed with Go 1.25.9. Added coverage for option compatibility, cancellation, signing failure before persistence, replacement signing, and rebroadcasting stored signatures.
Impact: A recoverable invalid configuration (Signer: NewWalletSigner(nil), no Wallet) becomes a runtime panic while submitting a transaction.
Suggested fix: Reject a nil wallet in NewWalletSigner (for example, return (Signer, error)), or return a nil Signer so existing finalizer validation rejects the configuration.
⚪ Low: Reject typed-nil Signer values during option validation
File:ethfinalizer/ethfinalizer.go:68↗ Confidence: high
FinalizerOptions.IsValid accepts a typed-nil Signer, allowing construction with no usable signer and deferring failure to Send.
if (o.Wallet==nil) == (o.Signer==nil) {
returnfmt.Errorf("exactly one of wallet or signer is required")
}
In Go, an interface holding a nil pointer is non-nil. NewFinalizer retains that interface, and Send invokes f.signer.Address() and f.signer.SignTransaction(...); pointer-backed implementations that dereference their receiver panic.
Suggested fix: Treat nil underlying values of nil-capable Signer implementations as absent during validation and signer selection, or use an option representation that cannot carry typed-nil signers.
Stats
🤖 Model: openai-codex gpt-5.6-terra high
🧞 Codegenie: v0.5.6 (a662388fde)
Elapsed time: 2m 48s
Git:0xsequence/ethkit from master to codex/kms-finalizer-signer (8afd52cb73)
Review completeness: complete.
Usage: model calls 49, tokens 692609, cost $0.9751.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ethfinalizercurrently requires a concrete wallet, which prevents using a signer whose private key lives outside the process. Add a context-awareSignerinterface for initial transactions and fee replacements, plusNewWalletSignerfor local wallets.Existing callers can continue setting
FinalizerOptions.Wallet; callers using an external signer setSignerinstead. Construction requires exactly one. Persisted signed transactions are rebroadcast without signing again.Validation:
go test -race ./ethfinalizerpassed with Go 1.25.9. Added coverage for option compatibility, cancellation, signing failure before persistence, replacement signing, and rebroadcasting stored signatures.