Commit graph

13631 commits

Author SHA1 Message Date
Sean Darcy
b1d4921e24 Loads in real data to test if the transaction is signing correctly
The wallet needs to be fed a single output plus a sufficient number of
decoys. This transaction was run on the testnet and details were copied
into the test file.
2022-03-28 22:24:29 -04:00
Thomas Winget
eb8f4a51a6 add daemon comms submit tx endpoint
TODO: more complete response handling
2022-03-28 22:24:29 -04:00
Thomas Winget
e42cc7c79b fix wallet3 Output type mismatch 2022-03-28 22:24:29 -04:00
Thomas Winget
875b2570e5 fix mock_wallet after rebase mistake 2022-03-28 22:24:29 -04:00
Thomas Winget
aa5bd8ba26 add key derivation for outputs to scanner 2022-03-28 22:24:29 -04:00
Thomas Winget
56aa4f8caa transfer request parsing and some request syntax fixup
transfer request is a bit jank but unfortunately cannot be changed
in service of backwards compatibility.  epee strikes again...
2022-03-28 22:24:29 -04:00
Thomas Winget
f67c0f8c4b refactor wallet3 db usage
db usage all now abstracted rather than having sql lying around everywhere.

fix a couple minor bugs in tx construction logic.
2022-03-28 22:24:29 -04:00
Thomas Winget
28f20c72c1 Wallet3 design overview doc initial commit 2022-03-28 22:24:29 -04:00
Thomas Winget
e65cfb8ab6 wallet3 rpc initial commit
omq rpc intitialization; needs parameters

legacy rpc call definitions, descriptions, boilerplate, and addition
to omq rpc registry
2022-03-28 22:24:29 -04:00
Thomas Winget
a6c88e3a18 move and refactor common RPC code 2022-03-28 22:24:29 -04:00
Sean
dcd5d77677
Merge pull request #1522 from darcys22/bt-rpc-wallet
amend wallet2 and simple wallet to use bt-rpc definitions
2022-03-29 09:58:54 +11:00
Sean Darcy
37c213d7a6 SD review notes 2022-03-25 15:45:58 +11:00
Sean Darcy
bb82585f71 amend wallet2 and simple wallet to use bt-rpc definitions
This goes through the remaining code in wallet2 that needed updating to
utilise our newly defined json_rpc methods rather than epee
serialisation to call rpc methods.
2022-03-25 10:42:16 +11:00
Sean
8a66a526bc
Merge pull request #1520 from darcys22/transaction-signing
Transaction signing
2022-03-02 08:51:47 +11:00
Sean Darcy
44f565f085 basic structure for signing transactions
The keyring structure contains functions that will take a pending
transaction and fill out the cryptonote::transaction member with
the relevant signature fields ready for serialization.
2022-03-02 08:51:06 +11:00
Sean
3a1dfe3ea3
Merge pull request #1508 from darcys22/transaction-creation-select-decoys
Transaction creation select decoys
2022-01-24 15:44:57 +11:00
Sean Darcy
9b2265e408 decoy range 2022-01-05 14:24:23 +11:00
Sean Darcy
e109ac6f49 review notes 2022-01-05 13:26:30 +11:00
Sean Darcy
d7fe7646fc initial commit for decoy selection 2021-12-14 15:37:57 +11:00
Sean
f5d39a841e
Merge pull request #1504 from jagerman/avoid-temporary
Rewrite logic to avoid warning about binding a temporary
2021-12-07 13:52:53 +11:00
Sean Darcy
ae61454692 ffs 2021-12-07 13:13:39 +11:00
Sean
e98ade5c0f
Merge pull request #1502 from darcys22/transaction-creation
Calculate the fee based on the current pending transaction.
2021-12-07 13:11:32 +11:00
Sean Darcy
0ac65075eb Calculate the fee based on the current pending transaction.
When building the pending transaction we can call GetFee() to calculate
how much the transaction will cost. It takes a single parameter for the
number of inputs because we will want to specify how many when
estimating.

We then build a list of the potential fees for up to 300 inputs and pass
that to our output selection function which will use it to determine if
the outputs selected will be sufficient to cover the fees. This allows
us to know in advance how much the fees will be rather than trial and
error.
2021-12-07 13:10:32 +11:00
Jason Rhinelander
ca1121c850
Rewrite logic to avoid warning about binding a temporary
The for loop here is converting them binding to that temporary,
producing a compiler warning.  Clean it up.
2021-12-06 18:41:12 -04:00
Thomas Winget
b85c01ba60 rename wallet3 functions to be more in line with the rest of the codebase 2021-12-06 16:04:11 -05:00
Sean
089ddd0e72
Merge pull request #1499 from darcys22/transaction-creation
Transaction creation
2021-12-02 09:42:03 +11:00
Sean Darcy
25c4fd8a82 initial tx creation
The Transaction Constructor will be used to generate pending
transactions, depending on the type of transaction the pending
transaction class will allow the user to modify items such as tx type
(ONS for example) add additional data to the tx extra field, modify burn
amount etc before finalising the transaction which will select the
necessary outputs, mixins and calculate fees and change amounts. Once
finalised the pending transaction will be forwarded to a signing
structure for further action.
2021-12-02 08:59:05 +11:00
Thomas Winget
ecb62e8fab Wallet3 squashed initial commit
tx scanning for basic transactions working
  - TODO: subadresses.  The scanning code is there, but it does not
  currently know/care about any subaddresses.

daemon comms for basic syncing working

(multi-)wallet sync more or less working properly
  - seem to have a dangling shared_ptr somewhere when removing a wallet from
  daemon comms, so not working perfectly yet.

Lots of TODOs and cleanup needed, as well as further features of course.
2021-11-30 16:31:54 -05: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
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