-
Notifications
You must be signed in to change notification settings - Fork 21
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
FS-154 New TransactionId Derivation #1001
Conversation
… of first payload txo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1001 +/- ##
==========================================
- Coverage 60.12% 55.57% -4.56%
==========================================
Files 88 125 +37
Lines 12356 16517 +4161
Branches 2010 2840 +830
==========================================
+ Hits 7429 9179 +1750
- Misses 3238 5234 +1996
- Partials 1689 2104 +415 ☔ View full report in Codecov by Sentry. |
Motivation
transaction_log_ids
created by full-service are used to lookup records in thetransaction_log
within the local wallet database.Many third-party full-service clients expose this id to their users, expecting it to be the equivalent of other blockchain's transaction ids -- a hash that can be used to find evidence of the transaction on the blockchain itself.
Up until now, this has not been the case. While it was a 32 byte hash, represented as a 64 character hex string, the information being hashed included information private to the wallet database and so could not be used to find evidence of the transaction on the blockchain itself.
In this PR
This PR updates the algorithm for creating new
transaction_log_ids
(historical ids will remain unchanged) to use public blockchain information only. Specifically, we now use thepublic_key
of one of the transaction'spayload_txos
as thetransaction_log.id
for newly createdtransaction_log
entries. This will result in improved experiences for when thetransaction_log.id
is shared with end users and used by them to, for example, search for the transaction in the block-explorer.Meanwhile clients that use the
transaction_log.id
to look uptransaction_logs
can still use it the same as always.