Commit graph

13811 commits

Author SHA1 Message Date
Sean
9588055440
Merge pull request #1467 from jagerman/ledger-speculos
Ledger emulator (speculos) support
2021-11-17 15:58:36 +11:00
Sean Darcy
09aefc37c1 move nlohmann all to rpc 2021-11-15 16:11:18 +11:00
Sean Darcy
43489af3b5 ONS_OWNERS_TO_NAMES 2021-11-15 13:34:13 +11:00
Sean Darcy
8b3d2371bb GET_OUTPUT_HISTOGRAM 2021-11-15 10:38:37 +11:00
Sean Darcy
4013cb5115 GET_ALTERNATE_CHAINS 2021-11-12 15:59:40 +11:00
Sean Darcy
e206fd12ed GET_QUORUM_STATE 2021-11-12 13:38:34 +11:00
Sean Darcy
aa0427dbdb GET_SERVICE_NODE_REGISTRATION_CMD_RAW 2021-11-11 16:02:01 +11:00
Sean Darcy
cf8ecd2d17 delete bootstrap daemon 2021-11-11 14:35:17 +11:00
Sean Darcy
285e89ecda GET_BLOCK 2021-11-11 13:37:15 +11:00
Sean Darcy
129e6f204c GET_BLOCK_HEADER_BY_HEIGHT 2021-11-11 11:16:40 +11:00
Sean Darcy
32179ddd3e GET_BLOCK_HEADERS_RANGE 2021-11-11 10:13:30 +11:00
Sean Darcy
7d8189f7bb RELAY_TX 2021-11-09 13:19:53 +11:00
Sean Darcy
09d4baf63e GET_SERVICE_NODE_BLACKLISTED_KEY_IMAGES 2021-11-09 11:29:08 +11:00
Sean Darcy
c749c4b3e1 GET_SERVICE_PRIVKEYS 2021-11-08 16:26:32 +11:00
Sean Darcy
133e022aca GET_SERVICE_KEYS 2021-11-08 16:10:06 +11:00
Sean Darcy
a16a2d3949 GET_STAKING_REQUIREMENT 2021-11-08 15:42:56 +11:00
Sean Darcy
eedb23c545 GET_CHECKPOINTS 2021-11-08 14:54:43 +11:00
Sean Darcy
95f6c02d55 SETBANS 2021-11-08 10:16:42 +11:00
Sean Darcy
6651fdd33a GETBANS 2021-11-05 16:19:11 +11:00
Sean Darcy
d476f216cc GET_BLOCK_HEADER_BY_HASH 2021-11-05 15:21:38 +11:00
Sean Darcy
445fab4ac5 GET_LAST_BLOCK_HEADER 2021-11-05 14:12:29 +11:00
Sean Darcy
f549e3ffad Add entire range of udev rules 2021-11-05 09:39:16 +11:00
Jason Rhinelander
66311235e4
Merge pull request #1498 from jagerman/use-ghc-fs
Use fs::path instead of std::filesystem::path
2021-11-04 01:41:08 -03:00
Jason Rhinelander
972fe0de73 Stop using legacy ledger usb product id 2021-11-04 01:35:46 -03:00
Jason Rhinelander
06a9251f15 Add LedgerTCP hardware wallet support
This communicates with the Ledger over TCP, which is what the ledger
emulator requires.

To use, specify:

    --hw-device LedgerTCP --hw-device-address localhost:9999

to the wallet command-line arguments.
2021-11-04 01:35:46 -03:00
Jason Rhinelander
b8ecb6724c device: C++ cleanups and modernization
- Clean up a bunch of not very nice C and older C++ code in the
`device/` tree.

