Compare commits

...

7 Commits

Author SHA1 Message Date
Some Random Crypto Guy
beffdd7ed9 fixed refresh height for testnet/stagenet; updated some DE translations; bumped version 2024-08-13 12:51:29 +01:00
Some Random Crypto Guy
91d52ba063 updated fast sync checkpoints; bumped version for BETA1 2024-08-12 11:27:30 +01:00
Some Random Crypto Guy
71d50f1b3f simplified blockchain height estimation, which should fix wallet restore height issue 2024-08-12 09:50:14 +01:00
Some Random Crypto Guy
1b0a1b6047 updated seed node IP addresses + port numbers 2024-08-12 09:49:32 +01:00
Some Random Crypto Guy
5a10a54563 changed seed URLs 2024-08-09 21:37:53 +01:00
Some Random Crypto Guy
2dfbcce6a4 possible fixes for 'make depends' build for Win64 2024-08-09 20:51:13 +01:00
Some Random Crypto Guy
9f34b46961 fixed wallet API to expose TX type to GUI wallet; updated Dockerfile 2024-08-09 16:03:18 +01:00
16 changed files with 108 additions and 79 deletions

View File

@@ -41,26 +41,26 @@ RUN set -ex && \
rm -rf /var/lib/apt
COPY --from=builder /src/build/x86_64-linux-gnu/release/bin /usr/local/bin/
# Create monero user
RUN adduser --system --group --disabled-password monero && \
mkdir -p /wallet /home/monero/.bitmonero && \
chown -R monero:monero /home/monero/.bitmonero && \
chown -R monero:monero /wallet
# Create salvium user
RUN adduser --system --group --disabled-password salvium && \
mkdir -p /wallet /home/salvium/.salvium && \
chown -R salvium:salvium /home/salvium/.salvium && \
chown -R salvium:salvium /wallet
# Contains the blockchain
VOLUME /home/monero/.bitmonero
VOLUME /home/salvium/.salvium
# Generate your wallet via accessing the container and run:
# cd /wallet
# monero-wallet-cli
# salvium-wallet-cli
VOLUME /wallet
EXPOSE 18080
EXPOSE 18081
EXPOSE 19080
EXPOSE 19081
# switch to user monero
USER monero
# switch to user salvium
USER salvium
ENTRYPOINT ["monerod"]
CMD ["--p2p-bind-ip=0.0.0.0", "--p2p-bind-port=18080", "--rpc-bind-ip=0.0.0.0", "--rpc-bind-port=18081", "--non-interactive", "--confirm-external-bind"]
ENTRYPOINT ["salviumd"]
CMD ["--p2p-bind-ip=0.0.0.0", "--p2p-bind-port=19080", "--rpc-bind-ip=0.0.0.0", "--rpc-bind-port=19081", "--non-interactive", "--confirm-external-bind"]

View File

@@ -1,4 +1,4 @@
mingw32_CFLAGS=-pipe
mingw32_CFLAGS=-pipe -pthread
mingw32_CXXFLAGS=$(mingw32_CFLAGS)
mingw32_ARFLAGS=cr

View File

