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

Initial tx_history #13

Draft
wants to merge 22 commits into
base: seraphis_wallet
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e99b422
add key exchange round booster to multisig_account
UkoeHB Mar 3, 2022
0b10b72
seraphis mega squash commit [initial commit - 05/15/2023]; see seraph…
UkoeHB Sep 3, 2021
dbd8c9c
async: explicit task constructors
UkoeHB May 15, 2023
f3dda41
rebase fixes
UkoeHB May 16, 2023
fb30680
make JamtisDestinationV1 serializable (#11)
DangerousFreedom1984 Jun 8, 2023
7e9203f
compile fix
UkoeHB Jul 14, 2023
ea9fa07
clarify SpBasicEnoteRecordV1 docs; add async unit test for custom joins
UkoeHB Aug 31, 2023
eeca802
remove broken perf tests
UkoeHB Sep 10, 2023
0a14382
Merge pull request #9 from seraphis-migration/seraphis_lib
rbrunner7 Sep 22, 2023
ad1cb23
common: add Jamtis base32 encoding
jeffro256 Sep 10, 2023
d7e89f7
Merge pull request #6 from jeffro256/jamtis_base32_sm
rbrunner7 Sep 26, 2023
774fdb9
fix base32 unit_test with single quote
Sep 27, 2023
7b3443e
Merge pull request #10 from DangerousFreedom1984/base32_quotes
rbrunner7 Sep 29, 2023
3149f3b
seraphis_impl: jamtis base32 checksums
jeffro256 Sep 11, 2023
9f0a03c
Merge pull request #7 from jeffro256/jamtis_checksum_sm
rbrunner7 Sep 29, 2023
0a92514
add operator== to JamtisPaymentProposals (#18)
DangerousFreedom1984 Oct 18, 2023
8868b2d
make JamtisPaymentProposal serializable (#21)
DangerousFreedom1984 Oct 23, 2023
b6c52f0
util to convert legacy outputs to seraphis lib compatible enotes (#22)
j-berman Oct 24, 2023
f5915c6
container_helpers: is_sorted_and_unique 3x fewer comparison ops (#19)
Oct 24, 2023
702e5b1
Merge pull request #12 from seraphis-migration/seraphis_lib
rbrunner7 Oct 25, 2023
eafafc8
initial tx_history
Oct 28, 2023
1669933
remove encrypt_file
Oct 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make JamtisDestinationV1 serializable (#11)
make JamtisDestinationV1 serializable 

---------

Co-authored-by: DangerousFreedom <[email protected]>
DangerousFreedom1984 and DangerousFreedom authored Jun 8, 2023
commit fb3068016380f38aeb9c38d13ced43de57b06a1a
31 changes: 30 additions & 1 deletion src/seraphis_impl/serialization_demo_types.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2022, The Monero Project
// Copyright (c) 2023, The Monero Project
//
// All rights reserved.
//
@@ -36,6 +36,7 @@
#include "ringct/rctTypes.h"
#include "seraphis_core/binned_reference_set.h"
#include "seraphis_core/discretized_fee.h"
#include "seraphis_core/jamtis_destination.h"
#include "seraphis_core/jamtis_support_types.h"
#include "serialization/containers.h"
#include "serialization/crypto.h"
@@ -56,6 +57,12 @@ namespace sp
namespace serialization
{

/// serializable jamtis::address_tag_t
struct ser_address_tag_t final
{
unsigned char bytes[sizeof(jamtis::address_tag_t)];
};

/// serializable jamtis::encrypted_address_tag_t
struct ser_encrypted_address_tag_t final
{
@@ -406,8 +413,30 @@ struct ser_SpTxSquashedV1 final
END_SERIALIZE()
};

/// serializable JamtisDestinationV1
struct ser_JamtisDestinationV1 final
{
/// K_1 (address spend key)
rct::key addr_K1;
/// xK_2 (address view key)
crypto::x25519_pubkey addr_K2;
/// xK_3 (DH base key)
crypto::x25519_pubkey addr_K3;
/// addr_tag
ser_address_tag_t addr_tag;

BEGIN_SERIALIZE()
FIELD(addr_K1)
FIELD(addr_K2)
FIELD(addr_K3)
FIELD(addr_tag) static_assert(sizeof(addr_tag) == sizeof(jamtis::address_tag_t), "");
END_SERIALIZE()
};


} //namespace serialization
} //namespace sp

BLOB_SERIALIZER(sp::serialization::ser_address_tag_t);
BLOB_SERIALIZER(sp::serialization::ser_encrypted_address_tag_t);
BLOB_SERIALIZER(sp::serialization::ser_encoded_amount_t);
23 changes: 22 additions & 1 deletion src/seraphis_impl/serialization_demo_utils.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2022, The Monero Project
// Copyright (c) 2023, The Monero Project
//
// All rights reserved.
//
@@ -36,6 +36,7 @@
#include "ringct/rctTypes.h"
#include "seraphis_core/binned_reference_set.h"
#include "seraphis_core/discretized_fee.h"
#include "seraphis_core/jamtis_destination.h"
#include "seraphis_crypto/bulletproofs_plus2.h"
#include "seraphis_crypto/grootle.h"
#include "seraphis_crypto/sp_composition_proof.h"
@@ -389,6 +390,16 @@ void make_serializable_sp_tx_squashed_v1(const SpTxSquashedV1 &tx, ser_SpTxSquas
make_serializable_discretized_fee(tx.tx_fee, serializable_tx_out.tx_fee);
}
//-------------------------------------------------------------------------------------------------------------------
void make_serializable_sp_destination_v1(const jamtis::JamtisDestinationV1 &dest, ser_JamtisDestinationV1 &serializable_dest_out)
{
serializable_dest_out.addr_K1 = dest.addr_K1;
serializable_dest_out.addr_K2 = dest.addr_K2;
serializable_dest_out.addr_K3 = dest.addr_K3;
memcpy(serializable_dest_out.addr_tag.bytes,
dest.addr_tag.bytes,
sizeof(dest.addr_tag));
}
//-------------------------------------------------------------------------------------------------------------------

//-------------------------------------------------------------------------------------------------------------------
void recover_bpp2(ser_BulletproofPlus2_PARTIAL &serializable_bpp2_in,
@@ -680,5 +691,15 @@ bool try_recover_sp_tx_squashed_v1(ser_SpTxSquashedV1 &serializable_tx_in, SpTxS
return true;
}
//-------------------------------------------------------------------------------------------------------------------
void recover_sp_destination_v1(const ser_JamtisDestinationV1 &serializable_destination, jamtis::JamtisDestinationV1 &dest_out)
{
dest_out.addr_K1 = serializable_destination.addr_K1;
dest_out.addr_K2 = serializable_destination.addr_K2;
dest_out.addr_K3 = serializable_destination.addr_K3;
memcpy(dest_out.addr_tag.bytes,
serializable_destination.addr_tag.bytes,
sizeof(serializable_destination.addr_tag));
}
//-------------------------------------------------------------------------------------------------------------------
} //namespace serialization
} //namespace sp
5 changes: 4 additions & 1 deletion src/seraphis_impl/serialization_demo_utils.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2022, The Monero Project
// Copyright (c) 2023, The Monero Project
//
// All rights reserved.
//
@@ -38,6 +38,7 @@
#include "ringct/rctTypes.h"
#include "seraphis_core/binned_reference_set.h"
#include "seraphis_core/discretized_fee.h"
#include "seraphis_core/jamtis_destination.h"
#include "seraphis_core/sp_core_types.h"
#include "seraphis_impl/serialization_demo_types.h"
#include "seraphis_main/tx_component_types.h"
@@ -135,6 +136,7 @@ void make_serializable_discretized_fee(const DiscretizedFee discretized_fee,
unsigned char &serializable_discretized_fee_out);
void make_serializable_sp_tx_coinbase_v1(const SpTxCoinbaseV1 &tx, ser_SpTxCoinbaseV1 &serializable_tx_out);
void make_serializable_sp_tx_squashed_v1(const SpTxSquashedV1 &tx, ser_SpTxSquashedV1 &serializable_tx_out);
void make_serializable_sp_destination_v1(const jamtis::JamtisDestinationV1 &dest, ser_JamtisDestinationV1 &serializable_dest_out);
/**
* brief: recover_* - convert a serializable object back into its normal object parent
* param: serializable_object_in - serializable object to be consumed (destructive: may be left in an unusable state)
@@ -186,6 +188,7 @@ bool try_recover_sp_tx_squashed_v1(ser_SpTxSquashedV1 &serializable_tx_in,
const std::size_t sp_ref_set_decomp_m,
SpTxSquashedV1 &tx_out);
bool try_recover_sp_tx_squashed_v1(ser_SpTxSquashedV1 &serializable_tx_in, SpTxSquashedV1 &tx_out);
void recover_sp_destination_v1(const ser_JamtisDestinationV1 &serializable_destination, jamtis::JamtisDestinationV1 &dest_out);

} //namespace serialization
} //namespace sp