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

Feature/signed contingent inputs #5

Draft
wants to merge 11 commits into
base: feature/mixed-transactions
Choose a base branch
from

Conversation

cbeck88
Copy link
Owner

@cbeck88 cbeck88 commented Apr 25, 2022

Second step of MCIP mobilecoinfoundation#31, which enables a secure atomic swap on chain

@cbeck88 cbeck88 self-assigned this Apr 25, 2022
@cbeck88 cbeck88 force-pushed the feature/mixed-transactions branch from 0037f82 to 71cd422 Compare April 26, 2022 01:18
@cbeck88 cbeck88 force-pushed the feature/signed-contingent-inputs branch 2 times, most recently from 4705a1f to 892f742 Compare April 27, 2022 03:33
jgreat and others added 11 commits April 27, 2022 12:06
* add workflow-dispatch placeholdes so we can run on other non-default branches

* add delete dispatch
…ecoinfoundation#1858)

* initial work on consensus config api endpoint

* add governors signature to config

* expose more configuration params

* minor edits

* try and fix go build

* Update consensus/api/proto/consensus_config.proto

Co-authored-by: Remoun Metyas <[email protected]>

* Update consensus/api/src/conversions.rs

Co-authored-by: Remoun Metyas <[email protected]>

Co-authored-by: Remoun Metyas <[email protected]>
* allow transactions with "mixed" token types

these are introduced at block version 3

the token type of every pseudo output and real output must be
listed in `pseudo_output_token_ids` and `output_token_ids` in the
`SignatureRctBulletproofs` object

* Update mobilecoind-json/src/data_types.rs

Co-authored-by: Remoun Metyas <[email protected]>

* Update mobilecoind-json/src/data_types.rs

Co-authored-by: Remoun Metyas <[email protected]>

* Update mobilecoind-json/src/data_types.rs

Co-authored-by: Remoun Metyas <[email protected]>

* cargo fmt

* fix mobilecoind-json conversions

* review comments

* fixups

* add more test coverage on mixed transactions

* add transaction builder support for mixed transactions, and tests

* fix the world

* don't, at this time, make mobilecoind start writing 0 value change

this should happen at the time of adding RTH support to mobilecoind

* eran comments

* Update transaction/core/src/ring_signature/error.rs

Co-authored-by: Remoun Metyas <[email protected]>

* more review comments

* Make a wrapper for u64 which serializes to json as string

this addresses review comments

* missing copyright

* more review comments

* more uses of `Amount::new`

* cleanup in transaction builder around Amount

* cleanup tx prefix around Amount

* cleanup input secret and output secret around Amount

* Update transaction/core/src/ring_signature/rct_bulletproofs.rs

Co-authored-by: Remoun Metyas <[email protected]>

* Update transaction/std/src/memo_builder/rth_memo_builder.rs

Co-authored-by: Remoun Metyas <[email protected]>

* Update transaction/std/src/transaction_builder.rs

Co-authored-by: Remoun Metyas <[email protected]>

* Update transaction/std/src/transaction_builder.rs

Co-authored-by: Remoun Metyas <[email protected]>

* Update transaction/std/src/transaction_builder.rs

Co-authored-by: Remoun Metyas <[email protected]>

* Update transaction/std/src/transaction_builder.rs

Co-authored-by: Remoun Metyas <[email protected]>

* Update transaction/std/src/transaction_builder.rs

Co-authored-by: Remoun Metyas <[email protected]>

* Update transaction/std/src/transaction_builder.rs

Co-authored-by: Remoun Metyas <[email protected]>

* Update consensus/service/src/validators.rs

Co-authored-by: Remoun Metyas <[email protected]>

* fix build

* JsonTokenId -> JsonU64, and code shortening in lots of places

* more JsonU64

* Update transaction/core/src/ring_signature/generator_cache.rs

Co-authored-by: Remoun Metyas <[email protected]>

* replace assert with error

* Make `TransactionBuilder::new(` take the fee `Amount`

this cleans up the constructor

* fix build

* fix clippy

* replace assert with error in another place

* fix a variable name, per review comments

* add a code comment about balance proofing after this mixed transactions stuff

* fixup code comment

* Update transaction/core/src/blockchain/block_version.rs

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

* Update transaction/core/src/ring_signature/rct_bulletproofs.rs

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

* Update transaction/std/src/transaction_builder.rs

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

* Update transaction/std/src/transaction_builder.rs

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

* Update transaction/std/src/transaction_builder.rs

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

* Update transaction/core/src/tx_error.rs

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

* Update transaction/core/src/ring_signature/rct_bulletproofs.rs

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

* improve code comment

* add code comments in external.proto

* add github issue references in sources

* cargo format of code comments

Co-authored-by: Remoun Metyas <[email protected]>
Co-authored-by: sugargoat <[email protected]>
This will be useful for testing the signed contingent inputs
@cbeck88 cbeck88 force-pushed the feature/signed-contingent-inputs branch from 892f742 to 18f1453 Compare April 27, 2022 23:51
cbeck88 pushed a commit that referenced this pull request Oct 26, 2023
mobilecoinfoundation#2062)

* added proper testing for sorted outputs for BlockVersion version 3 and higher

* linting fix

* linting fix #2

* linting fix #3

* linting fix #4

* linting fix #5

* removed mod crate

Co-authored-by: Eugene Rata <[email protected]>
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