From a0f632c254272b31ef03f81d61ed880acc33c777 Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Mon, 15 Jan 2024 13:21:49 +0200 Subject: [PATCH] Fix for xchain failures. --- go/enclave/components/batch_executor.go | 6 +++--- go/enclave/crosschain/message_bus_manager.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go/enclave/components/batch_executor.go b/go/enclave/components/batch_executor.go index 1dc4313280..14f18ce464 100644 --- a/go/enclave/components/batch_executor.go +++ b/go/enclave/components/batch_executor.go @@ -191,7 +191,7 @@ func (executor *batchExecutor) ComputeBatch(context *BatchExecutionContext, fail return nil, err } - if err = executor.verifyInboundCrossChainTransactions(crossChainTransactions, ccSuccessfulTxs, ccReceipts); err != nil { + if err = executor.verifyInboundCrossChainTransactions(xchainTxs, ccSuccessfulTxs, ccReceipts); err != nil { return nil, fmt.Errorf("batch computation failed due to cross chain messages. Cause: %w", err) } @@ -378,8 +378,8 @@ func (executor *batchExecutor) populateHeader(batch *core.Batch, receipts types. } } -func (executor *batchExecutor) verifyInboundCrossChainTransactions(transactions types.Transactions, executedTxs types.Transactions, receipts types.Receipts) error { - if transactions.Len() != executedTxs.Len() { +func (executor *batchExecutor) verifyInboundCrossChainTransactions(transactions common.L2PricedTransactions, executedTxs types.Transactions, receipts types.Receipts) error { + if len(transactions) != executedTxs.Len() { return fmt.Errorf("some synthetic transactions have not been executed") } diff --git a/go/enclave/crosschain/message_bus_manager.go b/go/enclave/crosschain/message_bus_manager.go index 1731a10515..1a70bd7465 100644 --- a/go/enclave/crosschain/message_bus_manager.go +++ b/go/enclave/crosschain/message_bus_manager.go @@ -86,7 +86,7 @@ func (m *MessageBusManager) GenerateMessageBusDeployTx() (*common.L2Tx, error) { tx := &types.LegacyTx{ Nonce: 0, // The first transaction of the owner identity should always be deploying the contract Value: gethcommon.Big0, - Gas: 5_000_000, // It's quite the expensive contract. + Gas: 500_000_000, // It's quite the expensive contract. GasPrice: gethcommon.Big0, // Synthetic transactions are on the house. Or the house. Data: gethcommon.FromHex(MessageBus.MessageBusMetaData.Bin), To: nil, // Geth requires nil instead of gethcommon.Address{} which equates to zero address in order to return receipt.