Compare commits

..

10 Commits

Author SHA1 Message Date
Some Random Crypto Guy
4b594142ca updated block fast sync checksums; disabled spend authority proof due to multisig; fixed issue in protocol_tx; bumped version 2024-12-17 20:06:54 +00:00
Some Random Crypto Guy
29e435bd39 added belt and braces to prevent CONVERT TXs from being attempted; integrated spend authority proof support into wallet; bumped version number 2024-12-16 14:07:37 +00:00
Some Random Crypto Guy
4abde92c1a bumped RC version 2024-12-16 09:18:47 +00:00
Some Random Crypto Guy
dd23331df9 switched to single spend authority proof - the dummy proofs don't work as intended, so dropping them 2024-12-16 09:16:34 +00:00
Some Random Crypto Guy
7d2025bc19 interim checkin 2024-12-16 07:48:16 +00:00
Some Random Crypto Guy
a01422a5e0 partial working serialisation 2024-12-15 22:28:14 +00:00
Some Random Crypto Guy
e68f7f46ed fixed check on miner-staker split 2024-12-15 11:50:14 +00:00
Some Random Crypto Guy
b87c243da1 fixed unit tests; fixed core tests; fixed performance tests; added fix to prevent change in block reward split (thanks Akil); added prelim code for spend authority proof - not complete / working 2024-12-15 11:09:46 +00:00
Some Random Crypto Guy
49fd907073 Merge branch 'main' into develop 2024-12-12 21:08:33 +00:00
Some Random Crypto Guy
8f5111aeda Merge branch 'main' into develop 2024-11-05 12:39:42 +00:00
8 changed files with 29 additions and 51 deletions

View File

@@ -109,7 +109,7 @@ jobs:
with:
name: ${{ matrix.toolchain.name }}
path: |
/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/build/${{ matrix.toolchain.host }}/release/bin/salvium-wallet-*
/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/build/${{ matrix.toolchain.host }}/release/bin/salvium-wallet-cli*
/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}/build/${{ matrix.toolchain.host }}/release/bin/salviumd*
- name: zip daemon & cli
run: |

View File

@@ -1,4 +1,4 @@
# Salvium Zero v0.7.2
# Salvium Zero v0.7.0-rc3
Copyright (c) 2023-2024, Salvium
Portions Copyright (c) 2014-2023, The Monero Project

View File

@@ -220,8 +220,6 @@
#define HF_VERSION_FULL_PROOFS 3
#define HF_VERSION_ENFORCE_FULL_PROOFS 4
#define HF_VERSION_REQUIRE_VIEW_TAGS 255
#define HF_VERSION_ENABLE_CONVERT 255
#define HF_VERSION_ENABLE_ORACLE 255

View File

