reporter: sign via SignTx allowlist instead of blind SignRaw - #36
Conversation
diorwave
commented
Jun 12, 2026
- Reporter daemon now signs through the signer's SignTx (msg-type allowlist), not blind SignRaw.
- One-shot operator cmds (create-validator/-reporter/unjail) unchanged.
- Regenerated vendor-api (SignTx + SignBridgeCheckpoint + SignOracleAttestation).
- Added cmd/edit-validator for commission edits via the remote signer.
| // Close remote signer connection if used | ||
| if c.remoteSignerConn != nil { | ||
| if err := c.remoteSignerConn.Close(); err != nil { | ||
| c.logger.Error("Failed to close remote signer connection", "error", err) | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
use defer next to where it is initialized
There was a problem hiding this comment.
this conn lives the whole daemon lifetime, keyring signs every tx via it until Stop()
defer-at-init would close it before signing, so it's deferred only on the error paths in newKeyringFromRemoteSigner.
…it, generic Dockerfile
|
@krasi-georgiev looks good after merge conflicts and fixed. |
…wlist + setupKeyring, add event-driven rpcClient
0xSpuddy
left a comment
There was a problem hiding this comment.
Looks good and working to me, but could use strict checks for working rpc endpoint and chain-id.
@0xSpuddy what kind of strict checks? We can add them in this PR |
| } | ||
|
|
||
| var firstAccepted *sdk.TxResponse | ||
| var lastErr error |
There was a problem hiding this comment.
Something like this would return as soon as any endpoint accepts the tx, instead of waiting for every broadcast goroutine to finish. Otherwise one slow or hung RPC can block the caller even after the tx has already been accepted elsewhere.
- var firstAccepted *sdk.TxResponse
var lastErr error
for i := 0; i < len(clients); i++ {
r := <-results
case r.resp != nil && (r.resp.Code == 0 || isAlreadyBroadcastCode(r.resp)):
c.logger.Debug("Tx accepted by RPC endpoint", "endpoint", r.endpoint, "code", r.resp.Code, "txhash", r.resp.TxHash)
- if firstAccepted == nil {
- firstAccepted = r.resp
- }
+ return r.resp, nil
- if firstAccepted != nil {
- return firstAccepted, nil
- }
if lastErr != nil {…oint cannot block the caller
…d signer address pubkey check
0xSpuddy
left a comment
There was a problem hiding this comment.
If it looks good to you it's lgtm.
| // keep the chain ID already detected from the node endpoints. | ||
| if signerChainID != "" { | ||
| if signerChainID != chainId { | ||
| c.logger.Info("Using chain ID from remote signer", "signer_chain_id", signerChainID, "detected_chain_id", chainId) |
There was a problem hiding this comment.
Suggest erroring out the daemon if chain-id doesn't match with something like:
return fmt.Errorf("remote signer chain ID %q does not match detected RPC chain ID %q", signerChainID, chainId)