FuelLabs / FuelLabs/fuel-core

During block production should modify the block after passing all checks

Open
#2,018 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.