Commit Graph

5620 Commits

Author SHA1 Message Date
Riccardo Spagni
50d48d6118
Merge pull request #5135
de32dcea Human readable message if maximum outputs reached (italocoin)
2019-03-17 17:50:41 +02:00
Riccardo Spagni
4c91eb23a0
Merge pull request #5061
1f2930ce Update 2019 copyright (binaryFate)
2019-03-17 17:49:30 +02:00
Howard Chu
8a97563a93
Use threadpool instead of new threads for DNS queries 2019-03-17 15:39:15 +00:00
moneromooo-monero
4500236f25
wallet2: make use_fork_rules handle chain heights lower than leeway 2019-03-17 14:22:50 +00:00
moneromooo-monero
0a6cb30d62
wallet: flush output cache upon reorg
Fixes output usage tracking
2019-03-17 10:34:07 +00:00
moneromooo-monero
23fb056a72
wallet_rpc_server: new auto_refresh RPC
It can enable/disable auto refresh, and set auto refresh period
2019-03-17 10:33:51 +00:00
Riccardo Spagni
e063615a0e
Merge pull request #5249
3ac40938 timings: fix errno.h mispelt as error.h (moneromooo-monero)
2019-03-16 14:06:07 +02:00
Riccardo Spagni
03d1dbc2ad
Merge pull request #5280
aac4e2f5 wallet_rpc_server: add missing --rpc-ssl-allowed-fingerprints (moneromooo-monero)
2019-03-16 14:05:30 +02:00
moneromooo-monero
4ee156556d
wallet_rpc_server: fix buffer read overflow in string assignment 2019-03-15 19:36:13 +00:00
moneromooo-monero
8fd7452b6e
wallet: move light wallet RPC out of core RPC
It's not nothing to do with it
2019-03-15 13:34:08 +00:00
Dusan Klinec
f42263ebb6
wallet: adds rescan_bc option with preserving key images
- enables to perform rescan_spent / ki sync with untrusted daemon. Spent check status involves RPC calls which require trusted daemon status as it leaks information. The new call performs soft reset while preserving key images thus a sequence: refresh, ki sync / import, rescan_bc keep_ki will correctly perform spent checking without need for trusted daemon.

- useful to detect spent outputs with untrusted daemon on watch_only / multisig / hw-cold wallets after expensive key image sync.

- cli: rescan_bc keep_ki
2019-03-15 12:55:29 +01:00
moneromooo-monero
2b10f22ae6
mnemonics: fix half length seed to bytes conversion 2019-03-15 11:05:42 +00:00
moneromooo-monero
77e9815db7
blockchain: do not try to pop the genesis block 2019-03-15 10:51:48 +00:00
moneromooo-monero
328d291fe4
wallet2: set seed language when creating from json 2019-03-15 00:16:50 +00:00
moneromooo-monero
a52366c1bf
wallet2: fix generation from json when restore height is not set
It was not recovering then, but creating a new random address
2019-03-14 23:41:41 +00:00
moneromooo-monero
39f000b394
miner: fix possible exit crash due to race in stop
If a thread asks to stop the miner, m_stop will be set, and
that thread will wait to join. If the main thread is exiting
at that time, it will ask the miner to stop, but the miner
will claim it's not mining and early out since m_stop is
set. This will cause the database and other things to get
shutdown. If the miner happens to find a block at that time,
it will try to call core, and crash.

Instead, lock and check whether any threads are currently
in m_threads, since they'll only be cleared once the threads
are joined. Moreover, since we lock, the second thread will
have to wait for the first one to have finished. Calling
join twice on a thread seems fine as per pthread_join(3).
2019-03-14 16:59:08 +00:00
moneromooo-monero
cce948a5ae
simplewallet: add some missing spacing before uses data 2019-03-14 10:07:49 +00:00
Riccardo Spagni
c88e992104
Merge pull request #4977
5ea17909 device/trezor: debugging features, trezor tests (Dusan Klinec)
2019-03-14 09:43:02 +02:00
moneromooo-monero
f962449d46
wallet_rpc_server: include out subaddress indices in get_transfers 2019-03-13 14:14:15 +00:00
moneromooo-monero
aac4e2f585
wallet_rpc_server: add missing --rpc-ssl-allowed-fingerprints 2019-03-13 12:59:44 +00:00
moneromooo-monero
bc61b5ca95
wallet2: don't store 0 amount outputs, they'll fail to be spent
It's better to just ignore them, the user does not really need
to know they're here. If the mask is wrong, they'll fail to be
used, and sweeping will fail as it tries to use it.

