Skip to content

Commit

Permalink
fix: disable automatic resigning for the signer pkg (#3257)
Browse files Browse the repository at this point in the history
Ref: #3256
  • Loading branch information
cmwaters authored Apr 5, 2024
1 parent a92de72 commit 854ad5a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 2 additions & 3 deletions pkg/user/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ func TestConcurrentTxSubmission(t *testing.T) {
}

func TestSignerTwins(t *testing.T) {
if testing.Short() {
t.Skip("skipping in short mode")
}
// Ref: https://github.com/celestiaorg/celestia-app/issues/3256
t.Skip()

// Setup network
tmConfig := testnode.DefaultTendermintConfig()
Expand Down
10 changes: 7 additions & 3 deletions pkg/user/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,13 @@ func (s *Signer) broadcastTx(ctx context.Context, txBytes []byte, sequence uint6
}
s.networkSequence = nextSequence
s.localSequence = nextSequence
return s.retryBroadcastingTx(ctx, txBytes, nextSequence)
}
if resp.TxResponse.Code == abci.CodeTypeOK {
// FIXME: We can't actually resign the transaction. A malicious node
// may manipulate us into signing the same transaction several times
// and then executing them. We need some proof of what the last network
// sequence is rather than relying on an error provided by the node
// return s.retryBroadcastingTx(ctx, txBytes, nextSequence)
// Ref: https://github.com/celestiaorg/celestia-app/issues/3256
} else if resp.TxResponse.Code == abci.CodeTypeOK {
s.outboundSequences[sequence] = struct{}{}
s.reverseTxHashSequenceMap[resp.TxResponse.TxHash] = sequence
return resp.TxResponse, nil
Expand Down

0 comments on commit 854ad5a

Please sign in to comment.