51 Commits

Author SHA1 Message Date
erhant
e87bad71ab chore: clippy docfix + bump crossbeam-epoch (RUSTSEC-2026-0204) 2026-07-08 12:04:23 +03:00
erhant
97720fc35d fix(indexer): allow recovery from parked-and-stalled store (w.r.t Copilot review)
refactor(indexer): move chain-consistency code within a dedicated file
2026-07-08 12:04:23 +03:00
erhant
98af8e33f7 chore: docfix w.r.t Copilot 2026-07-08 12:04:23 +03:00
erhant
4287e64673 chore: fix typos, enable ignored test 2026-07-08 12:04:23 +03:00
erhant
b2f7fae972 fix(indexer): tend to @schouhy reviews, allow re-applied old blocks 2026-07-08 12:04:23 +03:00
erhant
2fa6793349 chore: typo fix ChainConsistency [skip ci] 2026-07-08 12:04:23 +03:00
erhant
416eddc733 refactor(indexer): tend to several reviews by @schouhy 2026-07-08 12:04:23 +03:00
erhant
39c19912c5 fix(indexer): use better error types, tend to few @Arjentix PR review 2026-07-08 12:04:23 +03:00
erhant
1547a51fa6 fix(indexer)!: address several reviews, use better return types with conversions, some docfixes
BREAKING CHANGE: dropping the serde rename attrs changes the FFI
`query_status` JSON: `state` values are now variant-cased
(`caught_up` -> `CaughtUp`) and fields snake_case
(`indexedBlockId` -> `indexed_block_id`, `lastError` -> `last_error`).
Consumers (lez-indexer-module, lez-explorer-ui) must update their parsing.
2026-07-08 12:04:23 +03:00
erhant
357c92f947 chore: very small comment about future fix [skip ci] 2026-07-07 16:40:33 +03:00
erhant
15ebccb11e fix(indexer): catch the edge case of re-using the last valid tip on restart 2026-07-07 16:40:33 +03:00
erhant
d24e25fea3 fix(indexer): attend to copilot comments, rm Store error from a park case 2026-07-07 16:40:33 +03:00
erhant
022a456bc5 chore: rm redundant unit test [skip ci] 2026-07-07 16:40:33 +03:00
erhant
375e76df48 fix(indexer): run the chain-identity check even when the store is parked 2026-07-07 16:40:33 +03:00
erhant
2cdda18b88 fix(indexer): run the chain-identity check even when the store is parked 2026-07-07 16:40:33 +03:00
erhant
64497526fd fix(indexer): detect chain reset via anchor block, **not** deterministic genesis
test `RISC0_DEV_MODE=1 RISC0_SKIP_BUILD=1 cargo test -p indexer_core`
2026-07-07 16:40:33 +03:00
erhant
50bdeefc84 chore: greatly increase timeout 2026-07-07 16:40:33 +03:00
erhant
8d0c2f4422 feat(indexer): run genesis-consistency check at service and FFI startup 2026-07-07 16:40:33 +03:00
erhant
406b6ab011 feat(indexer): add startup genesis-consistency check
test `RISC0_DEV_MODE=1 RISC0_SKIP_BUILD=1 cargo test -p indexer_core`
2026-07-07 16:40:33 +03:00
erhant
02eb338a6a test(indexer): cover stall recovery and full StallReason roundtrip
test `RISC0_DEV_MODE=1 RISC0_SKIP_BUILD=1 cargo test -p indexer_core`
2026-07-07 16:40:33 +03:00
erhant
206f3de524 feat(indexer): expose status over RPC and add integration coverage
test `RUST_LOG=info RISC0_DEV_MODE=1 cargo test -p integration_tests --test bridge --indexer_status_rpc_reports_caught_up_with_no_stall --exact --nocapture --include-ignored`
2026-07-07 16:40:33 +03:00
erhant
5f6f26d012 chore: fix linter 2026-07-07 16:40:33 +03:00
erhant
2b3fd9b5da feat(indexer): park ingest loop on bad blocks instead of skipping
`RISC0_DEV_MODE=1 RISC0_SKIP_BUILD=1 cargo test -p indexer_core`
2026-07-07 16:40:33 +03:00
erhant
30aa168651 refactor(indexer): use "stall reason" instead of "chain breaker" 2026-07-07 16:31:40 +03:00
erhant
46732698b7 feat(indexer): add Stalled status and chain breaker snapshot
test `RISC0_DEV_MODE=1 RISC0_SKIP_BUILD=1 cargo test -p indexer_core --lib status`
2026-07-07 16:31:40 +03:00
erhant
7916efb5c6 feat(indexer): add accept_block with chain-linkage check and atomic apply
test `RISC0_DEV_MODE=1 RISC0_SKIP_BUILD=1 cargo test -p indexer_core --lib accept_tests`
2026-07-07 16:31:40 +03:00
erhant
0899eb3547 feat(indexer): persist ChainBreaker in RocksDB meta
test `RISC0_DEV_MODE=1 RISC0_SKIP_BUILD=1 cargo test -p storage -p indexer_core --lib chain_breaker`
2026-07-07 16:31:40 +03:00
erhant
8394597fd5 feat(indexer): add BlockIngestError enum, fix linting 2026-07-07 16:31:40 +03:00
erhant
ab0fd355ea refactor(indexer): rename execute_on_state and drop indexer-side tx checks
test with:
RISC0_DEV_MODE=1 RISC0_SKIP_BUILD=1 cargo test -p common -p storage -p indexer_core
2026-07-07 16:31:40 +03:00
Sergio Chouhy
ae0705995f fix: solve merging conflicts with main 2026-07-03 15:07:35 -03:00
jonesmarvin8
f786aca73e
refactor(lez): clean up long functions (#541)
* add helper functions

* CI fixes

* additional refactors

* fix: clarify doc comment on apply_mempool_transaction

* chore: apply nightly fmt

* fix: import missing ML_KEM_768_CIPHERTEXT_LEN in auth_transfer private test
2026-07-01 10:23:21 -04:00
erhant
7f0714a79e fix(indexer): the latest docker fix updated bedrock ports, this small commit fixes those 2026-06-23 17:02:47 +03:00
erhant
c7336c3216 fix(indexer): tiny comment link fix [skip ci] 2026-06-23 15:57:33 +03:00
erhant
735235efa1 fix(indexer)!: address @Arjentix comments on IndexerStatus 2026-06-23 15:57:33 +03:00
erhant
2195937400 fix(indexer_ffi): use already FFI-safe Runtime 2026-06-23 15:57:33 +03:00
erhant
5d51e0b59c fix(indexer): use /var/lib/indexer_service volume path in Dockerfile
+ add `*` wildcard for rocksdb ignore
2026-06-23 15:57:33 +03:00
erhant
0bb7b30d63 fix: rm comments, add cpp_compat to cbindgen 2026-06-23 15:57:33 +03:00
erhant
c57bf16d15 feat: added status reporter for indexer (for UI) 2026-06-23 15:57:33 +03:00
erhant
c0fbaaf08e refactor: use channel id for rocksdb filename [skip ci] 2026-06-23 15:57:33 +03:00
erhant
1c1e80f646 feat(indexer)!: make storage location caller-driven, not config-driven
The indexer's storage location was the `home` field of IndexerConfig, used only to derive the RocksDB dir. Defaulting to "." meant it landed in the process CWD — fine for the standalone service, but wrong when the indexer runs embedded in a logos_host subprocess (RocksDB ended up in an arbitrary/unwritable dir). Storage location is an operational concern the host should own, not something baked into a user-editable config.

Remove `home` from IndexerConfig and pass the storage directory explicitly:

  - core: `IndexerCore::new(config, storage_dir)` derives `<storage_dir>/rocksdb`.
  - ffi: `start_indexer(runtime, config_path, storage_dir)`; null/empty storage_dir falls back to ".". Lets a host (e.g. a Logos module's instance persistence path) own where state lives.
  - service: `run_server(config, storage_dir, port)` + a `--data-dir` flag (default ".") on the binary, preserving current behaviour.
  - drop `home` from the committed indexer config JSONs and the test fixtures.

BREAKING CHANGE: `start_indexer` gains a `storage_dir` parameter and IndexerConfig no longer has a `home` field.
2026-06-23 15:57:33 +03:00
erhant
0db82d2344 refactor: better runtime handling + logger lint fix 2026-06-23 15:57:33 +03:00
erhant
4a3fa1d4be refactor: logger now only enables for indexer crates + takes in a loglevel option 2026-06-23 15:57:33 +03:00
erhant
956dc6278a fix!(indexer_ffi): fix 3 existing issues, refactor the runtime handling, rm unused cbindgen.toml 2026-06-23 15:57:33 +03:00
Daniil Polyakov
cd06f7c0f7 feat(docker): extract risc0 installation into a separate image 2026-06-23 15:24:03 +03:00
Daniil Polyakov
972a7f981b fix(docker): fix dockerfiles to properly build images 2026-06-23 15:24:03 +03:00
Pravdyvy
4185599df6 remove(logos-blockchain-circuits): removed logos blockchains circuits mentions 2026-06-17 13:31:35 +03:00
erhant
dac429a94a
Merge pull request #520 from logos-blockchain/erhant/hotfix-indexer-accepts-sequencer-deposit-txs-with-bypass
fix(indexer): bypass system account guards
2026-06-12 21:19:07 +03:00
erhant
4076de05c0 rename execute_unchecked_on_state to execute_without_system_accounts_check_on_state 2026-06-11 12:44:16 +03:00
erhant
e6fa92dd1e initial hotfixes to bypass system account guards to allow deposit txes 2026-06-10 14:51:01 +03:00
erhant
85284562b4 removed bedrock_parent_id as well 2026-06-10 11:08:14 +03:00