diff --git a/README.md b/README.md index 09c19914e..ad6f46d4f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Salvium Zero v0.9.0 +# Salvium Zero v0.9.1 Copyright (c) 2023-2024, Salvium Portions Copyright (c) 2014-2023, The Monero Project @@ -172,7 +172,7 @@ invokes cmake commands as needed. ```bash cd salvium - git checkout v0.9.0 + git checkout v0.9.1 make ``` @@ -251,7 +251,7 @@ Tested on a Raspberry Pi Zero with a clean install of minimal Raspbian Stretch ( ```bash git clone https://github.com/salvium/salvium cd salvium - git checkout v0.9.0 + git checkout v0.9.1 ``` * Build: @@ -370,10 +370,10 @@ application. cd salvium ``` -* If you would like a specific [version/tag](https://github.com/salvium/salvium/tags), do a git checkout for that version. eg. 'v0.9.0'. If you don't care about the version and just want binaries from master, skip this step: +* If you would like a specific [version/tag](https://github.com/salvium/salvium/tags), do a git checkout for that version. eg. 'v0.9.1'. If you don't care about the version and just want binaries from master, skip this step: ```bash - git checkout v0.9.0 + git checkout v0.9.1 ``` * If you are on a 64-bit system, run: diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp index e290832ab..935bfb1e2 100644 --- a/src/blockchain_db/lmdb/db_lmdb.cpp +++ b/src/blockchain_db/lmdb/db_lmdb.cpp @@ -215,7 +215,7 @@ namespace * yield_block_data block height {slippage_coins, locked_coins, lc_total, network_health} * yield_tx_data block height {txn hash, locked_coins, return_address} * - * audit_data block height {locked_coins, lc_total} + * audit_block_data block height {locked_coins, lc_total} * audit_tx_data block height {txn hash, locked_coins, return_address} * * Note: where the data items are of uniform size, DUPFIXED tables have diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index c5aab80e5..dbb5457ba 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -3951,6 +3951,20 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc, } } + if (tx.type == cryptonote::transaction_type::AUDIT) { + // Make sure we are supposed to accept AUDIT txs at this point + const std::map> audit_hard_forks = get_config(m_nettype).AUDIT_HARD_FORKS; + CHECK_AND_ASSERT_MES(audit_hard_forks.find(hf_version) != audit_hard_forks.end(), false, "trying to audit outside an audit fork"); + std::string expected_asset_type = audit_hard_forks.at(hf_version).first; + CHECK_AND_ASSERT_MES(tx.source_asset_type == expected_asset_type, false, "trying to spend " << tx.source_asset_type << " coins in an AUDIT TX"); + } else { + if (hf_version >= HF_VERSION_SALVIUM_ONE_PROOFS) { + CHECK_AND_ASSERT_MES(tx.source_asset_type == "SAL1", false, "trying to spend " << tx.source_asset_type << " coins in a non-AUDIT TX"); + } else { + CHECK_AND_ASSERT_MES(tx.source_asset_type == "SAL", false, "trying to spend " << tx.source_asset_type << " coins in a non-AUDIT TX"); + } + } + std::vector> pubkeys(tx.vin.size()); std::vector < uint64_t > results; results.resize(tx.vin.size(), 0); diff --git a/src/version.cpp.in b/src/version.cpp.in index 04dbe9a4a..bfd9dc5b3 100644 --- a/src/version.cpp.in +++ b/src/version.cpp.in @@ -1,5 +1,5 @@ #define DEF_SALVIUM_VERSION_TAG "@VERSIONTAG@" -#define DEF_SALVIUM_VERSION "0.9.0" +#define DEF_SALVIUM_VERSION "0.9.1" #define DEF_MONERO_VERSION_TAG "release" #define DEF_MONERO_VERSION "0.18.3.3" #define DEF_MONERO_RELEASE_NAME "Zero"