@@ -5,7 +5,7 @@ $(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43
define $(package)_set_vars
$(package)_config_opts=--without-documentation --disable-shared --without-libsodium --disable-curve
$(package)_config_opts=--without-documentation --disable-shared --without-libsodium --disable-curve --with-cv-impl=pthread
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
$(package)_cxxflags=-std=c++11

Binary file not shown.

View File

@@ -6049,7 +6049,7 @@ void Blockchain::cancel()
}
#if defined(PER_BLOCK_CHECKPOINT)
static const char expected_block_hashes_hash[] = "df3f619804a92fdb4057192dc43dd748ea778adc52bc498ce80524c014b81119";
static const char expected_block_hashes_hash[] = "7f60b4980ea16b32e3f9fc1959d9d4116ba91f2b067bd70b3e21c44520096d14";
void Blockchain::load_compiled_in_block_hashes(const GetCheckpointsCallback& get_checkpoints)
{
if (get_checkpoints == nullptr || !m_fast_sync)

View File

@@ -299,10 +299,9 @@ namespace nodetool
private:
const std::vector<std::string> m_seed_nodes_list =
{ "seeds.moneroseeds.se"
, "seeds.moneroseeds.ae.org"
, "seeds.moneroseeds.ch"
, "seeds.moneroseeds.li"
{ "seed01.salvium.io"
, "seed02.salvium.io"
, "seed03.salvium.io"
};
bool islimitup=false;

View File

@@ -705,32 +705,24 @@ namespace nodetool
std::set<std::string> full_addrs;
if (m_nettype == cryptonote::TESTNET)
{
full_addrs.insert("176.9.0.187:28080");
full_addrs.insert("88.99.173.38:28080");
full_addrs.insert("51.79.173.165:28080");
full_addrs.insert("192.99.8.110:28080");
full_addrs.insert("37.187.74.171:28080");
full_addrs.insert("152.42.130.46:29080");
full_addrs.insert("45.55.138.87:29080");
full_addrs.insert("209.97.164.15:29080");
}
else if (m_nettype == cryptonote::STAGENET)
{
full_addrs.insert("176.9.0.187:38080");
full_addrs.insert("88.99.173.38:38080");
full_addrs.insert("51.79.173.165:38080");
full_addrs.insert("192.99.8.110:38080");
full_addrs.insert("37.187.74.171:38080");
full_addrs.insert("152.42.130.46:39080");
full_addrs.insert("45.55.138.87:39080");
full_addrs.insert("209.97.164.15:39080");
}
else if (m_nettype == cryptonote::FAKECHAIN)
{
}
else
{
full_addrs.insert("176.9.0.187:18080");
full_addrs.insert("88.198.163.90:18080");
full_addrs.insert("66.85.74.134:18080");
full_addrs.insert("88.99.173.38:18080");
full_addrs.insert("51.79.173.165:18080");
full_addrs.insert("192.99.8.110:18080");
full_addrs.insert("37.187.74.171:18080");
full_addrs.insert("152.42.130.46:19080");
full_addrs.insert("45.55.138.87:19080");
full_addrs.insert("209.97.164.15:19080");
}
return full_addrs;
}

View File

@@ -1,5 +1,5 @@
#define DEF_SALVIUM_VERSION_TAG "@VERSIONTAG@"
#define DEF_SALVIUM_VERSION "0.4.2"
#define DEF_SALVIUM_VERSION "0.4.4-beta2"
#define DEF_MONERO_VERSION_TAG "release"
#define DEF_MONERO_VERSION "0.18.3.3"
#define DEF_MONERO_RELEASE_NAME "Zero"

View File

@@ -150,6 +150,7 @@ void TransactionHistoryImpl::refresh()
ti->m_timestamp = pd.m_timestamp;
ti->m_confirmations = (wallet_height > pd.m_block_height) ? wallet_height - pd.m_block_height : 0;
ti->m_unlock_time = pd.m_unlock_time;
ti->m_type = static_cast<Monero::transaction_type>(static_cast<uint8_t>(pd.m_tx_type));
m_history.push_back(ti);
}
@@ -193,6 +194,7 @@ void TransactionHistoryImpl::refresh()
ti->m_label = pd.m_subaddr_indices.size() == 1 ? m_wallet->m_wallet->get_subaddress_label({pd.m_subaddr_account, *pd.m_subaddr_indices.begin()}) : "";
ti->m_timestamp = pd.m_timestamp;
ti->m_confirmations = (wallet_height > pd.m_block_height) ? wallet_height - pd.m_block_height : 0;
ti->m_type = static_cast<Monero::transaction_type>(static_cast<uint8_t>(pd.m_tx.type));
// single output transaction might contain multiple transfers
for (const auto &d: pd.m_dests) {
@@ -229,6 +231,7 @@ void TransactionHistoryImpl::refresh()
ti->m_label = pd.m_subaddr_indices.size() == 1 ? m_wallet->m_wallet->get_subaddress_label({pd.m_subaddr_account, *pd.m_subaddr_indices.begin()}) : "";
ti->m_timestamp = pd.m_timestamp;
ti->m_confirmations = 0;
ti->m_type = static_cast<Monero::transaction_type>(static_cast<uint8_t>(pd.m_tx.type));
for (const auto &d : pd.m_dests)
{
ti->m_transfers.push_back({d.amount, d.address(m_wallet->m_wallet->nettype(), pd.m_payment_id)});
@@ -258,6 +261,7 @@ void TransactionHistoryImpl::refresh()
ti->m_label = m_wallet->m_wallet->get_subaddress_label(pd.m_subaddr_index);
ti->m_timestamp = pd.m_timestamp;
ti->m_confirmations = 0;
ti->m_type = static_cast<Monero::transaction_type>(static_cast<uint8_t>(pd.m_tx_type));
m_history.push_back(ti);
LOG_PRINT_L1(__FUNCTION__ << ": Unconfirmed payment found " << pd.m_amount);

View File

@@ -149,4 +149,9 @@ uint64_t TransactionInfoImpl::unlockTime() const
return m_unlock_time;
}
Monero::transaction_type TransactionInfoImpl::type() const
{
return m_type;
}
} // namespace