Reported by Josh Davis.
2019-03-12 18:42:30 +00:00
moneromooo-monero
2790d4d30a
hardfork: update last_versions on popped block 2019-03-12 13:43:12 +00:00
naughtyfox
5ade72818b Wallet API: multisig_tx_set passing bug fixed 2019-03-12 14:02:01 +03:00
moneromooo-monero
576116d415
wallet: fix load failure if the mms isn't usable 2019-03-11 16:11:48 +00:00
moneromooo-monero
4ef3c895a4
blockchain: fix ahead of time PoW batch calc 2019-03-10 10:16:13 +00:00
moneromooo-monero
59478c80dd
daemon: new mining_status command 2019-03-09 20:51:53 +00:00
moneromooo-monero
4b21d38dfd
blockchain: speed up getting N blocks weights/long term weights 2019-03-08 12:04:14 +00:00
moneromooo-monero
7ac3334217
slow-hash: cache TLS references locally once at function start 2019-03-07 18:11:19 +00:00
moneromooo-monero
7632dede7b
crypto: fix PaX issue on NetBSD with CNv4 JIT 2019-03-07 16:46:02 +00:00
moneromooo-monero
a48e49aa36
aesb: avoid stomping on an existing define on NetBSD 2019-03-07 16:08:00 +00:00
moneromooo-monero
3ac40938c3
timings: fix errno.h mispelt as error.h 2019-03-07 16:03:55 +00:00
moneromooo-monero
3f6f90bb31
wallet2: do not use invalid keys as fake outs in rings 2019-03-07 15:49:13 +00:00
Riccardo Spagni
49afbd0c53
Merge pull request #5232
082149c5 fix merge errors, update recommended version to 0.14.0.2 (Riccardo Spagni)
f3b368c6 update checkpoints hash (Riccardo Spagni)
e518f2b1 update checkpoints, update README for 0.14.1 release (Riccardo Spagni)
8780d6b4 update readme via cherry-pick (Riccardo Spagni)
2019-03-07 15:17:31 +02:00
moneromooo-monero
3907588bf6
rpc: make fill_pow restricted
It's slow work, so let's not expose it
2019-03-06 00:05:41 +00:00
moneromooo-monero
c6a70af86a
wallet2: key image import fixes
- return the right output data when offset is not zero
- do not consider import failed if result height is zero
  (it can be 0 if unknown)
- select the right tx pubkey when using subaddresses (it's faster,
  and we might select the wrong one if we got an output using one
  of the additional tx keys)
- account for skipped outputs for spent/unspent balance info

"spent" is arguably wrong, since it will count spent change
multiple times as it goes through receive/spend cycles.
2019-03-05 22:41:44 +00:00
binaryFate
1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
Riccardo Spagni
5bbbe3902b
Merge pull request #4852
057c279c epee: add SSL support (Martijn Otto)
2019-03-05 16:21:30 +02:00
spoke0
8b51464516 add multisig tx sets to describe_transfer rpc endpoint 2019-03-05 14:42:43 +01:00
Martijn Otto
057c279cb4
epee: add SSL support
RPC connections now have optional tranparent SSL.

An optional private key and certificate file can be passed,
using the --{rpc,daemon}-ssl-private-key and
--{rpc,daemon}-ssl-certificate options. Those have as
argument a path to a PEM format private private key and
certificate, respectively.
If not given, a temporary self signed certificate will be used.

SSL can be enabled or disabled using --{rpc}-ssl, which
accepts autodetect (default), disabled or enabled.

Access can be restricted to particular certificates using the
--rpc-ssl-allowed-certificates, which takes a list of
paths to PEM encoded certificates. This can allow a wallet to
connect to only the daemon they think they're connected to,
by forcing SSL and listing the paths to the known good
certificates.

To generate long term certificates:

openssl genrsa -out /tmp/KEY 4096
openssl req -new -key /tmp/KEY -out /tmp/REQ
openssl x509 -req -days 999999 -sha256 -in /tmp/REQ -signkey /tmp/KEY -out /tmp/CERT

