Skip to content

Commit

Permalink
Fix for xchain failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanIliev545 committed Jan 15, 2024
1 parent 4424153 commit a0f632c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions go/enclave/components/batch_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -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")
}

Expand Down
2 changes: 1 addition & 1 deletion go/enclave/crosschain/message_bus_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a0f632c

Please sign in to comment.