From cc53a174d7ae630b64fd96614f105263e2ebd44d Mon Sep 17 00:00:00 2001 From: jeff <113397187+cyberhorsey@users.noreply.github.com> Date: Tue, 9 Apr 2024 16:27:08 -0700 Subject: [PATCH 1/5] feat(relayer): relayer small fixes + logs (#16692) --- packages/relayer/processor/process_message.go | 89 +++++++++++-------- packages/relayer/processor/processor.go | 27 +++--- .../processor/wait_for_confirmations.go | 3 +- .../relayer/processor/wait_header_synced.go | 5 +- 4 files changed, 64 insertions(+), 60 deletions(-) diff --git a/packages/relayer/processor/process_message.go b/packages/relayer/processor/process_message.go index c72feeb602..bdabbe6084 100644 --- a/packages/relayer/processor/process_message.go +++ b/packages/relayer/processor/process_message.go @@ -33,7 +33,6 @@ var ( // get it's on-chain current status. func (p *Processor) eventStatusFromMsgHash( ctx context.Context, - gasLimit *big.Int, signal [32]byte, ) (relayer.EventStatus, error) { var eventStatus relayer.EventStatus @@ -67,7 +66,7 @@ func (p *Processor) processMessage( return false, errors.Wrap(err, "json.Unmarshal") } - eventStatus, err := p.eventStatusFromMsgHash(ctx, msgBody.Event.Message.GasLimit, msgBody.Event.MsgHash) + eventStatus, err := p.eventStatusFromMsgHash(ctx, msgBody.Event.MsgHash) if err != nil { return false, errors.Wrap(err, "p.eventStatusFromMsgHash") } @@ -87,7 +86,7 @@ func (p *Processor) processMessage( ) if err := p.waitForConfirmations(ctx, msgBody.Event.Raw.TxHash, msgBody.Event.Raw.BlockNumber); err != nil { - return false, errors.Wrap(err, "p.waitForConfirmations") + return false, err } slog.Info("done waiting for confirmations", @@ -96,12 +95,16 @@ func (p *Processor) processMessage( // we need to check the invocation delays and proof receipt to see if // this is currently processable, or we need to wait. - invocationDelay, extraDelay, err := p.destBridge.GetInvocationDelays(nil) + invocationDelay, extraDelay, err := p.destBridge.GetInvocationDelays(&bind.CallOpts{ + Context: ctx, + }) if err != nil { return false, errors.Wrap(err, "p.destBridge.invocationDelays") } - proofReceipt, err := p.destBridge.ProofReceipt(nil, msgBody.Event.MsgHash) + proofReceipt, err := p.destBridge.ProofReceipt(&bind.CallOpts{ + Context: ctx, + }, msgBody.Event.MsgHash) if err != nil { return false, errors.Wrap(err, "p.destBridge.ProofReceipt") } @@ -118,7 +121,7 @@ func (p *Processor) processMessage( if proofReceipt.ReceivedAt == 0 { encodedSignalProof, err = p.generateEncodedSignalProof(ctx, msgBody.Event) if err != nil { - return false, errors.Wrap(err, "p.generateEncodedSignalProof") + return false, err } slog.Info("proof generated", @@ -130,7 +133,7 @@ func (p *Processor) processMessage( // preferred exeuctor, if it wasnt us // who proved it, there is an extra delay. if err := p.waitForInvocationDelay(ctx, invocationDelay, extraDelay, proofReceipt); err != nil { - return false, errors.Wrap(err, "p.waitForInvocationDelay") + return false, err } } @@ -159,17 +162,19 @@ func (p *Processor) processMessage( slog.Info("waiting for invocation delay", "msgHash", common.BytesToHash(msgBody.Event.MsgHash[:]).Hex()) - proofReceipt, err := p.destBridge.ProofReceipt(nil, msgBody.Event.MsgHash) + proofReceipt, err := p.destBridge.ProofReceipt(&bind.CallOpts{ + Context: ctx, + }, msgBody.Event.MsgHash) if err != nil { - return false, errors.Wrap(err, "p.destBridge.ProofReceipt") + return false, err } if err := p.waitForInvocationDelay(ctx, invocationDelay, extraDelay, proofReceipt); err != nil { - return false, errors.Wrap(err, "p.waitForInvocationDelay") + return false, err } if _, err := p.sendProcessMessageCall(ctx, msgBody.Event, nil); err != nil { - return false, errors.Wrap(err, "p.sendProcessMessageAndWaitForReceipt") + return false, err } } else if topic == bridgeAbi.Events["MessageExecuted"].ID { // if we got MessageExecuted, the message is finished processing. this occurs @@ -181,7 +186,9 @@ func (p *Processor) processMessage( } } - messageStatus, err := p.destBridge.MessageStatus(&bind.CallOpts{}, msgBody.Event.MsgHash) + messageStatus, err := p.destBridge.MessageStatus(&bind.CallOpts{ + Context: ctx, + }, msgBody.Event.MsgHash) if err != nil { return false, errors.Wrap(err, "p.destBridge.GetMessageStatus") } @@ -203,7 +210,7 @@ func (p *Processor) processMessage( if msg.Internal != nil { // update message status if err := p.eventRepo.UpdateStatus(ctx, msgBody.ID, relayer.EventStatus(messageStatus)); err != nil { - return false, errors.Wrap(err, fmt.Sprintf("p.eventRepo.UpdateStatus, id: %v", msgBody.ID)) + return false, err } } @@ -246,7 +253,7 @@ func (p *Processor) waitForInvocationDelay( for { select { case <-ctx.Done(): - return nil + return ctx.Err() case <-t.C: slog.Info("waiting for invocation delay", "processableAt", processableAt.String(), @@ -299,13 +306,13 @@ func (p *Processor) generateEncodedSignalProof(ctx context.Context, event, err := p.waitHeaderSynced(ctx, hopEthClient, hopChainID.Uint64(), blockNum) if err != nil { - return nil, errors.Wrap(err, "p.waitHeaderSynced") + return nil, err } blockNum = event.SyncedInBlockID } else { if _, err := p.waitHeaderSynced(ctx, p.srcEthClient, p.destChainId.Uint64(), event.Raw.BlockNumber); err != nil { - return nil, errors.Wrap(err, "p.waitHeaderSynced") + return nil, err } } @@ -318,7 +325,7 @@ func (p *Processor) generateEncodedSignalProof(ctx context.Context, ) if err != nil { - return nil, errors.Wrap(err, "p.srcSignalService.GetSignalSlot") + return nil, err } // if we have no hops, this is strictly a srcChain => destChain message. @@ -331,7 +338,7 @@ func (p *Processor) generateEncodedSignalProof(ctx context.Context, p.srcChainId.Uint64(), ) if err != nil { - return nil, errors.Wrap(err, "p.eventRepo.ChainDataSyncedEventByBlockNumberOrGreater") + return nil, err } hops = append(hops, proof.HopParams{ @@ -372,10 +379,12 @@ func (p *Processor) generateEncodedSignalProof(ctx context.Context, new(big.Int).SetUint64(blockNum), ) if err != nil { - return nil, errors.Wrap(err, "p.blockHeader") + return nil, err } - hopStorageSlotKey, err := hop.signalService.GetSignalSlot(&bind.CallOpts{}, + hopStorageSlotKey, err := hop.signalService.GetSignalSlot(&bind.CallOpts{ + Context: ctx, + }, hop.chainID.Uint64(), hop.taikoAddress, block.Root(), @@ -413,7 +422,7 @@ func (p *Processor) generateEncodedSignalProof(ctx context.Context, "hopsLength", len(hops), ) - return nil, errors.Wrap(err, "p.prover.GetEncodedSignalProof") + return nil, err } return encodedSignalProof, nil @@ -426,11 +435,9 @@ func (p *Processor) sendProcessMessageCall( event *bridge.BridgeMessageSent, proof []byte, ) (*types.Receipt, error) { - slog.Info("sending process message call") - eventType, canonicalToken, _, err := relayer.DecodeMessageData(event.Message.Data, event.Message.Value) if err != nil { - return nil, errors.Wrap(err, "relayer.DecodeMessageData") + return nil, err } var gas uint64 @@ -439,7 +446,7 @@ func (p *Processor) sendProcessMessageCall( needsContractDeployment, err := p.needsContractDeployment(ctx, event, eventType, canonicalToken) if err != nil { - return nil, errors.Wrap(err, "p.needsContractDeployment") + return nil, err } if needsContractDeployment { @@ -454,7 +461,7 @@ func (p *Processor) sendProcessMessageCall( gas, err = p.hardcodeGasLimit(ctx, event, eventType, canonicalToken) if err != nil { - return nil, errors.Wrap(err, "p.hardcodeGasLimit") + return nil, err } } } @@ -466,7 +473,7 @@ func (p *Processor) sendProcessMessageCall( cost, err = p.getCost(ctx, gas, gasTipCap, nil) if err != nil { - return nil, errors.Wrap(err, "p.getCost") + return nil, err } if bool(p.profitableOnly) { @@ -478,7 +485,7 @@ func (p *Processor) sendProcessMessageCall( received, err := p.destBridge.IsMessageReceived(nil, event.Message, proof) if err != nil { - return nil, errors.Wrap(err, "p.destBridge.isMessageReceived") + return nil, err } // message will fail when we try to process it @@ -495,7 +502,7 @@ func (p *Processor) sendProcessMessageCall( data, err := encoding.BridgeABI.Pack("processMessage", event.Message, proof) if err != nil { - return nil, errors.Wrap(err, "encoding.BridgeABI.Pack") + return nil, err } candidate := txmgr.TxCandidate{ @@ -516,7 +523,7 @@ func (p *Processor) sendProcessMessageCall( slog.Info("Mined tx", "txHash", hex.EncodeToString(receipt.TxHash.Bytes())) if err := p.saveMessageStatusChangedEvent(ctx, receipt, event); err != nil { - return nil, errors.Wrap(err, "p.saveMEssageStatusChangedEvent") + return nil, err } return receipt, nil @@ -600,32 +607,38 @@ func (p *Processor) hardcodeGasLimit( case relayer.EventTypeSendERC20: // determine whether the canonical token is bridged or not on this chain bridgedAddress, err = p.destERC20Vault.CanonicalToBridged( - nil, + &bind.CallOpts{ + Context: ctx, + }, new(big.Int).SetUint64(canonicalToken.ChainID()), canonicalToken.Address(), ) if err != nil { - return 0, errors.Wrap(err, "p.destERC20Vault.CanonicalToBridged") + return 0, err } case relayer.EventTypeSendERC721: // determine whether the canonical token is bridged or not on this chain bridgedAddress, err = p.destERC721Vault.CanonicalToBridged( - nil, + &bind.CallOpts{ + Context: ctx, + }, new(big.Int).SetUint64(canonicalToken.ChainID()), canonicalToken.Address(), ) if err != nil { - return 0, errors.Wrap(err, "p.destERC721Vault.CanonicalToBridged") + return 0, err } case relayer.EventTypeSendERC1155: // determine whether the canonical token is bridged or not on this chain bridgedAddress, err = p.destERC1155Vault.CanonicalToBridged( - nil, + &bind.CallOpts{ + Context: ctx, + }, new(big.Int).SetUint64(canonicalToken.ChainID()), canonicalToken.Address(), ) if err != nil { - return 0, errors.Wrap(err, "p.destERC1155Vault.CanonicalToBridged") + return 0, err } default: return 0, errors.New("unexpected event type") @@ -653,7 +666,7 @@ func (p *Processor) saveMessageStatusChangedEvent( ) error { bridgeAbi, err := abi.JSON(strings.NewReader(bridge.BridgeABI)) if err != nil { - return errors.Wrap(err, "abi.JSON") + return err } m := make(map[string]interface{}) @@ -663,7 +676,7 @@ func (p *Processor) saveMessageStatusChangedEvent( if topic == bridgeAbi.Events["MessageStatusChanged"].ID { err = bridgeAbi.UnpackIntoMap(m, "MessageStatusChanged", log.Data) if err != nil { - return errors.Wrap(err, "abi.UnpackIntoInterface") + return err } break diff --git a/packages/relayer/processor/processor.go b/packages/relayer/processor/processor.go index 3eaf283a84..4070952629 100644 --- a/packages/relayer/processor/processor.go +++ b/packages/relayer/processor/processor.go @@ -4,7 +4,6 @@ import ( "context" "crypto/ecdsa" "database/sql" - "encoding/json" "errors" "fmt" "log/slog" @@ -430,26 +429,12 @@ func (p *Processor) eventLoop(ctx context.Context) { slog.Error("Err acking message", "err", err.Error()) } case errors.Is(err, relayer.ErrUnprofitable): - // we want to add it to the unprofitable queue, to be iterated - // and picked up by a processor that will periodically check - // if the messages are now estimated to be profitable, rather than - // just discard those messages. - marshalled, err := json.Marshal(m) - if err != nil { - slog.Error("error marshaling queue message", "error", err) - // if we cant marshal it, we cant publish it. we should negatively acknowledge - // the emssage so it goes to the dead letter queue. - if err := p.queue.Nack(ctx, m, shouldRequeue); err != nil { - slog.Error("Err nacking message", "err", err.Error()) - } - - return - } + slog.Info("publishing to unprofitable queue") if err := p.queue.Publish( ctx, fmt.Sprintf("%v-unprofitable", p.queueName()), - marshalled, + m.Body, p.cfg.UnprofitableMessageQueueExpiration, ); err != nil { slog.Error("error publishing to unprofitable queue", "error", err) @@ -460,6 +445,14 @@ func (p *Processor) eventLoop(ctx context.Context) { if err := p.queue.Ack(ctx, m); err != nil { slog.Error("Err acking message", "err", err.Error()) } + case errors.Is(err, context.Canceled): + slog.Error("process message failed due to context cancel", "err", err.Error()) + + // we want to negatively acknowledge the message and make sure + // we requeue it + if err := p.queue.Nack(ctx, m, true); err != nil { + slog.Error("Err nacking message", "err", err.Error()) + } default: slog.Error("process message failed", "err", err.Error()) diff --git a/packages/relayer/processor/wait_for_confirmations.go b/packages/relayer/processor/wait_for_confirmations.go index 1c86e8ea17..df2ecf981f 100644 --- a/packages/relayer/processor/wait_for_confirmations.go +++ b/packages/relayer/processor/wait_for_confirmations.go @@ -5,7 +5,6 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/pkg/errors" "github.com/taikoxyz/taiko-mono/packages/relayer" ) @@ -22,7 +21,7 @@ func (p *Processor) waitForConfirmations(ctx context.Context, txHash common.Hash p.confirmations, txHash, ); err != nil { - return errors.Wrap(err, "relayer.WaitConfirmations") + return err } return nil diff --git a/packages/relayer/processor/wait_header_synced.go b/packages/relayer/processor/wait_header_synced.go index 038246b431..c18c13e98e 100644 --- a/packages/relayer/processor/wait_header_synced.go +++ b/packages/relayer/processor/wait_header_synced.go @@ -4,7 +4,6 @@ import ( "context" "time" - "github.com/pkg/errors" "github.com/taikoxyz/taiko-mono/packages/relayer" ) @@ -30,7 +29,7 @@ func (p *Processor) waitHeaderSynced( blockNum, ) if err != nil { - return nil, errors.Wrap(err, "p.eventRepo.ChainDataSyncedEventByBlockNumberOrGreater") + return nil, err } if event != nil { @@ -52,7 +51,7 @@ func (p *Processor) waitHeaderSynced( blockNum, ) if err != nil { - return nil, errors.Wrap(err, "p.eventRepo.ChainDataSyncedEventByBlockNumberOrGreater") + return nil, err } if event != nil { From 35adb3d7f5a79200573c1f6822586ea221a29dfa Mon Sep 17 00:00:00 2001 From: xiaodino Date: Tue, 9 Apr 2024 17:35:57 -0700 Subject: [PATCH 2/5] fix(blobstorage, eventindexer, relayer): remove username and password (#16700) --- packages/blobstorage/.default.indexer.env | 4 ++-- packages/blobstorage/.default.server.env | 4 ++-- packages/blobstorage/README.md | 4 ++-- packages/eventindexer/.l1.env | 4 ++-- packages/eventindexer/.l2.env | 4 ++-- packages/relayer/.default.env | 4 ++-- packages/relayer/.l1indexer.example.env | 8 ++++---- packages/relayer/.l1processor.example.env | 8 ++++---- packages/relayer/README.md | 4 ++-- packages/relayer/docker-compose/docker-compose.yml | 2 +- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/blobstorage/.default.indexer.env b/packages/blobstorage/.default.indexer.env index a6cf895557..c73b38dfd1 100644 --- a/packages/blobstorage/.default.indexer.env +++ b/packages/blobstorage/.default.indexer.env @@ -3,7 +3,7 @@ BEACON_URL=https://l1beacon.hekla.taiko.xyz TAIKO_L1_CONTRACT_ADDRESS=0xC069c3d2a9f2479F559AD34485698ad5199C555f DATABASE_HOST=localhost DATABASE_PORT=3306 -DATABASE_USER=root -DATABASE_PASSWORD=passw00d +DATABASE_USER= +DATABASE_PASSWORD= DATABASE_NAME=blobs METRICS_HTTP_PORT=7472 diff --git a/packages/blobstorage/.default.server.env b/packages/blobstorage/.default.server.env index d7c46611e1..c50948e393 100644 --- a/packages/blobstorage/.default.server.env +++ b/packages/blobstorage/.default.server.env @@ -1,7 +1,7 @@ HTTP_PORT=3282 DATABASE_HOST=localhost DATABASE_PORT=3306 -DATABASE_USER=root -DATABASE_PASSWORD=passw00d +DATABASE_USER= +DATABASE_PASSWORD= DATABASE_NAME=blobs METRICS_HTTP_PORT=7471 diff --git a/packages/blobstorage/README.md b/packages/blobstorage/README.md index e7fe0e15ce..dd1bb84a97 100644 --- a/packages/blobstorage/README.md +++ b/packages/blobstorage/README.md @@ -28,8 +28,8 @@ Repository for BLOB storage (archive and serve data) ```bash cd ./migrations - goose mysql "root:passw00d@tcp(localhost:3306)/blobs" status - goose mysql "root:passw00d@tcp(localhost:3306)/blobs" up + goose mysql ":@tcp(localhost:3306)/blobs" status + goose mysql ":@tcp(localhost:3306)/blobs" up ``` These commands apply migrations to the `blobs` database. diff --git a/packages/eventindexer/.l1.env b/packages/eventindexer/.l1.env index 79bb020e2d..1385dbba47 100644 --- a/packages/eventindexer/.l1.env +++ b/packages/eventindexer/.l1.env @@ -1,7 +1,7 @@ HTTP_PORT=4100 PROMETHEUS_HTTP_PORT=6063 -DATABASE_USER=root -DATABASE_PASSWORD=root +DATABASE_USER= +DATABASE_PASSWORD= DATABASE_NAME=eventindexer DATABASE_HOST=localhost:3306 DATABASE_MAX_IDLE_CONNS=50 diff --git a/packages/eventindexer/.l2.env b/packages/eventindexer/.l2.env index 77bb8409ff..983f2ac306 100644 --- a/packages/eventindexer/.l2.env +++ b/packages/eventindexer/.l2.env @@ -1,7 +1,7 @@ HTTP_PORT=4009 METRICS_HTTP_PORT=6067 -DATABASE_USER=root -DATABASE_PASSWORD=root +DATABASE_USER= +DATABASE_PASSWORD= DATABASE_NAME=eventindexer DATABASE_HOST=localhost:3306 DATABASE_MAX_IDLE_CONNS=50 diff --git a/packages/relayer/.default.env b/packages/relayer/.default.env index 88973ca621..28f7c92ee7 100644 --- a/packages/relayer/.default.env +++ b/packages/relayer/.default.env @@ -1,7 +1,7 @@ HTTP_PORT=4101 PROMETHEUS_HTTP_PORT=6061 -MYSQL_USER=root -MYSQL_PASSWORD=root +MYSQL_USER= +MYSQL_PASSWORD= MYSQL_DATABASE=relayer MYSQL_HOST=localhost:3306 MYSQL_MAX_IDLE_CONNS=50 diff --git a/packages/relayer/.l1indexer.example.env b/packages/relayer/.l1indexer.example.env index 1abb2aedd3..8a11abd4a6 100644 --- a/packages/relayer/.l1indexer.example.env +++ b/packages/relayer/.l1indexer.example.env @@ -1,14 +1,14 @@ HTTP_PORT=4103 METRICS_HTTP_PORT=6062 -DATABASE_USER=root -DATABASE_PASSWORD=root +DATABASE_USER= +DATABASE_PASSWORD= DATABASE_NAME=relayer DATABASE_HOST=localhost:3306 DATABASE_MAX_IDLE_CONNS=50 DATABASE_MAX_OPEN_CONNS=3000 DATABASE_CONN_MAX_LIFETIME=100000 -QUEUE_USER=guest -QUEUE_PASSWORD=guest +QUEUE_USER= +QUEUE_PASSWORD= QUEUE_HOST=localhost QUEUE_PORT=5672 EVENT_NAME=MessageSent diff --git a/packages/relayer/.l1processor.example.env b/packages/relayer/.l1processor.example.env index 6b8c1c05cb..df6f69374d 100644 --- a/packages/relayer/.l1processor.example.env +++ b/packages/relayer/.l1processor.example.env @@ -1,13 +1,13 @@ PROMETHEUS_HTTP_PORT=6062 -DATABASE_USER=root -DATABASE_PASSWORD=passw00d +DATABASE_USER= +DATABASE_PASSWORD= DATABASE_NAME=relayer DATABASE_HOST=localhost:3306 DATABASE_MAX_IDLE_CONNS=50 DATABASE_MAX_OPEN_CONNS=3000 DATABASE_CONN_MAX_LIFETIME=100000 -QUEUE_USER=guest -QUEUE_PASSWORD=guest +QUEUE_USER= +QUEUE_PASSWORD= QUEUE_HOST=localhost QUEUE_PORT=5672 PROCESSOR_PRIVATE_KEY= diff --git a/packages/relayer/README.md b/packages/relayer/README.md index 87e07dab3c..cbc9780041 100644 --- a/packages/relayer/README.md +++ b/packages/relayer/README.md @@ -36,8 +36,8 @@ To migrate the database schema in MySQL: ```sh cd ./migrations -goose mysql "root:passw00d@tcp(localhost:3306)/relayer" status -goose mysql "root:passw00d@tcp(localhost:3306)/relayer" up +goose mysql ":@tcp(localhost:3306)/relayer" status +goose mysql ":@tcp(localhost:3306)/relayer" up ``` ### Configure Environment Variables diff --git a/packages/relayer/docker-compose/docker-compose.yml b/packages/relayer/docker-compose/docker-compose.yml index c2343fb855..66192fde61 100644 --- a/packages/relayer/docker-compose/docker-compose.yml +++ b/packages/relayer/docker-compose/docker-compose.yml @@ -7,7 +7,7 @@ services: restart: always environment: - MYSQL_DATABASE=relayer - - MYSQL_ROOT_PASSWORD=passw00d + - MYSQL_ROOT_PASSWORD= ports: - "3306:3306" volumes: From 03d610d8a94e4f1ef52b4c3e5656ed9081b8585f Mon Sep 17 00:00:00 2001 From: jeff <113397187+cyberhorsey@users.noreply.github.com> Date: Tue, 9 Apr 2024 17:36:21 -0700 Subject: [PATCH 3/5] feat(eventindexer): flag typo + delete unused task (#16703) --- packages/eventindexer/cmd/flags/disperser.go | 2 +- packages/eventindexer/pkg/tasks/tasks.go | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/eventindexer/cmd/flags/disperser.go b/packages/eventindexer/cmd/flags/disperser.go index fbf653c627..e71ab5f9c6 100644 --- a/packages/eventindexer/cmd/flags/disperser.go +++ b/packages/eventindexer/cmd/flags/disperser.go @@ -18,7 +18,7 @@ var ( EnvVars: []string{"TAIKO_TOKEN_ADDRESS"}, } DispersalAmount = &cli.StringFlag{ - Name: "taikoTokenAddress", + Name: "dispersalAmount", Usage: "Dispersal amount in wei", Required: true, Category: disperserCategory, diff --git a/packages/eventindexer/pkg/tasks/tasks.go b/packages/eventindexer/pkg/tasks/tasks.go index fc0048f04d..ecbece9798 100644 --- a/packages/eventindexer/pkg/tasks/tasks.go +++ b/packages/eventindexer/pkg/tasks/tasks.go @@ -3,8 +3,6 @@ package tasks var ( TotalTransactions = "total-transactions" TransactionsPerDay = "transactions-per-day" - TotalBlocks = "total-blocks" - BlocksPerDay = "blocks-per-day" TotalAccounts = "total-accounts" AccountsPerDay = "accounts-per-day" UniqueProposersPerDay = "unique-proposers-per-day" @@ -32,8 +30,6 @@ var ( var Tasks = []string{ TotalTransactions, TransactionsPerDay, - TotalBlocks, - BlocksPerDay, TotalAccounts, AccountsPerDay, UniqueProposersPerDay, From 9257049f14d58c394f081e25a94fcd0313157821 Mon Sep 17 00:00:00 2001 From: teko <160625009+taiko-kitty@users.noreply.github.com> Date: Wed, 10 Apr 2024 00:47:35 -0400 Subject: [PATCH 4/5] chore(main): release protocol 1.3.0 (#16697) --- .release-please-manifest.json | 2 +- packages/protocol/CHANGELOG.md | 20 ++++++++++++++++++++ packages/protocol/package.json | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 104278e4b0..45d0f2deaf 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -6,6 +6,6 @@ "packages/fork-diff": "0.4.0", "packages/guardian-prover-health-check": "0.1.0", "packages/guardian-prover-health-check-ui": "0.1.0", - "packages/protocol": "1.2.0", + "packages/protocol": "1.3.0", "packages/relayer": "0.12.0" } diff --git a/packages/protocol/CHANGELOG.md b/packages/protocol/CHANGELOG.md index a730a18896..ab02a72ec8 100644 --- a/packages/protocol/CHANGELOG.md +++ b/packages/protocol/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [1.3.0](https://github.com/taikoxyz/taiko-mono/compare/protocol-v1.2.0...protocol-v1.3.0) (2024-04-10) + + +### Features + +* **protocol:** add `TaikoL1.getTransition(blockId, transitionID)` function ([2c63cb0](https://github.com/taikoxyz/taiko-mono/commit/2c63cb0c796495948f1dd887662044397394d852)) +* **protocol:** allow assigned prover to prove blocks outside proving window (liveness bond not returned) ([2c63cb0](https://github.com/taikoxyz/taiko-mono/commit/2c63cb0c796495948f1dd887662044397394d852)) +* **protocol:** allow bridge to fail a message by the owner without retrying it ([#16669](https://github.com/taikoxyz/taiko-mono/issues/16669)) ([dce651e](https://github.com/taikoxyz/taiko-mono/commit/dce651e2647013b0d13d7947e0fd0115f38fe639)) +* **protocol:** remove `contestations` from `TransitionState` and events (it's buggy) ([2c63cb0](https://github.com/taikoxyz/taiko-mono/commit/2c63cb0c796495948f1dd887662044397394d852)) +* **protocol:** use 35000 as gas limit for sending Ether in Brdge ([#16666](https://github.com/taikoxyz/taiko-mono/issues/16666)) ([4909782](https://github.com/taikoxyz/taiko-mono/commit/4909782194ae025ff78438126c1e595f404e16a9)) + + +### Bug Fixes + +* **protocol:** add GovernorSettingsUpgradeable ([#16687](https://github.com/taikoxyz/taiko-mono/issues/16687)) ([eba82ba](https://github.com/taikoxyz/taiko-mono/commit/eba82bad1075afc695f3203304160f26e42627a9)) +* **protocol:** check invocation gas limit also in `retryMessage` ([#16660](https://github.com/taikoxyz/taiko-mono/issues/16660)) ([8209a43](https://github.com/taikoxyz/taiko-mono/commit/8209a437436f9a84d1e75bbafe6780952401d6a2)) +* **protocol:** check no loops in multi-hop in Bridge ([#16659](https://github.com/taikoxyz/taiko-mono/issues/16659)) ([447cd52](https://github.com/taikoxyz/taiko-mono/commit/447cd5252d141dfd38a2764d570b9168762c0d4b)) +* **protocol:** fix potential 1271 signature replay if proposers are smart contracts ([#16665](https://github.com/taikoxyz/taiko-mono/issues/16665)) ([2b27477](https://github.com/taikoxyz/taiko-mono/commit/2b27477ec0f9e5f0e0326d302531f93ff2c65de3)) +* **protocol:** return liveness bond only to assigned prover ([2c63cb0](https://github.com/taikoxyz/taiko-mono/commit/2c63cb0c796495948f1dd887662044397394d852)) + ## [1.2.0](https://github.com/taikoxyz/taiko-mono/compare/protocol-v1.1.0...protocol-v1.2.0) (2024-04-05) diff --git a/packages/protocol/package.json b/packages/protocol/package.json index dc0f5033f0..943deaff1e 100644 --- a/packages/protocol/package.json +++ b/packages/protocol/package.json @@ -1,6 +1,6 @@ { "name": "@taiko/protocol", - "version": "1.2.0", + "version": "1.3.0", "private": true, "scripts": { "buildMerkle": "ts-node ./utils/airdrop/buildMerkleTree.ts ./utils/airdrop/airdrop_db/example_claimList.json", From e25ad9f8beb13c75fe68160fcc4b4a3edbda57c2 Mon Sep 17 00:00:00 2001 From: D <51912515+adaki2004@users.noreply.github.com> Date: Wed, 10 Apr 2024 12:20:16 +0200 Subject: [PATCH 5/5] chore(protocol): fix commenting copy paste (#16706) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Keszey Dániel --- packages/protocol/contracts/bridge/Bridge.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/protocol/contracts/bridge/Bridge.sol b/packages/protocol/contracts/bridge/Bridge.sol index 3cf85d6cbf..faed0a00d7 100644 --- a/packages/protocol/contracts/bridge/Bridge.sol +++ b/packages/protocol/contracts/bridge/Bridge.sol @@ -473,11 +473,11 @@ contract Bridge is EssentialContract, IBridge { ); } - /// @notice Checks if a msgHash has failed on its destination chain. + /// @notice Checks if a msgHash has been received on its source chain. /// This is the 'readonly' version of proveMessageReceived. /// @param _message The message. /// @param _proof The merkle inclusion proof. - /// @return true if the message has failed, false otherwise. + /// @return true if the message has been received, false otherwise. function isMessageReceived( Message calldata _message, bytes calldata _proof