Commit graph

13039 commits

Author SHA1 Message Date
Jason Rhinelander
9dd56bdc43 Print to stderr to not break | jq . 2020-11-26 23:55:04 -04:00
Jason Rhinelander
8e049e563a Fix encrypted connections in utils/lmq-rpc.py
- Added client key generation if no curve pubkey is specified
- Fixed missing import causing an error if you tried to specify an
x25519 privkey
2020-11-26 23:52:16 -04:00
Jason Rhinelander
b6a83a49a5
Merge pull request #1359 from jagerman/remove-obsolete-json-serialization
Remove obsolete json serialization
2020-11-23 18:15:05 -04:00
Jason Rhinelander
141e8c0084 Make static variable pack code less nasty
A function-local static variable made up of a local struct is just
nasty; replace it with a simpler static struct.
2020-11-23 17:22:53 -04:00
Jason Rhinelander
6fabd5b70c Remove obsolete JSON serialization
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.
2020-11-23 17:16:55 -04:00
Jason Rhinelander
77424b0edf 8.1.4 version bump 2020-11-19 22:56:17 -04:00
Jason Rhinelander
3dd6bbf2ba Add snapshot gui wallet builds + uploads 2020-11-19 22:54:42 -04:00
Jason Rhinelander
59dec4a51d Only compile cn_monero_hash on Android
This causes a ton of fake positive malware detections if it is build
into the binary, so just disable it on everything except Android.
2020-11-18 16:14:29 -04:00
Jason Rhinelander
075b5a18dd
Merge pull request #1352 from darcys22/1342-wallet-api-staking-methods
1342 wallet api staking methods
2020-11-18 16:11:48 -04:00
Sean Darcy
fbf6cab572 return api variables on heap 2020-11-18 10:00:20 +00:00
Jason Rhinelander
54b1b1be9d
Merge pull request #1350 from jagerman/string-signatures
Add inline string signatures and verification to cli wallet
2020-11-17 22:12:19 -04:00
Sean Darcy
6d0081a955 adjusted implementation of StakeUnlockResult 2020-11-17 10:09:10 +00:00
Sean Darcy
a7b60ff282 Add Unstake Methods to the Wallet API
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
2020-11-16 08:20:24 +00:00
Sean Darcy
581b0f1cd7 added staking definitions to wallet2 api 2020-11-15 12:22:45 +00:00
Sean Darcy
d667324c37 Added new staking commands to wallet api 2020-11-15 12:05:09 +00:00
Jason Rhinelander
2451b23d7d Format displayed signature nicely, with addr & value 2020-11-13 20:04:23 -04:00
Jason Rhinelander
eed58c918c Make signature validation messages green 2020-11-13 18:45:48 -04:00
Jason Rhinelander
4a57589215 Add support for signing strings in cli wallet
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
2020-11-13 18:45:48 -04:00
Jason Rhinelander
69db2f2a6e Remove obsolete comment 2020-11-13 18:45:48 -04:00
Jason Rhinelander
ce0d10fe89 Fix rpc wallet default bind ip
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.
2020-11-13 11:03:27 -04:00
Jason Rhinelander
1abd5e5547 Check before trying to create directory
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.
2020-11-12 17:05:09 -04:00
Jason Rhinelander
de7bad36c0 Misc fixes to lokid status output
Removes a space after the / in H/H, and add a missing % symbol.
2020-11-12 17:01:58 -04:00
Jason Rhinelander
f9c022ab5d Fix rpc commands invoked via lokid COMMAND
The wrong port was being used (because the new --rpc-admin value wasn't
being recognized), resulting in a connection failure.
2020-11-12 17:01:28 -04:00
Jason Rhinelander
8bcc0aa77e Print CI machine at beginning of build 2020-11-12 16:59:49 -04:00
Jason Rhinelander
4d8718692a Bump version 2020-11-11 15:18:34 -04:00
Jason Rhinelander
a49a2b4844
Merge pull request #1340 from jagerman/wallet-api-tx-fee-estimate
Add tx fee estimate to wallet api
2020-11-11 15:15:15 -04:00
Jason Rhinelander
cd5e49d06e Add tx fee estimate to wallet api
The estimate is crude, based on a 2kB tx size.
2020-11-10 15:46:02 -04:00
Jason Rhinelander
3cfe2d7a53
Merge pull request #1335 from jagerman/rpc-multi-bind
Overhaul http RPC command-line options and allow public+private listening
2020-11-06 21:15:23 -04:00
Jason Rhinelander
eb3da56452 Fix segfault in rpc shutdown
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).
2020-11-06 18:04:20 -04:00
Jason Rhinelander
8175e5e810 Run lokid test under gdb
Scripts for running under gdb + dumping a stack trace on problems from
lokinet.
2020-11-06 18:04:20 -04:00
Jason Rhinelander
d618d82ee4 Overhaul http rpc cli options
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).
2020-11-06 11:48:20 -04:00
Jason Rhinelander
6ce628266c Allow vector cli options to have defaults 2020-11-06 11:48:20 -04:00
Jason Rhinelander
864f891b4c
Merge pull request #1338 from jagerman/ios-build
iOS build automation and fixes
2020-11-06 11:43:58 -04:00
Jason Rhinelander
7f83c58c63 Merge arm/sim libs and collect headers in ios deps package 2020-11-06 00:41:28 -04:00
Jason Rhinelander
7d0eeeff06 Also build simulator library 2020-11-06 00:41:28 -04:00
Jason Rhinelander
acaf12c013 Build hack for curl 2020-11-06 00:41:28 -04:00
Jason Rhinelander
119ed3770a ios build hack for unbound 2020-11-06 00:41:28 -04:00
Jason Rhinelander
ca1a89ded0 Add ios build & upload
Also renames the android upload script to drone-android-blahblah to be
more consistent.
2020-11-06 00:41:28 -04:00
Jason Rhinelander
daaa8dbefd Lots of build hacks for iOS 2020-11-04 15:06:59 -04:00
Jason Rhinelander
8db38d6f23 Replace CMakeLists_IOS.txt hack job with proper toolchain file 2020-11-04 15:06:59 -04:00
Jason Rhinelander
46f4d4686f
Merge pull request #1337 from jagerman/android-build2
Android build
2020-11-04 14:40:42 -04:00
Jason Rhinelander
779c112611 Remove useless source directory pollution 2020-11-04 12:11:20 -04:00
Jason Rhinelander
a1674fb521 Downgrade libuv to 1.38.1
1.39 and 1.40 will not build on iOS.
2020-11-04 12:11:20 -04:00
Jason Rhinelander
b342f8e156 Update RandomX with jit-disabling support
The ARM64 JIT code does not compile or work on iOS.
2020-11-04 12:11:20 -04:00
Jason Rhinelander
1127ac51fd Remove BUILD_GUI_DEPS, enable FORCE_USE_HEAP on android
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).
2020-11-04 12:11:20 -04:00
Jason Rhinelander
6cf17d4d28 Clean up submodule commands 2020-11-04 12:11:20 -04:00
Jason Rhinelander
f6c4f478f6 Fix long poll thread handling in wallet_api
- 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).
2020-11-04 12:11:20 -04:00
Jason Rhinelander
792c658da4 Fix compiler over-optimization 2020-11-04 12:11:20 -04:00
Jason Rhinelander
53baadabcd Change create_address_file default to true
Android wallet wants this, apparently.
2020-11-04 12:11:20 -04:00
Doyle
f142f7d2c7 Add monero's original cn_slow_hash for android keystore hashing 2020-11-04 12:11:20 -04:00