/tmp/KEY is the private key, and /tmp/CERT is the certificate,
both in PEM format. /tmp/REQ can be removed. Adjust the last
command to set expiration date, etc, as needed. It doesn't
make a whole lot of sense for monero anyway, since most servers
will run with one time temporary self signed certificates anyway.

SSL support is transparent, so all communication is done on the
existing ports, with SSL autodetection. This means you can start
using an SSL daemon now, but you should not enforce SSL yet or
nothing will talk to you.
2019-03-05 14:16:08 +01:00
Dusan Klinec
5ea17909ca
device/trezor: debugging features, trezor tests 2019-03-05 14:02:45 +01:00
Riccardo Spagni
e65221d690
Merge pull request #5119
f024a10b db_lmdb: make mdb_block_info format conversion more future proof (moneromooo-monero)
2019-03-05 14:12:24 +02:00
Riccardo Spagni
5b9c3df5c1
Merge pull request #5103
ceb72be3 p2p: avoid busy loop when we have nothing to connect to (moneromooo-monero)
2019-03-05 14:09:42 +02:00
Riccardo Spagni
ed6aa76cca
Merge pull request #5100
c4851024 wallet_rpc_server: avoid repeated string allocations when parsing (moneromooo-monero)
88c85c18 cryptonote: avoid double parsing blocks when syncing (moneromooo-monero)
9feda0ee cryptonote: speed up calculating coinbase tx prunable hash (moneromooo-monero)
238401d4 core: avoid double parsing blocks after hoh (moneromooo-monero)
dc5a7609 blockchain: avoid unneeded block copy (moneromooo-monero)
79b4e9f3 save some database calls when getting top block hash and height (moneromooo-monero)
98278808 blockchain: avoid pointless transaction copy and temporary (moneromooo-monero)
07d655e4 blockchain: avoid duplicate block hash computation (moneromooo-monero)
f75d51ab core: avoid calculating tx prefix hash when we don't need it (moneromooo-monero)
b044d03a Avoid repeated (de)serialization when syncing (moneromooo-monero)
b747e836 wallet2: don't calculate prefix hash when we don't need it (moneromooo-monero)
e69477bf db: speedup block addition (moneromooo-monero)
2019-03-05 14:09:19 +02:00
moneromooo-monero
f024a10b68
db_lmdb: make mdb_block_info format conversion more future proof
If mdb_block_info changes again, the v2 to v3 conversion would
convert to an incorrect format.
2019-03-05 12:06:23 +00:00
moneromooo-monero
ceb72be329
p2p: avoid busy loop when we have nothing to connect to 2019-03-05 12:00:45 +00:00
moneromooo-monero
c4851024ce
wallet_rpc_server: avoid repeated string allocations when parsing 2019-03-05 11:58:22 +00:00
moneromooo-monero
88c85c18e0
cryptonote: avoid double parsing blocks when syncing 2019-03-05 11:58:18 +00:00
moneromooo-monero
9feda0eeba
cryptonote: speed up calculating coinbase tx prunable hash
It's a hash of an empty buffer, so we can avoid keccak
2019-03-05 11:58:16 +00:00
moneromooo-monero
238401d4e9
core: avoid double parsing blocks after hoh 2019-03-05 11:58:13 +00:00
moneromooo-monero
dc5a76095c
blockchain: avoid unneeded block copy 2019-03-05 11:58:10 +00:00
moneromooo-monero
79b4e9f377
save some database calls when getting top block hash and height 2019-03-05 11:58:05 +00:00
moneromooo-monero
9827880877
blockchain: avoid pointless transaction copy and temporary 2019-03-05 11:58:02 +00:00
moneromooo-monero
07d655e438
blockchain: avoid duplicate block hash computation 2019-03-05 11:58:00 +00:00
moneromooo-monero
f75d51abda
core: avoid calculating tx prefix hash when we don't need it 2019-03-05 11:57:57 +00:00
moneromooo-monero
b044d03a51
Avoid repeated (de)serialization when syncing 2019-03-05 11:57:55 +00:00
Riccardo Spagni
082149c580
fix merge errors, update recommended version to 0.14.0.2 2019-03-05 13:46:35 +02:00
Riccardo Spagni
f3b368c659
update checkpoints hash 2019-03-05 13:06:36 +02:00
Riccardo Spagni
e518f2b1c0
update checkpoints, update README for 0.14.1 release 2019-03-05 13:05:41 +02:00
moneromooo-monero
b747e836c8
wallet2: don't calculate prefix hash when we don't need it 2019-03-05 10:28:55 +00:00
moneromooo-monero
e69477bf25
db: speedup block addition
by avoiding repeated (de)serialization
2019-03-05 10:28:52 +00:00
moneromooo-monero
108c625b3f
CryptonightR: define out i386/x86_64 specific code on other archs 2019-03-05 10:24:24 +00:00
moneromooo-monero
1b8757dddc
slow-hash: fix build on arm 2019-03-05 10:24:24 +00:00
moneromooo-monero
23abe60705
check load_t_from_json return values 2019-03-04 22:38:06 +00:00
moneromooo-monero
e396146aee
default initialize rpc structures 2019-03-04 22:38:03 +00:00
moneromooo-monero
ef93b0995c
various: remove unused variables 2019-03-04 22:24:49 +00:00
Riccardo Spagni
2f7108f9d7
Merge pull request #5156
3d2772a0 wallet-rpc: get balance for all accounts and subaddresses (stoffu)
2019-03-04 21:33:07 +02:00
Riccardo Spagni
6984a4d69c
Merge pull request #5154
8a1ff079 wallet-rpc: get transfers for all accounts and subaddresses (Jethro Grassie)
2019-03-04 21:32:42 +02:00
Riccardo Spagni
5260111631
Merge pull request #5146
4a9257b4 Support docker for gitian builds (TheCharlatan)
2019-03-04 21:32:30 +02:00
Riccardo Spagni
8e3bd389ea
Merge pull request #5143
1f5680c8 simplewallet: add help for ask-password options (moneromooo-monero)
c7c74caf simplewallet: mark confirm-missing-payment-id as obsolete (moneromooo-monero)
2019-03-04 21:31:33 +02:00
Riccardo Spagni
27db0e3bb9
Merge pull request #5141
5c81a9f1 wallet_rpc_server: add a validate_address RPC (moneromooo-monero)
2019-03-04 21:30:45 +02:00
Riccardo Spagni
5ab6d68a40
Merge pull request #5140
a3973fc9 debug compilation fix: net lib missing common deps (Dusan Klinec)
2019-03-04 21:30:14 +02:00
Riccardo Spagni
66014706bb
Merge pull request #5131
d2c95ab9 Don't decrypt keys in view only wallets in wallet_keys_unlocker (Doyle)
2019-03-04 21:28:09 +02:00
Riccardo Spagni
42adc50766
Merge pull request #5125
8298f42e miner: it can now autodetect the optimal number of threads (moneromooo-monero)
2019-03-04 21:27:16 +02:00
Riccardo Spagni
372c0da086
Merge pull request #5111
6a3608d3 cryptonote_protocol_handler: pad tx messages when using tor/i2p (moneromooo-monero)
2019-03-04 21:24:32 +02:00
Riccardo Spagni
196022530b
Merge pull request #5108
1c9d5285 blockchain_prune: don't prune before v10 (moneromooo-monero)
2019-03-04 21:24:09 +02:00
Riccardo Spagni
a28237c9ca
Merge pull request #5102
1eef0565 performance_tests: better stats, and keep track of timing history (moneromooo-monero)
2019-03-04 21:22:51 +02:00
Riccardo Spagni
e1a177f0da
Merge pull request #5092
eec79276 blockchain: fix default genesis block timestamp (moneromooo-monero)
2019-03-04 21:21:08 +02:00
Riccardo Spagni
4466f4504e
Merge pull request #5091
123fc2a2 i2p: initial support (Jethro Grassie)
2019-03-04 21:20:34 +02:00
Riccardo Spagni
b0d326bf2a
Merge pull request #5084
9d58749b wallet2: fix hashchain going out of sync on refresh error (moneromooo-monero)
2019-03-04 21:19:12 +02:00
Riccardo Spagni
9d415495bf
Merge pull request #5082
1bc5f9fa bulletproofs: speed up vector_power_sum (moneromooo-monero)
2019-03-04 21:18:53 +02:00
Riccardo Spagni
11daa98c0a
Merge pull request #5081
d78addcb db_lmdb: don't unnecessarily cast to double on the way to uint64_t (moneromooo-monero)
2019-03-04 21:18:24 +02:00
Riccardo Spagni
46fd181cca
Merge pull request #4054
24569454 epee: add SSL support (moneromooo-monero)
2019-03-04 21:17:21 +02:00
Riccardo Spagni
9547e3f451
Merge pull request #5224
807903bb hardfork: fix fork determination for historical heights (moneromooo)
2019-03-04 17:17:34 +02:00
Riccardo Spagni
de6d6c0e29
Merge pull request #5217
fa2fbc39 wallet2: fix mishandling rct outputs in coinbase tx (moneromooo-monero)
2019-03-04 17:15:06 +02:00
moneromooo-monero
5f67e7f547
blockchain: forbid older BP rct versions from v11 2019-03-04 15:08:12 +00:00
Riccardo Spagni
09020235bf
Merge pull request #5175
85088d9f db_lmdb: fix missing mdb_dbi_close in migration (moneromooo-monero)
2019-03-04 17:06:58 +02:00
Riccardo Spagni
815c8a48ab
Merge pull request #5174
0de14396 tests: add a CNv4 JIT test (moneromooo-monero)
24d281c3 crypto: plug CNv4 JIT into cn_slow_hash (moneromooo-monero)
78ab59ea crypto: clear cache after generating random program (moneromooo-monero)
b9a61884 performance_tests: add tests for new Cryptonight variants (moneromooo-monero)
fff23bf7 CNv4 JIT compiler for x86-64 and tests (SChernykh)
3dde67d8 blockchain: add v10 fork heights (moneromooo-monero)
2019-03-04 17:06:37 +02:00
Riccardo Spagni
8c53ac2dd1
Merge pull request #5132
2dbc487e Add support for V10 protocol with BulletProofV2 and short amount. (cslashm)
63cc02c0 Fix dummy decryption in debug mode (cslashm)
f0e55ceb fix log namespace (cslashm)
460da140 New scheme key destination contrfol (cslashm)
2019-03-04 14:58:45 +02:00
moneromooo-monero
0de14396b9
tests: add a CNv4 JIT test 2019-03-04 11:56:55 +00:00
moneromooo-monero
24d281c324
crypto: plug CNv4 JIT into cn_slow_hash
Enabled by setting the MONERO_USE_CNV4_JIT env var to 1
2019-03-04 11:56:55 +00:00
moneromooo-monero
78ab59ea44
crypto: clear cache after generating random program 2019-03-04 11:56:46 +00:00
SChernykh
fff23bf7c6
CNv4 JIT compiler for x86-64 and tests
Minimalistic JIT code generator for random math sequence in CryptonightR.

