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

Simplest MVP transaction filtering #398

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
180 changes: 143 additions & 37 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]
resolver = "2"

members = ["indexer-metrics", "moving-average", "processor", "server-framework"]
members = ["indexer-metrics", "moving-average", "processor", "server-framework", "transaction-filter"]
CapCap marked this conversation as resolved.
Show resolved Hide resolved

[workspace.package]
authors = ["Aptos Labs <[email protected]>"]
Expand Down Expand Up @@ -58,6 +58,7 @@ gcloud-sdk = { version = "0.20.4", features = [
"google-cloud-bigquery-storage-v1",
] }
cloud-storage = { version = "0.11.1", features = ["global-client"] }
derive_builder = "0.20.0"
google-cloud-googleapis = "0.10.0"
google-cloud-pubsub = "0.18.0"
hex = "0.4.3"
Expand All @@ -69,6 +70,8 @@ jemallocator = { version = "0.5.0", features = [
] }
kanal = { version = "0.1.0-pre8", features = ["async"] }
once_cell = "1.10.0"
# SIMD for string search
memchr = "2.7.2"
num_cpus = "1.16.0"
pbjson = "0.5.1"
prometheus = { version = "0.13.0", default-features = false }
Expand All @@ -83,11 +86,12 @@ reqwest = { version = "0.11.20", features = [
] }
serde = { version = "1.0.193", features = ["derive", "rc"] }
serde_json = { version = "1.0.81", features = ["preserve_order"] }
serde_yaml = "0.8.24"
serde_yaml = "0.9.34"
CapCap marked this conversation as resolved.
Show resolved Hide resolved
sha2 = "0.9.3"
sha3 = "0.9.1"
strum = { version = "0.24.1", features = ["derive"] }
tempfile = "3.3.0"
thiserror = "1.0.61"
toml = "0.7.4"
tracing-subscriber = { version = "0.3.17", features = ["json", "env-filter"] }
tiny-keccak = { version = "2.0.2", features = ["keccak", "sha3"] }
Expand Down
1 change: 0 additions & 1 deletion rust/processor/src/grpc_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ pub async fn get_stream(

let mut rpc_client = match connect_res {
Ok(client) => client
.accept_compressed(tonic::codec::CompressionEncoding::Gzip)
CapCap marked this conversation as resolved.
Show resolved Hide resolved
.accept_compressed(tonic::codec::CompressionEncoding::Zstd)
.send_compressed(tonic::codec::CompressionEncoding::Zstd)
.max_decoding_message_size(MAX_RESPONSE_SIZE)
Expand Down
5 changes: 4 additions & 1 deletion rust/processor/src/utils/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ pub struct MultisigPayloadClean {
}

/// Standardizes all addresses and table handles to be length 66 (0x-64 length hash)
#[inline]
pub fn standardize_address(handle: &str) -> String {
if let Some(handle) = handle.strip_prefix("0x") {
if handle.len() == 66 {
handle.to_string()
} else if let Some(handle) = handle.strip_prefix("0x") {
format!("0x{:0>64}", handle)
} else {
format!("0x{:0>64}", handle)
Expand Down
Loading
Loading