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

ingress-egress-tracker: add tx_ref to redis #4573

Merged
merged 11 commits into from
Mar 1, 2024
Merged

Conversation

marcellorigotti
Copy link
Contributor

Pull Request

Closes: PRO-1196

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

Added tx_ref to the ingress-egress-tracker

Non-Breaking changes

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 69.23077% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 72%. Comparing base (98937bc) to head (65285b1).
Report is 10 commits behind head on main.

Files Patch % Lines
engine/src/witness/btc.rs 40% 3 Missing ⚠️
state-chain/chains/src/btc/benchmarking.rs 0% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #4573   +/-   ##
=====================================
- Coverage     73%     72%   -0%     
=====================================
  Files        401     401           
  Lines      66735   66784   +49     
  Branches   66735   66784   +49     
=====================================
- Hits       48417   48408    -9     
- Misses     15974   16026   +52     
- Partials    2344    2350    +6     

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

enum TransactionRef {
Bitcoin { hash: String },
Ethereum { hash: H256 },
Polkadot { transaction_id: PolkadotTransactionId },
Copy link
Contributor

Choose a reason for hiding this comment

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

how would this get serialized?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

solved IRL

@marcellorigotti marcellorigotti marked this pull request as ready for review February 27, 2024 14:36
@marcellorigotti marcellorigotti requested a review from a team as a code owner February 27, 2024 14:36
@marcellorigotti marcellorigotti requested review from GabrielBuragev and acdibble and removed request for a team February 27, 2024 14:36
@marcellorigotti
Copy link
Contributor Author

We decided to make some changes to the way the tx_ref is reported back to the chain, will update this PR once the other one is up and merged (it is just an implementation detail nothing changes for you @niklasnatter )

@marcellorigotti
Copy link
Contributor Author

PR is updated and ready, with the latest changes made to transaction_succeeded extrinsic.

#[derive(Serialize)]
#[serde(untagged)]
enum TransactionRef {
Bitcoin { hash: String },
Copy link
Collaborator

Choose a reason for hiding this comment

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

@marcellorigotti
Explicit conversion to String is a bit of an anti-pattern. I think a better solution here is to use BitcoinTransactionHash and define Serialize on that struct. The serialization should reverse the byte order. Then we can use the same struct for the tx_ref and tx_out_id.

IMO this is less confusing than storing two different tx references.

@marcellorigotti marcellorigotti requested review from dandanlen and removed request for kylezs and AlastairHolmes February 29, 2024 12:22
@dandanlen dandanlen enabled auto-merge (squash) March 1, 2024 09:45
@dandanlen dandanlen merged commit 022015b into main Mar 1, 2024
40 checks passed
@dandanlen dandanlen deleted the feature/pro-1196 branch March 1, 2024 10:29
syan095 added a commit that referenced this pull request Mar 5, 2024
…utxo

* origin/main:
  fix: upgrade test pnpm install from commit (#4600)
  chore: add notification on failed release build (#4589)
  chore: add Zellic audit to Security.md (#4599)
  update changelog for 1.2.1 (#4597)
  fix: use correct pnpm deps for upgrade-test (#4596)
  chore(bouncer): Use stable sdk version (#4595)
  chore(bouncer): Update sdk to 1.2.1 (#4582)
  log meaningful message if docker login fails (#4553)
  Added bouncer command to download a runtime update from a proposal (#4592)
  chore: add asset to withdrawal event (#4590)
  ingress-egress-tracker: add tx_ref to redis (#4573)
  fix: remove tight bound for ingress fee on broker test (#4591)

# Conflicts:
#	state-chain/chains/src/btc.rs
syan095 added a commit that referenced this pull request Mar 7, 2024
…ncoding

* origin/main: (21 commits)
  chore: update chainspecs (#4615)
  feat: Add channel opening fee to *DepositAddressReady Events (#4609)
  refactor: pass out CFE incompatibility exit information to main (#4563)
  feat: Introduce tx fee multiplier storage item (#4594)
  fix: debug cli  (#4605)
  fix: patch 1.2 broker test (#4607)
  feat: add block height and deposit details to PrewitnessedDeposit (#4606)
  chore: add myself as codeowner to upgrade-test (#4603)
  fix: RUSTSEC-2024-0019 (#4604)
  fix: upgrade test pnpm install from commit (#4600)
  chore: add notification on failed release build (#4589)
  chore: add Zellic audit to Security.md (#4599)
  update changelog for 1.2.1 (#4597)
  fix: use correct pnpm deps for upgrade-test (#4596)
  chore(bouncer): Use stable sdk version (#4595)
  chore(bouncer): Update sdk to 1.2.1 (#4582)
  log meaningful message if docker login fails (#4553)
  Added bouncer command to download a runtime update from a proposal (#4592)
  chore: add asset to withdrawal event (#4590)
  ingress-egress-tracker: add tx_ref to redis (#4573)
  ...

# Conflicts:
#	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.

3 participants