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

[Traffic Control] Support on bridge node #19291

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

williampsmith
Copy link
Contributor

@williampsmith williampsmith commented Sep 10, 2024

Description

Step 1 of adding traffic controller support in bridge node. This version only supports socket address based IPs. Followup PRs:

  • support x-forwarded-for configuration
  • authentication based schemes that do not rely on IP address at all
  • error code based error sampling distribution
  • endpoint based spam sampling distribution

Test plan

TODO (soon)


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • REST API:

Copy link

vercel bot commented Sep 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 1, 2024 7:20pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Oct 1, 2024 7:20pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Oct 1, 2024 7:20pm
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Oct 1, 2024 7:20pm


let (server_config, client_config) = config.validate(bridge_metrics.clone()).await?;
let traffic_controller = server_config.policy_config.map(|policy_config| {
Arc::new(TrafficController::spawn(
Copy link
Contributor

Choose a reason for hiding this comment

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

in a future PR, we will decide whether to spawn or init based on the actual acl policy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, once I merge and rebase on the other PR which introduces the spawn/init, this logic will no longer be valid since spawn should no longer be public, and will need to be replaced with init, which will do the right thing based on the policy

@@ -489,87 +547,154 @@ async fn handle_add_tokens_on_evm(
String,
String,
String,
)>,
)>,
Copy link
Contributor

Choose a reason for hiding this comment

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

revert?

@williampsmith williampsmith force-pushed the william/traffic-control-on-bridge-node branch from 64189ad to 78de8cc Compare September 20, 2024 19:04
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