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

feat: smart retrier endpoint selection #4984

Merged
merged 4 commits into from
Jul 15, 2024
Merged

Conversation

kylezs
Copy link
Contributor

@kylezs kylezs commented Jun 19, 2024

Pull Request

Closes: PRO-1409

Checklist

Please conduct a thorough self-review before opening the PR.

  • I am confident that the code works.
  • I have updated documentation where appropriate.

Summary

The idea here is that we want to keep trying the secondary endpoint until a specified time (2 minutes) has elapsed. We then try the primary endpoint again to check it's online. If not, we try the backup again. Note that this is global to all requests for the chain - previously every request would start by trying the primary, but not it will try the currently preferred endpoint, and occassionally re-attempt the primary, as we want to bias towards the primary.

Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 99.40120% with 1 line in your changes missing coverage. Please review.

Project coverage is 72%. Comparing base (7972736) to head (19ad6d2).
Report is 15 commits behind head on main.

Files Patch % Lines
engine/src/retrier.rs 99% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##            main   #4984    +/-   ##
======================================
  Coverage     71%     72%            
======================================
  Files        429     431     +2     
  Lines      74082   74791   +709     
  Branches   74082   74791   +709     
======================================
+ Hits       52931   53542   +611     
- Misses     18315   18401    +86     
- Partials    2836    2848    +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kylezs kylezs force-pushed the feat/smart-endpoint-selection branch from b16a660 to c6183e6 Compare June 25, 2024 08:59
test: backup used after primary down
@kylezs kylezs force-pushed the feat/smart-endpoint-selection branch from c6183e6 to 82317f7 Compare June 25, 2024 09:01
@kylezs kylezs changed the title WIP: smart endpoint selection feat: smart retrier endpoint selection Jun 25, 2024
@kylezs kylezs marked this pull request as ready for review June 25, 2024 09:26
@kylezs kylezs added this pull request to the merge queue Jun 26, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 26, 2024
@kylezs kylezs added this pull request to the merge queue Jun 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 27, 2024
@kylezs kylezs added this pull request to the merge queue Jun 28, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jun 28, 2024
* chore: remove unused struct

* feat: smart endpoint selection

test: backup used after primary down

* chore: last tried -> last failed

* refactor: invert condition
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 28, 2024
@kylezs kylezs added this pull request to the merge queue Jun 28, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 28, 2024
@kylezs kylezs added this pull request to the merge queue Jul 15, 2024
Merged via the queue into main with commit 0615948 Jul 15, 2024
47 of 49 checks passed
@kylezs kylezs deleted the feat/smart-endpoint-selection branch July 15, 2024 09:37
syan095 added a commit that referenced this pull request Jul 23, 2024
…-ccm-checker

* origin/wip/solana-api:
  Feat/solana ccm gas limit (#5048)
  feat: return early if no client ready on retry limited requests (#5057)
  feature/PRO-1378/validator-gas-refund (#4962)
  chore: fix bug in merge that caused tests to fail
  chore: build binaries on Mac M2 Runner 🍎 (#5005)
  chore: remove unused spec versioned migration util (#5054)
  test: update integration tests
  feat(docker images): add `chainflip-node` probe scripts 🩺 (#5033)
  Feat: Make FoK constants configurable (#5024)
  fix: cp .so files to /usr/lib (#5051)
  chore: run gas_limit test by default
  fix: allow validators to deregister once they no longer have relevant key material (#5045)
  Feat: RPC lp total balances (#4951)
  fix: rpath name on 1.4.5 dylib (#5046)
  chore: remove cp dylibs from post check (#5044)
  feat: add primary/secondary label to RPC_RETRIER_TOTAL_REQUESTS metric (#5015)
  feat: smart retrier endpoint selection (#4984)
  refactor: move collected network fee to swapping pallet (#5014)
  feat: consistent broker api address strings (#5030)

# Conflicts:
#	foreign-chains/solana/sol-prim/src/consts.rs
#	state-chain/chains/src/sol/api.rs
#	state-chain/pallets/cf-swapping/src/lib.rs
#	state-chain/pallets/cf-swapping/src/mock.rs
#	state-chain/runtime/src/lib.rs
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.

2 participants