Usage:
- Allocate writable and executable memory
- Call v4_generate_JIT_code with "buf" pointed to memory allocated on the previous step
- Call the generated code instead of "v4_random_math(code, r)", omit the "code" parameter
2019-03-04 11:56:29 +00:00
moneromooo-monero
3dde67d82d
blockchain: add v10 fork heights 2019-03-04 11:56:22 +00:00
moneromooo-monero
a17da7202b
Print the reason why a notification spec failed to parse 2019-03-04 11:48:46 +00:00
moneromooo-monero
356d813799
blockchain: include number of discarded blocks in --reorg-notify 2019-03-04 11:48:44 +00:00
moneromooo-monero
4d598e3d4d
core: add a few more block rate window sizes
The 10 minute one will never trigger for 0 blocks, as it's still
fairly likely to happen even without the actual hash rate changing
much, so we add a 20 minute window, where it will (for 0 blocks)
and a one hour window.
2019-03-04 11:48:42 +00:00
moneromooo-monero
d4fb9641e0
core: add --block-rate-notify
This runs a command whenever the block rate deviates too much
from the expectation
2019-03-04 11:48:39 +00:00
moneromooo-monero
28b6dbf263
notify: fix tokenizing being too strict 2019-03-04 11:48:36 +00:00
moneromooo
807903bbbf
hardfork: fix fork determination for historical heights 2019-03-04 11:19:59 +00:00
Riccardo Spagni
1b4fa00d7c
Merge pull request #5126
f1fb06b1 Fixed path to int-util.h (SChernykh)
9da0892b Adding cnv4-2 tweaks (SChernykh)
f51397b3 Cryptonight variant 4 aka CryptonightR (SChernykh)
2019-03-04 12:10:16 +02:00
Riccardo Spagni
55305559c1
Merge pull request #5124
b8787f43 ArticMine's new block weight algorithm (moneromooo-monero)
2019-03-04 12:09:13 +02:00
Riccardo Spagni
35e0bf2e06
Merge pull request #5122
52964501 ringct: fix v1 ecdhInfo serialization (moneromooo-monero)
2019-03-04 12:08:26 +02:00
Riccardo Spagni
4f06639d63
Merge pull request #5120
45b7df70 wallet_rpc_server: remove detached short payment ids support (moneromooo-monero)
2019-03-04 12:07:40 +02:00
Riccardo Spagni
e62ae67d16
Merge pull request #5118
49b2a48a simplewallet: tell the user to complain to the recipient (moneromooo-monero)
2019-03-04 12:07:02 +02:00
moneromooo-monero
b8787f4302
ArticMine's new block weight algorithm
This curbs runaway growth while still allowing substantial
spikes in block weight

