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

Panic in MessagePool::select_messages_optimal #4490

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

Panic in MessagePool::select_messages_optimal #4490

hanabi1224 opened this issue Jul 5, 2024 · 0 comments
Labels

Comments

@hanabi1224
Copy link
Contributor

Describe the bug

Logic in select_messages_optimal is quite out-of-sync with lotus. We need to revisit and update the logic to get parity.

To reproduce

  1. Send the below payload to http://localhost:2345/rpc/v0
{"jsonrpc":"2.0","id":0,"method":"Filecoin.MpoolSelect","params":
[[{"/":"bafy2bzaceb6vn533luic5oo7tnvudxy2g7jusjc4m3egjb3ei3tu2lhmdlbvi"},{"/":"bafy2bzaceabqr4736hunl6wu36xs5yqwdjhwbopplwqxykf54ssgbaqaphsq4"},{"/":"bafy2bzacec7zaiykrnemfuqmed7pkiyranuhixkfbv6aaa6rvkwojya5opnuk"}],0.8]
}
  1. get the below panic
thread 'tokio-runtime-worker' panicked at /home/me/git/forest/src/message_pool/msgpool/selection.rs:446:17:
attempt to subtract with overflow
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

forest code (panic in the last line):

                chains[i].merged = true;
                result.extend(chains[i].msgs.clone());
                random_count += chains[i].msgs.len();
                gas_limit -= chain_gas_limit;

Log output

Log Output
paste log output...

Expected behaviour

Screenshots

Environment (please complete the following information):

  • OS:
  • Branch/commit
  • Hardware

Other information and links

@hanabi1224 hanabi1224 added the Bug label Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant