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
Initial tx history #1
Initial tx history #1
Conversation
src/seraphis_wallet/encrypt_file.h
Outdated
|
||
struct encrypted_file | ||
{ | ||
std::string encrypted_data; |
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.
Can you do a proofreading pass on this PR for whitespace inconsistencies? This file is 2-space indentation, while other files in seraphis_wallet are 4-space indentation...
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.
Ok. I tried to create a .clang-format file that mimics Seraphis style for those using VSCodium/VSCode. It should be better now. Though these specific files (encrypt_file.*) won't exist in the future probably. Also created another PR for that.
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.
(I dont expect any detailed comment. So please dont waste your time with that. It is just a draft showing the direction where it is going. I will make cleaner, more precise and correct the many errors I already see in the next weeks.) |
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.
Commented a first few things that caught my eye.
In general nice to see how the first pieces of the wallet get finally built now. Please keep it up :)
|
||
void make_serializable_sp_transaction_store_v1(const SpTransactionStoreV1 &tx_store, | ||
ser_SpTransactionStoreV1 &ser_tx_store) | ||
{ |
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.
ser_SpTransactionStoreV1
is a quite strange name.
It starts with a lowercase letter which looks quite strange to me.
It mixes two naming styles, using underscores to separate words, and camel case.
In the Seraphis library only few words within names are abbreviated, but here we have ser
instead of Serialized
.
I checked the "Serialization demo" files in the Seraphis library, and much to my surprise, that ser_
prefix was used by @UkoeHB there. Still, with the naming in the library usually so systematic and well thought-out, I wonder whether this ser_
is merely there because so far that code is only that, a demo.
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.
The ser_
prefix is intentional as a kind of 'modifier. The rest of the name is a copy-paste of the original struct name.
serializable_multimap<std::uint64_t, rct::key, std::greater<std::uint64_t>> offchain_txids; | ||
|
||
BEGIN_SERIALIZE_OBJECT() | ||
FIELD(tx_records) |
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.
Usually those FIELD
lines get indented 1 level, and that seems only logical to me: Technically BEGIN_SERIALIZE_OBJECT()
expands to a method, and those FIELD
s to statements within that method.
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.
Indenting does not improve readability here.
8914232
to
93cfda4
Compare
5cfe192
to
e87cd2e
Compare
…ment complexity for sp_proofs
e87cd2e
to
c04003a
Compare
(Still a draft as it needs a review, clean-up and it is failing the checks as it depends on @jeffro256's basic_wallet2 PR)
This PR contains the following:
Creation of Transaction History Component:
Creation of Legacy knowledge proofs from the wallet side:
Creation of Seraphis knowledge proofs from the wallet side:
Creation of the show enotes functions to provide useful visualization of enotes and to be able to create the knowledge proofs:
It creates/modifies the files:
encrypt_file.h (Temporary)
legacy_knowledge_proofs.h
I prefer the first one since it allows to recover the tx_key necessary for tx_proof_out. Here is a discussion about it.
sp_knowledge_proofs.h
serialization_types.h
transaction_history.h
show_enotes.h
show_transfers
.transaction_utils.h
JamtisDestination
to the string address (xmra1...))New tasks and opened issues: