Closed davidtaikocha closed 4 months ago
Also, think there may be an some double counting in your taiko_worker.go code when calculating if the total tx len is within the maxBytesPerTxList limit.
this check: https://github.com/taikoxyz/taiko-geth/blob/30a615b4c3aafd0d395309035d58b86ff53c8eb0/miner/taiko_worker.go#L330 appends the current tx length before calling encodeAndComporeessTxList However, if the transaction was successful it should have already been added to env.txs here: https://github.com/taikoxyz/taiko-geth/blob/30a615b4c3aafd0d395309035d58b86ff53c8eb0/miner/worker.go#L764
You will also run this check even if the tx failed and wasn't added to the tx list, which seems unecassary.
To fix I think you just need to move the maxBytesPerTxList check before committing the tx. Happy to PR this in if I haven't missed anything.
Also, think there may be an some double counting in your taiko_worker.go code when calculating if the total tx len is within the maxBytesPerTxList limit.
this check: https://github.com/taikoxyz/taiko-geth/blob/30a615b4c3aafd0d395309035d58b86ff53c8eb0/miner/taiko_worker.go#L330 appends the current tx length before calling encodeAndComporeessTxList However, if the transaction was successful it should have already been added to env.txs here: https://github.com/taikoxyz/taiko-geth/blob/30a615b4c3aafd0d395309035d58b86ff53c8eb0/miner/worker.go#L764
You will also run this check even if the tx failed and wasn't added to the tx list, which seems unecassary.
To fix I think you just need to move the maxBytesPerTxList check before committing the tx. Happy to PR this in if I haven't missed anything.