This json serialization layer was only used in the old Monero ZMQ
interface, which no longer exists, and so this is just dead code.
On top of that, it doesn't work properly for serializing CLSAG
transactions, so just delete it.
adds both the Unstake methods
canRequestStakeUnlock(const std::string &sn_key)
requestStakeUnlock(const std::string &sn_key)
which will be used by the external wallets to interact with service
nodes
This adds support for directly signing a short string in the
command-line wallet. Usage:
[wallet T6T3FN]: sign_value hello
SigV1g5v5dQrMrr1BdSsw9mA6UUd4wvvzbwfw2QqzdnVYGN9uRDzuYfH6JHCPxVgdT1m3qAgXFS3CPeKcR1JwWDj39H8E
[wallet T6T3FN]: verify_value T6T3FNnRVvXDeck3BWLQ8NeLGUr4U3tuPPbcizdhUTyk7JY5YWExXA4d6kN2ZVuKB13TsYXBzdbvzQwpiGc8Zsi917GVuq8FK SigV1g5v5dQrMrr1BdSsw9mA6UUd4wvvzbwfw2QqzdnVYGN9uRDzuYfH6JHCPxVgdT1m3qAgXFS3CPeKcR1JwWDj39H8E hello
Good signature from T6T3FNnRVvXDeck3BWLQ8NeLGUr4U3tuPPbcizdhUTyk7JY5YWExXA4d6kN2ZVuKB13TsYXBzdbvzQwpiGc8Zsi917GVuq8FK
[wallet T6T3FN]: verify_value T6T3FNnRVvXDeck3BWLQ8NeLGUr4U3tuPPbcizdhUTyk7JY5YWExXA4d6kN2ZVuKB13TsYXBzdbvzQwpiGc8Zsi917GVuq8FK SigV1g5v5dQrMrr1BdSsw9mA6UUd4wvvzbwfw2QqzdnVYGN9uRDzuYfH6JHCPxVgdT1m3qAgXFS3CPeKcR1JwWDj39H8E hell
Error: Bad signature from T6T3FNnRVvXDeck3BWLQ8NeLGUr4U3tuPPbcizdhUTyk7JY5YWExXA4d6kN2ZVuKB13TsYXBzdbvzQwpiGc8Zsi917GVuq8FK
With the recent lokid rpc changes, the rpc-wallet-cli default bind ip
also inadvertently got changed in 8.1.3; this restores it to listen on
127.0.0.1 when not specified.
How this was written was fine if the data directory is an actual
directory, but it could fail if it was a symlink to a directory.
This commit adds an extra check for fs::is_directory() which works
through the symlink and thus avoids trying to create (and failing) in
such a case.
Fixes a couple of issues that can cause a segfault:
- we can get a shutdown callback double-scheduled, which would lead to a
segfault because we'd try freeing listening socket pointers that have
already been freed. Clear the variable properly so that if we get
called more than once we don't actually do anything.
- Don't store nullptr failed listen sockets. When uWebSockets fails to
bind it gives us a nullptr; we were storing this for some reason, but
shouldn't be (because later we try to dereference/free it). With the
recent change this started triggering much more frequently because the
build CIs don't have IPv6 (and so the optional bind to [::1]:22023 would
fail).
The RPC listening options inherited from Monero are a mess: this
overhauls them to support just two options:
--rpc-admin - takes an IP:PORT value to listen on (and can be
specified multiple times to listen on multiple IPs/ports)
--rpc-public - same as above, but the RPC will be restricted.
which allows you to listen on whatever IP/port you want in a much
simpler way.
This replaces all of:
--rpc-bind-ip
--rpc-bind-ipv6
--restricted-rpc
--rpc-use-ipv6
--rpc-ignore-ipv4
--rpc-bind-port
--rpc-restricted-bind-port
--confirm-external-bind
and preemptively also replaces Monero upstream's proposed future
argument:
--rpc-restricted-bind-ip
while being more flexible in every way.
For now the existing Monero options are still supported, but will
produce log warnings on startup when used. They will be removed in a
future major version upgrade (probably loki 9.x).
BUILD_GUI_DEPS was dumb: it should have just been a non-"all" target (as
it is now) that can be explicitly built, rather than misusing a cmake
option.
It was doing one useful thing, however, of turning on FORCE_USE_HEAP --
but that was wrong too, because that needs to be enabled when doing an
android build (and probably IOS as well).
- The long poll was not cancelled or joined, resulting in a segfault on
WalletImpl destruction.
- Reduce the 10s timer to 1s, and make it always apply (so that we can't
end up in a busy loop).