Original specification from ArticMine:

here is the scaling proposal
Define: LongTermBlockWeight
Before fork:
LongTermBlockWeight = BlockWeight
At or after fork:
LongTermBlockWeight = min(BlockWeight, 1.4*LongTermEffectiveMedianBlockWeight)
Note: To avoid possible consensus issues over rounding the LongTermBlockWeight for a given block should be calculated to the nearest byte, and stored as a integer in the block itself. The stored LongTermBlockWeight is then used for future calculations of the LongTermEffectiveMedianBlockWeight and not recalculated each time.
Define:   LongTermEffectiveMedianBlockWeight
LongTermEffectiveMedianBlockWeight = max(300000, MedianOverPrevious100000Blocks(LongTermBlockWeight))
Change Definition of EffectiveMedianBlockWeight
From (current definition)
EffectiveMedianBlockWeight  = max(300000, MedianOverPrevious100Blocks(BlockWeight))
To (proposed definition)
EffectiveMedianBlockWeight  = min(max(300000, MedianOverPrevious100Blocks(BlockWeight)), 50*LongTermEffectiveMedianBlockWeight)
Notes:
1) There are no other changes to the existing penalty formula, median calculation, fees etc.
2) There is the requirement to store the LongTermBlockWeight of a block unencrypted in the block itself. This  is to avoid possible consensus issues over rounding and also to prevent the calculations from becoming unwieldy as we move away from the fork.
3) When the  EffectiveMedianBlockWeight cap is reached it is still possible to mine blocks up to 2x the EffectiveMedianBlockWeight by paying the corresponding penalty.

