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

Unclear unwrap inside core execution logic #1769

Open
SuperFluffy opened this issue Oct 30, 2024 · 0 comments · May be fixed by #1772
Open

Unclear unwrap inside core execution logic #1769

SuperFluffy opened this issue Oct 30, 2024 · 0 comments · May be fixed by #1772
Assignees

Comments

@SuperFluffy
Copy link
Member

SuperFluffy commented Oct 30, 2024

astria_sequencer::App::execute_transaction_prepare_proposal [1] unwraps a Result. The expect message it provides does not give any indication why unwrapping at that point is acceptable. Tracing it through the stack the error that is being bubbled up comes from a call deep inside astria_sequencer::Mempool::builder_queue [2] and [3].

It is not clear why this expect here is acceptable or why it is an invariant of the system that the return value of of the method call is always Ok.

1:

.expect("failed to fetch pending transactions");

2:
self.pending.read().await.builder_queue(state).await

3:
pub(super) async fn builder_queue<S: accounts::StateReadExt>(

The code that introduced this was #1323.

┆Issue Number: ENG-960

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

Successfully merging a pull request may close this issue.

2 participants