Skip to content

Commit

Permalink
Some logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanIliev545 committed Feb 22, 2024
1 parent 357726e commit d7cc25f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {

// TODO: Remove hardcoded L2 message bus address when properly exposed.
const messageBusAddress = hre.ethers.getAddress("0x526c84529b2b8c11f57d93d3f5537aca3aecef9b");
console.log(`Deploying l2 cross chain messenger.`)
// Deploy the L2 Cross chain messenger and use the L2 bus for validation
const crossChainDeployment = await deployments.deploy('CrossChainMessenger', {
from: deployer,
Expand All @@ -39,6 +40,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
}
}
});
console.log(`Setting L2 Cross chain messenger`)
// get L1 management contract and write the cross chain messenger address to it
const mgmtContract = (await hre.ethers.getContractFactory('ManagementContract')).attach(mgmtContractAddress);
const tx = await mgmtContract.getFunction("SetImportantContractAddress").populateTransaction("L2CrossChainMessenger", crossChainDeployment.address);
Expand Down
1 change: 1 addition & 0 deletions go/enclave/nodetype/sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ func (s *sequencer) createNewHeadBatch(l1HeadBlock *common.L1Block, skipBatchIfE
if tx := lazyTx.Resolve(); tx != nil {
err = limiter.AcceptTransaction(tx)
if err != nil {
s.logger.Info("Unable to accept transaction", log.TxKey, tx.Hash(), log.ErrKey, err)
if errors.Is(err, limiters.ErrInsufficientSpace) { // Batch ran out of space
break
}
Expand Down
6 changes: 5 additions & 1 deletion go/enclave/nodetype/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ func (val *obsValidator) SubmitTransaction(tx *common.L2Tx) error {
if headBatch == nil || headBatch.Uint64() <= common.L2GenesisSeqNo+1 {
return fmt.Errorf("not initialised")
}
return val.mempool.Validate(tx)
err := val.mempool.Validate(tx)
if err != nil {
val.logger.Info("Error validating transaction.", log.ErrKey, err, log.TxKey, tx.Hash())
}
return err
}

func (val *obsValidator) OnL1Fork(_ *common.ChainFork) error {
Expand Down

0 comments on commit d7cc25f

Please sign in to comment.