Note: the long term block weight is stored in the database, but not in the actual block itself,
since it requires recalculating anyway for verification.
2019-03-04 09:33:58 +00:00
moneromooo-monero
fa2fbc3917
wallet2: fix mishandling rct outputs in coinbase tx
Reported by cutcoin
2019-03-03 18:55:12 +00:00
Joel
364516975a Simplify RPC endpoint, emoving second RPC endpoint generate_from_view_key 2019-03-02 23:14:35 +01:00
Nathan Dorfman
be6f426a3f rpc: Allow submitting tx as hex blob over ZMQ 2019-02-27 16:55:04 -07:00
moneromooo-monero
9c4d403ae0
dns_utils: use fallback if the default resolver does not support DNSSEC 2019-02-27 11:08:56 +00:00
moneromooo-monero
4921c79494
cn_deserialize: remove some unused code 2019-02-26 17:57:03 +00:00
moneromooo-monero
eef164f7cc
cryptonote_protocol_handler: search for syncing peers in "cruise mode"
When all our outgoing peer slots are filled, we cycle one peer at
a time looking for syncing peers until we have at least two such
peers. This brings two advantages:

- Peers without incoming connections will find more syncing peers
that before, thereby strengthening network decentralization

- Peers will have more resistance to isolation attacks, as they
are more likely to find a "good" peer than they were before
2019-02-26 12:45:28 +00:00
moneromooo-monero
7d88d8f27c
discontinue use of alloca
NetBSD emits:
warning: Warning: reference to the libc supplied alloca(3); this most likely will not work. Please use the compiler provided version of alloca(3), by supplying the appropriate compiler flags (e.g. not -std=c89).

and man 3 alloca says:

       Normally,  gcc(1)  translates  calls  to  alloca()  with  inlined code.  This is not done when either the -ansi, -std=c89, -std=c99, or the
       -std=c11 option is given and the header <alloca.h> is not included.  Otherwise, (without an -ansi or -std=c* option) the glibc  version  of
       <stdlib.h> includes <alloca.h> and that contains the lines:

           #ifdef  __GNUC__
           #define alloca(size)   __builtin_alloca (size)
           #endif

