generated from PaulRBerg/hardhat-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Failing test for historical events * Tidy up use statements * EVM Contracts listen for both live and historical events * Format * Format * Cache processed event_ids * Formatting * Formatting * Store last_block * Report last block to parent * Hook up last_block to reader * Tidy up test code * Refactor to push persistence to EvmEventReader * Tidy up dead code * Resume after shutdown test * Formatting * Neaten up test * Formatting * Hook start_block up to config * Formatting * Remove unnecessary Actor * Fix not loading snapshot(must have been using deduplication) * Add passing test for config * Formatting * Rename parent -> processor * Improve tracing transparency and fix config bug * Centralize logging tag/id * Tidy up instrument code and fix error * Formatting * Update packages/ciphernode/core/src/tag.rs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Formatting --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
90d33f9
commit dc7d047
Showing
50 changed files
with
1,310 additions
and
452 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//! Tag management for EVM event processing. | ||
//! | ||
//! This module provides thread-safe access to a global string tag that's used to | ||
//! differentiate between different EVM contract instances during event processing. | ||
//! The tag helps track and manage historical and live events for specific contracts. | ||
use std::sync::OnceLock; | ||
|
||
/// Global tag for contract event tracking with a default value of "_". | ||
/// This tag is initialized once and remains constant throughout the lifecycle | ||
/// of event processing to ensure consistent event tracking across restarts. | ||
static TAG: OnceLock<String> = OnceLock::new(); | ||
|
||
pub fn get_tag() -> String { | ||
TAG.get().cloned().unwrap_or_else(|| String::from("_")) | ||
} | ||
|
||
pub fn set_tag(new_tag: impl Into<String>) -> Result<(), &'static str> { | ||
TAG.set(new_tag.into()) | ||
.map_err(|_| "Tag has already been initialized") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.