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

Indexing stuck/crashes after merging frontrunning (testnet) #3305

Closed
emilcondrea opened this issue Mar 18, 2024 · 3 comments · Fixed by #3336
Closed

Indexing stuck/crashes after merging frontrunning (testnet) #3305

emilcondrea opened this issue Mar 18, 2024 · 3 comments · Fixed by #3336

Comments

@emilcondrea
Copy link
Contributor

emilcondrea commented Mar 18, 2024

I've been testing frontrunning protection and its great! Thanks for doing this, @casey
But somehow this change, #3212 crashes the indexer when trying to index a fresh/from scratch testnet. On regtest this works well.

./target/release/ord --testnet --index-runes --data-dir ./somenewdir

[indexing blocks] █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████░░░░ 2520002/2582461thread '<unnamed>' panicked at src/index/updater/rune_updater.rs:240:10:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@casey
Copy link
Collaborator

casey commented Mar 18, 2024

Thanks for the report! Can you run it with export RUST_BACKTRACE=1?

I have a hunch I know what the problem is.

@emilcondrea
Copy link
Contributor Author

Yes. I've tried to check before unwrap but then goes to infinite loop.

export RUST_BACKTRACE=1
➜  ord git:(master) ✗ ./target/release/ord --testnet --index-runes --data-dir ./index5   server --http-port 9001 
Listening on http://0.0.0.0:9001
[indexing blocks] █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████░░░░ 2520002/2582469thread '<unnamed>' panicked at src/index/updater/rune_updater.rs:240:10:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0: rust_begin_unwind
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
   2: core::panicking::panic
             at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:144:5
   3: ord::index::updater::rune_updater::RuneUpdater::index_runes
   4: ord::index::updater::Updater::index_block
   5: ord::index::Index::update
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@emilcondrea
Copy link
Contributor Author

Here its crashing, rune_updater.rs line 239

 for input in tx.input.iter() {
      if input.previous_output.is_null() {
        continue;
      }

      self
        .outpoint_to_output
        .remove(&input.previous_output.store())?
        .unwrap();
    }

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

Successfully merging a pull request may close this issue.

2 participants