Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

During block production should modify the block after passing all checks #2018

Open
xgreenx opened this issue Jul 5, 2024 · 0 comments
Open

Comments

@xgreenx
Copy link
Collaborator

xgreenx commented Jul 5, 2024

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.

	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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant