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

seraphis_main: add validation helpers for legacy txs #37

Draft
wants to merge 26 commits into
base: seraphis_lib
Choose a base branch
from

Conversation

jeffro256
Copy link

@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
Owner

UkoeHB commented Mar 5, 2024

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

@jeffro256
Copy link
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
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 <[email protected]>
* add operator== to JamtisPaymentProposals

---------

Co-authored-by: DangerousFreedom <[email protected]>\
* make JamtisPaymentProposal serializable

---------

Co-authored-by: DangerousFreedom <[email protected]>
…tProposals (monero-project#24)

* modify construct_tx_for_mock_ledger_v1 so it outputs the JamtisPaymentProposals

---------

Co-authored-by: DangerousFreedom <[email protected]>
* derive view_balance from master key

Co-authored-by: UkoeHB <[email protected]>

---------

Co-authored-by: DangerousFreedom1984 <[email protected]>
Co-authored-by: UkoeHB <[email protected]>
@UkoeHB
Copy link
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