Skip to content

Commit

Permalink
Remove signature
Browse files Browse the repository at this point in the history
  • Loading branch information
ImJeremyHe committed Nov 15, 2024
1 parent 9647d36 commit 1116e55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
14 changes: 3 additions & 11 deletions arbnode/transaction_streamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1330,16 +1330,8 @@ func (s *TransactionStreamer) pollSubmittedTransactionForFinality(ctx context.Co
msgs = append(msgs, *msg.Message)
}

// Sovereign sequencer submits hotshot transactions one by one. It ensures that
// every hotshot block only contains 1 hotshot transaction.
tx := resp.Transactions[0]
// The first 65 bytes is the signature. Get the signature from the hotshot transaction.
//
// From an efficiency perspective, we don’t need to reconstruct the signature.
// In terms of purpose, we don’t care whether the signature is consistent;
// we only care about whether our messages have been confirmed.
sig := tx[0:65]
payload, err := arbos.BuildHotShotPayload(&msgs, (*[]byte)(&sig))
// Rebuild the hotshot payload with messages to check if it is finalizied
payload, err := arbos.BuildHotShotPayload(&msgs)
if err != nil {
return s.config().EspressoTxnsPollingInterval
}
Expand Down Expand Up @@ -1637,7 +1629,7 @@ func (s *TransactionStreamer) submitEspressoTransactions(ctx context.Context, ig
}
msgs = append(msgs, *msg.Message)
}
payload, err := arbos.BuildHotShotPayload(&msgs, nil)
payload, err := arbos.BuildHotShotPayload(&msgs)
if err != nil {
log.Error("failed to build hotshot transaction payload", "err", err)
return s.config().EspressoTxnsPollingInterval
Expand Down
5 changes: 1 addition & 4 deletions arbos/parse_l2.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,8 @@ func IsEspressoSovereignMsg(msg *arbostypes.L1IncomingMessage) bool {
msg.L2msg[0] == L2MessageKind_EspressoSovereignTx
}

func BuildHotShotPayload(msgs *[]arbostypes.L1IncomingMessage, sig *([]byte)) (espressoTypes.Bytes, error) {
func BuildHotShotPayload(msgs *[]arbostypes.L1IncomingMessage) (espressoTypes.Bytes, error) {
payload := []byte{}
if sig != nil {
payload = append(payload, *sig...)
}

sizeBuf := make([]byte, 8)
for _, msg := range *msgs {
Expand Down

0 comments on commit 1116e55

Please sign in to comment.