It looks like alloca is a bad idea in modern C/C++, so we use
VLAs for C and std::vector for C++.
2019-02-25 11:11:07 +00:00
xiphon
a54e81e572 daemon: add '--no-sync' arg to optionally disable blockchain sync 2019-02-25 03:22:14 +00:00
xiphon
551104fbf1 daemon: add --public-node mode, RPC port propagation over P2P 2019-02-25 02:40:23 +03:00
moneromooo-monero
8298f42e9d
miner: it can now autodetect the optimal number of threads 2019-02-23 12:22:32 +00:00
moneromooo-monero
b674728dfa
Better error when sending a tx with a too large extra field 2019-02-22 11:45:32 +00:00
moneromooo-monero
bb2aed8e4d
rpc: quantize db size up to 5 GB in restricted mode 2019-02-21 23:49:53 +00:00
moneromooo-monero
7c09882a27
dns_utils: remove MoneroPulse/checkpoints mention in TXT record code
This code is used for more than just these
2019-02-21 17:38:43 +00:00
Joel
c17c81881b Remove code duplication 2019-02-21 15:49:32 +01:00
moneromooo-monero
85088d9f85
db_lmdb: fix missing mdb_dbi_close in migration
Fixed by hyc
2019-02-21 09:52:30 +00:00
stoffu
3d2772a0d6
wallet-rpc: get balance for all accounts and subaddresses 2019-02-20 14:23:36 +09:00
Dusan Klinec
8630a028f2
wallet: fix payment ID decryption for construction data 2019-02-20 03:55:35 +01:00
Dusan Klinec
75e5aafdcb
device/trezor: dummy payment ID fix 2019-02-20 02:00:14 +01:00
Joel
acb14c1079 Add generate_from_view_key RPC method 2019-02-19 14:30:35 +01:00
Joel
7dd7a3b791 Add generate_from_keys RPC method 2019-02-19 14:13:01 +01:00
Jethro Grassie
8a1ff079ea
wallet-rpc: get transfers for all accounts and subaddresses 2019-02-17 22:21:45 -05:00
TheCharlatan
4a9257b464
Support docker for gitian builds
Building with docker is arguably easier and more familiar to most people
than either kvm, or lxc.

This commit also relaxes the back compat requirement a bit. 32 bit linux
now uses glibc version 2.0. Also, the docker shell could not handle gcc arguments
containing spaces, so the explicit '-DFELT_TYPE' declaration was dropped.

Lastly, this removes some packages from the osx descriptor.
2019-02-14 23:14:34 +01:00
moneromooo-monero
5c81a9f1a1
wallet_rpc_server: add a validate_address RPC 2019-02-14 21:01:11 +00:00
SChernykh
f1fb06b137 Fixed path to int-util.h 2019-02-14 20:46:56 +01:00
SChernykh
9da0892b10 Adding cnv4-2 tweaks
Co-Authored-By: Lee Clagett <vtnerd@users.noreply.github.com>
2019-02-14 20:42:50 +01:00
SChernykh
f51397b306 Cryptonight variant 4 aka CryptonightR
It introduces random integer math into the main loop.
2019-02-14 11:29:54 +01:00
moneromooo-monero
1f5680c8db
simplewallet: add help for ask-password options 2019-02-14 09:21:22 +00:00
moneromooo-monero
c7c74cafec
simplewallet: mark confirm-missing-payment-id as obsolete 2019-02-14 09:21:22 +00:00
Dusan Klinec
a3973fc95f debug compilation fix: net lib missing common deps
```
Undefined symbols for architecture x86_64:
  "common_category()", referenced from:
      make_error_code(common_error) in parse.cpp.o
      make_error_code(common_error) in tor_address.cpp.o
  "boost::system::detail::system_category_ncx()", referenced from:
      boost::system::system_category() in parse.cpp.o
      boost::system::system_category() in socks.cpp.o
      boost::system::system_category() in libepee.a(net_utils_base.cpp.o)
  "boost::system::detail::generic_category_ncx()", referenced from:
      boost::system::generic_category() in parse.cpp.o
      boost::system::generic_category() in socks.cpp.o
      boost::system::generic_category() in tor_address.cpp.o
      boost::system::generic_category() in libepee.a(string_tools.cpp.o)
      boost::system::generic_category() in libepee.a(net_utils_base.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [src/net/libnet.dylib] Error 1
make[2]: *** [src/net/CMakeFiles/net.dir/all] Error 2
```
2019-02-13 23:37:46 +01:00
Doyle
d2c95ab941 Don't decrypt keys in view only wallets in wallet_keys_unlocker 2019-02-13 15:36:49 +11:00
italocoin
de32dcea1d Human readable message if maximum outputs reached 2019-02-10 09:51:20 -05:00
cslashm
2dbc487ec0 Add support for V10 protocol with BulletProofV2 and short amount. 2019-02-08 17:02:55 +01:00
cslashm
63cc02c08d Fix dummy decryption in debug mode 2019-02-08 17:02:55 +01:00
cslashm
f0e55cebf7 fix log namespace 2019-02-08 17:02:55 +01:00
cslashm
460da140ec New scheme key destination contrfol
Implies protocol version management.
2019-02-08 17:02:44 +01:00
moneromooo-monero
49b2a48a46
simplewallet: tell the user to complain to the recipient
for long payment ids
2019-02-03 10:34:07 +00:00
moneromooo-monero
529645014c
ringct: fix v1 ecdhInfo serialization
The change made for v2 broke v1, and we have no way to know which
version we're serializing here. However, since we don't actually
care about space savings in this case, we continue serialiazing
both mask and amount.
2019-02-03 10:33:10 +00:00
moneromooo-monero
2456945408
epee: add SSL support
RPC connections now have optional tranparent SSL.

