Skip to content

Commit a56b641

Browse files
aptos-botAptos Botlarry-aptos
authored
Update aptos-protos to upstream branch 01-10-test_the_release (#91)
* Update aptos-protos to 33540e35bd9a83e79c8ffff737ca119e7ec9f7da * update the dependencies. * fix. * fix. * fix. --------- Co-authored-by: Aptos Bot <[email protected]> Co-authored-by: Larry Liu <[email protected]>
1 parent 604787e commit a56b641

File tree

8 files changed

+58
-92
lines changed

8 files changed

+58
-92
lines changed

.github/workflows/update-processor-sdk-version.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ name: Update Processor SDK Version
99
# Reason: if SDK version is not updated, no change will be picked up by processors.
1010
- aptos-indexer-processors-sdk/Cargo.toml
1111

12+
permissions:
13+
contents: read
14+
id-token: write
15+
1216
jobs:
1317
update-processor-sdk-version:
1418
runs-on: ubuntu-latest
@@ -19,8 +23,21 @@ jobs:
1923
contains(github.event.pull_request.labels.*.name, 'indexer-sdk-update')
2024
)
2125
steps:
26+
- id: auth
27+
uses: "google-github-actions/auth@v2"
28+
with:
29+
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
30+
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }}
31+
- name: Get Secret Manager Secrets
32+
id: secrets
33+
uses: 'google-github-actions/get-secretmanager-secrets@v2'
34+
with:
35+
secrets: |-
36+
token:aptos-ci/github-actions-repository-dispatch
2237
- name: Checkout code
2338
uses: actions/checkout@v4
39+
with:
40+
token: ${{ steps.secrets.outputs.token }}
2441
- name: Capture the commit hash
2542
id: commit_hash
2643
run: |
@@ -41,7 +58,7 @@ jobs:
4158
- name: Dispatch Event to processors Repo
4259
uses: peter-evans/[email protected]
4360
with:
44-
token: ${{ secrets.GITHUB_TOKEN }}
61+
token: ${{ steps.secrets.outputs.token }}
4562
repository: 'aptos-labs/aptos-indexer-processors'
4663
event-type: 'sdk-dependency-update'
4764
client-payload: '{"commit_hash": "${{ github.sha }}", "branch_name": "${{ steps.commit_hash.outputs.branch_name }}", "aptos_protos_commit_hash": ${{ steps.aptos_protos_commit_hash.outputs.aptos_protos_commit_hash }}}'

aptos-indexer-processors-sdk/Cargo.lock

Lines changed: 30 additions & 83 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aptos-indexer-processors-sdk/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ testing-framework = { path = "testing-framework" }
3131

3232
ahash = { version = "0.8.7", features = ["serde"] }
3333
anyhow = "1.0.86"
34-
aptos-protos = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "5c48aee129b5a141be2792ffa3d9bd0a1a61c9cb" }
34+
aptos-protos = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "6116af69aa173ca49e1761daabd6fe103fe2c65e" }
3535
aptos-system-utils = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "4541add3fd29826ec57f22658ca286d2d6134b93" }
3636
async-trait = "0.1.80"
3737
autometrics = { version = "1.0.1", features = ["prometheus-exporter"] }
@@ -78,7 +78,7 @@ once_cell = { version = "1.19.0" }
7878
petgraph = "0.6.5"
7979
prometheus = "0.13.3"
8080
prometheus-client = "0.22.2"
81-
prost = { version = "0.12.3", features = ["no-recursion-limit"] }
81+
prost = { version = "0.13.4", features = ["no-recursion-limit"] }
8282
rayon = "1.10.0"
8383
serde = { version = "1.0.193", features = ["derive", "rc"] }
8484
serde_json = { version = "1.0.81", features = ["preserve_order"] }
@@ -93,7 +93,7 @@ tracing = "0.1.34"
9393
tokio = { version = "1.37.0", features = ["full"] }
9494
tokio-retry = { version = "0.3.0" }
9595
toml = "0.7.4"
96-
tonic = { version = "0.11.0", features = [
96+
tonic = { version = "0.12.3", features = [
9797
"tls",
9898
"tls-roots",
9999
"transport",

aptos-indexer-processors-sdk/sdk/src/common_steps/write_rate_limit_step.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub struct WriteRateLimitConfig {
2222
pub num_seconds: u64,
2323
}
2424

25+
#[allow(clippy::too_long_first_doc_paragraph)]
2526
/// This step limits the number of bytes that can be written to the DB per second, based
2627
/// on a config specifying the number of bytes that can be written in a given number of
2728
/// seconds. See `WriteRateLimitConfig` for more.
@@ -145,6 +146,7 @@ impl<Input: Send + Sizeable + 'static> NamedStep for WriteRateLimitStep<Input> {
145146
}
146147
}
147148

149+
#[allow(clippy::too_long_first_doc_paragraph)]
148150
/// To use an item with `WriteRateLimitStep`, it must implement `Sizeable`. The intent
149151
/// of `WriteRateLimitStep` is to put an upper bound on the write load on the DB, so the
150152
/// implementation of this trait should reflect the size of the data in terms of what it

aptos-indexer-processors-sdk/sdk/src/utils/time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn parse_timestamp(ts: &Timestamp, version: i64) -> chrono::DateTime<Utc> {
1616
nanos: 0,
1717
}
1818
} else {
19-
ts.clone()
19+
*ts
2020
};
2121
chrono::DateTime::from_timestamp(final_ts.seconds, final_ts.nanos as u32)
2222
.unwrap_or_else(|| panic!("Could not parse timestamp {:?} for version {}", ts, version))

aptos-indexer-processors-sdk/transaction-stream/src/transaction_stream.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,10 +391,9 @@ impl TransactionStream {
391391
self.reconnection_retries = 0;
392392
let start_version = r.transactions.as_slice().first().unwrap().version;
393393
let start_txn_timestamp =
394-
r.transactions.as_slice().first().unwrap().timestamp.clone();
394+
r.transactions.as_slice().first().unwrap().timestamp;
395395
let end_version = r.transactions.as_slice().last().unwrap().version;
396-
let end_txn_timestamp =
397-
r.transactions.as_slice().last().unwrap().timestamp.clone();
396+
let end_txn_timestamp = r.transactions.as_slice().last().unwrap().timestamp;
398397

399398
let size_in_bytes = r.encoded_len() as u64;
400399
let chain_id: u64 = r

aptos-indexer-processors-sdk/transaction-stream/src/utils/additional_headers.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use serde::{Deserialize, Serialize};
33
use std::{collections::HashMap, str::FromStr};
44
use tonic::metadata::{Ascii, MetadataKey, MetadataMap, MetadataValue};
55

6+
#[allow(clippy::too_long_first_doc_paragraph)]
67
/// This struct holds additional headers that we attach to the request metadata.
78
/// Regarding serde, we just serialize this as we would a HashMap<String, String>.
89
/// Similarly, we expect that format when deserializing.

aptos-indexer-processors-sdk/transaction-stream/src/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub fn parse_timestamp(ts: &Timestamp, version: i64) -> chrono::DateTime<chrono:
1313
nanos: 0,
1414
}
1515
} else {
16-
ts.clone()
16+
*ts
1717
};
1818
chrono::DateTime::from_timestamp(final_ts.seconds, final_ts.nanos as u32)
1919
.unwrap_or_else(|| panic!("Could not parse timestamp {:?} for version {}", ts, version))

0 commit comments

Comments
 (0)