Commit graph

962 commits

Author SHA1 Message Date
moneromooo-monero
06f77c9b9b simplewallet: tell the user to complain to the recipient
for long payment ids
2019-02-20 17:09:17 +11:00
Doyle
43436b081d
Infinite Staking Part 2 (#406)
* Cleanup and undoing some protocol breakages

* Simplify expiration of nodes

* Request unlock schedules entire node for expiration

* Fix off by one in expiring nodes

* Undo expiring code for pre v10 nodes

* Fix RPC returning register as unlock height and not checking 0

* Rename key image unlock height const

* Undo testnet hardfork debug changes

* Remove is_type for get_type, fix missing var rename

* Move serialisable data into public namespace

* Serialise tx types properly

* Fix typo in no service node known msg

* Code review

* Fix == to >= on serialising tx type

* Code review 2

* Fix tests and key image unlock

* Add command to print locked key images

* Update ui to display lock stakes, query in print cmd blacklist

* Modify print stakes to be less slow

* Remove autostaking code

* Refactor staking into sweep functions

It appears staking was derived off stake_main written separately at
implementation at the beginning. This merges them back into a common
code path, after removing autostake there's only some minor differences.

It also makes sure that any changes to sweeping upstream are going to be
considered in the staking process which we want.

* Display unlock height for stakes

* Begin creating output blacklist

* Make blacklist output a migration step

* Implement get_output_blacklist for lmdb

* In wallet output selection ignore blacklisted outputs

* Apply blacklisted outputs to output selection

* Fix broken tests, switch key image unlock

* Fix broken unit_tests

* Begin change to limit locked key images to 4 globally

* Revamp prepare registration for new min contribution rules

* Fix up old back case in prepare registration

* Remove debug code

* Cleanup debug code and some unecessary changes

* Fix migration step on mainnet db

* Fix blacklist outputs for pre-existing DB's

* Remove irrelevant note

* Tweak scanning addresses for locked stakes

Since we only now allow contributions from the primary address we can
skip checking all subaddress + lookahead to speed up wallet scanning

* Define macro for SCNu64 for Mingw

* Fix failure on empty DB

* Add missing error msg, remove contributor from stake

* Improve staking messages

* Flush prompt to always display

* Return the msg from stake failure and fix stake parsing error

* Tweak fork rules for smaller bulletproofs

* Tweak pooled nodes minimum amounts

* Fix crash on exit, there's no need to store on destructor

Since all information about service nodes is derived from the blockchain
and we store state every time we receive a block, storing in the
destructor is redundant as there is no new information to store.

* Make prompt be consistent with CLI

* Check max number of key images from per user to node

* Implement error message on get_output_blacklist failure

* Remove resolved TODO's/comments

* Handle infinite staking in print_sn

* Atoi->strtol, fix prepare_registration, virtual override, stale msgs
2019-02-14 12:12:57 +11:00
doy-lee
813897e229 Fix layout putting prompt yes/no on new line
Remove extra space at front of yes/no prompt
2019-02-05 13:13:55 +11:00
doy-lee
bebecbd0a6 Merge branch 'dev' into LokiMergeUpstream 2019-01-30 16:59:47 +11:00
doy-lee
245c4b3ba0 Merge commit '4f104a0' into LokiMergeUpstream 2019-01-30 15:03:46 +11:00
doy-lee
ac4d0469bf Merge commit '4a0e4c7' into LokiMergeUpstream 2019-01-30 12:04:20 +11:00
doy-lee
aaa1966e10 Merge commit '4e72384' into LokiMergeUpstream 2019-01-30 11:15:46 +11:00
doy-lee
d0bab8e6f5 Merge commit '13b1297' into LokiMergeUpstream 2019-01-29 20:11:17 +11:00
Riccardo Spagni
756ed760f7
Merge pull request #5056
8258a9e7 wallet: do not check txpool in background mode (moneromooo-monero)
2019-01-28 21:27:34 +02:00
Doyle
3a7b6b59eb
Infinite Staking Part 1 (#387)
* Remove dead branches in hot-path check_tx_inputs

Also renames #define for mixins to better match naming convention

* Shuffle around some more code into common branches

* Fix min/max tx version rules, since there 1 tx v2 on v9 fork

* First draft infinite staking implementation

* Actually generate the right key image and expire appropriately

* Add framework to lock key images after expiry

* Return locked key images for nodes, add request unlock option

* Introduce transaction types for key image unlock

* Update validation steps to accept tx types, key_image_unlock

* Add mapping for lockable key images to amounts

* Change inconsistent naming scheme of contributors

* Create key image unlock transaction type and process it

* Update tx params to allow v4 types and as a result construct_tx*

* Fix some serialisation issues not sending all the information

* Fix dupe tx extra tag causing incorrect deserialisation

* Add warning comments

* Fix key image unlocks parsing error

* Simplify key image proof checks

* Fix rebase errors

* Correctly calculate the key image unlock times

* Blacklist key image on deregistration

* Serialise key image blacklist

* Rollback blacklisted key images

* Fix expiry logic error

* Disallow requesting stake unlock if already unlocked client side

* Add double spend checks for key image unlocks

* Rename get_staking_requirement_lock_blocks

To staking_initial_num_lock_blocks

* Begin modifying output selection to not use locked outputs

* Modify output selection to avoid locked/blacklisted key images

* Cleanup and undoing some protocol breakages

* Simplify expiration of nodes

* Request unlock schedules entire node for expiration

* Fix off by one in expiring nodes

* Undo expiring code for pre v10 nodes

* Fix RPC returning register as unlock height and not checking 0

* Rename key image unlock height const

* Undo testnet hardfork debug changes

* Remove is_type for get_type, fix missing var rename

* Move serialisable data into public namespace

* Serialise tx types properly

* Fix typo in no service node known msg

* Code review

* Fix == to >= on serialising tx type

* Code review 2

* Fix tests and key image unlock

* Add additional test, fix assert

* Remove debug code in wallet

* Fix merge dev problem
2019-01-25 14:15:52 +11:00
Maxim Shishmarev
715f3d3698 allow less than 25% staking with large existing contributions (#339)
* allow less than 25% staking with large existing contributions

* remove readline depencency in wallet2
2019-01-22 10:44:30 +11:00
moneromooo-monero
c6d387184e
core: include a dummy encrypted payment id when no payment is used
For better transaction uniformity, even though this wastes space.
2019-01-18 16:58:50 +00:00
moneromooo-monero
b7441c4a32
core, wallet: remember original text version of destination address 2019-01-18 16:58:47 +00:00
Riccardo Spagni
13b12973d1
Merge pull request #5037
51b0625e simplewallet: improve punctuation in user visible string (selsta)
2019-01-18 09:25:59 +02:00
Riccardo Spagni
f3368acef5
Merge pull request #5020
1ef79b43 simplewallet: disable long payment ids by default (moneromooo-monero)
2019-01-18 09:25:18 +02:00
Riccardo Spagni
4fb9cfa017
Merge pull request #4971
15904610 simplewallet: remove extra colon in a few calls to input_secure_line (stoffu)
247dab73 simplewallet: avoid conversion to string in input_secure_line (stoffu)
bf9ef7ad simplewallet: factor yesno hint into input_line (stoffu)
2019-01-18 09:23:03 +02:00
stoffu
1717e63551
simplewallet: fix help text of rescan_bc to mention the "hard" option 2019-01-18 09:51:44 +09:00
stoffu
1590461005
simplewallet: remove extra colon in a few calls to input_secure_line 2019-01-18 09:48:54 +09:00
stoffu
247dab7304
simplewallet: avoid conversion to string in input_secure_line 2019-01-18 09:48:52 +09:00
stoffu
bf9ef7adb6
simplewallet: factor yesno hint into input_line 2019-01-18 09:48:48 +09:00
doy-lee
752aa96310 Merge commit '961bb1b' into LokiMergeUpstream 2019-01-18 11:36:10 +11:00
doy-lee
06cbe13f2f Merge commit 'e59813c' into LokiMergeUpstream 2019-01-18 11:27:03 +11:00
doy-lee
9d4a795d5d Add red on failed for loki codebase 2019-01-18 10:59:30 +11:00
doy-lee
99feac7435 Merge commit 'f8a10bc' into LokiMergeUpstream 2019-01-18 10:47:24 +11:00
doy-lee
074ed7680f Merge commit '3e9bb96' into LokiMergeUpstream 2019-01-18 10:35:18 +11:00
doy-lee
96d582038e Merge commit '31b6d12' into LokiMergeUpstream 2019-01-17 16:31:02 +11:00
doy-lee
a57558d6f9 Merge commit 'a7ff63e' into LokiMergeUpstream 2019-01-17 15:39:42 +11:00
doy-lee
da32932ad9 Merge commit 'c8fc06c' into LokiMergeUpstream 2019-01-17 15:14:42 +11:00
moneromooo-monero
1ef79b430f
simplewallet: disable long payment ids by default
unless --long-payment-id-support is used
2019-01-16 20:06:04 +00:00
selsta
51b0625e00 simplewallet: improve punctuation in user visible string 2019-01-16 20:45:39 +01:00
Riccardo Spagni
6285c43ffc
Merge pull request #5042
c1081091 simplewallet: Show new address after going multisig (rbrunner7)
2019-01-16 21:42:17 +02:00
Riccardo Spagni
8e4c0de46a
Merge pull request #5035
53fcd159 simplewallet: don't subtract 1 to estimate blockchain height (moneromooo-monero)
2019-01-16 21:40:56 +02:00
Riccardo Spagni
3eb96fa512
Merge pull request #5027
9092fc4b wallet: do not display daemon controlled text if untrusted (moneromooo-monero)
2019-01-16 21:38:15 +02:00
Riccardo Spagni
46fcae717a
Merge pull request #5018
8bd71677 simplewallet: remove ability to transfer with detached short payment ids (moneromooo-monero)
2019-01-16 21:35:48 +02:00
Riccardo Spagni
f8a10bcc07
Merge pull request #5009
5e10dee3 simplewallet: fix show_transfers colouring, and add red for failed (moneromooo-monero)
2019-01-16 21:30:52 +02:00
Riccardo Spagni
cb996d15c5
Merge pull request #4981
60b35c91 Add --restore-date param (Howard Chu)
2019-01-16 19:05:31 +02:00
Doyle
ab12d69906
Fix lock status using deprecated lock time (#389) 2019-01-11 14:07:29 +11:00
Maxim Shishmarev
f9a1883ce2 Allow rpc call to get registration command to use human readable input (#343)
* Allow `prepare_registration` to work on command-line

This allows you to use `lokid prepare_registration` to generate a
registration command via RPC commands to the lokid, which is
particularly useful when the lokid is running non-interactively as a
system service.

Without this it is necessary to stop the lokid service, start it
manually, run the prepare_registration, then stop lokid and restart it
via the system service.

This also rewrites the description of the prepare_registration command to
remove the reference to saving to disk.

* make getting registration command more user-friendly via rpc

* better error message for get registration command rpc

* move get_service_node_registration_cmd into prepare_registration

* show error message on unsuccessful registration in simplewallet as well
2019-01-11 13:28:21 +11:00
Doyle
0b070900d2
Check TX Inputs Refactor (#385)
* Remove dead branches in hot-path check_tx_inputs

Also renames #define for mixins to better match naming convention

* Shuffle around some more code into common branches

* Fix min/max tx version rules, since there 1 tx v2 on v9 fork

* Fix update_output_map incorrectly classifying miner tx

* Remove unused vector, c style for loop in check tx inputs
2019-01-10 10:35:54 +11:00
moneromooo-monero
8258a9e7a9
wallet: do not check txpool in background mode
This avoids the constant message about needed to run refresh
to enter a password.
Also mention the txpool when asking for the password if the
reason is a pool tx.
2019-01-09 11:21:39 +00:00
rbrunner7
c108109102 simplewallet: Show new address after going multisig 2019-01-04 16:33:02 +01:00
moneromooo-monero
53fcd15953
simplewallet: don't subtract 1 to estimate blockchain height
in case it returns 0, and other uses don't, plus it's a estimation anyway.
2019-01-02 00:55:19 +00:00
moneromooo-monero
db3f2a91fa
wallet: optionally keep track of owned outputs uses 2018-12-31 23:57:51 +00:00
luigi1111
a872a2a41a
Merge pull request #4948
1d892ec simplewallet: donate command validate amount (selsta)
2018-12-31 16:10:30 -06:00
moneromooo-monero
9092fc4bfd
wallet: do not display daemon controlled text if untrusted 2018-12-30 01:32:57 +00:00
moneromooo-monero
8bd716777e
simplewallet: remove ability to transfer with detached short payment ids
It seemed like a good idea at the time
2018-12-27 00:45:04 +00:00
Tadeas Moravec
e6f026e530
Simplewallet: Unify usage messages.
Help messages describe the commands usage. When users run the command
with wrong arguments, it usually helpfully offers the usage, too.
Unfortunately, these two usage messages were duplicated in the code and
started to get out of sync.

Fixing with constant strings.
2018-12-23 20:12:50 +00:00
moneromooo-monero
5e10dee3ea
simplewallet: fix show_transfers colouring, and add red for failed
Also add the type back, as it was somehow weirdly split into
two different fields, one being a union...
2018-12-23 15:15:55 +00:00
doy-lee
f5b17fc86e Merge commit '6bc0c7e' into LokiMergeUpstream 2018-12-19 12:25:48 +11:00
doy-lee
df347f23e0 Merge branch 'dev' into LokiMergeUpstream 2018-12-19 10:53:35 +11:00