During block production should modify the block after passing all checks
Open
- Dominant language
- Rust
- Stars
- 56.8k
- Forks
- 2.9k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 5
Description
Our code adds the transactions to the block first, and after, we could face an error that will skip the transaction. We need to go over the codebase and update all places to follow "Check first, update after" flow.
```rust
block.transactions.push(tx);
execution_data.tx_count = tx_count
.checked_add(1)
.ok_or(ExecutorError::TooManyTransactions)?;
```
The source is https://bugs.immunefi.com/dashboard/submission/32625.
Contributor guide
Assessment
This issue has not been assessed yet.