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

[Indexer-Grpc-V2] Add protos. #15701

Merged
merged 1 commit into from
Jan 13, 2025
Merged

[Indexer-Grpc-V2] Add protos. #15701

merged 1 commit into from
Jan 13, 2025

Conversation

grao1991
Copy link
Contributor

@grao1991 grao1991 commented Jan 9, 2025

Description

How Has This Been Tested?

Key Areas to Review

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Performance improvement
  • Refactoring
  • Dependency update
  • Documentation update
  • Tests

Which Components or Systems Does This Change Impact?

  • Validator Node
  • Full Node (API, Indexer, etc.)
  • Move/Aptos Virtual Machine
  • Aptos Framework
  • Aptos CLI/SDK
  • Developer Infrastructure
  • Move Compiler
  • Other (specify)

Checklist

  • I have read and followed the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I identified and added all stakeholders and component owners affected by this change as reviewers
  • I tested both happy and unhappy path of the functionality
  • I have made corresponding changes to the documentation

Copy link

trunk-io bot commented Jan 9, 2025

⏱️ 3h 5m total CI duration on this PR
Slowest 15 Jobs Cumulative Duration Recent Runs
execution-performance / single-node-performance 1h 10m 🟩🟥🟩
rust-move-tests 13m 🟩
rust-move-tests 13m 🟩
rust-move-tests 13m 🟩
forge-compat-test / forge 13m 🟩
test-target-determinator 11m 🟩🟩🟩
execution-performance / test-target-determinator 11m 🟩🟩🟩
rust-doc-tests 7m 🟩
rust-cargo-deny 7m 🟩🟩🟩🟩
check-dynamic-deps 6m 🟩🟩🟩🟩
fetch-last-released-docker-image-tag 6m 🟩🟩🟩
rust-doc-tests 5m 🟩
rust-doc-tests 5m 🟩
general-lints 2m 🟩🟩🟩🟩
semgrep/ci 2m 🟩🟩🟩🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

@grao1991 grao1991 enabled auto-merge (squash) January 9, 2025 23:27

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

import "aptos/transaction/v1/transaction.proto";
import "aptos/util/timestamp/timestamp.proto";

message StreamProgressSampleProto {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i feel Proto here is a little redundant; either remove or use unit something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use here because in the rust code I have a corresponding struct called StreamProgressSample. Just want to have a different name here.

@grao1991 grao1991 requested a review from larry-aptos January 10, 2025 22:07
}

message StreamProgress {
repeated StreamProgressSampleProto samples = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the intent behind collecting multiple samples here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calculate tps, etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sync'ed offline; for monitoring purpose.

optional StreamInfo stream_info = 3;
}

message FullnodeInfo {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should include validation here? like chain id?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Done.

@larry-aptos
Copy link
Contributor

overall looks good; some nits/questions.

Copy link
Contributor

@larry-aptos larry-aptos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a second pair of eyes 👀 overall looks good

@larry-aptos
Copy link
Contributor

also i see that the master address in the message; does election process leverage the proposed protos or you'll introduce new grpcs?

@grao1991
Copy link
Contributor Author

also i see that the master address in the message; does election process leverage the proposed protos or you'll introduce new grpcs?

It won't rely on this. (and based on the design review I will probably not implement it in the beginning, just configure one of them through config).

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@larry-aptos
Copy link
Contributor

you may need rebase

@grao1991
Copy link
Contributor Author

you may need rebase

Done

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Comment on lines +161 to +166
async fn ping(
&self,
_request: Request<PingFullnodeRequest>,
) -> Result<Response<PingFullnodeResponse>, Status> {
unimplemented!()
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using unimplemented!() will cause a panic at runtime. Consider returning a proper gRPC response instead:

Ok(Response::new(PingFullnodeResponse { info: None }))

This maintains the gRPC contract while indicating the endpoint is not yet implemented.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Copy link
Contributor

✅ Forge suite realistic_env_max_load success on 6580930bd04073ed7d6fb3835d6b870d63076dcb

two traffics test: inner traffic : committed: 14891.00 txn/s, latency: 2668.37 ms, (p50: 2700 ms, p70: 2700, p90: 3000 ms, p99: 3300 ms), latency samples: 5661880
two traffics test : committed: 99.96 txn/s, latency: 1432.57 ms, (p50: 1300 ms, p70: 1400, p90: 1500 ms, p99: 3100 ms), latency samples: 1640
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 1.524, avg: 1.399", "ConsensusProposalToOrdered: max: 0.288, avg: 0.287", "ConsensusOrderedToCommit: max: 0.301, avg: 0.291", "ConsensusProposalToCommit: max: 0.587, avg: 0.578"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.74s no progress at version 29148 (avg 0.19s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.54s no progress at version 2505965 (avg 0.54s) [limit 16].
Test Ok

This comment has been minimized.

Copy link
Contributor

✅ Forge suite compat success on 6593fb81261f25490ffddc2252a861c994234c2a ==> 6580930bd04073ed7d6fb3835d6b870d63076dcb

Compatibility test results for 6593fb81261f25490ffddc2252a861c994234c2a ==> 6580930bd04073ed7d6fb3835d6b870d63076dcb (PR)
1. Check liveness of validators at old version: 6593fb81261f25490ffddc2252a861c994234c2a
compatibility::simple-validator-upgrade::liveness-check : committed: 18225.39 txn/s, latency: 1918.90 ms, (p50: 2000 ms, p70: 2100, p90: 2200 ms, p99: 2200 ms), latency samples: 586080
2. Upgrading first Validator to new version: 6580930bd04073ed7d6fb3835d6b870d63076dcb
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 7506.78 txn/s, latency: 3995.27 ms, (p50: 4600 ms, p70: 4900, p90: 5200 ms, p99: 5300 ms), latency samples: 135520
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 7408.41 txn/s, latency: 4555.31 ms, (p50: 4900 ms, p70: 5100, p90: 5200 ms, p99: 5400 ms), latency samples: 248740
3. Upgrading rest of first batch to new version: 6580930bd04073ed7d6fb3835d6b870d63076dcb
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 7665.28 txn/s, latency: 3928.93 ms, (p50: 4500 ms, p70: 4700, p90: 4900 ms, p99: 4900 ms), latency samples: 143680
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 7313.15 txn/s, latency: 4499.40 ms, (p50: 4900 ms, p70: 4900, p90: 5000 ms, p99: 5100 ms), latency samples: 252500
4. upgrading second batch to new version: 6580930bd04073ed7d6fb3835d6b870d63076dcb
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 13316.38 txn/s, latency: 2174.24 ms, (p50: 2400 ms, p70: 2500, p90: 2900 ms, p99: 2900 ms), latency samples: 228380
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 13369.66 txn/s, latency: 2435.70 ms, (p50: 2400 ms, p70: 2800, p90: 2900 ms, p99: 3000 ms), latency samples: 430860
5. check swarm health
Compatibility test for 6593fb81261f25490ffddc2252a861c994234c2a ==> 6580930bd04073ed7d6fb3835d6b870d63076dcb passed
Test Ok

@grao1991 grao1991 merged commit 8f3d204 into main Jan 13, 2025
43 of 46 checks passed
@grao1991 grao1991 deleted the grao_proto branch January 13, 2025 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants