From 0e8c64fc699a93efc561f4d3c3694d39aaf50a0e Mon Sep 17 00:00:00 2001 From: erhant Date: Tue, 23 Jun 2026 10:34:50 +0300 Subject: [PATCH 1/5] fix: @Arjentix gitignore newline --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d3f2e1c..c66966c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ build lez-explorer-ui-*-lgx-* # ignore rocksdb (may appear here during indexer tests) -rocksdb* \ No newline at end of file +rocksdb* From c67fd88978157c1e0a0d4ff5d56136137c183e1f Mon Sep 17 00:00:00 2001 From: erhant Date: Tue, 23 Jun 2026 14:58:09 +0300 Subject: [PATCH 2/5] fix: add preemptive poll quit to help with graceful shutting downs, bump flakes --- flake.lock | 16 ++++++++-------- src/lez_explorer_ui_backend.cpp | 20 +++++++++++++++++++- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 0370f66..23c0109 100644 --- a/flake.lock +++ b/flake.lock @@ -21,11 +21,11 @@ "logos-module-builder": "logos-module-builder_4" }, "locked": { - "lastModified": 1782142627, - "narHash": "sha256-IZslE6yROAxl/FpjlEeZRc+vHKc/1M7kIFvRlgWqDIQ=", + "lastModified": 1782215779, + "narHash": "sha256-x9L1jcK6XfVl40tsqpfrdERLmuGaEDBsFYzNIDdiZPM=", "ref": "erhant/migr-to-logos-module-builder-update-LEZ", - "rev": "014a6dcfe1f5b2529024e8e0fa659e0c546f8652", - "revCount": 42, + "rev": "b5a283124a909854eba695ed213356269b45b414", + "revCount": 45, "type": "git", "url": "https://github.com/logos-blockchain/lez-indexer-module" }, @@ -2013,11 +2013,11 @@ "rust-rapidsnark": "rust-rapidsnark" }, "locked": { - "lastModified": 1782142589, - "narHash": "sha256-K5NtBontpPx1XqnX6jbEzPXSchaLbPlG9689W+C/ExA=", + "lastModified": 1782215206, + "narHash": "sha256-BKwz2qgH2Mu1fSCooc203iYOcxBREcjLnFDF07Ro/H0=", "ref": "erhant/fix-indexer-ffi", - "rev": "2a78b1b3d1b4080930c00ecf23b5c0e73cd646b8", - "revCount": 2773, + "rev": "84c84d885af1f6ccf3ae76a99d93183dbdc3a925", + "revCount": 2778, "type": "git", "url": "https://github.com/logos-blockchain/logos-execution-zone" }, diff --git a/src/lez_explorer_ui_backend.cpp b/src/lez_explorer_ui_backend.cpp index 23a57f7..5b8afec 100644 --- a/src/lez_explorer_ui_backend.cpp +++ b/src/lez_explorer_ui_backend.cpp @@ -3,6 +3,7 @@ #include #include +#include #include #include #include @@ -220,7 +221,13 @@ LezExplorerUiBackend::LezExplorerUiBackend() setDefaultConfig(QString::fromUtf8(kDefaultConfig)); } -LezExplorerUiBackend::~LezExplorerUiBackend() = default; +LezExplorerUiBackend::~LezExplorerUiBackend() +{ + // Defensive: ensure no poll fires while the backend is being torn down. + if (m_pollTimer) { + m_pollTimer->stop(); + } +} void LezExplorerUiBackend::onContextReady() { @@ -239,6 +246,17 @@ void LezExplorerUiBackend::onContextReady() connect(m_pollTimer, &QTimer::timeout, this, &LezExplorerUiBackend::pollTip); m_pollTimer->start(); + // pollTip() makes a synchronous cross-process call into lez_indexer_module. + // On shutdown the host SIGTERMs that dependency and only waits ~3s before + // SIGKILL, while our IPC timeout is ~20s — so a poll landing mid-teardown + // blocks on a dead peer and freezes the window. Stop polling the instant the + // app starts quitting to close that window from our side. + connect(qApp, &QCoreApplication::aboutToQuit, this, [this]() { + if (m_pollTimer) { + m_pollTimer->stop(); + } + }); + // Kick an immediate poll so the view fills without waiting a full interval. pollTip(); } From 21ff5e665661a142d5ccac161b42062c4c7e4422 Mon Sep 17 00:00:00 2001 From: erhant Date: Tue, 23 Jun 2026 16:46:56 +0300 Subject: [PATCH 3/5] fix: better start/stop --- flake.lock | 20 ++++++++++---------- src/lez_explorer_ui_backend.cpp | 6 +++++- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 23c0109..a3d988a 100644 --- a/flake.lock +++ b/flake.lock @@ -21,11 +21,11 @@ "logos-module-builder": "logos-module-builder_4" }, "locked": { - "lastModified": 1782215779, - "narHash": "sha256-x9L1jcK6XfVl40tsqpfrdERLmuGaEDBsFYzNIDdiZPM=", + "lastModified": 1782222303, + "narHash": "sha256-T//08rBmSvOOhvZZ5if8Gnaq1okEuSGt2ASym1eDyPY=", "ref": "erhant/migr-to-logos-module-builder-update-LEZ", - "rev": "b5a283124a909854eba695ed213356269b45b414", - "revCount": 45, + "rev": "06396d7aeccdd7c3e7310c5acf4e687c12109052", + "revCount": 47, "type": "git", "url": "https://github.com/logos-blockchain/lez-indexer-module" }, @@ -2013,16 +2013,16 @@ "rust-rapidsnark": "rust-rapidsnark" }, "locked": { - "lastModified": 1782215206, - "narHash": "sha256-BKwz2qgH2Mu1fSCooc203iYOcxBREcjLnFDF07Ro/H0=", - "ref": "erhant/fix-indexer-ffi", - "rev": "84c84d885af1f6ccf3ae76a99d93183dbdc3a925", - "revCount": 2778, + "lastModified": 1782219627, + "narHash": "sha256-mF9P5483XSGudP69VWlCeRTYFocklDwHGvPNujnDxTM=", + "ref": "main", + "rev": "a9df90c5b655446708395c99f627834eb822c48d", + "revCount": 2790, "type": "git", "url": "https://github.com/logos-blockchain/logos-execution-zone" }, "original": { - "ref": "erhant/fix-indexer-ffi", + "ref": "main", "type": "git", "url": "https://github.com/logos-blockchain/logos-execution-zone" } diff --git a/src/lez_explorer_ui_backend.cpp b/src/lez_explorer_ui_backend.cpp index 5b8afec..888fa1b 100644 --- a/src/lez_explorer_ui_backend.cpp +++ b/src/lez_explorer_ui_backend.cpp @@ -35,7 +35,7 @@ constexpr quint64 kGapRebuildThreshold = 8; const char* const kDefaultConfig = R"JSON({ "consensus_info_polling_interval": "1s", "bedrock_config": { - "addr": "http://localhost:8080", + "addr": "http://localhost:18080", "backoff": { "start_delay": "100ms", "max_retries": 5 @@ -588,6 +588,10 @@ QString LezExplorerUiBackend::readConfigFile() const bool LezExplorerUiBackend::startIndexerFromFile() { + // start_indexer is idempotent and won't restart a running indexer, so stop + // any current one first — this is what lets a re-saved config (e.g. a new + // bedrock addr) actually take effect. No-op on the first start. + modules().lez_indexer_module.stop_indexer(); const qlonglong code = modules().lez_indexer_module.start_indexer(configFilePath()); if (code != 0) { emit error(QStringLiteral("start_indexer failed (code %1)").arg(code)); From d16a66a64a9b2ff1008519d1ff93ea5d81cb4dd3 Mon Sep 17 00:00:00 2001 From: erhant Date: Tue, 23 Jun 2026 17:16:53 +0300 Subject: [PATCH 4/5] chore: better comment --- src/lez_explorer_ui_backend.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lez_explorer_ui_backend.cpp b/src/lez_explorer_ui_backend.cpp index 888fa1b..4de8e89 100644 --- a/src/lez_explorer_ui_backend.cpp +++ b/src/lez_explorer_ui_backend.cpp @@ -588,9 +588,9 @@ QString LezExplorerUiBackend::readConfigFile() const bool LezExplorerUiBackend::startIndexerFromFile() { - // start_indexer is idempotent and won't restart a running indexer, so stop - // any current one first — this is what lets a re-saved config (e.g. a new - // bedrock addr) actually take effect. No-op on the first start. + // stops the indexer if it's already running, then starts it with the config file path. + // + // this has the effect of "restarting" the indexer with the new config. modules().lez_indexer_module.stop_indexer(); const qlonglong code = modules().lez_indexer_module.start_indexer(configFilePath()); if (code != 0) { From 1b61820e0147633791cc30ea304bccbaeec58ff3 Mon Sep 17 00:00:00 2001 From: erhant Date: Tue, 23 Jun 2026 19:11:30 +0300 Subject: [PATCH 5/5] chore: use `main` branch --- flake.lock | 12 ++++++------ flake.nix | 7 ++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index a3d988a..0c7bf1c 100644 --- a/flake.lock +++ b/flake.lock @@ -21,16 +21,16 @@ "logos-module-builder": "logos-module-builder_4" }, "locked": { - "lastModified": 1782222303, - "narHash": "sha256-T//08rBmSvOOhvZZ5if8Gnaq1okEuSGt2ASym1eDyPY=", - "ref": "erhant/migr-to-logos-module-builder-update-LEZ", - "rev": "06396d7aeccdd7c3e7310c5acf4e687c12109052", - "revCount": 47, + "lastModified": 1782229998, + "narHash": "sha256-SmYzzRGT239/hXnBdUldILvcCdObeNufvUPJLopOCKM=", + "ref": "main", + "rev": "385c0ce6a042eb9b211dbd95bd0f9ee94864f148", + "revCount": 52, "type": "git", "url": "https://github.com/logos-blockchain/lez-indexer-module" }, "original": { - "ref": "erhant/migr-to-logos-module-builder-update-LEZ", + "ref": "main", "type": "git", "url": "https://github.com/logos-blockchain/lez-indexer-module" } diff --git a/flake.nix b/flake.nix index 18d502d..4b7d0f3 100644 --- a/flake.nix +++ b/flake.nix @@ -4,11 +4,8 @@ inputs = { logos-module-builder.url = "github:logos-co/logos-module-builder"; nix-bundle-lgx.url = "github:logos-co/nix-bundle-lgx"; - - # NOTE: git+https (not github:) because the branch name contains a slash — - # the github: fetcher mis-routes slashed refs through the commits API (404). - # TODO: repoint to the merge target once this branch lands / goes public. - lez_indexer_module.url = "git+https://github.com/logos-blockchain/lez-indexer-module?ref=erhant/migr-to-logos-module-builder-update-LEZ"; + + lez_indexer_module.url = "git+https://github.com/logos-blockchain/lez-indexer-module?ref=main"; }; outputs =