- Rename device/device_io_* source files to io_*, and remove their `_io`
suffix from the class names (since they are *already* inside an `io`
namespace).
2021-11-04 01:35:44 -03:00
Jason Rhinelander
7f7caadf4e Add short_duration for single-unit time printing 2021-11-04 01:33:42 -03:00
Thomas Winget
18016ded02 rebase fixups 2021-11-01 17:27:44 -04:00
Jason Rhinelander
040dcdd2db Various formatting fixes
- `/p`s should be `\p`s
- wrap long lines in new doc comments
- fix some grammar
- remove some duplicate comments
2021-11-01 17:08:57 -04:00
Sean Darcy
d5cb4a0ae7 FLUSH_CACHE 2021-11-01 17:08:57 -04:00
Sean Darcy
60db8271a9 TEST_TRIGGER_UPTIME_PROOF TEST_TRIGGER_P2P_RESYNC REPORT_PEER_STATUS 2021-11-01 17:08:57 -04:00
Sean Darcy
88904bc9a3 GET_SN_STATE_CHANGES 2021-11-01 17:08:57 -04:00
Sean Darcy
8f999ec785 PRUNE_BLOCKCHAIN 2021-11-01 17:08:57 -04:00
Sean Darcy
0fb605746a STORAGE_SERVER_PING and LOKINET_PING 2021-11-01 17:08:56 -04:00
Sean Darcy
8d1e9985f9 POP_BLOCKS 2021-11-01 17:08:56 -04:00
Sean Darcy
ef44031b79 OUT_PEERS and IN_PEERS 2021-11-01 17:08:56 -04:00
Sean Darcy
b16a744bf8 GET_BASE_FEE_ESTIMATE 2021-11-01 17:08:56 -04:00
Sean Darcy
53890cc1bc GET_COINBASE_TX_SUM 2021-11-01 17:08:56 -04:00
Sean Darcy
3b65462f40 GET_VERSION to new rpc 2021-11-01 17:08:56 -04:00
Sean Darcy
6f3f6a4836 FLUSH_TRANSACTION_POOL to new rpc format 2021-11-01 17:08:56 -04:00
Sean Darcy
bd56d537f5 BANNED to new RPC format 2021-11-01 17:08:56 -04:00
Sean Darcy
2a4ca2a50f make_request template instead of try_running 2021-11-01 17:08:56 -04:00
Sean Darcy
1c2a798bc9 set_log_level and set_log_categories to use new RPC 2021-11-01 17:08:56 -04:00
Jason Rhinelander
7551f5c137 Remove p2p rpc_port; p2p code clean-ups
The public rpc port code from Monero is not used on Oxen (we have no
ability to enable it because we didn't want it), but still carried
around and printed pointlessly.  This removes it entirely.

Along the way I ran into some really nasty p2p code using templates for
absolutely no reason at all, so I fixed that crap, and moved some p2p
serialization out of headers into a .cpp file.  (This only scratches the
surface, but as we're going to replace the p2p code entirely eventually
I don't want to waste time trying to polish a turd).
2021-11-01 17:08:56 -04:00
Jason Rhinelander
6c54ca6abd fix 2021-11-01 17:08:56 -04:00
Jason Rhinelander
ff0c76d7f3 RPC: +peerlist, -publicnodes
Updates GET_PEER_LIST to new RPC.

Removes GET_PUBLIC_NODES because we don't use this option at all in
oxend.  (At the point where we need a decentralized public node
repository we'll almost certainly want to use the service node network
to do it, not the p2p layer).
2021-11-01 17:08:56 -04:00
Jason Rhinelander
e1ef4a44e4 Remove external block generation/submission support
We have no need for any of this, so just remove it rather than convert
it.

(This doesn't drop block generation support, which we can still do via
start/stop mining calls, but rather just the ability to hook up an
external miner, which we are unlikely to ever need again).
2021-11-01 17:08:56 -04:00
Jason Rhinelander
c70545b18a RPC: GET_BLOCK_HASH updated
This endpoint has bizarre inputs and outputs, so this breaks
compatibility to make them sane.

Old:

    "height": [h]

where h must be exactly 1 height (yes, that 1 single height must be in a
list), and output is the raw hash as a string (no dict, etc. around it).

New in:

    "heights": [123, 456, ...]

Result:

    {
        "123": "hash123",
        "456": "hash456",
        "status": "OK"
    }
2021-11-01 17:08:56 -04:00
Jason Rhinelander
671a8ba0fe RPC: SUBMIT_TRANSACTION new rpc update
- Rename endpoint from "send_raw_transaction" to "submit_transaction"
  and rename the RPC struct similarly.

- Rename tx_as_hex to just tx, and start accepting it as hex, base64, or
  raw bytes.  (Transactions formats are consistent enough that we can
  easily tell which one we have from the first couple bytes).

- Drop `do_not_relay` parameter as I can see no purpose to ever
  submitting a transaction to a daemon that shouldn't be relayed.  (The
  only use I can see would be to try to exploit a PoW network with
  double-spends).

- Drop `do_sanity_checks` parameter; the checks done here should be (and
  are!) done by the wallet, not the oxend receiving the completed
  transaction.
2021-11-01 17:08:56 -04:00
Jason Rhinelander
59359b315e Zero-initialize RPC
Add some initializers and also make sure we zero initialize in case they
are forgotten in the future.
2021-11-01 17:08:56 -04:00