feat: connect crisp to blockchain time [skip-line-limit]#1052
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughAdds a BlockListener and EventListener accessor, introduces ThresholdQueue and CallbackQueue for time-based scheduling, refactors the Indexer to use separate event and block listeners with do_later scheduling, renames RPC parameters (ws/http_rpc -> rpc_url/url), and updates CRISP example, tests, and Hardhat config accordingly. Changes
Sequence Diagram(s)sequenceDiagram
rect rgba(70,130,180,0.06)
participant BlockListener as BlockListener
participant CallbackQueue as CallbackQueue
participant Handlers as Handlers
end
BlockListener->>BlockListener: listen()
loop for each new block
BlockListener->>Handlers: spawn handler tasks (concurrent)
Handlers->>Handlers: process Header
BlockListener->>CallbackQueue: execute_until_including(block.timestamp)
CallbackQueue->>CallbackQueue: run eligible callbacks (sequentially)
end
sequenceDiagram
participant Indexer as Indexer
participant EventListener as EventListener
participant BlockListener as BlockListener
participant EventHandlers as EventHandlers
participant BlockHandlers as BlockHandlers
Indexer->>Indexer: listen() (tokio::select!)
par monitor events
EventListener-->>Indexer: contract event
Indexer->>EventHandlers: invoke event handlers
and monitor blocks
BlockListener-->>Indexer: new block
Indexer->>BlockHandlers: invoke block handlers
Indexer->>CallbackQueue: check & execute scheduled callbacks
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45–70 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
examples/CRISP/packages/crisp-contracts/hardhat.config.ts (1)
75-78: Mining config fits blockchain‑time usage; confirm EDR support and consider configurabilityThis
mining: { auto: false, interval: 1000 }setup makes sense for deterministic block‑time progression driving CRISP behavior and shouldn’t affect Hardhat’s defaulthardhatnetwork. Two minor suggestions:
- Consider making the interval configurable (e.g., via env or a shared test constant), so you can easily speed up local/test runs or align it precisely with CRISP timeout/interval assumptions.
- Since this network uses
type: 'edr-simulated', please confirm that the EDR/Anvil integration actually respects theminingfield here (and doesn’t ignore or reject it), to avoid surprises where blocks don’t advance as expected.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
examples/CRISP/packages/crisp-contracts/hardhat.config.ts(1 hunks)examples/CRISP/scripts/dev.sh(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- examples/CRISP/scripts/dev.sh
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: test_net
- GitHub Check: test_contracts
- GitHub Check: build_e3_support_risc0
- GitHub Check: crisp_rust_unit
- GitHub Check: build_sdk
- GitHub Check: rust_unit
- GitHub Check: rust_integration
- GitHub Check: integration_prebuild
- GitHub Check: build_enclave_cli
- GitHub Check: Build & Push Image
- GitHub Check: Build & Push Image
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
deploy/local/start.sh (1)
132-132: Ensure file ends with a trailing newline.Bash best practice is to include a trailing newline at the end of scripts. The final echo statement should be followed by a newline character.
Apply this diff to add the trailing newline:
-echo "🚨 CRISP development environment stopped" +echo "🚨 CRISP development environment stopped"Note: Ensure the file ends with a newline after this line.
packages/enclave-contracts/hardhat.config.ts (1)
111-118: Confirm intent oflocalas an EDR‑simulated, URL‑less networkSwitching
localtotype: "edr-simulated"without aurl(and sharing chainId 31337 withhardhat) is a non‑trivial behavioral change from a classic HTTP localhost network. Please double‑check:
- Any scripts/CI that use
--network localaren’t relying onnetworks.local.urlorRPC_URL.- The duplication with the
hardhatnetwork (same chainId, similar type) is intentional and documented somewhere (even a brief comment here) so future readers understand when to usehardhatvslocal.If everything already uses the new EDR flow, then this looks fine; otherwise, it might be worth either keeping a small
url-based network around or adding a comment to make the new semantics explicit.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (12)
deploy/local/contracts.sh(1 hunks)deploy/local/start.sh(2 hunks)docs/pages/CRISP/setup.mdx(1 hunks)examples/CRISP/packages/crisp-contracts/hardhat.config.ts(1 hunks)examples/CRISP/scripts/crisp_deploy.sh(1 hunks)examples/CRISP/scripts/dev.sh(1 hunks)packages/enclave-contracts/README.md(2 hunks)packages/enclave-contracts/hardhat.config.ts(1 hunks)templates/default/package.json(1 hunks)templates/default/scripts/dev_ciphernodes.sh(1 hunks)tests/integration/base.sh(4 hunks)tests/integration/persist.sh(4 hunks)
✅ Files skipped from review due to trivial changes (1)
- deploy/local/contracts.sh
🚧 Files skipped from review as they are similar to previous changes (1)
- examples/CRISP/scripts/dev.sh
🧰 Additional context used
🧠 Learnings (12)
📚 Learning: 2025-09-19T11:16:53.825Z
Learnt from: cedoor
Repo: gnosisguild/enclave PR: 752
File: packages/enclave-contracts/contracts/Enclave.sol:15-17
Timestamp: 2025-09-19T11:16:53.825Z
Learning: The Enclave contract in the gnosisguild/enclave repository has not been deployed yet as of September 2025, so storage layout considerations for upgradeable contracts don't apply to current changes.
Applied to files:
packages/enclave-contracts/README.md
📚 Learning: 2025-09-11T13:09:03.800Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 677
File: packages/enclave-contracts/scripts/deployAndSave/naiveRegistryFilter.ts:30-31
Timestamp: 2025-09-11T13:09:03.800Z
Learning: In Hardhat v3 deployment scripts, use `(await signer.provider?.getNetwork())?.name ?? "localhost"` instead of `hre.globalOptions.network` to reliably get the network name, as `hre.globalOptions.network` can be undefined in some contexts.
Applied to files:
packages/enclave-contracts/README.mdexamples/CRISP/packages/crisp-contracts/hardhat.config.tstemplates/default/package.jsonpackages/enclave-contracts/hardhat.config.ts
📚 Learning: 2024-09-26T04:12:09.345Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 107
File: tests/basic_integration/test.sh:103-114
Timestamp: 2024-09-26T04:12:09.345Z
Learning: In `tests/basic_integration/test.sh`, the user prefers not to refactor the ciphernode addition section to reduce duplication.
Applied to files:
tests/integration/base.shtests/integration/persist.shtemplates/default/scripts/dev_ciphernodes.sh
📚 Learning: 2024-10-23T01:59:27.215Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 156
File: tests/basic_integration/test.sh:21-21
Timestamp: 2024-10-23T01:59:27.215Z
Learning: In `tests/basic_integration/test.sh`, the hardcoded `CIPHERNODE_SECRET` is acceptable for testing purposes and does not need to be changed.
Applied to files:
tests/integration/base.shtests/integration/persist.shtemplates/default/scripts/dev_ciphernodes.sh
📚 Learning: 2024-11-25T09:47:48.863Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 184
File: packages/ciphernode/net/tests/entrypoint.sh:4-8
Timestamp: 2024-11-25T09:47:48.863Z
Learning: When reviewing test scripts like `packages/ciphernode/net/tests/entrypoint.sh`, avoid suggesting additional error handling and cleanup for `iptables` commands, as it may not be necessary.
Applied to files:
tests/integration/base.shtests/integration/persist.shtemplates/default/scripts/dev_ciphernodes.sh
📚 Learning: 2025-10-10T12:56:40.538Z
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 830
File: templates/default/README.md:123-128
Timestamp: 2025-10-10T12:56:40.538Z
Learning: In the Enclave repository, the hard-coded Hardhat development private key `0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80` is acceptable in template README files and documentation for local testing/interaction purposes.
Applied to files:
tests/integration/base.shexamples/CRISP/packages/crisp-contracts/hardhat.config.tstests/integration/persist.shpackages/enclave-contracts/hardhat.config.ts
📚 Learning: 2025-11-05T14:12:57.814Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 963
File: examples/CRISP/client/package.json:25-25
Timestamp: 2025-11-05T14:12:57.814Z
Learning: In the Enclave/CRISP codebase, `enclave-e3/sdk` and `crisp-e3/sdk` are different packages: `enclave-e3/sdk` is the general Enclave SDK, while `crisp-e3/sdk` is the CRISP-specific SDK. The CRISP client (`examples/CRISP/client`) intentionally depends on `enclave-e3/sdk`, not `crisp-e3/sdk`.
Applied to files:
deploy/local/start.sh
📚 Learning: 2025-08-25T10:28:56.174Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 657
File: Cargo.toml:32-34
Timestamp: 2025-08-25T10:28:56.174Z
Learning: The examples/CRISP directory has its own Cargo.toml workspace configuration with members like "server", "wasm-crypto", "program/core", "program/client", etc. The root workspace intentionally excludes "examples/CRISP/server", "examples/CRISP/program", and "examples/CRISP/wasm-crypto" to prevent double workspace membership, which is the correct approach for self-contained example workspaces.
Applied to files:
deploy/local/start.sh
📚 Learning: 2025-09-11T13:09:03.800Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 677
File: packages/enclave-contracts/scripts/deployAndSave/naiveRegistryFilter.ts:30-31
Timestamp: 2025-09-11T13:09:03.800Z
Learning: In Hardhat v3, hre.network.name is not available anymore. Use hre.globalOptions.network to get the network name instead.
Applied to files:
examples/CRISP/packages/crisp-contracts/hardhat.config.tspackages/enclave-contracts/hardhat.config.ts
📚 Learning: 2024-10-08T19:45:18.209Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 107
File: tests/basic_integration/test.sh:92-102
Timestamp: 2024-10-08T19:45:18.209Z
Learning: In the `tests/basic_integration/test.sh` script, it's acceptable not to redirect output of background `ciphernode` processes to log files.
Applied to files:
tests/integration/persist.sh
📚 Learning: 2024-10-23T01:59:42.967Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 156
File: packages/ciphernode/tests/tests/test_aggregation_and_decryption.rs:274-274
Timestamp: 2024-10-23T01:59:42.967Z
Learning: In the `packages/ciphernode/tests/tests/test_aggregation_and_decryption.rs` file and other test files within this project, hardcoding `CIPHERNODE_SECRET` is acceptable for testing purposes.
Applied to files:
tests/integration/persist.sh
📚 Learning: 2025-09-11T12:56:39.601Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 677
File: packages/enclave-contracts/test/Enclave.spec.ts:804-807
Timestamp: 2025-09-11T12:56:39.601Z
Learning: In Hardhat v3, the chai matchers syntax changed to support multiple network connections: `.to.not.be.revert(ethers)` is the correct new syntax, replacing the old `.to.not.be.reverted` (without parameters). The ethers object must be passed as a parameter to the revert/reverted matchers in Hardhat v3. Similarly, `.revertedWithoutReason(ethers)` replaces `.revertedWithoutReason`.
Applied to files:
packages/enclave-contracts/hardhat.config.ts
🧬 Code graph analysis (1)
tests/integration/base.sh (2)
tests/integration/fns.sh (2)
heading(53-60)waiton(66-71)packages/enclave-sdk/src/utils.ts (1)
sleep(38-40)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: test_contracts
- GitHub Check: build_sdk
- GitHub Check: build_enclave_cli
- GitHub Check: integration_prebuild
- GitHub Check: test_net
- GitHub Check: rust_unit
- GitHub Check: build_e3_support_risc0
- GitHub Check: crisp_rust_unit
- GitHub Check: rust_integration
- GitHub Check: Build & Push Image
- GitHub Check: Build & Push Image
🔇 Additional comments (10)
deploy/local/start.sh (2)
71-71: Standardization tolocalnetwork alias.This change aligns well with the PR objective to standardize deployment and testing workflows on the
localnetwork alias instead oflocalhost.
86-88: Verify network parameter consistency across deployment commands.Lines 86–88 still reference
--network "localhost"in thepnpm ciphernode:addcalls, while line 71 was updated to use--network local. Given the PR's objective to standardize on thelocalnetwork alias, confirm whether these references should also be updated to--network "local"for consistency.templates/default/package.json (1)
10-10: Deploy script now targetslocalnetwork consistentlySwitching the deploy script to
--network localmatches the rest of the repo’s network naming and keeps template behavior aligned with the new default.packages/enclave-contracts/README.md (1)
44-45: Docs updated to use--network localUsing
--network localin these examples keeps the README consistent with the updated Hardhat network name and other scripts. No further changes needed here.Also applies to: 99-100
templates/default/scripts/dev_ciphernodes.sh (1)
55-59: Ciphernode admin-add now points atlocalnetworkAll
ciphernode:admin-addcalls use--network local, matching the rest of the tooling and avoiding the oldlocalhostalias mismatch.docs/pages/CRISP/setup.mdx (1)
234-235: CRISP setup docs correctly referencelocalnetworkUpdating the deploy step to
--network localkeeps the guide in sync with the Hardhat config and other CRISP scripts.examples/CRISP/scripts/crisp_deploy.sh (1)
11-12: CRISP deploy script aligned withnetworks.localUsing
--network localfor both clean and full deploy is consistent with the CRISP hardhat config and avoids relying on the deprecatedlocalhostalias.tests/integration/base.sh (1)
20-94: Integration test flow now targetslocalnetwork consistentlyAll pnpm CLI calls in this script now use
--network local, which keeps the integration tests aligned with the updated Hardhat network naming without altering control flow.tests/integration/persist.sh (1)
20-99: Persist integration test switched tolocalnetworkThe updated
--network localflags keep this script consistent with the rest of the integration suite and the configured Hardhat network, without changing the underlying test behavior.examples/CRISP/packages/crisp-contracts/hardhat.config.ts (1)
68-79: Based on my verification:Hardhat v3 network configuration is valid and correctly implemented
The
networks.localconfiguration uses the standard Hardhat v3 pattern established throughout the repository:
type: 'edr-simulated'is consistently used for local/hardhat networks across 4 config fileschainType: 'l1'is the standard pairing withedr-simulatednetworksmining: { auto: false, interval: 1000 }is valid for Hardhat v3 and implements the documented behavior of disabling automatic mining with 1-second interval blocks (matching CRISP's predictable block-time requirement)TypeScript strict mode (enabled in tsconfig.json) would catch any schema violations, and no compilation errors are reported. The mining configuration aligns with comments in the template scripts that describe this exact pattern.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/enclave-contracts/scripts/deployEnclave.ts (1)
25-27: EnsurenetworkNamereflects the actual Hardhat network when--networkis omittedChanging the fallback from
"localhost"to"local"matches the repo-wide alias change, but this still depends onhre.globalOptions.network, which isundefinedwhen the script runs without an explicit--networkflag (Hardhat then uses its configured default, often"hardhat"). In that case,autoCleanForLocalhostwill receive"local"even if the underlying provider is actually on"hardhat", which could target the wrong ignition state.Consider deriving the network name from the provider (e.g., via
signer.provider.getNetwork().name) and only falling back to a literal default if that’s unavailable, usinghre.globalOptions.networkas a secondary hint. Based on learnings,hre.globalOptions.networkalone is not always reliable in Hardhat v3 deployment scripts.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/enclave-contracts/scripts/deployEnclave.ts(1 hunks)packages/enclave-contracts/scripts/utils.ts(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/enclave-contracts/scripts/utils.ts
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-11T13:09:03.800Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 677
File: packages/enclave-contracts/scripts/deployAndSave/naiveRegistryFilter.ts:30-31
Timestamp: 2025-09-11T13:09:03.800Z
Learning: In Hardhat v3 deployment scripts, use `(await signer.provider?.getNetwork())?.name ?? "localhost"` instead of `hre.globalOptions.network` to reliably get the network name, as `hre.globalOptions.network` can be undefined in some contexts.
Applied to files:
packages/enclave-contracts/scripts/deployEnclave.ts
📚 Learning: 2025-09-11T13:09:03.800Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 677
File: packages/enclave-contracts/scripts/deployAndSave/naiveRegistryFilter.ts:30-31
Timestamp: 2025-09-11T13:09:03.800Z
Learning: In Hardhat v3, hre.network.name is not available anymore. Use hre.globalOptions.network to get the network name instead.
Applied to files:
packages/enclave-contracts/scripts/deployEnclave.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: build_enclave_cli
- GitHub Check: test_contracts
- GitHub Check: test_net
- GitHub Check: rust_unit
- GitHub Check: build_sdk
- GitHub Check: build_e3_support_dev
- GitHub Check: integration_prebuild
- GitHub Check: build_e3_support_risc0
- GitHub Check: rust_integration
- GitHub Check: crisp_rust_unit
- GitHub Check: Build & Push Image
2de3907 to
4637c29
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
crates/evm-helpers/tests/integration.rs (1)
8-12: Clean up unused and redundant imports.Line 8 imports
BlockHeaderbut it's not used in the test. Line 11 imports theblock_listenermodule, which appears redundant sinceBlockListeneris already imported from it on line 12.Apply this diff to remove the unused imports:
-use alloy::consensus::BlockHeader; use alloy::providers::ext::AnvilApi; use alloy::{node_bindings::Anvil, providers::ProviderBuilder, sol}; -use e3_evm_helpers::block_listener; use e3_evm_helpers::{block_listener::BlockListener, event_listener::EventListener};
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
crates/evm-helpers/tests/integration.rs(2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2024-09-26T03:11:29.311Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 107
File: packages/ciphernode/sortition/src/distance.rs:1-1
Timestamp: 2024-09-26T03:11:29.311Z
Learning: In `packages/ciphernode/core/src/events.rs`, the import statements use the correct and updated `alloy::primitives` module.
Applied to files:
crates/evm-helpers/tests/integration.rs
📚 Learning: 2024-10-22T02:10:34.864Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 145
File: packages/ciphernode/tests/tests/test_aggregation_and_decryption.rs:82-83
Timestamp: 2024-10-22T02:10:34.864Z
Learning: In the file `packages/ciphernode/tests/tests/test_aggregation_and_decryption.rs`, when reviewing test functions like `generate_pk_share`, minor performance optimizations (e.g., minimizing mutex locks) are not a priority.
Applied to files:
crates/evm-helpers/tests/integration.rs
📚 Learning: 2025-10-27T15:37:59.138Z
Learnt from: ryardley
Repo: gnosisguild/enclave PR: 904
File: crates/net/src/bin/p2p_test.rs:22-45
Timestamp: 2025-10-27T15:37:59.138Z
Learning: In test files (especially integration test binaries like p2p_test.rs), suggesting correlation ID filtering for DHT events may be unnecessarily complex since test environments are typically more controlled and false positives are less of a concern.
Applied to files:
crates/evm-helpers/tests/integration.rs
🧬 Code graph analysis (1)
crates/evm-helpers/tests/integration.rs (1)
crates/evm-helpers/src/block_listener.rs (1)
new(24-29)
🔇 Additional comments (1)
crates/evm-helpers/tests/integration.rs (1)
210-252: Test relies on sleep-based synchronization, which may cause flakiness.The test uses fixed sleep durations (100ms on line 237 and 1s on line 243) to coordinate listener startup and block processing. This approach could lead to intermittent test failures in CI environments or under system load, as there's no guarantee the listener is ready after 100ms or that all blocks are processed within 1 second.
Consider using synchronization primitives instead of arbitrary sleeps. For example:
- Use a channel or condition variable to signal when the listener is ready
- Use a channel to wait for the expected number of block events before asserting
- Or implement a polling mechanism with a reasonable timeout
Example approach using a channel to signal readiness:
let (ready_tx, mut ready_rx) = tokio::sync::mpsc::channel::<()>(1); let events_handler = events.clone(); block_listener .add_block_handler(move |block| { let events = events_handler.clone(); let blockheight = block.number(); let ready_tx = ready_tx.clone(); async move { let mut events = events.lock().await; events.push(blockheight); // Signal when we've collected all expected blocks if events.len() == 5 { let _ = ready_tx.send(()).await; } Ok(()) } }) .await; // ... start listener ... provider.anvil_mine(Some(5), None).await?; // Wait for all blocks with a timeout tokio::time::timeout(Duration::from_secs(5), ready_rx.recv()).await??;This would make the test more deterministic and reliable.
⛔ Skipped due to learnings
Learnt from: ryardley Repo: gnosisguild/enclave PR: 170 File: packages/ciphernode/evm/tests/evm_reader.rs:63-63 Timestamp: 2024-11-05T03:56:22.254Z Learning: In the Rust test function `test_logs` in `packages/ciphernode/evm/tests/evm_reader.rs`, a sleep duration of 1 millisecond is sufficient for reliable event processing, even in CI environments.Learnt from: ryardley Repo: gnosisguild/enclave PR: 904 File: crates/net/src/bin/p2p_test.rs:22-45 Timestamp: 2025-10-27T15:37:59.138Z Learning: In test files (especially integration test binaries like p2p_test.rs), suggesting correlation ID filtering for DHT events may be unnecessarily complex since test environments are typically more controlled and false positives are less of a concern.Learnt from: ryardley Repo: gnosisguild/enclave PR: 145 File: packages/ciphernode/tests/tests/test_aggregation_and_decryption.rs:82-83 Timestamp: 2024-10-22T02:10:34.864Z Learning: In the file `packages/ciphernode/tests/tests/test_aggregation_and_decryption.rs`, when reviewing test functions like `generate_pk_share`, minor performance optimizations (e.g., minimizing mutex locks) are not a priority.
|
ok fixed! |
This is part of #1020
BlockListenerto listen for blocks with tests.ThresholdQueueas an abstraction to hold ordered events or callbacks to dispatch in order (can use this in ciphernodes too later)CallbackQueueto use theThresholdQueuefor holding callbacks.do_latermethod on the indexer ctx to register a future task using blocktime.Next steps:
Summary by CodeRabbit
New Features
Improvements
Chores
Tests
✏️ Tip: You can customize this high-level summary in your review settings.