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

chore(bridge-withdrawer): cleanup nonce handling #1292

Merged
merged 6 commits into from
Jul 30, 2024

Conversation

ethanoroshiba
Copy link
Contributor

@ethanoroshiba ethanoroshiba commented Jul 24, 2024

Summary

Deduplicated and added metrics to get_pending_nonce(), fixed too many arguments in process_batch().

Background

Following #1215, get_pending_nonce() was present in both the bridge-withdrawer and submitter, in which the submitter's get_pending_nonce() also did not implement metrics. The submitter's process_batch() function also had a Clippy exception for too many arguments.

Changes

  • Deleted bridge_withdrawer/startup.rs: get_pending_nonce() and its helper function make_sequencer_grpc_retry_config.
  • Instead imported submitter/mod.rs: get_pending_nonce() and formatted accordingly.
  • Added optional metrics argument to submitter get_pending_nonce() to allow for it to be used in the bridge-withdrawer startup.
  • Added conditional metrics to get_pending_nonce(), as well as mutators within Metrics.
  • Moved process_batch() inside Submitter to allow for sharing of members between the two, cutting down arguments and removing Clippy exception.

Testing

Passes blackbox tests.

Metrics

  • Added nonce_fetch_count.
  • Added nonce_fetch_failure_count.
  • Added nonce_fetch_latency.

Related Issues

Closes #1272
Closes #1273
Closes #1274

@ethanoroshiba ethanoroshiba marked this pull request as ready for review July 24, 2024 19:25
@ethanoroshiba ethanoroshiba requested a review from a team as a code owner July 24, 2024 19:25
@SuperFluffy
Copy link
Member

Is this truly a breaking change? The PR title contains a !, but there is no entry in the PR body. (also this change does not sound like it would break anything)

@SuperFluffy SuperFluffy changed the title chore(bridge-withdrawer)!: Cleanup nonce handling from #1215 chore(bridge-withdrawer)!: cleanup nonce handling Jul 25, 2024
@ethanoroshiba ethanoroshiba changed the title chore(bridge-withdrawer)!: cleanup nonce handling chore(bridge-withdrawer): cleanup nonce handling Jul 25, 2024
@ethanoroshiba
Copy link
Contributor Author

Is this truly a breaking change? The PR title contains a !, but there is no entry in the PR body. (also this change does not sound like it would break anything)

Certainly not, wasn't up to speed on labeling so thanks for the correction!

@ethanoroshiba ethanoroshiba requested review from a team, joroshiba and noot as code owners July 29, 2024 15:58
@github-actions github-actions bot added documentation Improvements or additions to documentation ci issues that are related to ci and github workflows conductor pertaining to the astria-conductor crate proto pertaining to the Astria Protobuf spec sequencer pertaining to the astria-sequencer crate sequencer-relayer pertaining to the astria-sequencer-relayer crate composer pertaining to composer cd labels Jul 29, 2024
@ethanoroshiba ethanoroshiba force-pushed the eoroshiba/deduplicate_pending_nonce branch from ab37180 to 6a7cb1c Compare July 29, 2024 16:23
@ethanoroshiba ethanoroshiba removed documentation Improvements or additions to documentation ci issues that are related to ci and github workflows conductor pertaining to the astria-conductor crate proto pertaining to the Astria Protobuf spec sequencer pertaining to the astria-sequencer crate sequencer-relayer pertaining to the astria-sequencer-relayer crate labels Jul 29, 2024
@ethanoroshiba ethanoroshiba added bridge-withdrawer code touching the bridge-withdrawer service and removed composer pertaining to composer cd labels Jul 29, 2024
ethanoroshiba and others added 2 commits July 29, 2024 11:25
Co-authored-by: Fraser Hutchison <190532+Fraser999@users.noreply.github.com>
@ethanoroshiba ethanoroshiba removed request for a team, joroshiba and noot July 29, 2024 19:45
@ethanoroshiba ethanoroshiba added this pull request to the merge queue Jul 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 30, 2024
@ethanoroshiba ethanoroshiba added this pull request to the merge queue Jul 30, 2024
Merged via the queue into main with commit aed95e0 Jul 30, 2024
42 checks passed
@ethanoroshiba ethanoroshiba deleted the eoroshiba/deduplicate_pending_nonce branch July 30, 2024 21:04
steezeburger added a commit that referenced this pull request Aug 2, 2024
* main:
  chore(core): Implement Protobuf trait for tx actions (#1320)
  refactor(sequencer): remove global state (#1317)
  refactor(sequencer): move asset state methods to asset module (#1313)
  feat(sequencer, core): Add fee reporting (#1305)
  chore(bridge-withdrawer): cleanup nonce handling (#1292)
  fix(charts, bridge): fix ci test (#1310)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bridge-withdrawer code touching the bridge-withdrawer service
Projects
None yet
3 participants