@@ -1498,7 +1498,6 @@ bool Blockchain::validate_miner_transaction(const block& b, size_t cumulative_bl
case HF_VERSION_BULLETPROOF_PLUS:
case HF_VERSION_ENABLE_N_OUTS:
case HF_VERSION_FULL_PROOFS:
case HF_VERSION_ENFORCE_FULL_PROOFS:
if (b.miner_tx.amount_burnt > 0) {
CHECK_AND_ASSERT_MES(money_in_use + b.miner_tx.amount_burnt > money_in_use, false, "miner transaction is overflowed by amount_burnt");
money_in_use += b.miner_tx.amount_burnt;
@@ -3493,9 +3492,9 @@ bool Blockchain::check_tx_outputs(const transaction& tx, tx_verification_context
}
}
}
*/
// from v4, forbid invalid pubkeys
if (hf_version >= 1) {
if (hf_version >= 4) {
for (const auto &o: tx.vout) {
crypto::public_key output_public_key;
if (!get_output_public_key(o, output_public_key)) {
@@ -3508,7 +3507,7 @@ bool Blockchain::check_tx_outputs(const transaction& tx, tx_verification_context
}
}
}
/*
// from v8, allow bulletproofs
if (hf_version < 8) {
if (tx.version >= 2) {
@@ -3607,9 +3606,10 @@ bool Blockchain::check_tx_outputs(const transaction& tx, tx_verification_context
}
}
}
*/
// from v1, forbid bulletproofs
if (hf_version >= HF_VERSION_BULLETPROOF_PLUS) {
// from v16, forbid bulletproofs
if (hf_version > HF_VERSION_BULLETPROOF_PLUS) {
if (tx.version >= 2) {
const bool bulletproof = rct::is_rct_bulletproof(tx.rct_signatures.type);
if (bulletproof)
@@ -3620,19 +3620,11 @@ bool Blockchain::check_tx_outputs(const transaction& tx, tx_verification_context
}
}
}
*/
// from v4, only allow bulletproofs plus _with_ full proofs on RCT transactions
if (hf_version >= HF_VERSION_ENFORCE_FULL_PROOFS) {
if (tx.type == cryptonote::transaction_type::TRANSFER || tx.type == cryptonote::transaction_type::STAKE || tx.type == cryptonote::transaction_type::BURN || tx.type == cryptonote::transaction_type::CONVERT) {
if (hf_version >= HF_VERSION_FULL_PROOFS) {
if (tx.type == cryptonote::transaction_type::TRANSFER) {
if (tx.rct_signatures.type != rct::RCTTypeFullProofs) {
MERROR_VER("FullProofs required after v" + std::to_string(HF_VERSION_FULL_PROOFS));
tvc.m_invalid_output = true;
return false;
}
} else {
if (tx.rct_signatures.type != rct::RCTTypeNull) {
MERROR_VER("NULL RCT required for coinbase TXs after v" + std::to_string(HF_VERSION_FULL_PROOFS));
MERROR_VER("FullProofs required for TRANSFER TXs after v" + std::to_string(HF_VERSION_FULL_PROOFS));
tvc.m_invalid_output = true;
return false;
}
@@ -4051,17 +4043,6 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
// obviously, the original and simple rct APIs use a mixRing that's indexes
// in opposite orders, because it'd be too simple otherwise...
const rct::rctSig &rv = tx.rct_signatures;
// Check that after full proofs are enabled, the RCT version is set to enforce full proofs
if (hf_version >= HF_VERSION_ENFORCE_FULL_PROOFS)
{
if (rv.type != rct::RCTTypeNull && rv.type != rct::RCTTypeFullProofs)
{
MERROR_VER("Unsupported rct type (full proofs are required): " << rv.type);
return false;
}
}
switch (rv.type)
{
case rct::RCTTypeNull: {
@@ -4152,6 +4133,22 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
MERROR_VER("Unsupported rct type: " << rv.type);
return false;
}
// for bulletproofs, check they're only multi-output after v8
if (rct::is_rct_bulletproof(rv.type))
{
if (hf_version < 8)
{
for (const rct::Bulletproof &proof: rv.p.bulletproofs)
{
if (proof.V.size() > 1)
{
MERROR_VER("Multi output bulletproofs are invalid before v8");
return false;
}
}
}
}
}
return true;
}

View File

@@ -923,16 +923,6 @@ namespace cryptonote
if (tx_info[n].tx->version < 2)
continue;
const rct::rctSig &rv = tx_info[n].tx->rct_signatures;
const uint8_t hf_version = m_blockchain_storage.get_current_hard_fork_version();
if (hf_version >= HF_VERSION_ENFORCE_FULL_PROOFS) {
if (rv.type != rct::RCTTypeNull && rv.type != rct::RCTTypeFullProofs) {
MERROR_VER("Invalid RCT type provided");
set_semantics_failed(tx_info[n].tx_hash);
tx_info[n].tvc.m_verifivation_failed = true;
tx_info[n].result = false;
return false;
}
}
switch (rv.type) {
case rct::RCTTypeNull:
// coinbase should not come here, so we reject for all other types

View File

@@ -590,7 +590,6 @@ namespace cryptonote
case HF_VERSION_BULLETPROOF_PLUS:
case HF_VERSION_ENABLE_N_OUTS:
case HF_VERSION_FULL_PROOFS:
case HF_VERSION_ENFORCE_FULL_PROOFS:
// SRCG: subtract 20% that will be rewarded to staking users
CHECK_AND_ASSERT_MES(tx.amount_burnt == 0, false, "while creating outs: amount_burnt is nonzero");
tx.amount_burnt = amount / 5;

View File

@@ -36,13 +36,7 @@ const hardfork_t mainnet_hard_forks[] = {
{ 1, 1, 0, 1341378000 },
// version 2 starts from block 89800, which is on or around the 4th of November, 2024. Fork time finalised on 2024-10-21. No fork voting occurs for the v2 fork.
{ 2, 89800, 0, 1729518000 },
// version 3 starts from block 121100, which is on or around the 19th of December, 2024. Fork time finalised on 2024-12-18. No fork voting occurs for the v3 fork.
{ 3, 121100, 0, 1734516900 },
// version 4 starts from block 121100, which is on or around the 20th of December, 2024. Fork time finalised on 2024-12-19. No fork voting occurs for the v4 fork.
{ 4, 121800, 0, 1734607000 },
{ 2, 89800, 0, 1729518000 },
};
const size_t num_mainnet_hard_forks = sizeof(mainnet_hard_forks) / sizeof(mainnet_hard_forks[0]);
const uint64_t mainnet_hard_fork_version_1_till = ((uint64_t)-1);

View File

@@ -1,5 +1,5 @@
#define DEF_SALVIUM_VERSION_TAG "@VERSIONTAG@"
#define DEF_SALVIUM_VERSION "0.7.2"
#define DEF_SALVIUM_VERSION "0.7.0-rc4"
#define DEF_MONERO_VERSION_TAG "release"
#define DEF_MONERO_VERSION "0.18.3.3"
#define DEF_MONERO_RELEASE_NAME "Zero"