An optional private key and certificate file can be passed,
using the --{rpc,daemon}-ssl-private-key and
--{rpc,daemon}-ssl-certificate options. Those have as
argument a path to a PEM format private private key and
certificate, respectively.
If not given, a temporary self signed certificate will be used.

SSL can be enabled or disabled using --{rpc}-ssl, which
accepts autodetect (default), disabled or enabled.

Access can be restricted to particular certificates using the
--rpc-ssl-allowed-certificates, which takes a list of
paths to PEM encoded certificates. This can allow a wallet to
connect to only the daemon they think they're connected to,
by forcing SSL and listing the paths to the known good
certificates.

To generate long term certificates:

openssl genrsa -out /tmp/KEY 4096
openssl req -new -key /tmp/KEY -out /tmp/REQ
openssl x509 -req -days 999999 -sha256 -in /tmp/REQ -signkey /tmp/KEY -out /tmp/CERT

/tmp/KEY is the private key, and /tmp/CERT is the certificate,
both in PEM format. /tmp/REQ can be removed. Adjust the last
command to set expiration date, etc, as needed. It doesn't
make a whole lot of sense for monero anyway, since most servers
will run with one time temporary self signed certificates anyway.

SSL support is transparent, so all communication is done on the
existing ports, with SSL autodetection. This means you can start
using an SSL daemon now, but you should not enforce SSL yet or
nothing will talk to you.
2019-02-02 20:05:33 +00:00
moneromooo-monero
45b7df703b
wallet_rpc_server: remove detached short payment ids support 2019-02-02 18:53:14 +00:00
Tom Smeding
fec359a641 cryptonote: Fix enum check in expand_transaction_2
This was noticed because GCC warned about using an enum value in a
boolean context.
2019-02-01 16:44:58 +01:00
Tom Smeding
9bf0e53751 cryptonote: Add const-qualifier on comparison functor
The original code did not compile with GCC 8.2.1 in C++17 mode, since
comparison functions for std::set's must be invocable as const.
2019-02-01 16:44:56 +01:00
Tom Smeding
5d2fdc2e8c serialization: Use pos_type instead of streampos
According to [1], the ios_base::streampos member type is deprecated, and
removed in C++17. This type was an alias for pos_type, which this commit
uses instead.

[1]: https://en.cppreference.com/w/cpp/io/ios_base
2019-02-01 16:44:55 +01:00
moneromooo-monero
6a3608d3d2
cryptonote_protocol_handler: pad tx messages when using tor/i2p 2019-01-30 23:17:45 +00:00
Jethro Grassie
123fc2a25a
i2p: initial support 2019-01-30 13:37:45 -05:00
moneromooo-monero
1c9d5285d1
blockchain_prune: don't prune before v10
This uses system time since it doesn't see the p2p network,
so is not 100% accurate
2019-01-30 16:32:14 +00:00