From 1116e55984b3ce45ed903fa882d8142aa48ce483 Mon Sep 17 00:00:00 2001 From: ImJeremyHe Date: Fri, 15 Nov 2024 10:34:20 +0800 Subject: [PATCH] Remove signature --- arbnode/transaction_streamer.go | 14 +++----------- arbos/parse_l2.go | 5 +---- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/arbnode/transaction_streamer.go b/arbnode/transaction_streamer.go index 6ef91fa8c0..11e1c1d74f 100644 --- a/arbnode/transaction_streamer.go +++ b/arbnode/transaction_streamer.go @@ -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 } @@ -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 diff --git a/arbos/parse_l2.go b/arbos/parse_l2.go index bbac615641..4a3266db3c 100644 --- a/arbos/parse_l2.go +++ b/arbos/parse_l2.go @@ -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 {