Skip to content

seraphis_main: add validation helpers for legacy txs#37

Draft
jeffro256 wants to merge 26 commits intoUkoeHB:seraphis_libfrom
jeffro256:legacy_validation_context
Draft

seraphis_main: add validation helpers for legacy txs#37
jeffro256 wants to merge 26 commits intoUkoeHB:seraphis_libfrom
jeffro256:legacy_validation_context

Conversation

@jeffro256
Copy link
Copy Markdown

@jeffro256 jeffro256 commented Mar 4, 2024

No description provided.

@jeffro256 jeffro256 force-pushed the legacy_validation_context branch from a6bdc34 to e73335d Compare March 4, 2024 03:47
@UkoeHB
Copy link
Copy Markdown
Owner

UkoeHB commented Mar 5, 2024

Can you explain what the 'fork dependent' part is about and why it's necessary?

@jeffro256
Copy link
Copy Markdown
Author

jeffro256 commented Mar 5, 2024

cryptonote::transaction does not contain any explicit semantic rule reference inside the transaction, like SpTxSquashedV1 and SpTxCoinbaseV1 do. Instead, most of the static verification rules require a cryptonote fork version parameter to verify against (for example https://github.com/monero-project/monero/blob/7b7958bbd9d76375c47dc418b4adabba0f0b1785/src/cryptonote_basic/cryptonote_format_utils.cpp#L966). The new function validate_tx_semantics_fork_dependent<>() designates a spot for rule validation which depends on the cryptonote fork version, which will be used for legacy tx validation in the future.

An alternative approach would be to create a versioning framework for legacy txs, then infer the semantics rule version based on the content of the transactions, then simply use is_tx_version_allowed(), but that would make review work much harder IMO.

(This PR doesn't yet actually change any behavior)

@UkoeHB
Copy link
Copy Markdown
Owner

UkoeHB commented Mar 5, 2024

Ok, can you add a brief comment somewhere in this PR with what you just said?

UkoeHB and others added 23 commits March 6, 2024 02:44
…is_lib_hist_05_15_23 branch for commit history
make JamtisDestinationV1 serializable 

---------

Co-authored-by: DangerousFreedom <monero-inflation-checker@protonmail.com>
* add operator== to JamtisPaymentProposals

---------

Co-authored-by: DangerousFreedom <monero-inflation-checker@protonmail.com>\
* make JamtisPaymentProposal serializable

---------

Co-authored-by: DangerousFreedom <monero-inflation-checker@protonmail.com>
…tProposals (monero-project#24)

* modify construct_tx_for_mock_ledger_v1 so it outputs the JamtisPaymentProposals

---------

Co-authored-by: DangerousFreedom <monero-inflation-checker@protonmail.com>
* derive view_balance from master key

Co-authored-by: UkoeHB <37489173+UkoeHB@users.noreply.github.com>

---------

Co-authored-by: DangerousFreedom1984 <monero-inflation-checker@protonmail.com>
Co-authored-by: UkoeHB <37489173+UkoeHB@users.noreply.github.com>
@UkoeHB
Copy link
Copy Markdown
Owner

UkoeHB commented Mar 7, 2024

Needs rebase

@jeffro256 jeffro256 marked this pull request as draft March 11, 2024 22:51
@jeffro256 jeffro256 force-pushed the legacy_validation_context branch from 59e550c to 944bf7c Compare March 11, 2024 22:52
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.

4 participants