View File

@@ -62,6 +62,7 @@ public:
virtual const std::vector<Transfer> &transfers() const override;
virtual uint64_t confirmations() const override;
virtual uint64_t unlockTime() const override;
virtual Monero::transaction_type type() const override;
private:
int m_direction;
@@ -81,6 +82,7 @@ private:
std::vector<Transfer> m_transfers;
uint64_t m_confirmations;
uint64_t m_unlock_time;
Monero::transaction_type m_type;
friend class TransactionHistoryImpl;

View File

@@ -49,7 +49,7 @@ enum NetworkType : uint8_t {
STAGENET
};
enum transaction_type {
enum transaction_type : uint8_t {
UNSET = 0,
MINER = 1,
PROTOCOL = 2,
@@ -233,6 +233,7 @@ struct TransactionInfo
virtual std::string paymentId() const = 0;
//! only applicable for output transactions
virtual const std::vector<Transfer> & transfers() const = 0;
virtual Monero::transaction_type type() const = 0;
};
/**
* @brief The TransactionHistory - interface for displaying transaction history

View File

@@ -13106,18 +13106,16 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err)
uint64_t wallet2::get_approximate_blockchain_height() const
{
// time of v2 fork
const time_t fork_time = m_nettype == TESTNET ? 1448285909 : m_nettype == STAGENET ? 1520937818 : 1458748658;
// v2 fork block
const uint64_t fork_block = m_nettype == TESTNET ? 624634 : m_nettype == STAGENET ? 32000 : 1009827;
if (m_nettype != MAINNET) return 0;
// time of v1 fork
const time_t fork_time = 1719997643;
// v1 fork block
const uint64_t fork_block = 0;
// avg seconds per block
const int seconds_per_block = DIFFICULTY_TARGET_V2;
// Calculated blockchain height
uint64_t approx_blockchain_height = fork_block + (time(NULL) - fork_time)/seconds_per_block;
// testnet and stagenet got some huge rollbacks, so the estimation is way off
static const uint64_t approximate_rolled_back_blocks = m_nettype == TESTNET ? 342100 : 30000;
if ((m_nettype == TESTNET || m_nettype == STAGENET) && approx_blockchain_height > approximate_rolled_back_blocks)
approx_blockchain_height -= approximate_rolled_back_blocks;
LOG_PRINT_L2("Calculated blockchain height: " << approx_blockchain_height);
return approx_blockchain_height;
}

View File

@@ -1442,37 +1442,37 @@
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="2282"/>
<source>Welcome to Monero, the private cryptocurrency.</source>
<translation>Willkommen bei Monero, der privaten Kryptowährung. </translation>
<source>Welcome to Salvium, the private cryptocurrency.</source>
<translation>Willkommen bei Salvium, der privaten Kryptowährung. </translation>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="2284"/>
<source>Monero, like Bitcoin, is a cryptocurrency. That is, it is digital money.</source>
<translation>Monero ist, wie Bitcoin, eine Kryptowährung. Also: digitales Geld.</translation>
<source>Salvium, like Bitcoin, is a cryptocurrency. That is, it is digital money.</source>
<translation>Salvium ist, wie Bitcoin, eine Kryptowährung. Also: digitales Geld.</translation>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="2288"/>
<source>Monero protects your privacy on the blockchain, and while Monero strives to improve all the time,</source>
<translation>Monero schützt deine Privatsphäre auf der Blockchain, und während Monero bestrebt ist, sich andauernd zu verbessern,</translation>
<source>Salvium protects your privacy on the blockchain, and while Salvium strives to improve all the time,</source>
<translation>Salvium schützt deine Privatsphäre auf der Blockchain, und während Salvium bestrebt ist, sich andauernd zu verbessern,</translation>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="2289"/>
<source>no privacy technology can be 100% perfect, Monero included.</source>
<translation>kann keine Privatsphärentechnologie hundertprozentig perfekt sein - Monero mit eingeschlossen.</translation>
<source>no privacy technology can be 100% perfect, Salvium included.</source>
<translation>kann keine Privatsphärentechnologie hundertprozentig perfekt sein - Salvium mit eingeschlossen.</translation>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="2290"/>
<source>Monero cannot protect you from malware, and it may not be as effective as we hope against powerful adversaries.</source>
<translation>Monero kann dich nicht vor bösartiger Software schützen, und es könnte nicht so effektiv gegen machtvolle Gegner sein, wie wir hoffen.</translation>
<source>Salvium cannot protect you from malware, and it may not be as effective as we hope against powerful adversaries.</source>
<translation>Salvium kann dich nicht vor bösartiger Software schützen, und es könnte nicht so effektiv gegen machtvolle Gegner sein, wie wir hoffen.</translation>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="2291"/>
<source>Flaws in Monero may be discovered in the future, and attacks may be developed to peek under some</source>
<source>Flaws in Salvium may be discovered in the future, and attacks may be developed to peek under some</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="2292"/>
<source>of the layers of privacy Monero provides. Be safe and practice defense in depth.</source>
<source>of the layers of privacy Salvium provides. Be safe and practice defense in depth.</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -1930,8 +1930,8 @@ Key Image, &quot;absolute&quot;, list of rings</source>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="3565"/>
<source>Prints basic info about Monero for first time users</source>
<translation>Drucke grundlegende Informationen über Monero für Erstnutzer</translation>
<source>Prints basic info about Salvium for first time users</source>
<translation>Drucke grundlegende Informationen über Salvium für Erstnutzer</translation>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="3569"/>
@@ -2008,7 +2008,7 @@ Key Image, &quot;absolute&quot;, list of rings</source>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="3694"/>
<source>monero, millinero, micronero, nanonero, piconero</source>
<translation>Monero, Millinero, Micronero, Nanonero, Piconero</translation>
<translation>Salvium, Millinero, Micronero, Nanonero, Piconero</translation>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="3695"/>
@@ -2648,9 +2648,9 @@ deine Wallet erneut zu synchronisieren (deine Wallet-Schlüssel sind in KEINEM F
auto-low-priority &lt;1|0&gt;
Whether to automatically use the low priority fee level when it&apos;s safe to do so.
segregate-pre-fork-outputs &lt;1|0&gt;
Set this if you intend to spend outputs on both Monero AND a key reusing fork.
Set this if you intend to spend outputs on both Salvium AND a key reusing fork.
key-reuse-mitigation2 &lt;1|0&gt;
Set this if you are not sure whether you will spend on a key reusing Monero fork later.
Set this if you are not sure whether you will spend on a key reusing Salvium fork later.
subaddress-lookahead &lt;major&gt;:&lt;minor&gt;
Set the lookahead sizes for the subaddress hash table.
segregation-height &lt;n&gt;
@@ -3294,7 +3294,7 @@ Get help about a subcommand with: help mms &lt;subcommand&gt;, or mms help &lt;s
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="3444"/>
<source>Set or modify authorized signer info (single-word label, transport address, Monero address), or list all signers</source>
<source>Set or modify authorized signer info (single-word label, transport address, Salvium address), or list all signers</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -3548,7 +3548,7 @@ By using &apos;sync&apos; processing of waiting messages with multisig sync info
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="4500"/>
<source>You are strongly encouraged to connect to the Monero network using your own daemon</source>
<source>You are strongly encouraged to connect to the Salvium network using your own daemon</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -3563,7 +3563,7 @@ By using &apos;sync&apos; processing of waiting messages with multisig sync info
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="4521"/>
<source>If you are new to Monero, type &quot;welcome&quot; for a brief overview.</source>
<source>If you are new to Salvium, type &quot;welcome&quot; for a brief overview.</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -3588,8 +3588,8 @@ By using &apos;sync&apos; processing of waiting messages with multisig sync info
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="5112"/>
<source>Background mining enabled. Thank you for supporting the Monero network.</source>
<translation>Hintergrund-Mining aktiviert. Danke, dass du das Monero-Netzwerk unterstützt.</translation>
<source>Background mining enabled. Thank you for supporting the Salvium network.</source>
<translation>Hintergrund-Mining aktiviert. Danke, dass du das Salvium-Netzwerk unterstützt.</translation>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="5140"/>
@@ -3610,7 +3610,7 @@ By using &apos;sync&apos; processing of waiting messages with multisig sync info
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="5181"/>
<source>Enabling this supports the network you are using, and makes you eligible for receiving new monero</source>
<translation>Indem du dies einschaltest, unterstützt du das von dir genutzte Netzwerk, und du bist dadurch berechtigt, neue Monero zu erhalten</translation>
<translation>Indem du dies einschaltest, unterstützt du das von dir genutzte Netzwerk, und du bist dadurch berechtigt, neue Salvium zu erhalten</translation>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="5186"/>
@@ -3651,7 +3651,7 @@ Eingabe &amp;llu/%llu (%s): Betrag=%s</translation>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="6168"/>
<source>I locked your Monero wallet to protect you while you were away</source>
<source>I locked your Salvium wallet to protect you while you were away</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -3693,7 +3693,7 @@ Eingabe &amp;llu/%llu (%s): Betrag=%s</translation>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="2285"/>
<source>Unlike Bitcoin, your Monero transactions and balance stay private and are not visible to the world by default.</source>
<source>Unlike Bitcoin, your Salvium transactions and balance stay private and are not visible to the world by default.</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -3703,7 +3703,7 @@ Eingabe &amp;llu/%llu (%s): Betrag=%s</translation>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="2294"/>
<source>Welcome to Monero and financial privacy. For more information see https://GetMonero.org</source>
<source>Welcome to Salvium and financial privacy. For more information see https://GetSalvium.org</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -4029,7 +4029,7 @@ This transaction (including %s change) will unlock on block %llu, in approximate
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="10320"/>
<source>Monero Address</source>
<source>Salvium Address</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -4141,12 +4141,12 @@ This transaction (including %s change) will unlock on block %llu, in approximate
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="10545"/>
<source>Invalid Monero address</source>
<source>Invalid Salvium address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="10552"/>
<source>Wallet state does not allow changing Monero addresses anymore</source>
<source>Wallet state does not allow changing Salvium addresses anymore</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -4525,7 +4525,7 @@ This transaction (including %s change) will unlock on block %llu, in approximate
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="7388"/>
<source>Donating %s %s to The Monero Project (donate.getmonero.org or %s).</source>
<source>Donating %s %s to The Salvium Project (donate.getmonero.org or %s).</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -5533,7 +5533,7 @@ Use &quot;mms note&quot; to display the waiting notes</source>
</message>
<message>
<location filename="../src/simplewallet/simplewallet.cpp" line="463"/>
<source> Monero Address = </source>
<source> Salvium Address = </source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -5681,7 +5681,7 @@ Use &quot;mms note&quot; to display the waiting notes</source>
<location filename="../src/simplewallet/simplewallet.cpp" line="10137"/>
<source>This is the command line monero wallet. It needs to connect to a monero
daemon to work correctly.
WARNING: Do not reuse your Monero keys on another fork, UNLESS this fork has key reuse mitigations built in. Doing so will harm your privacy.</source>
WARNING: Do not reuse your Salvium keys on another fork, UNLESS this fork has key reuse mitigations built in. Doing so will harm your privacy.</source>
<translation type="unfinished"></translation>
</message>
<message>

8
utils/conf/salviumd.conf Normal file
View File

@@ -0,0 +1,8 @@
# Configuration for salviumd
# Syntax: any command line option may be specified as 'clioptionname=value'.
# Boolean options such as 'no-igd' are specified as 'no-igd=1'.
# See 'salviumd --help' for all available options.
data-dir=/var/lib/salvium
log-file=/var/log/salvium/salvium.log
log-level=0

View File

@@ -0,0 +1,20 @@
[Unit]
Description=Salvium Full Node
After=network.target
[Service]
User=salvium
Group=salvium
WorkingDirectory=~
StateDirectory=salvium
LogsDirectory=salvium
Type=simple
ExecStart=/usr/bin/salviumd --config-file /etc/salviumd.conf --non-interactive
StandardOutput=null
StandardError=null
Restart=always
[Install]
WantedBy=multi-user.target