Compare commits

...

1281 Commits

Author SHA1 Message Date
tobtoht
fc812cdc14 Merge pull request #10005
0afe7d5 guix: bump time-machine to 3cd1c8769c618cab07181c6a4807792a371f0b2e (tobtoht)
2025-11-05 18:16:47 +00:00
tobtoht
0afe7d5e3e guix: bump time-machine to 3cd1c8769c618cab07181c6a4807792a371f0b2e 2025-11-01 20:25:33 +01:00
tobtoht
6bb36309d6 Merge pull request #10123
4e9d199 daemon: fix print_cn command when 0 connections (jeffro256)
2025-10-27 18:52:36 +00:00
tobtoht
b4a168b5f8 Merge pull request #10083
daded36 wallet: identify spends in pool when scanning (j-berman)
2025-10-27 18:50:40 +00:00
tobtoht
fc6170a1f7 Merge pull request #10156
0fc5e87 cryptonote_core: rm confusing/redundant BP consensus rule (jeffro256)
2025-10-27 18:47:58 +00:00
tobtoht
0237f04617 Merge pull request #10172
5905b20 wallet: sanity check ring indices only against spendable (jeffro256)
2025-10-27 18:47:03 +00:00
jeffro256
5905b202f0 wallet: sanity check ring indices only against spendable 2025-10-15 17:00:21 -05:00
jeffro256
0fc5e87f2c cryptonote_core: rm confusing/redundant BP consensus rule
This rule is confusing/redundant because before v8, no
bulletproofs whatsoever were allowed. And during and after
v8, ONLY multi-output bulletproofs were allowed, i.e.
exactly 1 bulletproof is allowed which proves the range of
all amount commitments in the transaction.

Sources:
  * No BP before v8:
    - d32b5bfe18/src/cryptonote_core/blockchain.cpp (L3021-L3032)
  * Only 1 BP allowed:
    - d32b5bfe18/src/cryptonote_basic/cryptonote_format_utils.cpp (L174)
    - d32b5bfe18/src/cryptonote_basic/cryptonote_format_utils.cpp (L150)
  * BP must cover all outputs:
    - d32b5bfe18/src/cryptonote_basic/cryptonote_format_utils.cpp (L190-L194)
    - d32b5bfe18/src/cryptonote_basic/cryptonote_format_utils.cpp (L166-L170)
2025-10-09 15:57:54 -05:00
tobtoht
d32b5bfe18 Merge pull request #9672
335fb0b depends: openssl: update to 3.5.4 (tobtoht)
2025-10-08 18:28:14 +00:00
tobtoht
335fb0b28c depends: openssl: update to 3.5.4 2025-10-08 12:26:52 +02:00
luigi1111
0d500f5349 Merge pull request #9752
8d6855c CoC: only allow Administrators to merge changes to the CoC (tobtoht)
2025-10-07 15:46:02 -04:00
luigi1111
3e2faec4da Merge pull request #9750
e3db452 CoC: 'log an issue' -> 'open an issue' (tobtoht)
2025-10-07 15:45:29 -04:00
luigi1111
177e14ac56 Merge pull request #9749
5c32fbd CoC: do not encourage using real names or 'well-known aliases' (tobtoht)
2025-10-07 15:44:52 -04:00
luigi1111
d3b80ce528 Merge pull request #9478
b9bead5 CoC: prohibit anyone from committing patches to the project directly (tobtoht)
2025-10-07 15:44:07 -04:00
luigi1111
ebfb495512 Merge pull request #9744
dc5e15c CoC: remove constraint suggesting copyright can be 'owned collectively' (tobtoht)
2025-10-07 15:42:52 -04:00
luigi1111
9f1686ef78 Merge pull request #9743
53cb44c CoC: remove constraints on 'release history' (tobtoht)
2025-10-07 15:42:18 -04:00
luigi1111
574d50ffc2 Merge pull request #9742
a60c108 CoC: clarify 'project founders' (tobtoht)
2025-10-07 15:41:38 -04:00
luigi1111
46d794f98e Merge pull request #9737
70d3907 docs: remove 'creating stable releases' section (tobtoht)
2025-10-07 15:40:24 -04:00
luigi1111
3f4f292847 Merge pull request #9735
69020aa docs: remove 'Monero Maintainer Team' (tobtoht)
2025-10-07 15:39:37 -04:00
luigi1111
0089f38682 Merge pull request #9733
8154b90 docs: do not automatically promote contributors to maintainers (tobtoht)
2025-10-07 15:34:19 -04:00
luigi1111
8f3ae08521 Merge pull request #9732
9bd265d docs: don't allow maintainers to edit docs without review (tobtoht)
2025-10-07 15:32:40 -04:00
luigi1111
42ed3c70ef Merge pull request #9730
5345eba docs: allow maintainers to merge their own prs if queued (tobtoht)
2025-10-07 15:32:02 -04:00
luigi1111
a5aa602dce Merge pull request #10147
292c053 Cleaner validation (faster and saner) (j-berman)
2025-10-07 15:22:35 -04:00
luigi1111
8e98fa954c Merge pull request #10146
ca27d51 cryptonote_basic: remove redundant call to get_transaction_hash() in overload (jeffro256)
2025-10-07 15:21:02 -04:00
luigi1111
e0d83e0ebb Merge pull request #10109
be79b83 Daemon RPC: fix on_getblockhash error return on too high height (j-berman)
2025-10-07 15:18:26 -04:00
luigi1111
df90240542 Merge pull request #10107
0fb4a8f src: update checkpoints to match v0.18.4.3 (selsta)
2025-10-07 15:17:44 -04:00
luigi1111
44b242d56f Merge pull request #10086
1dbb4a7 wallet2: warn instead of throw when RingDB doesn't include spend (j-berman)
2025-10-07 15:15:23 -04:00
selsta
0fb4a8f9b1 src: update checkpoints to match v0.18.4.3 2025-10-07 16:37:18 +02:00
j-berman
292c053280 Cleaner validation (faster and saner) 2025-10-06 12:51:16 -07:00
jeffro256
ca27d519df cryptonote_basic: remove redundant call to get_transaction_hash() in overload
Issue noticed by DataHoarder.
2025-10-05 16:47:57 -05:00
jeffro256
4e9d199913 daemon: fix print_cn command when 0 connections
Deferencing the result of `std::max_element()` when `res.connections` has 0 elements leads to UB, and segfaults in practice.

Co-authored-by: iamamyth <user@example.com>
2025-09-28 13:55:44 -05:00
tobtoht
8e9ab9677f Merge pull request #10097
9308fd7 simplewallet: batch address creation limit to match rpc (nahuhh)
2025-09-28 18:34:44 +00:00
tobtoht
adc395577a Merge pull request #10103
bc8b210 Send ZMQ miner notifications after txpool additions (WeebDataHoarder)
2025-09-28 18:33:35 +00:00
tobtoht
a6d0ac3fdb Merge pull request #10110
5e5a52e removing lza_menace seed nodes (lza_menace)
2025-09-28 18:32:52 +00:00
tobtoht
5240ee5438 Merge pull request #9939
ae489ba p2p: Improved peer selection with /24 subnet deduplication to disadvantage 'spy nodes' (rbrunner7)
2025-09-28 18:30:41 +00:00
tobtoht
0cc56f6373 Merge pull request #10114
6c49352 net_node: add hinto seed nodes (hinto.janai)
2025-09-28 18:29:09 +00:00
hinto.janai
6c493528e0 net_node: add hinto seed nodes 2025-09-26 19:26:33 +00:00
rbrunner7
ae489ba6ef p2p: Improved peer selection with /24 subnet deduplication to disadvantage 'spy nodes' 2025-09-26 14:16:55 +02:00
lza_menace
5e5a52e583 removing lza_menace seed nodes 2025-09-25 19:16:54 -07:00
j-berman
be79b83b4e Daemon RPC: fix on_getblockhash error return on too high height 2025-09-25 16:18:22 -07:00
tobtoht
b591866fcf Merge pull request #10065
179c924 Fix logging lock, future optimizations may needed (Lee *!* Clagett)
2025-09-24 20:53:02 +00:00
tobtoht
a0c144a436 Merge pull request #10072
b74ca72 cmake: set minimum to 3.10 to fix warnings (selsta)
2025-09-24 20:51:22 +00:00
tobtoht
1d9a201980 Merge pull request #10088
dc759e8 minimal changes to remove improper binding to temporary variable (dabbonda)
2025-09-24 20:50:55 +00:00
tobtoht
ef38c7cc6d Merge pull request #10089
92c8bd5 remove 66.85.74.134 as seed node (Gingeropolous)
2025-09-24 20:50:06 +00:00
tobtoht
79922e1215 Merge pull request #10091
935f2d2 cryptonote_core: `--dns-versions-check` is deprecated (nahuhh)
2025-09-24 20:49:12 +00:00
tobtoht
42d127a7bb Merge pull request #10100
5860b43 tests: only enable fuzz testing if ENABLE_FUZZ_TEST defined (0xFFFC0000)
2025-09-24 20:48:00 +00:00
0xFFFC0000
5860b43d94 tests: only enable fuzz testing if ENABLE_FUZZ_TEST defined 2025-09-24 12:05:00 +00:00
WeebDataHoarder
bc8b210aff Send ZMQ miner notifications after txpool additions
Bug was introduced in c069c04ede, before this txpool additions were not notified on block addition

When receiving blocks with previously unknown conditions, miner data was sent first, but txpool add events for already-added transactions in previous block were sent afterward. Miners would then include already-mined transactions in their new templates due to receiving the mistimed txpool add event.

The fix is to send miner notifications AFTER txpool events are sent, and before normal block notifications are sent (for mining switch speed purposes)

Fixes c069c04ede / #9135
Fixes dfee15eee1 / #7891
2025-09-24 09:13:25 +02:00
nahuhh
9308fd7113 simplewallet: batch address creation limit to match rpc 2025-09-22 13:54:15 +00:00
nahuhh
935f2d20ec cryptonote_core: --dns-versions-check is deprecated 2025-09-21 18:52:25 +00:00
dabbonda
dc759e89f9 minimal changes to remove improper binding to temporary variable 2025-09-21 12:36:28 -04:00
Gingeropolous
92c8bd53a4 remove 66.85.74.134 as seed node
remove 66.85.74.134 as seed node. bastards doubled the price of the server.
2025-09-21 10:04:28 -04:00
j-berman
1dbb4a7928 wallet2: warn instead of throw when RingDB doesn't include spend
A reorg can end up causing an output's position in the chain to
move. Since the wallet doesn't update the RingDB on reorg, it
may refer to the output's stale position in the chain.

This seems a reasonable solution rather than introducing complex
logic to update the stale ring member's value on rerog, since
RingDB can be deprecated with FCMP++.
2025-09-17 15:21:46 -07:00
j-berman
daded36823 wallet: identify spends in pool when scanning
- Make sure to mark identified spends in the pool as spends. The
wallet might not know these have been spent if it wasn't the wallet
that relayed the tx to the daemon, or the wallet was cleared via
rescan_bc.
- Make sure to add spends to m_unconfirmed_txs if not present.
- Make sure to process the entire pool again if refreshing for
the first time. The wallet fetches pool and blocks at the same
time. The wallet scans blocks first, then pool. If the wallet
identifies received outputs in the chain, then it may have spent
those received outputs in the pool. So we make sure to re-process
the entire pool again after scanning the chain for the first time.
- Multisig wallets that know about spent key images can now detect
spend txs in the pool. Update tests for that.
2025-09-15 14:14:50 -07:00
tobtoht
8d4c625713 Merge pull request #10004
36bdfad rpc-fuzz: Add new fuzzers for RPC endpoints (Arthur Chan)
2025-09-09 17:39:15 +00:00
Arthur Chan
36bdfad073 rpc-fuzz: Add new fuzzers for RPC endpoints
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Add macro definition for fuzzers

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Fix FuzzedDataProvider header missing problem

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Add README

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Provide static FuzzedDataProvider.h

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Update and enhance fuzzer

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Activate UBSan

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Fix fuzz target retrieval

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Remove bias selector and fix protocol lifespan

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Drop SIGALARM handling and fix bug on selectors

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Fix rpc request changes

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Add a new fuzzer profile that catch all expcetions

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Fix typo

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

Add warning

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
2025-09-08 18:35:55 +00:00
tobtoht
d8853474f7 Merge pull request #10069
0b1b9f7 CMake: fix msys/ICU compilation failure (0xFFFC0000)
2025-09-08 18:16:45 +00:00
selsta
b74ca72bad cmake: set minimum to 3.10 to fix warnings 2025-09-08 20:12:45 +02:00
tobtoht
8259df0d1d Merge pull request #9860
dbc8402 wallet: fix wallet_keys_unlocker (jeffro256)
2025-09-08 18:08:22 +00:00
0xFFFC0000
0b1b9f7eec CMake: fix msys/ICU compilation failure 2025-09-07 19:19:28 +00:00
jeffro256
dbc8402da6 wallet: fix wallet_keys_unlocker
Fix four issues with wallet_keys_unlocker:
1. It won't decrypt if there are unlockers open simulataneously on multiple `wallet2` instances
2. It won't decrypt if the first unlocker was disabled (i.e. `locked=false`), even with a second non-disabled unlocker
3. If a destructor of an earlier unlocker is triggered before the destructor of a later unlocker, it will re-encrypt too early, while the second unlocker is still in scope
4. Calling the 3-parameter constructor with `locked=true` after an unlocker already exists will "double-encrypt"  the spend key after its destructor since the local variable is `locked=false` and the field member is `locked=true`

Also, replace `wallet2::decrypt_account_for_multisig` with `wallet_keys_unlocker`.
2025-09-04 15:43:38 -05:00
Lee *!* Clagett
179c924c51 Fix logging lock, future optimizations may needed 2025-09-02 11:18:45 -04:00
tobtoht
7fe199facc Merge pull request #10061
a764f5a ci: macos: reinstall cmake (tobtoht)
2025-08-30 17:45:08 +00:00
tobtoht
a764f5a42a ci: macos: reinstall cmake 2025-08-30 19:14:34 +02:00
tobtoht
0229f6fdde Merge pull request #10046
a5b2ad0 BlockchainLMDB: do not assume alignment for alt block entries (jeffro256)
2025-08-30 17:08:26 +00:00
tobtoht
07dcc49bd7 Merge pull request #10056
ca48432 epee: only parse valid port (selsta)
2025-08-30 17:07:20 +00:00
tobtoht
bdce2fe089 Merge pull request #10060
57c40b8 functional_tests: fix piecemeal export in cold_signing, part 2 (jeffro256)
2025-08-29 16:41:00 +00:00
selsta
ca484323c3 epee: only parse valid port
Reported by hacksandhops and Ada Logic.
2025-08-29 11:45:02 +02:00
jeffro256
57c40b8993 functional_tests: fix piecemeal export in cold_signing, part 2
Do not mark output import as done if exception is thrown for output being past last imported output.
2025-08-26 15:38:25 -05:00
tobtoht
09bb3705e0 Merge pull request #10053
22433f8 functional_tests: fix piecemeal export in cold_signing (jeffro256)
2025-08-23 14:26:17 +00:00
jeffro256
22433f8414 functional_tests: fix piecemeal export in cold_signing
The `while` loop condition was incorrect, which could lead to incomplete imports.
Also, setting `start` to an *undone* output speeds up the test by 16s on my machine.
2025-08-22 13:21:32 -05:00
tobtoht
a9b8a8a4b1 Merge pull request #10010
149ba26 guix: switch to guix shell (tobtoht)
2025-08-21 17:30:51 +00:00
tobtoht
5886c12af6 Merge pull request #9455
574c845 guix: use llvm 18 toolchain for darwin targets (tobtoht)
2025-08-21 17:30:02 +00:00
tobtoht
f93dd5e3ce Merge pull request #10008
78b8c83 functional_tests: check transfers list consistency in cold_signing (jeffro256)
2025-08-21 17:28:00 +00:00
jeffro256
78b8c83fdf functional_tests: check transfers list consistency in cold_signing 2025-08-21 11:34:58 -05:00
tobtoht
4e93cdc941 Merge pull request #9883
7b28be0 functional_tests: test PR #9863 (jeffro256)
2025-08-21 16:31:19 +00:00
tobtoht
c8f3566dbb Merge pull request #10050
cc444a9 checkpoints: update to a recent block height (selsta)
2025-08-21 16:28:37 +00:00
tobtoht
f04668c13d Merge pull request #10044
7cf7912 CONTRIBUTING.md: replace discontinued paste service (Leonardo Faoro)
2025-08-21 16:26:55 +00:00
tobtoht
a344bb5989 Merge pull request #10042
d979031 fix typo in CHECK_AND_ASSERT_MES (Leonardo Faoro)
2025-08-21 16:26:06 +00:00
tobtoht
099af33242 Merge pull request #10036
f61294d epee: include math header for upcoming Boost 1.89 (Michael Cho)
2025-08-21 16:25:25 +00:00
tobtoht
d5514ab6ee Merge pull request #10033
681fee1 wallet: fix warning in fee priority algorithm (0xFFFC0000)
2025-08-21 16:24:52 +00:00
tobtoht
2633d1f24a Merge pull request #10029
fb64bb3 Skip ping connections in outgoing count (Lee *!* Clagett)
2025-08-21 16:22:51 +00:00
tobtoht
da2c15b76e Merge pull request #10026
613ee85 cryptonote_basic: remove state_idle in connection_context (jeffro256)
2025-08-21 16:22:13 +00:00
tobtoht
c6524eecd1 Merge pull request #10025
a8959f2 Daemon RPC: rm high_height_ok field from getblocks.bin (j-berman)
2025-08-21 16:21:37 +00:00
tobtoht
c9db24a010 Merge pull request #10017
d527fd5 simplewallet: fix payment id header in show_transfers command (ComputeryPony)
2025-08-21 16:21:08 +00:00
tobtoht
563a5b1a7d Merge pull request #10007
5e54c72 wallet: RPC method /incoming_transfers without daemon connection (jeffro256)
2025-08-21 16:20:37 +00:00
tobtoht
6dc7b1f8fb Merge pull request #9921
90256c8 error out if functional tests are disabled (Crypto City)
2025-08-21 16:19:30 +00:00
tobtoht
a8b5ae6dd2 Merge pull request #9919
06b74ae ringct & cryptonote_basic: detangle dependencies (jeffro256)
2025-08-21 16:18:14 +00:00
jeffro256
a5b2ad04c5 BlockchainLMDB: do not assume alignment for alt block entries 2025-08-20 23:23:48 -05:00
selsta
cc444a937d checkpoints: update to a recent block height 2025-08-20 18:40:18 +02:00
Leonardo Faoro
7cf7912bf0 CONTRIBUTING.md: replace discontinued paste service
fpaste.org has been seized by someone else and now links to a spam website, replaced it w/ a stable and reputable alternative (gnu.cat)

CONTRIBUTING.md: replace paste service

removed gnu.cat
added paste.debian.org
based on community usage and familiarity with the debian paste service
2025-08-18 21:49:51 +03:00
Leonardo Faoro
d979031977 fix typo in CHECK_AND_ASSERT_MES 2025-08-17 01:56:04 +00:00
0xFFFC0000
681fee125a wallet: fix warning in fee priority algorithm 2025-08-13 14:22:47 +00:00
Michael Cho
f61294dc6b epee: include math header for upcoming Boost 1.89
When building on Ubuntu 22.04 with GCC 11.4.0 and Boost 1.89.0.beta1,
the build failed with:
```
error: ‘floor’ was not declared in this scope
     41 |       num_char = (int)floor((float)num_char / (float)radix);
        |                       ^~~~~
```

Signed-off-by: Michael Cho <michael@michaelcho.dev>
2025-08-12 20:07:49 -04:00
Lee *!* Clagett
fb64bb346e Skip ping connections in outgoing count 2025-08-09 10:48:53 -04:00
jeffro256
613ee85402 cryptonote_basic: remove state_idle in connection_context 2025-08-07 20:55:44 -05:00
j-berman
a8959f2c9b Daemon RPC: rm high_height_ok field from getblocks.bin
Since current behavior on release is to ban clients with too
high a height included in the request, it seems reasonably
justified to modify that behavior to instead return a successful
response that includes the chain height and top block hash.
2025-08-06 12:45:49 -07:00
tobtoht
389e3ba1df Merge pull request #10020
c08f111 src: update checkpoints to match v0.18.4.2 (selsta)
2025-08-05 16:10:10 +00:00
tobtoht
574c845090 guix: use llvm 18 toolchain for darwin targets 2025-08-05 13:02:18 +02:00
selsta
c08f1114de src: update checkpoints to match v0.18.4.2 2025-08-01 17:27:51 +02:00
tobtoht
8e7af0806e Merge pull request #10000
a2f336d serialization: massage pair casting to remove user-defined-cast warnings (jeffro256)
2025-08-01 12:01:49 +00:00
tobtoht
4935f3c9c0 Merge pull request #10014
dc350f3 wallet: deprecate wallet2::find_and_save_rings() (jeffro256)
2025-08-01 11:51:51 +00:00
tobtoht
1e72c25983 Merge pull request #9938
8a33caf fix typo (Maximilian Hubert)
2025-08-01 11:51:22 +00:00
tobtoht
abf0515432 Merge pull request #9984
2820757 common: remove tools::add_element (jeffro256)
2025-08-01 11:49:16 +00:00
tobtoht
33c6b21ea9 Merge pull request #9989
2496501 Dockerfile: remove unused deps (tobtoht)
2025-08-01 11:48:37 +00:00
tobtoht
ddd7cfb09d Merge pull request #9990
ea54a08 ci: depends: remove unused deps (tobtoht)
2025-08-01 11:48:14 +00:00
tobtoht
af695b8290 Merge pull request #9992
d5eb1e6 docs: add URI scheme (tobtoht)
2025-08-01 11:47:46 +00:00
tobtoht
d839f99dde Merge pull request #9993
4f64942 readme: update packages (tobtoht)
2025-08-01 11:47:24 +00:00
tobtoht
b71780c967 Merge pull request #9995
4552250 guix: use canonical repository (tobtoht)
2025-08-01 11:47:00 +00:00
tobtoht
b77837d6bf Merge pull request #10001
4da5f7c guix: build freebsd target with clang 18 (tobtoht)
2025-08-01 11:46:24 +00:00
tobtoht
8f00046b4a Merge pull request #10002
4775755 tests: add OSS-Fuzz documentation (David Korczynski)
2025-08-01 11:45:22 +00:00
tobtoht
549aef9507 Merge pull request #10009
377071e cryptonote_core: remove blockchain_storage_boost_serialization.h (jeffro256)
2025-08-01 11:44:34 +00:00
tobtoht
8c4ac29c3f Merge pull request #10011
aea82b9 anonymity: update docs to use --proxy + misc improvements (nahuhh)
2025-08-01 11:44:03 +00:00
David Korczynski
4775755456 tests: add OSS-Fuzz documentation
Adds documentation that outlines the OSS-Fuzz integration of Monero. The
goal is to make it more accessible to build/test/expand the existing
fuzz suite, and also to make it more visible that this integration
exists.

Signed-off-by: David Korczynski <david@adalogics.com>
2025-07-31 11:30:42 -07:00
ComputeryPony
d527fd5834 simplewallet: fix payment id header in show_transfers command 2025-07-30 18:13:53 +09:00
jeffro256
dc350f35a5 wallet: deprecate wallet2::find_and_save_rings()
Rings for outgoing transactions are stored within the scanning code since the last hardfork,
so this code is largely unneccessary now.

Co-authored-by: j-berman <justinberman@protonmail.com>
2025-07-29 12:28:39 -05:00
nahuhh
aea82b9c7e anonymity: update docs to use --proxy + misc improvements 2025-07-25 15:25:37 +00:00
tobtoht
149ba2666a guix: switch to guix shell 2025-07-24 14:32:25 +02:00
jeffro256
377071ea89 cryptonote_core: remove blockchain_storage_boost_serialization.h
unused
2025-07-24 02:22:14 -05:00
jeffro256
5e54c72629 wallet: RPC method /incoming_transfers without daemon connection
Allows calling /incoming_transfers for cold wallets especially
2025-07-24 01:51:06 -05:00
tobtoht
fbc242d52d Merge pull request #9988
5f048a3 readme: fix macos depends requirements (tobtoht)
2025-07-19 15:19:53 +00:00
jeffro256
a2f336d22f serialization: massage pair casting to remove user-defined-cast warnings
Similar to: https://github.com/sstsimulator/sst-core/pull/1315
2025-07-16 00:03:42 -05:00
tobtoht
4da5f7cabd guix: build freebsd target with clang 18 2025-07-15 19:46:37 +02:00
tobtoht
fbd7348d82 Merge pull request #9997
40813f7 readme: recommend v0.18.4.1 (nahuhh)
2025-07-14 16:59:45 +00:00
tobtoht
fc1fcd4cbf Merge pull request #9996
ffd228b set do_not_relay always false in submit_multisig_main (SNeedlewoods)
2025-07-14 16:52:06 +00:00
nahuhh
40813f70ea readme: recommend v0.18.4.1 2025-07-14 16:05:04 +00:00
SNeedlewoods
ffd228b114 set do_not_relay always false in submit_multisig_main 2025-07-14 17:37:01 +02:00
tobtoht
4552250d86 guix: use canonical repository 2025-07-14 16:06:11 +02:00
tobtoht
4f649425d8 readme: update packages 2025-07-13 23:38:04 +02:00
tobtoht
d5eb1e6518 docs: add URI scheme 2025-07-13 22:32:43 +02:00
tobtoht
ea54a08c0e ci: depends: remove unused deps 2025-07-13 21:18:49 +02:00
tobtoht
249650162d Dockerfile: remove unused deps 2025-07-13 21:06:28 +02:00
tobtoht
5f048a30c9 readme: fix macos depends requirements 2025-07-13 20:24:56 +02:00
tobtoht
a1aef9e017 Merge pull request #9855
2aa90a1 Add log-level arg description to monerod (meed3)
2025-07-13 16:54:08 +00:00
tobtoht
40cd9ba0c4 Merge pull request #9981
6131dde rpc: return error correctly on bad key image string (jeffro256)
2025-07-13 16:53:30 +00:00
tobtoht
61b8c09f83 Merge pull request #9698
861437c add do_not_relay option to submit_multisig_main command in simplewallet (SNeedlewoods)
2025-07-13 16:52:14 +00:00
tobtoht
a9a399dc6b Merge pull request #9985
3c05f00 crypto: check+throw for Cryptonight v1 invalid input (jeffro256)
2025-07-13 16:50:58 +00:00
jeffro256
2820757d9d common: remove tools::add_element
Since C++17, `std::vector::emplace_back()` returns a reference, so this helper isn't needed anymore.
2025-07-11 11:31:46 -05:00
jeffro256
3c05f00b85 crypto: check+throw for Cryptonight v1 invalid input
If `crypto::cn_slow_hash()` is called with `variant=1` and an input length of less thab 43 bytes, it triggers a program exit.
This checks first and throws an exception instead.

Thank you to ADA Logics and the MAGIC Monero Fund for reporting this!
2025-07-11 11:19:43 -05:00
jeffro256
6131ddef10 rpc: return error correctly on bad key image string
Because of the missing `return` statement, the status is set to "OK" later on in the method when it shouldn't be.

Thank you to ADA Logics and the MAGIC Monero Fund for reporting this!
2025-07-11 10:39:03 -05:00
SNeedlewoods
861437c543 add do_not_relay option to submit_multisig_main command in simplewallet 2025-07-11 17:34:35 +02:00
tobtoht
c540d40071 Merge pull request #9957
2bce551 Add new dynamic fees to ZMQ (Lee Clagett)
2025-07-10 17:32:49 +00:00
tobtoht
bd34723f95 Merge pull request #9661
4a71ac0 depends: openssl: update to 3.0.17 (tobtoht)
2025-07-10 17:32:03 +00:00
tobtoht
804d8cf6da Merge pull request #9960
980f11f guix: cleanup manifest (tobtoht)
2025-07-10 17:29:10 +00:00
tobtoht
4a71ac0f08 depends: openssl: update to 3.0.17 2025-07-10 16:07:49 +02:00
tobtoht
d74035356f Merge pull request #9968
f5d4ba8 ci: bump debian to 11 (tobtoht)
2025-07-10 13:47:15 +00:00
tobtoht
26294e80c9 Merge pull request #9947
00237fe src: update checkpoints to match v0.18.4.1 (selsta)
2025-07-10 13:46:26 +00:00
selsta
00237fe18a src: update checkpoints to match v0.18.4.1 2025-07-10 15:31:54 +02:00
tobtoht
08438b60c1 Merge pull request #9838
2f2a8c4 wallet: Improve Fee Priority Code for Clarity (tzadiko)
2025-07-10 12:45:39 +00:00
tobtoht
88aa3ed21e Merge pull request #9925
4c341da BlockchainLMDB: remove `virtual` qualifers from overriden methods and mark `final` (jeffro256)
deb1ec9 BlockchainLMDB: mark overridden methods with `override` (jeffro256)
2025-07-10 12:34:05 +00:00
tobtoht
ff000b654d Merge pull request #9927
6fd3a2e tools::variant: remove (jeffro256)
2025-07-10 12:32:20 +00:00
tobtoht
6f2efeca1e Merge pull request #9940
e9c89dc wallet: kill support for deprecated ephemeral Boost messages (jeffro256)
2025-07-10 12:29:13 +00:00
tobtoht
8b95b38fa2 Merge pull request #9953
6d06de7 wallet: refactor subaddress expansion & add to transfer test (jeffro256)
6e26e44 wallet: improve lookahead logic & make rpc persistent (Justin Berman)
6f36037 wallet: create set_subaddress_lookahead wallet rpc endpoint (benevanoff)
b987676 wallet: ensure subaddress keys table is at least size of requested lookahead (benevanoff)
2025-07-10 12:20:49 +00:00
tobtoht
3d7171e684 Merge pull request #9977
71182c6 simplewallet: respect `do-not-relay` in `sweep_single` (hinto.janai)
2025-07-10 12:19:08 +00:00
tzadiko
2f2a8c46bb wallet: Improve Fee Priority Code for Clarity 2025-07-09 20:08:42 -05:00
hinto.janai
71182c6423 simplewallet: respect do-not-relay in sweep_single 2025-07-08 13:06:42 +00:00
tobtoht
4d5525a096 Merge pull request #9948
92315c0 Add is_same_host check to p2p (Lee *!* Clagett)
2025-07-08 09:28:55 +00:00
jeffro256
6d06de74b2 wallet: refactor subaddress expansion & add to transfer test 2025-07-07 22:16:11 +00:00
Justin Berman
6e26e4477e wallet: improve lookahead logic & make rpc persistent 2025-07-07 22:16:09 +00:00
benevanoff
6f36037116 wallet: create set_subaddress_lookahead wallet rpc endpoint 2025-07-07 22:15:04 +00:00
tobtoht
2657d3703c Merge pull request #9967
c704630 cmake: don't redefine project (tobtoht)
2025-07-07 19:39:54 +00:00
tobtoht
db91bde360 Merge pull request #9955
f567852 Add check for exception in tcp accept handler (Lee *!* Clagett)
2025-07-07 19:39:25 +00:00
tobtoht
17f6fb871c Merge pull request #9971
19fab4d wallet2: ignore checkpoints in fast_refresh when height < 1000 (Oscar Mira)
2025-07-03 10:49:07 +00:00
benevanoff
b987676d63 wallet: ensure subaddress keys table is at least size of requested lookahead 2025-06-27 21:35:16 +00:00
Oscar Mira
19fab4d38e wallet2: ignore checkpoints in fast_refresh when height < 1000 2025-06-27 00:35:56 +02:00
tobtoht
c7046302d4 cmake: don't redefine project 2025-06-24 08:01:37 +02:00
tobtoht
980f11f3ac guix: cleanup manifest 2025-06-16 10:42:27 +02:00
tobtoht
f5d4ba8ee3 ci: bump debian to 11 2025-06-15 21:11:13 +02:00
tobtoht
c572e1ad00 Merge pull request #9908
9891fe8 epee: fix string_tools on Windows (0xFFFC0000)
2025-06-14 18:59:52 +00:00
tobtoht
bc33cdfe29 Merge pull request #9935
69345db wallet2: use nearest checkpoint to allow fast_refresh on old accounts (Oscar Mira)
edc447e checkpoints: support nearest lower checkpoint lookup (Oscar Mira)
2025-06-14 18:58:52 +00:00
tobtoht
e9c33919a9 Merge pull request #9937
d0dda0b wallet:set refresh interval to default when hitting tip of chain (tzadiko)
2025-06-14 18:57:56 +00:00
tobtoht
ffa1488f77 Merge pull request #9944
b8af7e8 fix issue 9943: cli using wrong filename for storing keys (Rudolf Schmidt)
2025-06-14 18:56:23 +00:00
Lee Clagett
2bce551da7 Add new dynamic fees to ZMQ 2025-06-13 17:10:17 -04:00
Lee *!* Clagett
f567852867 Add check for exception in tcp accept handler 2025-06-12 17:46:42 -04:00
Rudolf Schmidt
b8af7e8406 fix issue 9943: cli using wrong filename for storing keys 2025-06-07 15:31:25 +02:00
jeffro256
e9c89dc6ab wallet: kill support for deprecated ephemeral Boost messages
The commit kills support for deprecated ephemeral Boost messages: signed/unsigned transaction sets, pending transactions, reserve proofs, MMS messages, etc.
It does NOT kill support for loading very old wallets in Boost format, that should be supported indefinitely. These messages were deprecated 5 years ago. Since
then, we have had a hard fork to enable a new non-compatible transaction type (w/ view tags), and disable the old transaction type. This renders basically all
of the aforementioned messages before that HF useless, with the possible exception of reserve proofs.

This commit also cleans up dead inclusions of boost serialization headers.

This commit is part of upstreaming Carrot/FCMP++. Killing support for Boost messages now means less boilerplate Boost serialization review for Carrot/FCMP++.
2025-05-30 14:24:56 -05:00
jeffro256
4c341da1e5 BlockchainLMDB: remove virtual qualifers from overriden methods and mark final
According to guideline at https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines.html#c128-virtual-functions-should-specify-exactly-one-of-virtual-override-or-final

Co-authored-by: SNeedlewoods <sneedlewoods_1@protonmail.com>
Co-authored-by: Lee *!* Clagett <code@leeclagett.com>
2025-05-30 12:11:43 -05:00
Maximilian Hubert
8a33cafcbf fix typo 2025-05-29 23:26:22 +02:00
tzadiko
d0dda0b6ee wallet:set refresh interval to default when hitting tip of chain 2025-05-27 19:19:42 -05:00
Oscar Mira
69345dbe29 wallet2: use nearest checkpoint to allow fast_refresh on old accounts 2025-05-23 19:27:19 +02:00
Oscar Mira
edc447eb75 checkpoints: support nearest lower checkpoint lookup 2025-05-23 19:27:10 +02:00
Lee *!* Clagett
92315c0357 Add is_same_host check to p2p 2025-05-19 18:30:18 -04:00
tobtoht
125622d5bd Merge pull request #9922
ff429c09b gpg_keys: bump my key's expiration to 5 years (moneromooo-monero)
2025-05-16 11:59:05 +00:00
tobtoht
047624ec38 Merge pull request #9923
0db4ed059 gpg_keys: bump jeffro256 expiration to 2027-05-09 (jeffro256)
2025-05-16 11:58:32 +00:00
jeffro256
6fd3a2e06b tools::variant: remove 2025-05-15 13:48:36 -05:00
jeffro256
deb1ec93c8 BlockchainLMDB: mark overridden methods with override 2025-05-15 13:13:39 -05:00
jeffro256
0db4ed059e gpg_keys: bump jeffro256 expiration to 2027-05-09 2025-05-08 19:11:54 -05:00
moneromooo-monero
ff429c09b7 gpg_keys: bump my key's expiration to 5 years
I had missed the subkey in my recent bump
2025-05-08 17:20:06 +00:00
Crypto City
90256c8208 error out if functional tests are disabled 2025-05-08 17:08:32 +00:00
jeffro256
06b74ae3f5 ringct & cryptonote_basic: detangle dependencies
`libringct` was linking against `libcryptonote_basic` for a single, one-line convenience function: `cryptonote::get_blob_hash`.
Since `cryptonote_basic.h` includes `rctTypes.h`, this one function effectively made an explicit circular dependency between
the two libraries. `cryptonote_format_utils.cpp` was including header `rctSigs.h` from `libringct`, when only `rctOps.h` from
`libringct_basic` needed to be included. `libcryptonote_basic` wasn't explictly linking against `libringct_basic` nor
`libringct` like it should have. And `libblockchain_db` wasn't linking against `libcryptonote_basic` like it should have. We
can also downgrade `libblockchain_db`'s dependency on `libringct` to `libringct_basic`.
2025-05-07 19:52:24 -05:00
tobtoht
c2e3835223 Merge pull request #9910
d106e21b7 src: fix clangd warnings (0xFFFC0000)
2025-05-07 03:32:02 +00:00
0xFFFC0000
d106e21b74 src: fix clangd warnings 2025-05-01 05:27:35 +00:00
tobtoht
c5cb8e1b78 Merge pull request #9916
98b79485d msys2 build: include int headers (jeffro256)
2025-04-30 05:29:25 +00:00
jeffro256
98b79485df msys2 build: include int headers 2025-04-29 00:57:37 -05:00
tobtoht
b6df4bb142 Merge pull request #9875
fd08594ca wallet: fix monero-wallet-rpc ignoring calls during sync (tzadiko)
2025-04-25 05:09:56 +00:00
tobtoht
d2d976ca5a Merge pull request #9404
f4672c259 cryptonote_core: only verify txpool when the hardfork value has changed. (0xFFFC0000)
2025-04-24 16:13:01 +00:00
tobtoht
906acaf963 Merge pull request #9859
a57c099d0 fix: added key correspondence check (StrawberryChocolateFudge)
2025-04-24 15:44:08 +00:00
tobtoht
02fba21846 Merge pull request #9881
8af33c71c epee: syncobj: replace shims with Boost classes (jeffro256)
2025-04-23 16:31:56 +00:00
tobtoht
03de3ad5a6 Merge pull request #9879
18376ca57 epee: remove reg_exp_definer.h (jeffro256)
2025-04-23 16:27:03 +00:00
tobtoht
56ee3d2765 Merge pull request #9872
6d6e8e173 construct_tx_and_get_tx_key: don't erase exception trace (jeffro256)
2025-04-23 16:22:25 +00:00
tobtoht
d1a038683d Merge pull request #9848
f8ecd3174 Fix copies in ZMQ input/output (Lee *!* Clagett)
2025-04-23 16:21:01 +00:00
tobtoht
8d6b25568f Merge pull request #9795
cb91dcee3 tests: Speed up p2p reorg test (iamamyth)
2025-04-23 16:15:23 +00:00
tobtoht
627bb04b98 Merge pull request #9851
70fe289d8 Improve move/copy/default constructor semantics for tx and block (Lee *!* Clagett)
2025-04-23 16:14:50 +00:00
tobtoht
ee497cc172 Merge pull request #9857
332d92ffb epee: span::operator[] allow mut ref from const span (jeffro256)
2025-04-23 16:13:36 +00:00
tobtoht
28dd16181b Merge pull request #9863
c848e21c4 fix: multisig stale data after failed refresh (SNeedlewoods)
2025-04-23 16:12:45 +00:00
tobtoht
80a2cd3dd3 Merge pull request #9873
b81b38760 easylogging: replace NULL with empty string literal (tobtoht)
2025-04-23 16:11:04 +00:00
tobtoht
aca10cfe30 Merge pull request #9876
f728c963c CMakeLists: add cache option for MANUAL_SUBMODULES (jeffro256)
2025-04-23 16:10:10 +00:00
tobtoht
22627363a4 Merge pull request #9884
7cb406e05 cryptonote_basic: is_coinbase() take prefix (jeffro256)
2025-04-23 16:07:39 +00:00
tobtoht
563898bdb5 Merge pull request #9886
65b1eb772 Fix cmake usage in FetchContent and ExternalProject (Lee Clagett)
2025-04-23 16:07:01 +00:00
tobtoht
cd19e661cb Merge pull request #9889
b6ffb4c94 ci: run brew update (tobtoht)
2025-04-23 16:05:10 +00:00
tobtoht
9be4b92e89 Merge pull request #9892
de5a4a1cf guix: drop support for i686-linux-gnu (tobtoht)
2025-04-23 16:04:23 +00:00
tobtoht
e3cf0d4792 Merge pull request #9893
b1728a95a guix: unset HOST env variable (tobtoht)
2025-04-23 16:03:47 +00:00
tobtoht
bdc7898c4f Merge pull request #9895
4877537a0 fix inconsistent casing in Dockerfile (menaceone)
2025-04-23 16:03:06 +00:00
tobtoht
a726f8231d Merge pull request #9904
9d4dd0ef8 chore: fix some typos (tsinghuacoder)
2025-04-23 16:02:20 +00:00
tobtoht
cef67a7412 Merge pull request #9896
348ed19d9 guix: ask for confirmation before deleting files (tobtoht)
2025-04-22 13:32:42 +00:00
0xFFFC0000
9891fe8238 epee: fix string_tools on Windows 2025-04-22 13:22:02 +00:00
tsinghuacoder
9d4dd0ef8d chore: fix some typos
Signed-off-by: tsinghuacoder <tsinghuacoder@icloud.com>
2025-04-11 17:05:25 +08:00
tobtoht
348ed19d9c guix: ask for confirmation before deleting files 2025-04-07 10:58:56 +02:00
menaceone
4877537a03 fix inconsistent casing in Dockerfile
Switch from lower case "as" to upper case "AS" to be consistent with the other keywords.
2025-04-06 22:31:15 +02:00
tobtoht
b1728a95a8 guix: unset HOST env variable 2025-04-06 21:40:39 +02:00
tobtoht
de5a4a1cf7 guix: drop support for i686-linux-gnu 2025-04-06 18:26:12 +02:00
tobtoht
3b01c49095 Merge pull request #9891
fc80dc6e9 guix: remove --user option (tobtoht)
2025-04-06 16:23:19 +00:00
tobtoht
fc80dc6e97 guix: remove --user option 2025-04-05 19:15:25 +02:00
tobtoht
b6ffb4c944 ci: run brew update 2025-04-03 15:33:16 +02:00
Lee Clagett
65b1eb7729 Fix cmake usage in FetchContent and ExternalProject 2025-04-02 16:55:12 -04:00
jeffro256
7cb406e05a cryptonote_basic: is_coinbase() take prefix
Useful for wallet business logic, which stores the prefixes in `m_transfers`, not the whole transaction.
2025-04-02 11:01:49 -05:00
StrawberryChocolateFudge
a57c099d07 fix: added key correspondence check
refactor: key correspondence check error handling

fixed indentation

removed EOL whitespace
2025-04-02 04:30:32 +02:00
jeffro256
7b28be0ef3 functional_tests: test PR #9863 2025-04-01 13:56:44 -05:00
jeffro256
8af33c71cf epee: syncobj: replace shims with Boost classes
a. `critical_section` is functionally identical to a `boost::recursive_mutex`
b. `critical_region_t` is functionally identical to a `boost::unique_lock`
c. remove some vestigial definitons `g_test_dbg_lock_sleep` as a variable
2025-04-01 11:09:26 -05:00
jeffro256
18376ca57d epee: remove reg_exp_definer.h
Locking to initialize static block variables isn't necessary since C++11:
https://en.cppreference.com/w/cpp/language/storage_duration#Static_block_variables
2025-03-31 14:02:15 -05:00
tzadiko
fd08594caa wallet: fix monero-wallet-rpc ignoring calls during sync 2025-03-28 20:13:02 -05:00
jeffro256
f728c963c1 CMakeLists: add cache option for MANUAL_SUBMODULES 2025-03-28 13:14:06 -05:00
SNeedlewoods
c848e21c43 fix: multisig stale data after failed refresh 2025-03-28 12:48:38 +01:00
tobtoht
b81b387606 easylogging: replace NULL with empty string literal 2025-03-27 10:48:51 +01:00
jeffro256
6d6e8e1733 construct_tx_and_get_tx_key: don't erase exception trace 2025-03-26 15:10:09 -05:00
tobtoht
977dedce2c Merge pull request #9865
0e243a4ac checkpoints: update to a recent block height (selsta)
2025-03-26 12:37:06 +00:00
tobtoht
4b127d9c6b Merge pull request #9842
30ae2deed Correct Max / Min Block Waiting Periods (tzadiko)
2025-03-26 12:35:32 +00:00
tzadiko
30ae2deed5 Correct Max / Min Block Waiting Periods 2025-03-25 16:55:43 -05:00
selsta
0e243a4ac0 checkpoints: update to a recent block height 2025-03-25 21:28:20 +01:00
iamamyth
cb91dcee36 tests: Speed up p2p reorg test
Use a fixed, 240s deadline for the daemons to reach agreement and poll
with a suitable frequency (.25s), rather than polling up to 100 times at
roughly 10s intervals.
2025-03-24 11:18:57 -07:00
tobtoht
7ea8bcdc91 Merge pull request #9808
446d9622f logging: Generalize terminal color detection (iamamyth)
2025-03-24 14:06:18 +00:00
iamamyth
446d9622f8 logging: Generalize terminal color detection
Assume the terminal supports color codes if TERM ends with `-color` or
`-256color`, rather than special-casing a handful of such terminals.

Add tests for terminal color detection.

Co-authored-by: laanwj <126646+laanwj@users.noreply.github.com>
2025-03-24 11:07:33 -07:00
tobtoht
9b2031d244 Merge pull request #9861
55e6ba49c Fix expected hash check (Lee *!* Clagett)
2025-03-24 13:59:18 +00:00
Lee *!* Clagett
55e6ba49cb Fix expected hash check 2025-03-24 10:56:53 -04:00
tobtoht
84685492e6 Merge pull request #9840
8024d43e6 trezor: fix cmake variables (ComputeryPony)
2025-03-24 03:27:14 +00:00
tobtoht
642db87007 Merge pull request #9791
ef509e1c0 ci: introduce rust toolchain (tobtoht)
2025-03-24 03:26:20 +00:00
tobtoht
902b664e26 Merge pull request #9821
665316708 Fix HTTP unit tests (broken with new Boost versions) (Lee *!* Clagett)
2025-03-24 03:05:09 +00:00
tobtoht
f2d765afc4 Merge pull request #9809
8c43e33e3 logging: Fix easylogging++ init with blank config (iamamyth)
2025-03-24 03:02:46 +00:00
tobtoht
ef128a80e1 Merge pull request #9846
834438acb Remove hidden transaction copy in add_block (Lee *!* Clagett)
2025-03-24 02:54:20 +00:00
tobtoht
ba77342faa Merge pull request #9845
51a72c120 Blockchain: remove skip for pruned txs in `check_tx_inputs()` (jeffro256)
2025-03-24 02:53:13 +00:00
tobtoht
2d20c4a9b7 Merge pull request #9844
528664b1c cryptonote_protocol: fix handling of pruned blocks during sync (jeffro256)
2025-03-24 02:50:17 +00:00
tobtoht
227e503922 Merge pull request #9832
5393bef13 wallet: fix different-signedness int comparison warnings (jeffro256)
2025-03-24 02:46:29 +00:00
tobtoht
dfa92d6031 Merge pull request #9824
da8907974 chore: fix some typos in comments (shenpengfeng)
2025-03-24 02:45:18 +00:00
tobtoht
3c6f1c7748 Merge pull request #9839
a5fabe513 trezor: fix protobuf 30 compatibility (tobtoht)
2025-03-23 16:20:39 +00:00
jeffro256
332d92ffbe epee: span::operator[] allow mut ref from const span
Changes the `operator[]` method so we can get mutable
references to elements even if the span is `const`.
The operator is now also `constexpr`.
This behavior matches `std::span`.

C++ standard reference: https://en.cppreference.com/w/cpp/container/span/operator_at
2025-03-22 16:53:17 -05:00
Lee *!* Clagett
70fe289d82 Improve move/copy/default constructor semantics for tx and block 2025-03-21 14:02:12 -04:00
meed3
2aa90a1135 Add log-level arg description to monerod 2025-03-20 12:52:20 +00:00
Lee *!* Clagett
f8ecd31743 Fix copies in ZMQ input/output 2025-03-18 01:11:12 -04:00
Lee *!* Clagett
834438acb8 Remove hidden transaction copy in add_block 2025-03-17 19:19:20 -04:00
jeffro256
51a72c1209 Blockchain: remove skip for pruned txs in check_tx_inputs()
I can't see how this would trigger in the current codebase, so it's not a *current* safety issue,
but I can very well see it becoming on in the future if downstream code doesn't handle the passing
of pruned transactions correctly. I think the safe/good choice would be to remove this skip now
that all transactions that pass into the mempool are supposed to be unpruned. And for all in-block
txs, `check_tx_inputs()` isn't called for checkpointed blocks, and we sync pruned blocks only if
syncing checkpointed blocks.
2025-03-17 09:31:50 -05:00
jeffro256
528664b1c8 cryptonote_protocol: fix handling of pruned blocks during sync 2025-03-17 09:09:25 -05:00
ComputeryPony
8024d43e6f trezor: fix cmake variables 2025-03-16 18:57:44 -05:00
tobtoht
a5fabe5134 trezor: fix protobuf 30 compatibility 2025-03-16 23:02:45 +01:00
jeffro256
5393bef139 wallet: fix different-signedness int comparison warnings 2025-03-13 04:10:29 -05:00
tobtoht
f90a267fa3 Merge pull request #9820
50897a687 Limit scope of TCP checks to incoming only (Lee *!* Clagett)
2025-03-11 19:13:41 +00:00
tobtoht
44523cafff Merge pull request #9135
c069c04ed blockchain sync: reduce disk writes from 2 to 1 per tx (jeffro256)
2025-03-10 16:16:18 +00:00
jeffro256
c069c04ede blockchain sync: reduce disk writes from 2 to 1 per tx 2025-03-10 01:02:37 -05:00
shenpengfeng
da8907974e chore: fix some typos in comments
Signed-off-by: shenpengfeng <xinhangzhou@icloud.com>
2025-02-28 00:40:29 +08:00
Lee *!* Clagett
665316708c Fix HTTP unit tests (broken with new Boost versions) 2025-02-25 18:51:56 -05:00
Lee *!* Clagett
50897a6871 Limit scope of TCP checks to incoming only 2025-02-24 21:55:35 -05:00
tobtoht
8d6aff9590 Merge pull request #9538
c461b3c67 make: remove static targets (tobtoht)
2025-02-24 18:16:13 +00:00
0xFFFC0000
f4672c2595 cryptonote_core: only verify txpool when the hardfork value has changed.
Co-authored-by: Boog900 <boog900@tutanota.com>
2025-02-24 17:25:27 +00:00
iamamyth
8c43e33e35 logging: Fix easylogging++ init with blank config
The upstream version of el::base::TypedConfigurations::unsafeGetConfigByRef
accesses uninitialized memory if a key doesn't exist.
Commit b2c59af84d patched the library to
throw in this case, avoiding the invalid access, but the more suitable
pattern, both logically, and as evidenced by the behavior of
unsafeGetConfigByVal, would be to return a const reference to a
default-initialized value with static storage duration.
2025-02-19 15:02:08 -08:00
tobtoht
97c0ce73c4 Merge pull request #9804
418a9adb1 BlockchainLMDB: fix data.mdb nuking on Windows (jeffro256)
2025-02-17 18:23:06 +00:00
jeffro256
418a9adb13 BlockchainLMDB: fix data.mdb nuking on Windows 2025-02-17 11:57:32 -06:00
tobtoht
802844de23 Merge pull request #9802
c3fc0ffc3 common: add missing iomanip include (tobtoht)
2025-02-17 16:33:52 +00:00
tobtoht
c3fc0ffc37 common: add missing iomanip include 2025-02-17 17:20:03 +01:00
tobtoht
aae0c7743a Merge pull request #9439
02e2a4f4c assign default port for http and https clients (woodser)
2025-02-17 16:03:37 +00:00
woodser
02e2a4f4cd assign default port for http and https clients 2025-02-17 08:11:44 -05:00
tobtoht
94188d1a4a Merge pull request #9428
92b671c56 contrib: smaller and more reasonable log size. (0xFFFC0000)
2025-02-17 10:23:19 +00:00
tobtoht
a3db257c39 Merge pull request #9403
0a29a9f76 Add ZMQ-PUB json-schemas (Lee *!* Clagett)
2025-02-17 10:22:31 +00:00
tobtoht
ef509e1c08 ci: introduce rust toolchain
Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
2025-02-17 08:23:37 +01:00
tobtoht
13002ddd4b Merge pull request #9784
5b3021305 ci: containerize depends jobs (tobtoht)
2025-02-16 05:26:10 +00:00
tobtoht
24c90ae9a2 Merge pull request #9787
05184554a add wallet rpc call to get default fee priority (woodser)
2025-02-16 05:22:05 +00:00
woodser
05184554a6 add wallet rpc call to get default fee priority 2025-02-15 15:15:23 -05:00
tobtoht
5b30213057 ci: containerize depends jobs 2025-02-14 10:45:02 +01:00
tobtoht
257db6dff2 Merge pull request #9765
ec74ff4a3 Set response limits on http server connections (Lee *!* Clagett)
2025-02-14 07:33:45 +00:00
tobtoht
d6b7c8a351 Merge pull request #9728
4eae7c9ac cmake: remove redundant config env var (tobtoht)
2025-02-14 06:03:50 +00:00
Lee *!* Clagett
ec74ff4a3d Set response limits on http server connections 2025-02-13 23:55:17 -05:00
tobtoht
28e2042b04 Merge pull request #9762
950ddbf30 tests: Improve p2p tx propagation functional test (iamamyth)
2025-02-14 04:00:24 +00:00
tobtoht
a1b3468f26 Merge pull request #9671
325e317a3 depends: always pass --with-pic to autoconf builds (tobtoht)
2025-02-14 03:54:04 +00:00
tobtoht
203af950fd Merge pull request #9654
eee5838aa guix: remove automake & autoconf (tobtoht)
2025-02-14 03:52:14 +00:00
tobtoht
4d1a8804ae Merge pull request #9729
e250841a3 cmake: remove msvc (tobtoht)
2025-02-14 03:51:01 +00:00
tobtoht
6343e3ecf6 Merge pull request #9773
000d75777 depends: use staging_prefix_dir where possible (tobtoht)
2025-02-14 03:50:14 +00:00
tobtoht
915c5dc1d9 Merge pull request #9456
b746d0152 depends: android_ndk: update to 27 (latest LTS) (tobtoht)
2025-02-13 19:34:44 +00:00
tobtoht
ca16c290ab Merge pull request #9711
2511f8579 brew: use latest protobuf (tobtoht)
2025-02-13 17:40:24 +00:00
tobtoht
9570c1a216 Merge pull request #9717
ff4e86dc4 ringct: remove unused range proof types and fix serialization bug (jeffro256)
2025-02-13 17:37:47 +00:00
tobtoht
e87c16dd3e Merge pull request #9582
16b5c11f7 Some cleanup in span/connection_context + few more checks (Lee *!* Clagett)
2025-02-13 17:36:19 +00:00
tobtoht
eceb3cdc8d Merge pull request #9760
9386f87a7 ringct: remove inclusion of cryptonote_format_utils.h in rctOps.cpp (jeffro256)
2025-02-13 17:34:16 +00:00
tobtoht
2fae69f623 Merge pull request #9761
ad782ded1 utils: Simplify python RPC Response implementation (iamamyth)
2025-02-13 17:33:32 +00:00
tobtoht
3c4750c059 Merge pull request #9763
274b5748d tests: Improve functional_tests_rpc startup (iamamyth)
2025-02-13 17:32:47 +00:00
tobtoht
f97db315ba Merge pull request #9769
a076ac36e ci: run guix builds on Cargo.lock update (tobtoht)
2025-02-13 17:31:59 +00:00
tobtoht
ac7eeab52d Merge pull request #9770
151c7f0e8 src: bump network speed 4x (nahuhh)
2025-02-13 17:31:18 +00:00
tobtoht
9d6dae8031 Merge pull request #9779
498ed27cf ci: consolidate ubuntu 20.04 runs (tobtoht)
2025-02-13 17:28:11 +00:00
tobtoht
08503dab4e Merge pull request #9792
d796b1aff p2p/net_node.inl : update seed node (plowsof)
2025-02-13 17:26:05 +00:00
iamamyth
950ddbf30e tests: Improve p2p tx propagation functional test
Reduce the likelihood of false positive failures in the p2p
transaction propagation functional test by waiting up to a
maximum timeout for a transaction to propagate, rather than using a
fixed timeout, to reflect the random delay of Dandelion++ transaction
propagation. This strategy also speeds test execution in cases where
propagation occurs faster than the previously expected fixed delay.
2025-02-11 18:30:16 -08:00
plowsof
d796b1aff5 p2p/net_node.inl : update seed node 2025-02-09 23:42:40 +00:00
tobtoht
e250841a35 cmake: remove msvc 2025-02-09 11:43:57 +01:00
tobtoht
2511f8579d brew: use latest protobuf 2025-02-09 11:42:14 +01:00
tobtoht
325e317a3e depends: always pass --with-pic to autoconf builds 2025-02-09 11:40:54 +01:00
tobtoht
c461b3c67b make: remove static targets 2025-02-09 11:38:43 +01:00
tobtoht
498ed27cf3 ci: consolidate ubuntu 20.04 runs 2025-02-07 09:34:54 +01:00
tobtoht
000d757773 depends: use staging_prefix_dir where possible 2025-02-06 07:06:08 +01:00
tobtoht
84df77404e Merge pull request #9708
a0ed32391 ci: containerize ubuntu cli jobs (tobtoht)
2025-02-06 05:12:58 +00:00
tobtoht
a0ed323919 ci: containerize ubuntu cli jobs 2025-02-06 04:34:21 +01:00
nahuhh
151c7f0e85 src: bump network speed 4x 2025-02-05 17:30:58 +00:00
tobtoht
a076ac36e2 ci: run guix builds on Cargo.lock update 2025-02-05 07:46:24 +01:00
tobtoht
662d246cd5 Merge pull request #9726
d696efdc9 cmake: remove obsolete policy setting (tobtoht)
2025-02-04 18:44:48 +00:00
tobtoht
796f031646 Merge pull request #9725
e662fa9de cmake: don't explicitely link libatomic (tobtoht)
2025-02-04 18:44:04 +00:00
tobtoht
2102aebfcb Merge pull request #9724
d07f99a8d cmake: remove obsolete msys2 workaround (tobtoht)
2025-02-04 18:43:24 +00:00
tobtoht
f58dde6ced Merge pull request #9681
040c16321 depends: remove expat (tobtoht)
2025-02-04 18:42:09 +00:00
tobtoht
c57a429b2b Merge pull request #9675
e7e00df83 depends: remove eudev (tobtoht)
2025-02-04 18:41:24 +00:00
tobtoht
4118bd8721 Merge pull request #9467
5cb0b263d guix: bump time-machine to 9d09b0cf841fb657a1aec12e9bab68e00c2b493c (tobtoht)
2025-02-04 18:39:57 +00:00
tobtoht
513626059e Merge pull request #9706
7f40add8f ci: build wallet_api for all linux cli jobs (tobtoht)
2025-02-04 18:36:35 +00:00
tobtoht
59882b5d71 Merge pull request #9713
7110d180d guix: readme update (hinto.janai)
2025-02-04 17:00:58 +00:00
tobtoht
a92bd63822 Merge pull request #9739
70e441293 wallet: mark wallet error throwing functions as noreturn (jeffro256)
2025-02-04 16:59:18 +00:00
iamamyth
274b5748da tests: Improve functional_tests_rpc startup
* Use a global startup timeout, and apply it to each socket's connect
  call, rather than repeating connection attempts with short timeouts.

* Avoid leaking sockets by closing them.
2025-01-31 21:15:20 -08:00
iamamyth
ad782ded1d utils: Simplify python RPC Response implementation
Reduce bloat in the python RPC Response class by making better use of
superclass methods and recursion. As part of this change, add tests for
the Response class.
2025-01-31 17:47:55 -08:00
jeffro256
9386f87a78 ringct: remove inclusion of cryptonote_format_utils.h in rctOps.cpp
This vestigial include line breaks some downstream builds
2025-01-31 16:04:08 -06:00
tobtoht
8d6855c067 CoC: only allow Administrators to merge changes to the CoC 2025-01-29 08:20:09 +01:00
tobtoht
e3db452b52 CoC: 'log an issue' -> 'open an issue' 2025-01-29 02:23:39 +01:00
tobtoht
5c32fbd0b1 CoC: do not encourage using real names or 'well-known aliases' 2025-01-29 02:20:11 +01:00
tobtoht
b9bead529b CoC: prohibit anyone from committing patches to the project directly 2025-01-29 02:16:06 +01:00
tobtoht
dc5e15cc3d CoC: remove constraint suggesting copyright can be 'owned collectively' 2025-01-29 02:03:30 +01:00
tobtoht
53cb44c7b7 CoC: remove constraints on 'release history' 2025-01-29 01:56:06 +01:00
tobtoht
a60c108490 CoC: clarify 'project founders' 2025-01-29 01:52:24 +01:00
jeffro256
70e4412930 wallet: mark wallet error throwing functions as noreturn
Simplifies calling logic where a branch ends but a return value is needed
2025-01-28 00:05:31 -06:00
tobtoht
70d39076e0 docs: remove 'creating stable releases' section 2025-01-27 02:19:29 +01:00
tobtoht
69020aa0b3 docs: remove 'Monero Maintainer Team' 2025-01-26 17:27:46 +01:00
tobtoht
5345ebadef docs: allow maintainers to merge their own prs if queued 2025-01-26 15:07:41 +01:00
tobtoht
8154b90136 docs: do not automatically promote contributors to maintainers 2025-01-26 14:49:17 +01:00
tobtoht
9bd265d132 docs: don't allow maintainers to edit docs without review 2025-01-26 14:37:36 +01:00
tobtoht
7f40add8f6 ci: build wallet_api for all linux cli jobs 2025-01-26 13:38:53 +01:00
tobtoht
90359e31fd Merge pull request #9723
b2140b628 ci: Parallelize Arch Linux build (iamamyth)
2025-01-26 12:12:10 +00:00
tobtoht
4eae7c9ac7 cmake: remove redundant config env var 2025-01-26 12:12:53 +01:00
tobtoht
d696efdc98 cmake: remove obsolete policy setting 2025-01-26 11:31:49 +01:00
tobtoht
e662fa9def cmake: don't explicitely link libatomic 2025-01-26 05:55:11 +01:00
tobtoht
d07f99a8dc cmake: remove obsolete msys2 workaround 2025-01-26 05:28:55 +01:00
iamamyth
b2140b6287 ci: Parallelize Arch Linux build
The "--parallel" flag got dropped from the Arch Linux build due to
unidentified, logical commit conflicts.
2025-01-25 15:11:04 -08:00
tobtoht
8d60021377 Merge pull request #9716
f48a73d91 tests: Fix tools::is_hdd unit tests (iamamyth)
2025-01-25 11:43:04 +00:00
iamamyth
f48a73d919 tests: Fix tools::is_hdd unit tests
Correct the unit tests for tools::is_hdd to avoid making assumptions
about the configuration of a particular device based solely on the
value of the __GLIBC__ preprocessor flag. Instead, rely on the
test invoker to provide paths for devices of specific types via
the process environment, thereby avoiding faulty assumptions and
improving the specificity of test assertions. To ensure appropriate
devices exist, add a script, tests/create_test_disks.sh, which
configures loopback devices mirroring relevant configurations.
2025-01-24 23:11:47 -08:00
tobtoht
c0f3a1c1db Merge pull request #9690
f18b966a9 build: auto-set GitHub runner make job count (iamamyth)
2025-01-25 05:57:58 +00:00
tobtoht
040c16321f depends: remove expat 2025-01-25 05:57:21 +01:00
tobtoht
34d3e5201a Merge pull request #9715
e38c175d9 gtest: add submodule (tobtoht)
2025-01-25 04:48:01 +00:00
tobtoht
d69161d584 Merge pull request #9701
f3349b9dd daemon: fix log message typo (selsta)
2025-01-25 04:47:06 +00:00
tobtoht
996986b3af Merge pull request #9642
f150ff177 depends: unbound: update to 1.22.0 (tobtoht)
2025-01-25 04:46:08 +00:00
tobtoht
e7e00df831 depends: remove eudev 2025-01-24 10:52:42 +01:00
tobtoht
eee5838aaf guix: remove automake & autoconf 2025-01-24 01:53:25 +01:00
tobtoht
f150ff177a depends: unbound: update to 1.22.0 2025-01-24 01:50:30 +01:00
tobtoht
d42db814db Merge pull request #9720
3b64d1f55 functional tests: fix race in restore wallet refresh (j-berman)
2025-01-24 00:03:36 +00:00
j-berman
3b64d1f558 functional tests: fix race in restore wallet refresh 2025-01-23 11:37:48 -08:00
tobtoht
eaf9f98930 Merge pull request #9680
0bbac40e5 ci: add arch linux build (tobtoht)
2025-01-22 22:57:35 +00:00
tobtoht
3b7bd060d0 Merge pull request #9694
4feb6b3e2 crypto: remove unused POD classes (iamamyth)
2025-01-22 22:56:28 +00:00
tobtoht
cb25aba9ac Merge pull request #9693
07d93f01a common: Remove resolved FIXME in pod-class.h (iamamyth)
2025-01-22 22:55:21 +00:00
tobtoht
0beb733a16 Merge pull request #9691
254ac2bae crypto: make CRYPTO_DEFINE_HASH_FUNCTIONS adhere strict aliasing (jeffro256)
2025-01-22 22:53:55 +00:00
tobtoht
da470b7471 Merge pull request #9688
26b4f5e00 Revert "blockchain: detect and log bad difficulty calculations" (selsta)
2025-01-22 22:51:10 +00:00
tobtoht
73638a9e35 Merge pull request #9643
a8292fcf8 depends: hidapi: update to 0.14.0 (tobtoht)
2025-01-22 22:50:17 +00:00
tobtoht
8ab643adb0 Merge pull request #9523
3c25d6e3b build: bump minimum macos version to 10.15 (tobtoht)
2025-01-22 22:49:01 +00:00
tobtoht
0e253622b2 Merge pull request #9459
7e766e13c Cleanup TCP throttling code (performance) + move connection checks (Lee *!* Clagett)
2025-01-22 22:39:57 +00:00
tobtoht
e38c175d92 gtest: add submodule 2025-01-19 12:31:02 +01:00
tobtoht
1bd57c8e95 Merge pull request #9653
c182428 depends: don't run auto(re)conf anywhere (tobtoht)
2025-01-19 11:15:30 +00:00
jeffro256
ff4e86dc4f ringct: remove unused range proof types and fix serialization bug 2025-01-18 23:40:19 -06:00
tobtoht
c182428c35 depends: don't run auto(re)conf anywhere 2025-01-19 04:58:02 +01:00
tobtoht
249977ac32 Merge pull request #9650
84a56ae guix: remove moreutils (tobtoht)
2025-01-19 03:54:16 +00:00
tobtoht
b63122617e Merge pull request #9648
1d56b84 guix: remove p7zip (tobtoht)
2025-01-19 03:49:51 +00:00
tobtoht
d22e82dcb0 Merge pull request #9646
c3bb84f depends: sodium: drop unneeded patch (tobtoht)
2025-01-19 03:49:17 +00:00
tobtoht
6db5bdd5d8 Merge pull request #9645
4156bdc depends: cleanup packages.mk (tobtoht)
2025-01-19 03:47:56 +00:00
tobtoht
104001963b Merge pull request #9544
6fd2276 daemonizer: replace boost chrono/thread with std lib (tobtoht)
2025-01-19 03:47:11 +00:00
tobtoht
1360b18ab8 Merge pull request #9491
ad72b13 trezor: vendor trezor-common (tobtoht)
2025-01-19 03:46:24 +00:00
tobtoht
c5360bb4ec Merge pull request #9453
1a21e3d depends: freebsd_base: update to 12.3 (tobtoht)
2025-01-19 03:45:33 +00:00
tobtoht
94f7efd53f Merge pull request #9683
133298d Fix linking error with libunwind when build for FreeBSD with GCC, by preferring easylogging++ when GCC is being used (WHR)
2025-01-18 11:11:47 +00:00
tobtoht
09d95c2f14 Merge pull request #9664
4e54b19 check for windows NTFS compression on database files (eversinc33)
2025-01-18 11:06:38 +00:00
tobtoht
2226d4f7e0 Merge pull request #9389
98decee wallet2: remove refresh() from scan_tx (j-berman)
2025-01-18 00:09:41 +00:00
tobtoht
c3bb84f21b depends: sodium: drop unneeded patch 2025-01-17 21:46:10 +01:00
tobtoht
db70cc23dc Merge pull request #9171
35477a6 build: remove glibc backcompat (tobtoht)
2025-01-17 19:03:33 +00:00
hinto.janai
7110d180d2 guix: readme update 2025-01-16 15:42:17 -05:00
iamamyth
f18b966a96 build: auto-set GitHub runner make job count
Dynamically determine an appropriate number of make jobs for the GitHub
runner container, based upon the number of available CPU cores and RAM,
using the rule that each job requires a dedicated core and 2.25GiB of RAM.
2025-01-16 11:53:46 -08:00
tobtoht
ad72b1307f trezor: vendor trezor-common 2025-01-16 13:03:58 +01:00
tobtoht
1179269478 Merge pull request #9709
5f5770a tests: fix IPv4Success, DNSSECSuccess (tobtoht)
2025-01-16 01:35:23 +00:00
tobtoht
5f5770a51d tests: fix IPv4Success, DNSSECSuccess
"example.com" now has more than one A record
2025-01-15 20:28:33 +01:00
j-berman
98decee8ac wallet2: remove refresh() from scan_tx
Fixes #9354
2025-01-14 13:37:46 -08:00
eversinc33
4e54b19793 check for windows NTFS compression on database files 2025-01-14 21:12:49 +01:00
tobtoht
0bbac40e55 ci: add arch linux build 2025-01-14 18:53:10 +01:00
tobtoht
a4a4a1df1d Merge pull request #9470
36e299c build: drop support for 32-bit windows target (tobtoht)
2025-01-14 16:22:37 +00:00
tobtoht
90ca75287f Merge pull request #9528
2fcaf95 guix: drop 32-bit android target (tobtoht)
2025-01-14 16:21:42 +00:00
tobtoht
2144b2beb4 Merge pull request #9539
eb0d443 ci: depends: build armv7 android target (tobtoht)
2025-01-14 16:20:57 +00:00
tobtoht
ca0b43d304 Merge pull request #9639
5a36ec0 ci: disable guix commit authentication (tobtoht)
2025-01-14 16:20:28 +00:00
tobtoht
0f13003917 Merge pull request #9679
d1ff49d ci: improve job naming (tobtoht)
2025-01-14 16:20:00 +00:00
tobtoht
2a9458aedc Merge pull request #9477
b1ff22f trezor: replace Python tools with CMake (tobtoht)
2025-01-14 16:14:51 +00:00
tobtoht
305f546328 Merge pull request #9644
e48c740 ci: print guix hashes to summary (tobtoht)
2025-01-14 16:09:07 +00:00
tobtoht
7ca53dcee6 Merge pull request #9686
5cffab8 miniupnpc: fix build with gcc 14 (tobtoht)
2025-01-14 14:36:51 +00:00
tobtoht
8c08863d60 Merge pull request #9663
978f1d7 Fix get_database_size on Windows (iamamyth)
2025-01-14 14:32:20 +00:00
tobtoht
295dba01a6 Merge pull request #9660
9311a24 validate ip parameter in set_bans rpc call (eversinc33)
2025-01-14 14:31:30 +00:00
tobtoht
90e908f588 Merge pull request #9659
d64d3bd p2p: remove dead protocol defs (jeffro256)
2025-01-14 14:30:48 +00:00
tobtoht
06f0cd5606 Merge pull request #9656
c99c07b common/password: flush confirm prompt before user input (jeffro256)
2025-01-14 14:29:31 +00:00
tobtoht
c599916113 Merge pull request #9632
e2eea7b Fix --anonymous-inbound data leak (Lee *!* Clagett)
2025-01-14 14:25:48 +00:00
tobtoht
b32c69aabd Merge pull request #9628
4344f97 Fix build with boost ASIO 1.87. Support boost 1.66+ (Lee *!* Clagett)
2025-01-14 14:24:07 +00:00
tobtoht
38668822b7 Merge pull request #9621
fe17069 Blockchain: get height of RingCT fork programmatically (jeffro256)
2025-01-14 14:13:06 +00:00
tobtoht
59edd62d0b Merge pull request #9600
797811d dns_util: add new DNSSEC trust anchor (selsta)
2025-01-14 14:05:23 +00:00
selsta
26b4f5e00c Revert "blockchain: detect and log bad difficulty calculations"
This reverts commit 5741b4d74d.
2025-01-14 13:04:25 +01:00
selsta
f3349b9dd6 daemon: fix log message typo 2025-01-14 11:17:43 +01:00
iamamyth
4feb6b3e29 crypto: remove unused POD classes
Remove the following unused classes from the crypto namespace:
public_keyV, secret_keyV, and public_keyM.
2025-01-10 12:00:19 -08:00
iamamyth
07d93f01ad common: Remove resolved FIXME in pod-class.h
In src/common/pod-class.h, the POD_CLASS definition contained quite
a lot of detritus, including a long-ago resolved FIXME. Delete all the
noise.
2025-01-09 17:55:31 -08:00
jeffro256
254ac2baef crypto: make CRYPTO_DEFINE_HASH_FUNCTIONS adhere strict aliasing
This code could've caused issues if the pointer to the `public_key`, `key_image`, `hash`, etc wasn't aligned on an 8-byte boundary.
2025-01-09 11:58:39 -06:00
tobtoht
2fcaf95aca guix: drop 32-bit android target 2025-01-07 20:25:36 +01:00
tobtoht
eb0d4431e9 ci: depends: build armv7 android target 2025-01-07 20:23:11 +01:00
tobtoht
5cffab8dd6 miniupnpc: fix build with gcc 14 2025-01-07 15:59:07 +01:00
WHR
133298d876 Fix linking error with libunwind when build for FreeBSD with GCC, by preferring easylogging++ when GCC is being used 2025-01-07 15:04:33 +08:00
Lee *!* Clagett
4344f97255 Fix build with boost ASIO 1.87. Support boost 1.66+ 2025-01-06 18:05:25 -05:00
tobtoht
b746d01522 depends: android_ndk: update to 27 (latest LTS) 2025-01-06 23:26:30 +01:00
iamamyth
978f1d7d41 Fix get_database_size on Windows
Replace all calls to epee::file_io::get_file_size with
boost::filesystem::file_size in order to avoid lossy conversions from
paths to strings, which tend to break filename resolution. This commit
fixes a bug on Windows where the get_info RPC call reported a zero
database size because BlockchainLMBD::get_database_size returned zero.
2025-01-06 10:38:12 -08:00
tobtoht
a8292fcf8e depends: hidapi: update to 0.14.0 2025-01-06 18:54:06 +01:00
luigi1111
2e8a128c75 Merge pull request #9640
ea26db4 depends: add cmake config command (tobtoht)
2025-01-06 12:24:13 -05:00
luigi1111
0d51fd9caa Merge pull request #9601
c06ebec wallet: shortchain history should include base block (0xFFFC0000)
2025-01-06 12:23:05 -05:00
luigi1111
222ca26e6a Merge pull request #9510
5dcc47d CI: -j4 with lin/win runners (plowsof)
2025-01-06 12:22:32 -05:00
luigi1111
551ce586fd Merge pull request #9162
8f89f6b depends: boost: update to 1.84.0 (tobtoht)
2025-01-06 12:21:29 -05:00
luigi1111
f11b938fe4 Merge pull request #9649
f84f237 unit_tests: fix variant tests after 'optional' name split (jeffro256)
2025-01-06 12:20:50 -05:00
tobtoht
d1ff49d05f ci: improve job naming 2025-01-04 15:40:20 +01:00
Lee *!* Clagett
e2eea7bc25 Fix --anonymous-inbound data leak 2025-01-03 19:01:35 -05:00
tobtoht
b1ff22f82b trezor: replace Python tools with CMake 2025-01-01 21:00:45 +01:00
eversinc33
9311a24044 validate ip parameter in set_bans rpc call 2024-12-28 23:34:35 +01:00
jeffro256
d64d3bd530 p2p: remove dead protocol defs 2024-12-27 15:22:19 -06:00
jeffro256
c99c07bf4a common/password: flush confirm prompt before user input
Co-authored-by: Mike <mpech@tuta.io>
2024-12-26 13:32:11 -06:00
tobtoht
84a56aeac6 guix: remove moreutils 2024-12-24 21:17:41 +01:00
jeffro256
f84f237af7 unit_tests: fix variant tests after 'optional' name split 2024-12-24 13:55:18 -06:00
tobtoht
1d56b84039 guix: remove p7zip 2024-12-24 20:39:55 +01:00
tobtoht
4156bdcd16 depends: cleanup packages.mk 2024-12-24 12:10:53 +01:00
tobtoht
e48c740d90 ci: print guix hashes to summary 2024-12-24 10:13:42 +01:00
tobtoht
ea26db449f depends: add cmake config command 2024-12-24 09:42:48 +01:00
tobtoht
3c25d6e3b2 build: bump minimum macos version to 10.15 2024-12-24 00:37:45 +01:00
tobtoht
35477a66c2 build: remove glibc backcompat 2024-12-24 00:28:48 +01:00
tobtoht
5a36ec0cec ci: disable guix commit authentication 2024-12-23 23:34:10 +01:00
tobtoht
36e299cd77 build: drop support for 32-bit windows target 2024-12-23 22:00:31 +01:00
tobtoht
1a21e3d3a4 depends: freebsd_base: update to 12.3 2024-12-23 21:43:35 +01:00
tobtoht
5cb0b263db guix: bump time-machine to 9d09b0cf841fb657a1aec12e9bab68e00c2b493c 2024-12-23 21:41:15 +01:00
tobtoht
8f89f6b1f2 depends: boost: update to 1.84.0 2024-12-23 21:12:26 +01:00
plowsof
5dcc47dcdf CI: -j4 with lin/win runners
https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
2024-12-23 19:56:30 +00:00
luigi1111
941ecefab2 Merge pull request #9638
cb54a0a ci: common: remove duplicated definition (tobtoht)
2024-12-23 13:33:04 -05:00
luigi1111
06ab84db29 Merge pull request #9542
7b3cbb0 cmake: use pkgconfig to find zeromq (tobtoht)
2024-12-23 13:31:34 -05:00
tobtoht
cb54a0a419 ci: common: remove duplicated definition 2024-12-23 18:31:52 +01:00
tobtoht
7b3cbb06da cmake: use pkgconfig to find zeromq 2024-12-23 17:12:22 +01:00
luigi1111
977bd41eb5 Merge pull request #9629
f8b5ea7 ci: don't fail-fast on matrix jobs (tobtoht)
2024-12-23 11:09:48 -05:00
luigi1111
eda163dcf0 Merge pull request #9625
4f12737 ci: brew: pin boost to 1.85 (tobtoht)
2024-12-23 11:08:36 -05:00
luigi1111
53f468ea78 Merge pull request #9623
a7dc3a0 ci: msys2: pin boost to 1.86.0 (tobtoht)
2024-12-23 11:07:39 -05:00
luigi1111
35dc7638f5 Merge pull request #9593
7605691 Keys: 2nd update for expired 'brunner7' key, valid 2 years (rbrunner7)
2024-12-23 11:02:53 -05:00
luigi1111
db643f7d61 Merge pull request #9592
e126b4b simplewallet: add header to show_transfers command (0xFFFC0000)
2024-12-23 11:02:14 -05:00
luigi1111
aa1369993d Merge pull request #9589
085d3ed build: fix tar extract cmd for systems with 16 bit uid_t (Ishan Arora)
2024-12-23 11:01:09 -05:00
luigi1111
b95aae5f2c Merge pull request #9585
c744496 epee: Drop unused in-tree MD5 (Bastian Germann)
0bc5969 Replace in-tree MD5 with OpenSSL (Bastian Germann)
2024-12-23 11:00:30 -05:00
luigi1111
731854d39b Merge pull request #9583
92de47f Fix memcpy in byte_slice constructor (Lee *!* Clagett)
2024-12-23 10:58:44 -05:00
luigi1111
869028ce9d Merge pull request #9581
33f6fa5 wallet: report exact reason for open_wallet failure. (0xFFFC0000)
2024-12-23 10:58:10 -05:00
luigi1111
53217389db Merge pull request #9580
ce03288 add gpg key (SNeedlewoods)
2024-12-23 10:57:37 -05:00
luigi1111
ccd404b156 Merge pull request #9577
59c0841 gpg_keys: bump my key's expiration date by another five years (moneromooo-monero)
2024-12-23 10:55:19 -05:00
luigi1111
2f770a3d7c Merge pull request #9574
e9adafa contrib: force (de)serialization to create params section incase there is none. Co-authored-by: Boog900 <boog900@tutanota.com> (0xFFFC0000)
2024-12-23 10:54:44 -05:00
luigi1111
3a414c5132 Merge pull request #9565
7cd33d1 Fix typos. (Soren Stoutner)
2024-12-23 10:54:08 -05:00
luigi1111
91b0a249e3 Merge pull request #9560
eb6f12c serialization: silence warning about shifting uint8_t by 8 (jeffro256)
2024-12-23 10:53:35 -05:00
luigi1111
10000bf75a Merge pull request #9558
b5f29ee p2p: allow comments in banlist files (jeffro256)
2024-12-23 10:52:45 -05:00
luigi1111
7f4ae309f4 Merge pull request #9556
c7dce22 ringct: add operator!= for key (jeffro256)
2024-12-23 10:52:08 -05:00
luigi1111
0495baade6 Merge pull request #9549
fc49af6 Update PORTABLE_STORAGE.md (Dmitry)
2024-12-23 10:50:59 -05:00
luigi1111
318bc17eca Merge pull request #9548
c1ead13 wallet2_api: use std::optional instead of handmade optional (jeffro256)
2024-12-23 10:50:19 -05:00
luigi1111
6633fcb72f Merge pull request #9543
968d796 cmake: make PER_BLOCK_CHECKPOINT an option (tobtoht)
2024-12-23 10:49:23 -05:00
luigi1111
8ed1287b1d Merge pull request #9541
03e593c cmake: lowercase ARCH_ID (tobtoht)
2024-12-23 10:48:45 -05:00
luigi1111
885b6a04d5 Merge pull request #9540
fd50651 brew: remove unneeded taps (tobtoht)
2024-12-23 10:48:16 -05:00
luigi1111
0d93746e71 Merge pull request #9537
b8911f1 readme: update raspberry pi build instructions (tobtoht)
2024-12-23 10:47:50 -05:00
luigi1111
5ce4858137 Merge pull request #9536
68a32a3 build: remove unneeded cmake toolchain files (tobtoht)
2024-12-23 10:47:14 -05:00
luigi1111
f1f2e7fa4a Merge pull request #9535
bd540d9 readme: update msys2 build instructions (tobtoht)
2024-12-23 10:46:50 -05:00
luigi1111
671b77a757 Merge pull request #9533
c3b262f readme: remove outdated gtest note (tobtoht)
2024-12-23 10:46:25 -05:00
luigi1111
51c1f1b1c9 Merge pull request #9532
e2410b2 ci: cleanup depends package requirements (tobtoht)
2024-12-23 10:46:01 -05:00
luigi1111
5d465e22bf Merge pull request #9531
def79dd readme: fix win64 cross-compile requirements (tobtoht)
2024-12-23 10:45:38 -05:00
luigi1111
d42bba7d82 Merge pull request #9529
484ece1 tests: remove python2 compatibility (tobtoht)
2024-12-23 10:44:35 -05:00
luigi1111
28302956d3 Merge pull request #9527
ced5b04 tests: fix missing <thread> includes (tobtoht)
2024-12-23 10:44:01 -05:00
luigi1111
77471ecd3f Merge pull request #9525
e1876ab tests: remove unlock_time argument from trezor_tests (0xFFFC0000)
2024-12-23 10:43:38 -05:00
luigi1111
518d42bff7 Merge pull request #9518
3210961 packages: add freebsd base mirror (plowsof)
2024-12-23 10:43:09 -05:00
luigi1111
0a1fd18ad2 Merge pull request #9515
808dff7 Replace deprecated result_of with decltype (Lee Clagett)
2024-12-23 10:42:45 -05:00
luigi1111
e32372e8dc Merge pull request #9511
bd28696 Relax static_asserts in src/lmdb (Lee Clagett)
2024-12-23 10:41:51 -05:00
luigi1111
3c86b148b2 Merge pull request #9507
8977746 tests: include <iomanip> where using std::setfill (jeffro256)
2024-12-23 10:41:09 -05:00
luigi1111
803ac91970 Merge pull request #9505
0f9a5c1 crypto: remove unused OAES code (jeffro256)
2024-12-23 10:40:10 -05:00
luigi1111
8d0c73f423 Merge pull request #9502
f8b7a89 depends: remove unwind from toolchain (tobtoht)
2024-12-23 10:39:16 -05:00
luigi1111
542fc01fb2 Merge pull request #9501
8442b66 depends: remove option from toolchain file (tobtoht)
2024-12-23 10:38:53 -05:00
luigi1111
f00cb9421a Merge pull request #9490
31c6b2a wallet: can't decrypt payment id if tx key is missing (tobtoht)
2024-12-23 10:38:25 -05:00
luigi1111
51d0a25c7c Merge pull request #9481
64bb031 ci: run job for oldest supported Debian version (tobtoht)
2024-12-23 10:37:59 -05:00
luigi1111
afbc9ef97a Merge pull request #9475
ea8e29f set USE_UNWIND for FreeBSD (Alexander Perechnev)
2024-12-23 10:37:37 -05:00
luigi1111
32d6e6e208 Merge pull request #9469
ca06337 ci: remove obsolete sdk cache (tobtoht)
2024-12-23 10:37:13 -05:00
luigi1111
06be03c438 Merge pull request #9457
e03de80 depends: release type should be lower case (tobtoht)
2024-12-23 10:36:44 -05:00
luigi1111
092fea667b Merge pull request #9454
9131369 readme: add missing ubuntu/debian build tools (tobtoht)
2024-12-23 10:36:17 -05:00
luigi1111
9f694fe4f5 Merge pull request #9452
f93f656 depends: allow granular stage env config (tobtoht)
2024-12-23 10:35:46 -05:00
luigi1111
d02957e28d Merge pull request #9451
4221051 docs: clarify proper PR title format (Gingeropolous)
2024-12-23 10:35:22 -05:00
luigi1111
14018339cf Merge pull request #9445
39ae489 cmake: fix readline find_path call. (0xFFFC0000)
2024-12-23 10:34:51 -05:00
luigi1111
1122fa523a Merge pull request #9441
cfb19b9 blockchain: more opportunities for caching the rolling median (Crypto City)
2024-12-23 10:34:25 -05:00
luigi1111
61dd13dfa6 Merge pull request #9395
7fdaf61 Blockchain: fix temp fails causing alt blocks to be permanently invalid (jeffro256)
2024-12-23 10:32:02 -05:00
luigi1111
414fe26254 Merge pull request #9381
df54d8b Daemon RPC: add max_block_count field to /getblocks.bin (j-berman)
2024-12-23 10:28:57 -05:00
luigi1111
fe11e4126a Merge pull request #9380
e866a19 wallet2: move wallet error on RPC resp handling to wallet_errors file (j-berman)
2024-12-23 10:28:16 -05:00
luigi1111
25dcb8dc9f Merge pull request #9376
445319d src: update internal data structure to boost::bimap. startup speed up 2-5x because this PR changing O(n^2) operation to O(nlogn). (0xFFFC0000)
2024-12-23 10:27:17 -05:00
luigi1111
44fef7903c Merge pull request #9336
04fe6fa split variant into plain and optional, add variant serialization (koe)
2024-12-23 10:26:23 -05:00
luigi1111
6796e99438 Merge pull request #9290
d64a5f7 Fix lmdb txn commit code (Lee *!* Clagett)
2024-12-23 10:25:10 -05:00
luigi1111
b4505cc21a Merge pull request #9286
bc05e72 common: add va_args.h (jeffro256)
2024-12-23 10:22:39 -05:00
luigi1111
1f7290f329 Merge pull request #9176
49ca1ad variant: split into variant and optional_variant (jeffro256)
2024-12-23 10:19:55 -05:00
luigi1111
575bc099a0 Merge pull request #9172
62fdacc variant: visit lambda and value-initialize by index (jeffro256)
2024-12-23 10:19:05 -05:00
luigi1111
785e3ac673 Merge pull request #9122
a79734c cryptonote_basic: faster and more readable is_valid_decomposed_amount (jeffro256)
2024-12-23 10:18:07 -05:00
luigi1111
df69d03df4 Merge pull request #8929
b2ff764 Bootstrappable Builds (tobtoht)
2024-12-23 10:17:14 -05:00
tobtoht
a7dc3a046f ci: msys2: pin boost to 1.86.0 2024-12-20 20:56:58 +01:00
Lee *!* Clagett
7e766e13c3 Cleanup TCP throttling code (performance) + move connection checks 2024-12-19 20:47:44 -05:00
tobtoht
f8b5ea70ee ci: don't fail-fast on matrix jobs 2024-12-17 23:24:19 +01:00
tobtoht
4f12737288 ci: brew: pin boost to 1.85 2024-12-17 17:27:10 +01:00
jeffro256
fe170698b1 Blockchain: get height of RingCT fork programmatically
Get height of the RingCT fork to start the output distributuon programmatically, instead of using a hardcoded index.

If using a hardcoded index, when the hardfork tables are modified, this can cause segmentation faults or horrific privacy issues: https://codeberg.org/wownero/wownero/issues/488#issuecomment-2514880.
2024-12-16 15:16:38 -06:00
jeffro256
b5f29eeacd p2p: allow comments in banlist files
In-line comments explicitly explaining banned hosts/subnets might help assuage fears of some good banlists' arbitaryiness.
2024-12-12 23:48:06 -06:00
tobtoht
b2ff7641a5 Bootstrappable Builds 2024-12-08 18:00:32 +01:00
0xFFFC0000
c06ebeceb7 wallet: shortchain history should include base block 2024-12-03 23:06:32 +00:00
selsta
797811d84b dns_util: add new DNSSEC trust anchor 2024-12-01 16:01:41 +01:00
rbrunner7
760569134a Keys: 2nd update for expired 'brunner7' key, valid 2 years 2024-11-25 08:27:48 +01:00
0xFFFC0000
e126b4b6d1 simplewallet: add header to show_transfers command 2024-11-24 20:39:26 +00:00
Ishan Arora
085d3ed136 build: fix tar extract cmd for systems with 16 bit uid_t 2024-11-23 13:40:19 +13:00
Bastian Germann
c744496d45 epee: Drop unused in-tree MD5
The RSA-MD licensed implementation that originated from RFC 1321 and got
into epee via Cyrus SASL and libEtPan! is not a good fit for epee, which
also links to the GPL licensed readline. RSA-MD has an advertisement
clause that is known to be incompatible with GPL.
2024-11-22 12:25:08 +01:00
Bastian Germann
0bc5969755 Replace in-tree MD5 with OpenSSL
This uses OpenSSL's non-deprecated EVP digest facility to calculate MD5
in HTTP digest authentication.
2024-11-22 12:24:22 +01:00
Lee *!* Clagett
92de47fd37 Fix memcpy in byte_slice constructor 2024-11-21 17:22:52 -05:00
Lee *!* Clagett
16b5c11f74 Some cleanup in span/connection_context + few more checks 2024-11-19 18:30:34 -05:00
0xFFFC0000
33f6fa5f2e wallet: report exact reason for open_wallet failure. 2024-11-19 19:49:02 +00:00
SNeedlewoods
ce03288ae1 add gpg key 2024-11-18 22:20:58 +01:00
moneromooo-monero
59c0841b1c gpg_keys: bump my key's expiration date by another five years 2024-11-17 20:13:10 +00:00
0xFFFC0000
e9adafa49e contrib: force (de)serialization to create params section incase there is none.
Co-authored-by: Boog900 <boog900@tutanota.com>
2024-11-16 20:22:14 +00:00
Soren Stoutner
7cd33d1dbc Fix typos. 2024-11-11 17:01:52 -07:00
jeffro256
eb6f12c213 serialization: silence warning about shifting uint8_t by 8
Some compilers are stupid and give a warning on this line when `T = uint8_t`, even though it will never run
2024-11-08 15:06:32 -06:00
jeffro256
c7dce222f8 ringct: add operator!= for key
Part of upstreaming Seraphis/Carrot

Co-authored-by: j-berman <justinberman@protonmail.com>
2024-11-06 03:01:48 -06:00
Dmitry
fc49af6229 Update PORTABLE_STORAGE.md
"Represenations" – a typo in the title: the correct spelling is "Representations."

Corrected.
2024-11-01 12:44:30 +03:00
jeffro256
c1ead13df3 wallet2_api: use std::optional instead of handmade optional
Cleaner, adheres to POLA, and allows for better compiler optimization. Declaration should be backwards compatible. Requires C++17.
2024-10-30 13:04:30 -04:00
j-berman
e866a192dd wallet2: move wallet error on RPC resp handling to wallet_errors file
Co-authored-by: jeffro256 <jeffro256@tutanota.com>
2024-10-29 10:56:11 -07:00
j-berman
df54d8b3d4 Daemon RPC: add max_block_count field to /getblocks.bin 2024-10-29 10:40:46 -07:00
tobtoht
6fd227610f daemonizer: replace boost chrono/thread with std lib 2024-10-25 18:29:31 +02:00
tobtoht
968d7969c2 cmake: make PER_BLOCK_CHECKPOINT an option 2024-10-25 18:14:23 +02:00
tobtoht
03e593c72f cmake: lowercase ARCH_ID 2024-10-25 01:34:59 +02:00
tobtoht
fd50651530 brew: remove unneeded taps 2024-10-25 00:22:43 +02:00
tobtoht
b8911f163c readme: update raspberry pi build instructions 2024-10-24 22:33:36 +02:00
tobtoht
bd540d9448 readme: update msys2 build instructions 2024-10-24 21:00:42 +02:00
tobtoht
68a32a373e build: remove unneeded cmake toolchain files 2024-10-24 20:14:30 +02:00
tobtoht
c3b262f4cb readme: remove outdated gtest note 2024-10-24 19:09:59 +02:00
tobtoht
e2410b29d0 ci: cleanup depends package requirements 2024-10-24 17:35:40 +02:00
tobtoht
def79dd7bd readme: fix win64 cross-compile requirements 2024-10-24 17:12:51 +02:00
tobtoht
484ece1c08 tests: remove python2 compatibility 2024-10-23 14:09:59 +02:00
tobtoht
ced5b040d5 tests: fix missing <thread> includes 2024-10-22 19:44:31 +02:00
0xFFFC0000
e1876ab7af tests: remove unlock_time argument from trezor_tests 2024-10-20 13:25:31 +00:00
luigi1111
893916ad09 Merge pull request #9435
89ad8ac epee: string_tools: keep full path in cut_off_extension (tobtoht)
c51ca53 epee: string_tools: remove dot from get_extension (tobtoht)
2024-10-14 10:17:10 -04:00
luigi1111
7df0d9bb8f Merge pull request #9499
170844b cmake: boost: fix header-only library search, bump minimum (tobtoht)
2024-10-14 10:15:38 -04:00
plowsof
3210961036 packages: add freebsd base mirror 2024-10-13 20:15:18 +01:00
Lee Clagett
808dff7d2f Replace deprecated result_of with decltype 2024-10-10 14:37:03 -04:00
Lee Clagett
bd2869650a Relax static_asserts in src/lmdb 2024-10-09 16:34:25 -04:00
jeffro256
0f9a5c1020 crypto: remove unused OAES code
@SyntheticBird45 reported that the OpenBSD compiler gives warnings about string functions used in `oaes_sprintf`,
as well as use of `rand()` in `oaes_key_gen`. Neither of these functions are used in the codebase. Removing the
unused OAES functions silences these warnings.
2024-10-07 11:04:34 -05:00
jeffro256
89777469f1 tests: include <iomanip> where using std::setfill 2024-10-07 00:50:45 -05:00
tobtoht
f8b7a895fc depends: remove unwind from toolchain 2024-10-04 14:43:48 +02:00
tobtoht
8442b66961 depends: remove option from toolchain file 2024-10-04 13:43:41 +02:00
tobtoht
170844bc59 cmake: boost: fix header-only library search, bump minimum 2024-10-02 23:13:03 +02:00
luigi1111
9866a0e902 Merge pull request #9480
9c7e6ab ci: fix windows msys2 build (tobtoht)
2024-10-01 16:25:12 -04:00
luigi1111
fabbde3077 Merge pull request #9450
ed955bf build: fix build with Boost 1.85 and remove instances of viewkey logging (jeffro256)
2024-10-01 15:28:36 -04:00
tobtoht
31c6b2a901 wallet: can't decrypt payment id if tx key is missing 2024-09-26 14:29:12 +02:00
tobtoht
64bb031d5f ci: run job for oldest supported Debian version 2024-09-13 20:04:20 +02:00
tobtoht
9c7e6ab04d ci: fix windows msys2 build 2024-09-13 15:42:20 +02:00
Lee *!* Clagett
0a29a9f76e Add ZMQ-PUB json-schemas 2024-09-10 16:29:48 -04:00
Alexander Perechnev
ea8e29fa96 set USE_UNWIND for FreeBSD 2024-09-08 12:34:13 +03:00
jeffro256
ed955bf751 build: fix build with Boost 1.85 and remove instances of viewkey logging
1. Use `std::is_standard_layout` and `std::is_trivially_copyable` instead of `std::is_pod` for KV byte-wise serialization, which fixes compile issue for Boost UUIDs
2. Use `std::has_unique_object_representations` instead of `alignof(T) == 1` for epee byte spans and epee hex functions
3. Removed reimplementation of `std::hash` for `boost::uuids::uuid
4. Removed `<<` operator overload for `crypto::secret_key`
5. Removed instances in code where private view key was dumped to the log in plaintext
2024-09-06 11:46:22 -05:00
tobtoht
ca063373e1 ci: remove obsolete sdk cache 2024-09-04 16:40:21 +02:00
tobtoht
e03de80924 depends: release type should be lower case 2024-08-26 16:24:32 +02:00
tobtoht
913136936b readme: add missing ubuntu/debian build tools 2024-08-25 18:32:27 +02:00
tobtoht
f93f656811 depends: allow granular stage env config 2024-08-25 17:38:15 +02:00
Gingeropolous
4221051c95 docs: clarify proper PR title format
this is a redo of #9210 because I'm an idiot and can't squash
2024-08-24 09:19:29 -04:00
0xFFFC0000
39ae489d34 cmake: fix readline find_path call. 2024-08-19 09:22:58 +00:00
Crypto City
cfb19b932f blockchain: more opportunities for caching the rolling median 2024-08-17 14:42:35 +00:00
luigi1111
a1dc85c537 Merge pull request #9416
ac0af73 rpc: add cumul weight field to block template resp (jeffro256)
2024-08-14 14:19:03 -04:00
luigi1111
65cc1f133b Merge pull request #9287
59cddbb serialization: support passing extra args to fields in DSL (jeffro256) b2c59c4 common: add va_args.h (jeffro256)
2024-08-14 14:17:56 -04:00
tobtoht
89ad8ac8b1 epee: string_tools: keep full path in cut_off_extension 2024-08-14 19:51:12 +02:00
tobtoht
c51ca53daa epee: string_tools: remove dot from get_extension
Fixes a regression introduced in #9254. Previously it did not
include the dot.
2024-08-14 16:59:09 +02:00
jeffro256
59cddbb9ca serialization: support passing extra args to fields in DSL
This PR is upstreaming changes in the Seraphis lib here: https://github.com/UkoeHB/monero/pull/39. The changes to the serialization header allow clean passing
of extra arguments to field serialization in the DSL. This is used mainly to pass implied sizes of containers during deserialization to make the format more
compact. For example, if my object has two containers A & B which must be the same size, I can serialize only the size of container A. Then, during
deserialization, when I deserialize A, I can then use A's size to deserialize B.

Depends on #9286.
2024-08-13 12:05:24 -05:00
jeffro256
b2c59c498c common: add va_args.h
This PR is upstreaming changes in the Seraphis lib here: https://github.com/UkoeHB/monero/pull/39. This header adds a macro `VA_ARGS_COMMAPREFIX`
which, when passed `__VA_ARGS__`, expands to `, __VA_ARGS__` unless the length of `__VA_ARGS__` is 0, in which case it expands to nothing. This
macro is useful for passing/declaring optional function arguments.
2024-08-13 12:02:45 -05:00
luigi1111
0db9e74223 Merge pull request #9429
bd2b226 device: add ledger flex support (tobtoht)
2024-08-13 12:29:47 -04:00
luigi1111
28788bc031 Merge pull request #9425
fc0a4b4 Make wallet2::estimate_fee static (Lee Clagett)
2024-08-13 12:18:24 -04:00
luigi1111
4bb00420cc Merge pull request #9423
aaeffb7 rpc: remove COMMAND_RPC_FAST_EXIT (hinto.janai)
2024-08-13 12:17:46 -04:00
luigi1111
fdc238ef59 Merge pull request #9421
bf74f89 monerod.service: use network-online.target Wait for network to be online before starting (Jared Monger)
2024-08-13 12:17:03 -04:00
luigi1111
dad4357f7a Merge pull request #9414
3216165 src: update checkpoints to match v0.18.3.4 (again) (selsta)
2024-08-13 12:16:29 -04:00
luigi1111
93d6e0964e Merge pull request #9384
88afcdb Fix ZMQ DaemonInfo: (Lee *!* Clagett)
2024-08-13 12:15:28 -04:00
luigi1111
1d4030937e Merge pull request #9357
802d643 Update depends.yml (preland)
2024-08-13 12:14:30 -04:00
tobtoht
bd2b226572 device: add ledger flex support
See: bd1b09970f/libs/ledgerjs/packages/devices/src/index.ts (L111)
2024-08-09 10:31:16 +02:00
0xFFFC0000
92b671c564 contrib: smaller and more reasonable log size. 2024-08-08 04:50:29 +00:00
Lee Clagett
fc0a4b4b04 Make wallet2::estimate_fee static 2024-08-07 13:47:31 -04:00
hinto.janai
aaeffb7c93 rpc: remove COMMAND_RPC_FAST_EXIT 2024-08-05 20:21:29 -04:00
Jared Monger
bf74f89ea6 monerod.service: use network-online.target
Wait for network to be online before starting
2024-08-04 05:52:59 -05:00
koe
04fe6fa63f split variant into plain and optional, add variant serialization 2024-08-02 13:18:57 -05:00
jeffro256
ac0af73222 rpc: add cumul weight field to block template resp
Resolves #9415
2024-08-01 01:03:41 -05:00
selsta
3216165822 src: update checkpoints to match v0.18.3.4 (again) 2024-07-31 18:14:23 +02:00
luigi1111
caa62bc9ea Merge pull request #9392
b894042 epee: fix mlog filename compare bug. (0xFFFC0000)
2024-07-16 19:02:24 -04:00
luigi1111
3b53db47cf Merge pull request #9386
1d024f0 chore: fix some comments (haouvw)
2024-07-16 19:01:09 -04:00
luigi1111
330212888a Merge pull request #9383
9f83e74 Daemon RPC: /getblocks.bin return chain's top_block_hash in resp (j-berman)
2024-07-16 19:00:39 -04:00
luigi1111
4ed5bc5436 Merge pull request #9382
356829a Daemon RPC: high_height_ok req boolean field /getblocks.bin (j-berman)
2024-07-16 19:00:06 -04:00
luigi1111
8dbbc47804 Merge pull request #9379
6c28bdb wallet2: move get_rpc_status func to RPC server definition file (j-berman)
2024-07-16 18:58:08 -04:00
luigi1111
cfd7f5222d Merge pull request #9370
9fc48f4 Fix ZMQ Tx Pruning (Lee Clagett)
2024-07-16 18:56:44 -04:00
luigi1111
66c5917876 Merge pull request #9353
32f3245 cryptonote_protocol: prevent duplicate txs in fluff queue (0xFFFC0000)
2024-07-16 18:51:30 -04:00
luigi1111
c830fc05d8 Merge pull request #9349
9817293 workflows: don't hardcode repo name (selsta)
2024-07-16 18:50:40 -04:00
luigi1111
e3cfaed278 Merge pull request #9346
0fad1a8 src: update checkpoints to match v0.18.3.4 (selsta)
2024-07-16 18:49:44 -04:00
luigi1111
c2fceb2939 Merge pull request #9344
a026d5a wallet2: validate fetched block height and parent hash (Oscar Mira)
c634c26 wallet2: use start_height consistently as const in process_parsed_blocks (Oscar Mira)
2024-07-16 18:48:43 -04:00
luigi1111
baf6df06c2 Merge pull request #9343
302fa9b wallet: fetch pool txs in pruned form (jeffro256)
2024-07-16 18:46:04 -04:00
luigi1111
b02bf31b83 Merge pull request #9342
b07a97c epee: partially revert c56ee140 to fix linking errors (jeffro256)
2024-07-16 18:44:04 -04:00
luigi1111
040bccc22f Merge pull request #9338
4a376d6 copyright: fix vector.h typo (hinto.janaiyo)
d61e8e9 workflows: delete copyright.yml (plowsof)
341771a copyright: bump to 2024 (copyCat)
2024-07-16 18:42:49 -04:00
luigi1111
2a6b6ea0f2 Merge pull request #9326
004ead1 gpg_keys: renew jeffro256 (jeffro256)
2024-07-16 18:41:57 -04:00
luigi1111
978842c284 Merge pull request #9324
2e061be README.md: sponsors;remove forked networking/globee (plowsof)
2024-07-16 18:41:20 -04:00
luigi1111
85cf0b01fa Merge pull request #9289
025021d BlockchainDB: shorter fixup() (jeffro256)
2024-07-16 18:40:46 -04:00
luigi1111
99e33996f4 Merge pull request #9288
262ef47 BlockchainDB: remove lock/unlock methods (jeffro256)
2024-07-16 18:32:42 -04:00
luigi1111
f145cb37a4 Merge pull request #9278
18fbe54 add sum of amounts for unspent_outputs (SNeedlewoods)
2024-07-16 18:31:59 -04:00
luigi1111
1ce9960ec6 Merge pull request #9215
3837bb8 remove repetitive word (cuinix)
2024-07-16 18:31:27 -04:00
luigi1111
38067711e2 Merge pull request #9114
88d074c Add support for Loongarch (YalingFang)
2024-07-16 18:30:56 -04:00
luigi1111
d7eece3cae Merge pull request #8619
e71c8bf wallet: background sync with just the view key (j-berman)
2024-07-16 18:29:47 -04:00
luigi1111
15b47b481c Merge pull request #8203
ddf3af1 add key exchange round booster to multisig_account (koe)
2024-07-16 18:27:09 -04:00
haouvw
1d024f0701 chore: fix some comments
Signed-off-by: haouvw <jchaodaohang@foxmail.com>
2024-07-11 14:56:25 +08:00
jeffro256
7fdaf61d41 Blockchain: fix temp fails causing alt blocks to be permanently invalid 2024-07-11 00:43:38 -05:00
0xFFFC0000
b8940420bb epee: fix mlog filename compare bug.
When using a relative path for the log filename,
since the iteration on files adds "./" to the beginning of the filename
monero-wallet-rpc and monero-wallet-cli	cannot find already written
log files and therefore rotate indefinitely.
2024-07-07 21:13:12 +00:00
Oscar Mira
a026d5ac44 wallet2: validate fetched block height and parent hash 2024-07-05 05:45:28 +02:00
Oscar Mira
c634c261c2 wallet2: use start_height consistently as const in process_parsed_blocks 2024-07-04 13:01:12 +02:00
j-berman
9f83e7434d Daemon RPC: /getblocks.bin return chain's top_block_hash in resp 2024-06-24 17:58:20 -07:00
j-berman
6c28bdb856 wallet2: move get_rpc_status func to RPC server definition file 2024-06-24 17:44:23 -07:00
Lee *!* Clagett
88afcdb8fa Fix ZMQ DaemonInfo:
* top_block_hash was never set in handler
  * wide_difficulty was never sent in JSON
  * wide_cumulative_difficulty was never sent in JSON
2024-06-24 19:57:20 -04:00
j-berman
356829a198 Daemon RPC: high_height_ok req boolean field /getblocks.bin
Behavior before: when start_height > chain tip, response fails

Behavior after: when req.high_height_ok is true && req.start_height
> chain tip, server rerturns a successful response that includes
chain height
2024-06-24 16:47:06 -07:00
0xFFFC0000
445319d3f1 src: update internal data structure to boost::bimap.
startup speed up 2-5x because this PR changing
O(n^2) operation to O(nlogn).
2024-06-21 07:22:19 +00:00
Lee Clagett
9fc48f4a8a Fix ZMQ Tx Pruning 2024-06-18 21:26:28 -04:00
preland
802d6434de Update depends.yml 2024-06-09 11:58:01 -04:00
0xFFFC0000
32f32453f1 cryptonote_protocol: prevent duplicate txs in fluff queue
1. Fix duplicate transaction #9335
2. Add test for cases where there are duplicate transaction in fluff

Co-authored-by: Boog900 <boog900@tutanota.com>
2024-06-05 16:33:15 +00:00
Lee *!* Clagett
d64a5f70d2 Fix lmdb txn commit code 2024-06-04 18:55:39 -04:00
selsta
98172930db workflows: don't hardcode repo name 2024-06-03 03:27:35 +02:00
selsta
0fad1a8d08 src: update checkpoints to match v0.18.3.4 2024-05-29 15:59:56 +02:00
jeffro256
302fa9b5df wallet: fetch pool txs in pruned form 2024-05-28 11:19:46 -05:00
jeffro256
b07a97c51f epee: partially revert c56ee140 to fix linking errors
On Linux Mint 21.3, g++ Ubuntu 11.4.0-1ubuntu1~22.04, I get linking error for an undefined reference to `epee::string_tools::trim_right`. This PR reverts the changes
to epee_readline.cpp in commit c56ee140, which turns a `boost::trim_right` callsite into an `epee::string_tools::trim_right` callsite.
2024-05-28 10:37:48 -05:00
j-berman
e71c8bf190 wallet: background sync with just the view key
- When background syncing, the wallet wipes the spend key
from memory and processes all new transactions. The wallet saves
all receives, spends, and "plausible" spends of receives the
wallet does not know key images for.
- When background sync disabled, the wallet processes all
background synced txs and then clears the background sync cache.
- Adding "plausible" spends to the background sync cache ensures
that the wallet does not need to query the daemon to see if any
received outputs were spent while background sync was enabled.
This would harm privacy especially for users of 3rd party daemons.
- To enable the feature in the CLI wallet, the user can set
background-sync to reuse-wallet-password or
custom-background-password and the wallet automatically syncs in
the background when the wallet locks, then processes all
background synced txs when the wallet is unlocked.
- The custom-background-password option enables the user to
open a distinct background wallet that only has a view key saved
and can be opened/closed/synced separately from the main wallet.
When the main wallet opens, it processes the background wallet's
cache.
- To enable the feature in the RPC wallet, there is a new
`/setup_background_sync` endpoint.
- HW, multsig and view-only wallets cannot background sync.
2024-05-24 23:11:58 -07:00
koe
ddf3af1f0c add key exchange round booster to multisig_account 2024-05-21 15:27:08 -05:00
luigi1111
cc73fe7116 Merge pull request #9202
c94ca0f depends: add command to print variables (tobtoht)
2024-05-21 14:47:28 -05:00
luigi1111
35eb5c1174 Merge pull request #9339
a28c38c wallet2: correct variable usage in get_multisig_seed (selsta)
2024-05-21 14:36:19 -05:00
hinto.janaiyo
4a376d6d3f copyright: fix vector.h typo 2024-05-21 20:09:14 +01:00
selsta
a28c38c946 wallet2: correct variable usage in get_multisig_seed 2024-05-21 19:22:39 +02:00
plowsof
d61e8e901e workflows: delete copyright.yml 2024-05-21 17:40:53 +01:00
copyCat
341771ac3e copyright: bump to 2024 2024-05-21 16:29:33 +00:00
tobtoht
c94ca0f785 depends: add command to print variables 2024-05-21 09:59:23 +02:00
luigi1111
af4fd61fe7 Merge pull request #9316
697986d net_node: update seed nodes (selsta)
2024-05-20 23:44:44 -05:00
luigi1111
ee7c5de112 Merge pull request #9313
304dcf8 contrib: fix compilation error for boost 1.85 (0xFFFC0000)
2024-05-20 23:43:36 -05:00
luigi1111
e6acde1a07 Merge pull request #9310
6d4f7b8 wallet2: fix stagenet get_approximate_blockchain_height (selsta)
2024-05-20 23:41:06 -05:00
luigi1111
a3c67ab5ad Merge pull request #9307
f9d9dd8 simplewallet: change boost::filesystem::complete to absolute. (0xFFFC0000)
2024-05-20 23:39:58 -05:00
luigi1111
6c346eca03 Merge pull request #9305
de9c461 common: support boost filesystem copy_options. Co-authored-by: selsta <selsta@sent.at> (0xFFFC0000)
2024-05-20 23:38:20 -05:00
luigi1111
fc452bd546 Merge pull request #9282
b27fda2 src: update checkpoints to match latest release (selsta)
2024-05-20 23:36:28 -05:00
luigi1111
b208eed32a Merge pull request #9270
267e31f Add drop_and_recreate in privatefile class. When creating a private file we need to delete the file if exist. (0xFFFC0000)
2024-05-20 23:35:48 -05:00
luigi1111
58b1e931f7 Merge pull request #9268
463228b Skip privacy networks (on tx sends) that don't have outgoing connections (Lee *!* Clagett)
2024-05-20 23:34:39 -05:00
luigi1111
812535390f Merge pull request #9259
427ba77 wallet2: ensure transfers and sweeps use same fee calc logic rnd2 (j-berman)
2024-05-20 23:32:48 -05:00
luigi1111
eb35250895 Merge pull request #9257
d6609b8 serialization: do any N-tuple (jeffro256)
2024-05-20 23:31:17 -05:00
luigi1111
2603a034cf Merge pull request #9245
8e80585 functional_tests: test HTTP digest auth (jeffro256)
2024-05-20 23:25:50 -05:00
luigi1111
6462d3760d Merge pull request #9232
7194506 Blockchain: remove old fee calc logic (jeffro256)
2024-05-20 23:18:07 -05:00
luigi1111
1e5ad57e2e Merge pull request #9211
9b946ae Removed default cryptonote address (SyntheticBird45)
2024-05-20 23:16:59 -05:00
luigi1111
03549ac75c Merge pull request #9205
5dbaace depends: fix ar zero timestamp for openssl & unbound on android targets (tobtoht)
2024-05-20 23:15:46 -05:00
luigi1111
54c84c57e6 Merge pull request #9204
358d27c depends: native_libtapi: don't embed git hash (tobtoht)
2024-05-20 23:15:16 -05:00
luigi1111
c5cb0d3094 Merge pull request #9200
3d2b6a8 depends: native_cctools: don't embed build date (tobtoht)
2024-05-20 23:14:32 -05:00
luigi1111
49aa0ff1cb Merge pull request #9199
5fdd67d depends: {native_,}protobuf: speedup build (tobtoht)
3c16794 build: force Trezor for depends builds (tobtoht)
2024-05-20 23:14:03 -05:00
luigi1111
9d960f056e Merge pull request #9198
e151ff7 update blake2b test vectors (koe)
fa47c7b add blake2b to src/crypto (koe)
2024-05-20 23:13:25 -05:00
luigi1111
689381dff9 Merge pull request #9194
9d101d5 serialization: protect blob serialization from undefined behavior (jeffro256)
2024-05-20 23:12:28 -05:00
luigi1111
cdd7fc09b4 Merge pull request #9151
ff49444 @tobtoht: undo rebase changes tx.dsts -> tx_dsts (jeffro256)
38f354e Enforce Tx unlock_time is Zero by Relay Rule (jeffro256)
2024-05-20 23:11:09 -05:00
luigi1111
7f752115ef Merge pull request #9149
c56ee14 Cleanup string_tools. 1. Use boost::filesystem for already available operations. 2. Use boost::string for already available operations. (0xFFFC0000)
2024-05-20 22:50:16 -05:00
luigi1111
69ffc1aa85 Merge pull request #9064
4689ad2 trezor: support c++17 and protobuf v25, libusb fix (Dusan Klinec)
2024-05-20 22:48:35 -05:00
luigi1111
d95414aa22 Merge pull request #8920
236e5d4 update TimingsDatabase to support csv format and incremental updating (koe)
2024-05-20 22:47:33 -05:00
luigi1111
172a191e3e Merge pull request #8488
e0b3507 tests: update block_weight for 2021 scaling (moneromooo-monero)
2024-05-20 22:46:53 -05:00
luigi1111
8db863c415 Merge pull request #8396
a46b6ba contrib: add more valgrind suppressions for spurious issues (moneromooo-monero)
7f3e31d unit_tests: fix accessing invalid memory in tree_hash test (moneromooo-monero)
2024-05-20 22:45:46 -05:00
luigi1111
3a47cdad13 Merge pull request #7852
8d94d08 replace 'multisig()' with 'get_multisig_status()' using multisig_account_status and including '.kex_is_done' member (koe)
2024-05-20 22:35:57 -05:00
jeffro256
004ead1a14 gpg_keys: renew jeffro256
Expiration date is simply pushed back to 1 year from now.
2024-05-14 13:34:13 -05:00
plowsof
2e061be322 README.md: sponsors;remove forked networking/globee 2024-05-12 19:43:06 +01:00
selsta
697986d948 net_node: update seed nodes
Also remove port for I2P seed nodes
2024-05-12 15:24:28 +02:00
0xFFFC0000
304dcf8570 contrib: fix compilation error for boost 1.85 2024-05-01 12:29:00 +00:00
0xFFFC0000
de9c461a98 common: support boost filesystem copy_options.
Co-authored-by: selsta <selsta@sent.at>
2024-04-30 23:20:10 +00:00
selsta
6d4f7b89c3 wallet2: fix stagenet get_approximate_blockchain_height 2024-04-28 21:15:38 +02:00
0xFFFC0000
f9d9dd88bb simplewallet: change boost::filesystem::complete to absolute. 2024-04-27 14:23:39 +00:00
0xFFFC0000
267e31f5b7 Add drop_and_recreate in privatefile class.
When creating a private file we need to delete the file if exist.
2024-04-22 14:32:12 +00:00
cuinix
3837bb853f remove repetitive word
Signed-off-by: cuinix <915115094@qq.com>
2024-04-20 19:17:46 +08:00
jeffro256
025021dee0 BlockchainDB: shorter fixup()
Instead of hard-coding all missing key images into the code and inserting if missing,
we simply pop all blocks after height 202611. This makes the `monerod` binary about
0.35% smaller.
2024-04-11 14:34:56 -05:00
jeffro256
262ef473db BlockchainDB: remove lock/unlock methods 2024-04-11 12:12:35 -05:00
jeffro256
bc05e724cb common: add va_args.h
This PR is upstreaming changes in the Seraphis lib here: https://github.com/UkoeHB/monero/pull/39. This header adds a macro `VA_ARGS_COMMAPREFIX`
which, when passed `__VA_ARGS__`, expands to `, __VA_ARGS__` unless the length of `__VA_ARGS__` is 0, in which case it expands to nothing. This
macro is useful for passing/declaring optional function arguments.
2024-04-11 11:32:07 -05:00
Dusan Klinec
4689ad2d3c trezor: support c++17 and protobuf v25, libusb fix
- fix If there is no protobuf version installed, if fails
- passphrase test fix, wallet keys init was missing
2024-04-10 18:19:22 +02:00
selsta
b27fda269e src: update checkpoints to match latest release 2024-04-06 00:53:05 +02:00
jeffro256
ff49444ee8 @tobtoht: undo rebase changes tx.dsts -> tx_dsts 2024-04-05 13:12:34 -05:00
SNeedlewoods
18fbe54729 add sum of amounts for unspent_outputs 2024-03-30 13:18:12 +01:00
Lee *!* Clagett
463228b961 Skip privacy networks (on tx sends) that don't have outgoing connections 2024-03-29 13:01:58 -04:00
j-berman
427ba7702f wallet2: ensure transfers and sweeps use same fee calc logic rnd2
Looks like the logic from #8882 was accidentally removed in #8861
(regressing to the behavior noted in the #8882 description).
This commit brings that logic back.
2024-03-22 14:05:17 -07:00
koe
e151ff711f update blake2b test vectors 2024-03-21 09:51:40 -05:00
jeffro256
d6609b83d6 serialization: do any N-tuple 2024-03-19 14:49:36 -05:00
0xFFFC0000
c56ee140df Cleanup string_tools.
1. Use boost::filesystem for already available operations.
2. Use boost::string for already available operations.
2024-03-15 14:54:23 +03:30
luigi1111
c8214782fb Merge pull request #9243
c4e1c5a ringct: fix trunc_amount field name change (jeffro256)
2024-03-12 12:45:35 -04:00
jeffro256
8e80585ef5 functional_tests: test HTTP digest auth
Test:
  1. Can't login to RPC server with --rpc-login enabled, but no auth provided
  2. Can access RPC server with correct login
  3. Can use internal HTTP client to access RPC server with correct login

With commit 0ae5c91e50 not reverted, we fail test 3.
2024-03-11 23:54:50 -05:00
jeffro256
c4e1c5a640 ringct: fix trunc_amount field name change
Caused in commit 05231400ce, PR #9035.
2024-03-11 20:21:22 -05:00
luigi1111
2d855f8d67 Merge pull request #9237
bcb15d3 Revert 'http_client: reduce number of packets sent for small bodies' (jeffro256)
2024-03-11 15:55:37 -04:00
luigi1111
8e61ddb413 Merge pull request #9228
c40d8b2 depends: add riscv64 linux build tag (selsta)
2024-03-11 15:52:09 -04:00
jeffro256
bcb15d3b00 Revert "http_client: reduce number of packets sent for small bodies"
This reverts commit 0ae5c91e50.
2024-03-10 23:04:44 -05:00
jeffro256
9d101d5ea0 serialization: protect blob serialization from undefined behavior
There is currently no compiler protection when someone tries to
do (for example) `BLOB_SERIALIZER(std::vector<int>)`. You just
get runtime allocation errors. This has already eaten up dev time
before, so this PR adds a static assertion that the type must be
trivially copyable, as defined by the C++ standard. Types can
override this if applicable if they use `BLOB_SERIALIZER_FORCED`.
2024-03-10 14:15:48 -05:00
jeffro256
7194506792 Blockchain: remove old fee calc logic 2024-03-10 13:30:46 -05:00
selsta
c40d8b213c depends: add riscv64 linux build tag 2024-03-09 21:15:28 +01:00
luigi1111
1bec71279e Merge pull request #9225
a01d7cc Fixed mempool pruning (SChernykh)
2024-03-08 20:27:34 -05:00
luigi1111
769202bc52 Merge pull request #9219
e6f4875 wallet2: adjust fee during backlog, fix set priority (selsta)
2024-03-08 20:26:58 -05:00
SyntheticBird45
9b946ae527 Removed default cryptonote address
- Removed `localhost:8080` default value to address string in wallet rpc
- Added an error response in case string is empty

fixed indentation

removed if and errors, default to localhost and port based on nettype

Forgot ":"

forgot ; and m_

removed wallet_rpc_server_error_codes.h
2024-03-08 21:32:26 +01:00
SChernykh
a01d7ccbfd Fixed mempool pruning
- Fixed undefined behavior after a call to `remove_tx_from_transient_lists` (it used an invalid iterator)
- Fixed `txCompare` (it wasn't strictly weak ordered)
2024-03-08 21:04:16 +01:00
luigi1111
d6d55b507a Merge pull request #9222
66e5081 get_block_template_backlog: better sorting logic (SChernykh)
2024-03-08 13:45:41 -05:00
luigi1111
c23951f339 Merge pull request #9218
7815023 tx_memory_pool: make double spends a no-drop offense (jeffro256)
2024-03-08 10:43:20 -05:00
SChernykh
66e5081eae get_block_template_backlog: better sorting logic
std::sort is unstable, so it can return random sets of transactions when mempool has many transactions with the same fee/byte. It can result in p2pool mining empty blocks sometimes because it doesn't pick up "new" transactions immediately.
2024-03-08 14:50:01 +01:00
selsta
e6f4875219 wallet2: adjust fee during backlog, fix set priority 2024-03-08 14:13:58 +01:00
luigi1111
4b255808d0 Merge pull request #9214
399b884 unit_tests: fix strtoul unit test (jeffro256)
2024-03-07 21:37:42 -05:00
luigi1111
6ade592adf Merge pull request #9195
2a2da79 free function serialization DSL (jeffro256)
2024-03-07 21:37:05 -05:00
luigi1111
2dced15f85 Merge pull request #9187
695084e depends: add download commands for freebsd & android sources (tobtoht)
2024-03-07 21:35:02 -05:00
luigi1111
ce88edc3f7 Merge pull request #9184
7043238 Remove instructions for Void Linux, add NixOS (Siren)
2024-03-07 21:34:39 -05:00
luigi1111
c3ebfb132f Merge pull request #9179
e499e74 actions: update to v4 actions (tobtoht)
2024-03-07 21:34:13 -05:00
luigi1111
e2cf644bef Merge pull request #9170
1bc09fc depends: add riscv64 to gitignore (tobtoht)
2024-03-07 21:25:00 -05:00
luigi1111
4582656f60 Merge pull request #9169
119e341 depends: remove unwind (tobtoht)
2024-03-07 21:24:30 -05:00
luigi1111
6e4ef12e50 Merge pull request #9168
0c9a5c5 depends: remove ccache (tobtoht)
2024-03-07 21:23:43 -05:00
luigi1111
1d24774b5b Merge pull request #9167
442146a depends: libusb: update to 1.0.27 (tobtoht)
2024-03-07 21:22:17 -05:00
luigi1111
20dbf99795 Merge pull request #9166
5f1b5c2 depends: eudev: update to 3.2.14 (tobtoht)
2024-03-07 21:21:42 -05:00
jeffro256
7815023117 tx_memory_pool: make double spends a no-drop offense
Nodes who see different txs in a double spend attack will drop each other, splitting the network.
Issue found by @boog900.
2024-03-07 09:23:51 -06:00
jeffro256
399b884a9c unit_tests: fix strtoul unit test 2024-03-07 09:05:09 -06:00
tobtoht
5dbaace1e8 depends: fix ar zero timestamp for openssl & unbound on android targets 2024-03-05 09:15:24 +01:00
tobtoht
358d27c2e4 depends: native_libtapi: don't embed git hash 2024-02-26 15:33:21 +01:00
jeffro256
38f354e89f Enforce Tx unlock_time is Zero by Relay Rule
Related to https://github.com/monero-project/research-lab/issues/78

Added a relay rule that enforces the `unlock_time` field is equal to 0 for non-coinbase transactions.

UIs changed:
* Removed `locked_transfer` and `locked_sweep_all` commands from `monero-wallet-cli`

APIs changed:
* Removed `unlock_time` parameters from `wallet2` transfer methods
* Wallet RPC transfer endpoints send error codes when requested unlock time is not 0
* Removed `unlock_time` parameters from `construct_tx*` cryptonote core functions
2024-02-24 14:27:17 -06:00
jeffro256
2a2da79943 free function serialization DSL
Example usage for Seraphis types (in global or `sp` namespace):

```
BEGIN_SERIALIZE_OBJECT_FN(sp::SpCoinbaseEnoteCore)
    FIELD_F(onetime_address)
    VARINT_FIELD_F(amount)
END_SERIALIZE()

BEGIN_SERIALIZE_OBJECT_FN(sp::SpEnoteCore)
    FIELD_F(onetime_address)
    FIELD_F(amount_commitment)
END_SERIALIZE()
```
2024-02-24 11:24:47 -06:00
luigi1111
7b7958bbd9 Merge pull request #9004
cdab0d4 cmake: require libsodium (tobtoht)
684bfca depends: move sodium to packages (tobtoht)
2024-02-24 10:46:59 -05:00
tobtoht
cdab0d489c cmake: require libsodium 2024-02-24 16:26:43 +01:00
tobtoht
684bfca765 depends: move sodium to packages 2024-02-24 16:25:13 +01:00
luigi1111
9c9cb6e458 Merge pull request #9191
3313933 docs: omit i2p port number from ANONYMITY_NETWORKS (selsta)
2024-02-24 10:17:48 -05:00
luigi1111
b12766a652 Merge pull request #9189
f7670c9 cryptonote_core: early out on out of bounds scaling parameter (selsta)
2024-02-24 10:16:54 -05:00
luigi1111
7c22754432 Merge pull request #9182
538f19b depends: android_ndk: update to 18b (tobtoht)
2024-02-24 10:15:34 -05:00
luigi1111
7b8fd2d1a0 Merge pull request #9165
c334d0e depends: openssl: update to 3.0.13 (tobtoht)
2024-02-24 10:13:42 -05:00
luigi1111
7ba726c142 Merge pull request #9164
b26155b depends: expat: update to 2.6.0 (tobtoht)
2024-02-24 10:13:19 -05:00
luigi1111
b616c64953 Merge pull request #9163
edcc1e4 depends: unbound: update to 1.19.1 (tobtoht)
2024-02-24 10:12:31 -05:00
luigi1111
72d87cd10a Merge pull request #9160
c50ade5 Daemon-specific proxy for the wallet-rpc. (0xFFFC0000)
2024-02-24 10:11:51 -05:00
luigi1111
3078e44847 Merge pull request #9155
ed50938 Zero initialize rctSigBase elements (Lee *!* Clagett)
2024-02-24 10:07:54 -05:00
luigi1111
f2493d9139 Merge pull request #9143
b1c9a80 Add <cstdint> to aligned test (Lee *!* Clagett)
2024-02-24 10:06:57 -05:00
luigi1111
486ae9f1cf Merge pull request #9138
cd7ccfb Disable/fix ports with I2P (Lee Clagett)
2024-02-24 10:05:25 -05:00
luigi1111
7904879326 Merge pull request #9137
8d25418 daemon: warn user on specifiying ZMQ args with --no-zmq (jeffro256)
2024-02-24 10:04:56 -05:00
luigi1111
9132d4eea0 Merge pull request #9132
9cd4757 Cleanup extra memory allocation, and port boost::shared_ptr to std::shared_ptr. (0xFFFC0000)
2024-02-24 10:04:04 -05:00
luigi1111
400b313caf Merge pull request #9128
ba902f9 actions: remove unnecessary packages (tobtoht)
2024-02-24 10:00:27 -05:00
luigi1111
c12ee59ebd Merge pull request #9125
0c545f6 epee/test: remove levin_protocol_handler and core_proxy tests (jeffro256)
2024-02-24 09:59:50 -05:00
luigi1111
49bfb8fd63 Merge pull request #9121
afe5167 depends: update config scripts (jeffro256)
2024-02-24 09:58:59 -05:00
luigi1111
2dc918402c Merge pull request #9006
47042ce wallet2: call on_reorg callback in handle_reorg (j-berman)
2024-02-24 09:57:55 -05:00
luigi1111
92a3b2c97e Merge pull request #9005
0d763a1 depends: move cmake system config to hosts files (tobtoht)
2024-02-24 09:57:09 -05:00
luigi1111
b91c433788 Merge pull request #8940
48b7d08 epee binary: container can read from empty seq of any type (jeffro256)
2024-02-24 09:55:58 -05:00
luigi1111
ee104bc9d5 Merge pull request #8861
b13c5f6 wallet: feature: transfer amount with fee included (jeffro256)
2024-02-24 09:54:56 -05:00
tobtoht
3d2b6a8ac2 depends: native_cctools: don't embed build date 2024-02-23 18:30:17 +01:00
tobtoht
5fdd67d738 depends: {native_,}protobuf: speedup build 2024-02-23 10:58:11 +01:00
tobtoht
3c16794f1f build: force Trezor for depends builds 2024-02-23 10:56:37 +01:00
koe
fa47c7b7d6 add blake2b to src/crypto 2024-02-21 19:39:11 -06:00
selsta
33139336a2 docs: omit i2p port number from ANONYMITY_NETWORKS 2024-02-21 01:01:32 +01:00
jeffro256
b13c5f6669 wallet: feature: transfer amount with fee included
To transfer ~5 XMR to an address such that your balance drops by exactly 5 XMR, provide a `subtractfeefrom` flag to the `transfer` command. For example:

    transfer 76bDHojqFYiFCCYYtzTveJ8oFtmpNp3X1TgV2oKP7rHmZyFK1RvyE4r8vsJzf7SyNohMnbKT9wbcD3XUTgsZLX8LU5JBCfm 5 subtractfeefrom=all

If my walet balance was exactly 30 XMR before this transaction, it will be exactly 25 XMR afterwards and the destination address will receive slightly
less than 5 XMR. You can manually select which destinations fund the transaction fee and which ones do not by providing the destination index.
For example:

    transfer 75sr8AAr... 3 74M7W4eg... 4 7AbWqDZ6... 5 subtractfeefrom=0,2

This will drop your balance by exactly 12 XMR including fees and will spread the fee cost proportionally (3:5 ratio) over destinations with addresses
`75sr8AAr...` and `7AbWqDZ6...`, respectively.

Disclaimer: This feature was paid for by @LocalMonero.
2024-02-20 17:08:06 -06:00
selsta
f7670c9387 cryptonote_core: early out on out of bounds scaling parameter 2024-02-21 00:02:27 +01:00
tobtoht
695084ecad depends: add download commands for freebsd & android sources 2024-02-20 16:36:29 +01:00
Siren
7043238261 Remove instructions for Void Linux, add NixOS 2024-02-20 01:33:21 +02:00
tobtoht
119e3410bb depends: remove unwind 2024-02-19 22:35:26 +01:00
tobtoht
e499e74b8e actions: update to v4 actions 2024-02-19 00:01:22 +01:00
0xFFFC0000
c50ade514f Daemon-specific proxy for the wallet-rpc.
1. Daemon-specific proxy is exclusive with global proxy (--proxy).
2. If you set global proxy (--proxy) you cannot set daemon-specific proxy.
3. If you don't set global proxy, you can set proxy (or not set) proxy for
each daemon connection with the proxy field in jsonrpc to the wallet-rpc.
2024-02-18 18:36:52 +00:00
jeffro256
49ca1ad6ae variant: split into variant and optional_variant
Upstreaming https://github.com/UkoeHB/monero/pull/28
2024-02-16 19:12:13 -06:00
jeffro256
48b7d0895a epee binary: container can read from empty seq of any type 2024-02-16 15:53:07 -06:00
jeffro256
62fdacca07 variant: visit lambda and value-initialize by index 2024-02-14 02:01:44 -06:00
tobtoht
1bc09fce59 depends: add riscv64 to gitignore 2024-02-13 22:36:20 +01:00
tobtoht
0c9a5c5587 depends: remove ccache 2024-02-13 20:54:02 +01:00
tobtoht
5f1b5c2c4a depends: eudev: update to 3.2.14 2024-02-13 20:13:45 +01:00
tobtoht
442146a508 depends: libusb: update to 1.0.27 2024-02-13 19:28:42 +01:00
tobtoht
c334d0e5f3 depends: openssl: update to 3.0.13 2024-02-13 18:45:59 +01:00
tobtoht
b26155b8fa depends: expat: update to 2.6.0 2024-02-13 18:20:19 +01:00
tobtoht
edcc1e4618 depends: unbound: update to 1.19.1 2024-02-13 18:18:23 +01:00
tobtoht
538f19b0b7 depends: android_ndk: update to 18b 2024-02-12 19:31:15 +01:00
jeffro256
8d25418df0 daemon: warn user on specifiying ZMQ args with --no-zmq
Resolves https://github.com/monero-project/monero/issues/9127
2024-02-07 00:04:46 -06:00
Lee *!* Clagett
ed50938af4 Zero initialize rctSigBase elements 2024-02-06 12:47:47 -05:00
Lee Clagett
cd7ccfbdab Disable/fix ports with I2P 2024-01-30 13:40:05 -05:00
Lee *!* Clagett
b1c9a809a0 Add <cstdint> to aligned test 2024-01-29 21:37:22 -05:00
0xFFFC0000
9cd4757c88 Cleanup extra memory allocation, and port boost::shared_ptr to std::shared_ptr. 2024-01-23 11:18:39 +03:30
tobtoht
ba902f9303 actions: remove unnecessary packages 2024-01-19 19:50:03 +01:00
luigi1111
059028a30a Merge pull request #9126
e7629dc CMake: only set policy CMP0148 to OLD if version >= 3.27 (jeffro256)
2024-01-19 13:45:01 -05:00
jeffro256
e7629dc46f CMake: only set policy CMP0148 to OLD if version >= 3.27
Co-authored-by: 0xFFFC0000 <0xFFFC0000@proton.me>
2024-01-19 11:14:58 -06:00
luigi1111
39a698d22c Merge pull request #9119
9690bfd gpg_keys: add 0xfffc0000 (0xFFFC0000)
2024-01-18 18:09:22 -05:00
luigi1111
79608f74d5 Merge pull request #9117
7d3b9b9 remove ARCH='x86-64' from release-static (woodser)
2024-01-18 18:08:52 -05:00
luigi1111
edff20040a Merge pull request #9111
34e62d5 workflows: enable manual run of copyright update (plowsof)
dd978ee workflows: copyright commit author (plowsof)
2024-01-18 18:07:51 -05:00
luigi1111
663dcf3aa2 Merge pull request #9103
562bdb8 storages: add missing return (selsta)
2024-01-18 18:07:12 -05:00
luigi1111
eb904d709a Merge pull request #9090
430b102 Cleanup scoped_ptr in src/common/dns_utils.cpp and header include: 	* No need for entire new class (Fix #8732). 	* Fix stdint.h header include in contrib/epee/include/net/http_base.h. (0xFFFC0000)
2024-01-18 18:06:23 -05:00
luigi1111
36addc1e56 Merge pull request #9084
01c6e4b OpenBSD: node server fix IP localhost by aliasing (mesaoptimizer)
2024-01-18 18:05:28 -05:00
luigi1111
e9a4deef81 Merge pull request #9079
eed975d Fix missing checks for IsObject in ZMQ jsonrpc reading (Lee Clagett)
2024-01-18 18:03:18 -05:00
luigi1111
8ee57110b0 Merge pull request #9077
2525200 serialization: remove container wrappers and serialize directly (jeffro256)
2024-01-18 18:02:31 -05:00
luigi1111
71ef573a14 Merge pull request #9076
eb083ca cmake: silence FindPythonInterp warning (tobtoht)
2024-01-18 18:02:09 -05:00
luigi1111
4b1910af13 Merge pull request #9073
53e632b fix merge mining with more than one merge mined chain (Crypto City)
2024-01-18 18:01:34 -05:00
luigi1111
7795895774 Merge pull request #9072
69a8175 Change std::result_of to auto (Lee Clagett)
2024-01-18 18:01:08 -05:00
luigi1111
5d3679c43c Merge pull request #9069
a11e03a serialization: fix infinite loops and clean up dispatching (jeffro256)
2024-01-18 18:00:25 -05:00
luigi1111
6d00cf2c2d Merge pull request #9061
085fdea Add compile-time check for input iterators in ::wire array writing (Lee *!* Clagett)
2024-01-18 17:59:47 -05:00
luigi1111
7b158679bf Merge pull request #9060
cf2253c workflows: upload macOS binary after name change (selsta)
2024-01-18 17:59:18 -05:00
luigi1111
2eed43cef2 Merge pull request #9059
2766d12 MMS: Ignore 2 more API errors thrown by latest PyBitmessage (rbrunner7)
2024-01-18 17:58:57 -05:00
luigi1111
57799a8ca5 Merge pull request #9056
deb8c79 gpg_keys: add tobtoht (tobtoht)
2024-01-18 17:58:18 -05:00
luigi1111
9d7b253263 Merge pull request #9052
4acae11 Fix EAGAIN bug in ZMQ-RPC/ZMQ-PUB (Lee *!* Clagett)
2024-01-18 17:57:30 -05:00
luigi1111
2a6f7efca6 Merge pull request #9049
1062b17 wallet: sign_tx: get tx pubkey from extra (tobtoht)
2024-01-18 17:56:55 -05:00
luigi1111
5f6646020e Merge pull request #9023
b2eb47d wallet: mitigate statistical dependence for decoy selection within rings (jeffro256)
2024-01-18 17:55:49 -05:00
jeffro256
0c545f614a epee/test: remove levin_protocol_handler and core_proxy tests 2024-01-17 17:17:16 -06:00
jeffro256
a79734c848 cryptonote_basic: faster and more readable is_valid_decomposed_amount
Includes performance tests
2024-01-15 15:44:10 -06:00
jeffro256
afe5167531 depends: update config scripts
The files are exact copies from the original repository (git://git.savannah.gnu.org/config.git),
in commit 28ea239c53a2d5d8800c472bc2452eaa16e37af2. The main reason for the update is because
loongarch was mentioned in PR #9114 and new the latest config files handle loongarch,
as well as WASM64, since the old files only cover WASM32. Tandem NSX and IA16, are also handled
in the newest config files, which covers the changes TheCharlatan made in 2018.
2024-01-12 12:54:26 -06:00
0xFFFC0000
9690bfda27 gpg_keys: add 0xfffc0000 2024-01-09 03:52:30 +03:30
woodser
7d3b9b98cb remove ARCH="x86-64" from release-static 2024-01-06 14:15:08 -05:00
YalingFang
88d074c0e0 Add support for Loongarch 2024-01-05 08:14:12 +00:00
plowsof
34e62d58db workflows: enable manual run of copyright update 2024-01-02 17:18:07 +00:00
plowsof
dd978ee437 workflows: copyright commit author
author is now copyCat
2024-01-02 17:16:06 +00:00
selsta
562bdb824b storages: add missing return 2023-12-25 15:27:00 +01:00
0xFFFC0000
430b102aef Cleanup scoped_ptr in src/common/dns_utils.cpp and header include:
* No need for entire new class (Fix #8732).
	* Fix stdint.h header include in contrib/epee/include/net/http_base.h.
2023-12-19 16:54:37 +03:30
mesaoptimizer
01c6e4b4ad OpenBSD: node server fix IP localhost by aliasing
The test node_server.bind_same_p2p_port fails by default on OpenBSD
for at least the debug build. Using the same ifconfig command as
described for MacOS results in the test passing.
2023-12-10 22:08:05 +01:00
Crypto City
53e632b435 fix merge mining with more than one merge mined chain
reported by sech1
2023-11-30 17:01:52 +00:00
Lee Clagett
eed975db5d Fix missing checks for IsObject in ZMQ jsonrpc reading 2023-11-28 18:02:57 -05:00
jeffro256
2525200185 serialization: remove container wrappers and serialize directly
Some downstream code (most notably PR https://github.com/UkoeHB/monero/pull/25) wants to use the src/serialization lib
for storing information persistently. When one builds classes/machines wishing to serialize containers, they must use
the `serializable_*` container classes. In this case, this makes the Seraphis library code unnecessarily tightly coupled
with the src/serialization code since one cannot swap out their type of storage format without major refactoring of class
field types. By serializing STL containers directly, we can abstract the serialization details away, making for much
cleaner design. Also small bonus side effect of this change is that STL containers with custom Comparators, Allocators,
and Hashers are serializable. `std::multimap` is added to the list of serializable containers.

Depends upon https://github.com/monero-project/monero/pull/9069.
2023-11-28 14:06:24 -06:00
tobtoht
eb083ca423 cmake: silence FindPythonInterp warning 2023-11-25 20:38:52 +01:00
Lee Clagett
69a8175edc Change std::result_of to auto 2023-11-20 17:16:42 -05:00
jeffro256
a11e03afa6 serialization: fix infinite loops and clean up dispatching
Resolves #8687
2023-11-18 03:47:55 -06:00
Lee *!* Clagett
085fdea88c Add compile-time check for input iterators in ::wire array writing 2023-11-06 16:26:39 -05:00
selsta
cf2253c812 workflows: upload macOS binary after name change 2023-11-06 20:39:40 +01:00
luigi1111
ac02af9286 Merge pull request #9050
23179a0 wallet: fix multisig key memory leak (jeffro256)
2023-11-06 09:38:08 -05:00
luigi1111
cab0ebdeb5 Merge pull request #9045
504269e unit tests: fix running from pwd and auto test selected location (jeffro256)
2023-11-06 09:35:11 -05:00
luigi1111
b0ea37a198 Merge pull request #9044
5443240 core_tests: fix gcc7 compilation (selsta)
2023-11-06 09:34:37 -05:00
luigi1111
06cfcb73ae Merge pull request #9042
ade57b6 JH hash compiler workarounds (SChernykh)
2023-11-06 09:33:35 -05:00
luigi1111
b22ba16dec Merge pull request #9038
e191083 epee: remove dead code in math_helper and string_tools (jeffro256)
2023-11-06 09:31:33 -05:00
luigi1111
c03e404980 Merge pull request #9035
0523140 ringct: make 
ctSigBase serialization follow strict aliasing rule (jeffro256)
2023-11-06 09:28:18 -05:00
luigi1111
4ea2a194c7 Merge pull request #9033
56dab0f cryptonote_config: include cstdint (jeffro256)
2023-11-06 09:27:26 -05:00
luigi1111
3ab36f36f9 Merge pull request #9030
30cf537 unit tests: wallet_storage: generate in 'Ascii' format test (jeffro256)
2023-11-06 09:26:48 -05:00
luigi1111
26d37fe91d Merge pull request #9028
9ea3257 gitian: add riscv64 support (selsta)
2023-11-06 09:25:24 -05:00
luigi1111
54e8463fe6 Merge pull request #8990
c17f73a add sp_transcript (koe) 51e40f7 add seraphis_crypto directory (koe)
2023-11-06 09:24:37 -05:00
luigi1111
a87f2bdd3f Merge pull request #8979
80b5bf8 gcc: fix uninitialized constructor warnings (jeff)
2023-11-06 09:23:48 -05:00
luigi1111
476398687d Merge pull request #8965
1e2e703 core_rpc_server: silence unused  warnings (jeffro256)
2023-11-06 09:23:08 -05:00
luigi1111
3cea45bc56 Merge pull request #8922
b4491c1 cmake: set -fno-aligned-allocation on macOS ARM (selsta)
df9f380 cmake: set BOOST_NO_AUTO_PTR to fix c++17 compilation (selsta)
5136974 device: boost -> std locks to fix c++17 compilation (selsta)
5965b02 cmake: set cpp17 standard (selsta)
2023-11-06 09:21:55 -05:00
tobtoht
deb8c79a97 gpg_keys: add tobtoht 2023-11-05 16:15:19 +01:00
rbrunner7
2766d12a62 MMS: Ignore 2 more API errors thrown by latest PyBitmessage 2023-11-05 16:11:52 +01:00
koe
c17f73a1a2 add sp_transcript 2023-11-04 21:56:42 -05:00
SChernykh
ade57b694f JH hash compiler workarounds
- Fixed uninitialized `state->x` warning
- Fixed broken code with `-O3` or `-Ofast`

The old code is known to break GCC 10.1 and GCC 11.4
2023-11-04 21:01:07 +01:00
Lee *!* Clagett
4acae11327 Fix EAGAIN bug in ZMQ-RPC/ZMQ-PUB 2023-11-04 13:42:14 -04:00
tobtoht
1062b172b6 wallet: sign_tx: get tx pubkey from extra 2023-11-02 15:19:05 +01:00
jeffro256
23179a0ba4 wallet: fix multisig key memory leak
Multisig keys per-transfer were being wiped, but not erased, which lead to a ginormous
quadratic bloat the more transfers and exports you performed with the wallet.
2023-11-02 02:58:50 -05:00
jeffro256
504269e6cf unit tests: fix running from pwd and auto test selected location 2023-10-28 03:14:05 -05:00
selsta
5443240aa6 core_tests: fix gcc7 compilation 2023-10-28 04:26:27 +02:00
selsta
b4491c1072 cmake: set -fno-aligned-allocation on macOS ARM
We set a deployment target that is lower than 10.14, which means
we have to disable aligned allocation otherwise compilation fails.
2023-10-26 04:02:27 +02:00
selsta
df9f380671 cmake: set BOOST_NO_AUTO_PTR to fix c++17 compilation 2023-10-26 04:02:26 +02:00
selsta
5136974da9 device: boost -> std locks to fix c++17 compilation 2023-10-26 04:02:26 +02:00
selsta
5965b02aef cmake: set cpp17 standard 2023-10-26 04:02:25 +02:00
luigi1111
053ba2cf07 Merge pull request #9026
9dc10bb Update RandomX to 1.2.1 (tevador)
2023-10-25 21:40:59 -04:00
luigi1111
5dbe2d0407 Merge pull request #9017
fe4a34e depends: zeromq: update to 4.3.5 (tobtoht)
2023-10-25 21:39:47 -04:00
luigi1111
40af6848f2 Merge pull request #9007
c8e4de1 depends: remove kernel version from darwin triplet (tobtoht)
2023-10-25 21:39:24 -04:00
luigi1111
b91ed92fa4 Merge pull request #9003
b9f1e37 depends: unwind: do not build for linux hosts (tobtoht)
2023-10-25 21:38:57 -04:00
luigi1111
e946315627 Merge pull request #9002
932bba3 depends: remove libiconv: unused (tobtoht)
2023-10-25 21:38:32 -04:00
luigi1111
10f208fbc5 Merge pull request #8989
9b231c9 add account_generators for mapping public EC generators to account keys (koe)
2023-10-25 21:37:37 -04:00
luigi1111
a1a40d67d2 Merge pull request #8987
1025e4f unit_test: set data dir relative to exe & add log-level arg (jeff)
2023-10-25 21:37:09 -04:00
luigi1111
fc4397010d Merge pull request #8974
759293d wallet2: fix version check at hf version 1 (j-berman)
2023-10-25 21:36:36 -04:00
luigi1111
829c8f0ff9 Merge pull request #8972
f70d65c ea_config: define ELPP_FEATURE_CRASH_LOG for freebsd (teknosquet)
2023-10-25 21:36:09 -04:00
luigi1111
e3d0154b5b Merge pull request #8969
8190f25 KV_SERIALIZE: remove extraneous semicolons in DSL (jeffro256)
2023-10-25 21:35:43 -04:00
luigi1111
f10ed50431 Merge pull request #8967
eba9011 README: remove obsolete forum (maogo)
2023-10-25 21:35:17 -04:00
luigi1111
faffe09bdb Merge pull request #8966
f71e2dc multisig: better errors for small malformed kex msgs (jeffro256)
2023-10-25 21:34:57 -04:00
luigi1111
1d3eba161f Merge pull request #8963
294366f depends: openssl: update to 3.0.11 (tobtoht)
2023-10-25 21:34:36 -04:00
luigi1111
d5da693866 Merge pull request #8958
b0bf49a blockchain_db: add k-anonymity to txid fetching (jeffro256)
2023-10-25 21:34:06 -04:00
luigi1111
cf474d55f6 Merge pull request #8933
ebb7671 depends: use macOS 11 SDK with libc++ headers (tobtoht)
2023-10-25 21:31:40 -04:00
luigi1111
8f0343df16 Merge pull request #8752
c444a7e trezor: support v2.5.2+, add more trezor tests, fix chaingen and tests (Dusan Klinec)
056c996 fix chaingen tests (Dusan Klinec)
2023-10-25 21:30:49 -04:00
jeffro256
e191083bed epee: remove dead code in math_helper and string_tools 2023-10-25 16:41:21 -05:00
tobtoht
ebb7671e0e depends: use macOS 11 SDK with libc++ headers 2023-10-24 19:56:11 +02:00
jeffro256
05231400ce ringct: make rctSigBase serialization follow strict aliasing rule
Accessing an object of type `char` thru an lvalue of type `crypto::hash8` is undefined behavior.
https://developers.redhat.com/blog/2020/06/03/the-joys-and-perils-of-aliasing-in-c-and-c-part-2
2023-10-23 16:28:02 -05:00
jeffro256
56dab0fad2 cryptonote_config: include cstdint
Header was using `uint64_t` without including `<cstdint>` which caused some issues downstream for windows builds
2023-10-22 18:02:54 -05:00
jeffro256
30cf537bcc unit tests: wallet_storage: generate in "Ascii" format test 2023-10-21 18:37:12 -05:00
selsta
9ea325777f gitian: add riscv64 support 2023-10-21 16:02:55 +02:00
tevador
9dc10bb223 Update RandomX to 1.2.1 2023-10-20 20:46:36 +02:00
jeffro256
b2eb47d875 wallet: mitigate statistical dependence for decoy selection within rings
Since we are required to check for uniqueness of decoy picks within any given
ring, and since some decoy picks may fail due to unlock time or malformed EC points,
the wallet2 decoy selection code was building up a larger than needed *unique* set of
decoys for each ring according to a certain distribution *without replacement*. After
filtering out the outputs that it couldn't use, it chooses from the remaining decoys
uniformly random *without replacement*.

The problem with this is that the picks later in the picking process are not independent
from the picks earlier in the picking process, and the later picks do not follow the
intended decoy distribution as closely as the earlier picks. To understand this
intuitively, imagine that you have 1023 marbles. You label 512 marbles with the letter A,
label 256 with the letter B, so on and so forth, finally labelling one marble with the
letter J. You put them all into a bag, shake it well, and pick 8 marbles from the bag,
but everytime you pick a marble of a certain letter, you remove all the other marbles
from that bag with the same letter. That very first pick, the odds of picking a certain
marble are exactly how you would expect: you are twice as likely to pick A as you are B,
twice as likely to pick B as you are C, etc. However, on the second pick, the odds of
getting the first pick are 0%, and the chances for everything else is higher. As you go
down the line, your picked marbles will have letters that are increasingly more unlikely
to pick if you hadn't remove the other marbles. In other words, the distribution of the
later marbles will be more "skewed" in comparison to your original distribution of marbles.

In Monero's decoy selection, this same statistical effect applies. It is not as dramatic
since the distribution is not so steep, and we have more unique values to choose from,
but the effect *is* measureable. Because of the protocol rules, we cannot have duplicate
ring members, so unless that restriction is removed, we will never have perfectly
independent picking. However, since the earlier picks are less affected by this
statistical effect, the workaround that this commit offers is to store the order that
the outputs were picked and commit to this order after fetching output information over RPC.
2023-10-17 00:53:40 -05:00
jeff
80b5bf8b3d gcc: fix uninitialized constructor warnings 2023-10-16 16:48:27 -05:00
tobtoht
fe4a34ebb2 depends: zeromq: update to 4.3.5 2023-10-10 00:08:44 +02:00
luigi1111
67d190ce7c Merge pull request #9013
bb33daa add a test for the long term weight cache (Boog900)
65839b5 Fix: long term block weight cache The long term block weight cache was doing a wrong calculation when adding a new block to the cache. (Boog900)
2023-10-02 15:27:39 -04:00
Boog900
bb33daab1b add a test for the long term weight cache 2023-10-02 01:38:10 +01:00
Boog900
65839b5ac1 Fix: long term block weight cache
The long term block weight cache was doing a wrong calculation when
adding a new block to the cache.
2023-10-01 13:40:06 +01:00
luigi1111
f29a3d45f3 Merge pull request #9000
9636375 storages: change error log category to serialization (selsta)
2023-09-30 14:45:06 -04:00
luigi1111
6d37eb0a01 Merge pull request #8998
9f981ac wallet: store watch-only wallet correctly when change_password() is called (jeff)
2023-09-30 14:43:40 -04:00
Dusan Klinec
c444a7e002 trezor: support v2.5.2+, add more trezor tests, fix chaingen and tests
- passphrase logic: remove backward compatibility for 2.4.3, code cleanup.
- fix LibUSB cmake for static builds on OSX
- tests: all tests now work with passphrase logic enabled. Passphrase test added with different passphrase. no_passphrase test added, Trezor pin test added. Testing wallet opening with correct and incorrect passphrase. Trezor test chain revamp, cleanup. Smaller chain, chain file versioning added.
- tests: Trezor tests support TEST_MINING_ENABLED, TEST_MINING_TIMEOUT env vars to change mining-related tests behaviour.
- requires protobuf@21 on osx for now (c++14), building with unlinked protobuf: `CMAKE_PREFIX_PATH=$(find /opt/homebrew/Cellar/protobuf@21 -maxdepth 1 -type d -name "21.*" -print -quit) \
make debug-test-trezor -j8`
2023-09-30 09:01:10 +02:00
Dusan Klinec
056c996703 fix chaingen tests
- fix tx create from sources, input locking. Originally, creating a synthetic transactions with chaingen could create a transaction with outputs that are still locked in the current block, thus failing chain validation by the daemon. Simple unlock check was added. Some buggy tests were fixed as well as new unlock-checking version of tx creation rejected those, fixes are simple - mostly using correct block after a rewind to construct a transaction
2023-09-29 19:11:20 +02:00
tobtoht
c8e4de13f2 depends: remove kernel version from darwin triplet 2023-09-27 07:37:01 +02:00
j-berman
47042ce808 wallet2: call on_reorg callback in handle_reorg 2023-09-26 20:37:11 -07:00
tobtoht
0d763a19b8 depends: move cmake system config to hosts files 2023-09-26 16:46:51 +02:00
tobtoht
b9f1e37d33 depends: unwind: do not build for linux hosts 2023-09-26 09:47:36 +02:00
tobtoht
932bba3b79 depends: remove libiconv: unused 2023-09-25 14:00:34 +02:00
selsta
9636375421 storages: change error log category to serialization 2023-09-22 19:05:55 +02:00
jeff
9f981ac219 wallet: store watch-only wallet correctly when change_password() is called
The Monero GUI code was calling `Monero::wallet::setPassword()` on every open/close for some reason,
and the old `store_to()` code called `store_keys()` with `watch_only=false`, even for watch-only wallets.
This caused a bug where the watch-only keys file got saved with with the JSON field `watch_only` set to 0,
and after saving a watch-only wallet once, a user could never open it back up against because `load()` errored out.
This never got brought up before this because you would have to change the file location of the watch-only
wallet to see this bug, and I guess that didn't happen often, but calling the new `store_to()` function with the
new `force_rewrite` parameter set to `true` triggers key restoring and the bug appeared.
2023-09-21 22:42:16 -05:00
tobtoht
294366f8af depends: openssl: update to 3.0.11 2023-09-19 15:54:00 +02:00
luigi1111
90294f09ae Merge pull request #8976
d4d8840 functional_tests: fix multisig tests noutputs assertion (jeffro256)
2023-09-14 22:20:10 -05:00
luigi1111
8a280dd6d0 Merge pull request #8937
1bea8ef wallet2: fix store_to() and change_password() (jeffro256)
2023-09-14 22:17:27 -05:00
koe
51e40f721b add seraphis_crypto directory 2023-09-10 16:49:58 -05:00
koe
9b231c9ac3 add account_generators for mapping public EC generators to account keys 2023-09-10 16:02:46 -05:00
koe
236e5d4623 update TimingsDatabase to support csv format and incremental updating 2023-09-10 15:51:54 -05:00
jeff
1025e4fcb1 unit_test: set data dir relative to exe & add log-level arg 2023-09-10 02:18:50 -05:00
jeffro256
1bea8ef42a wallet2: fix store_to() and change_password()
Resolves #8932 and:
2. Not storing cache when new path is different from old in `store_to()` and
3. Detecting same path when new path contains entire string of old path in `store_to()` and
4. Changing your password / decrypting your keys (in this method or others) and providing a bad original password and getting no error and
5. Changing your password and storing to a new file
2023-08-23 11:48:18 -05:00
jeffro256
d4d884057c functional_tests: fix multisig tests noutputs assertion
The changes to the multisig tests in #8914 and #8904 affected each other, this PR cleans up the code and fixes that issue.
2023-08-19 22:09:51 -05:00
j-berman
759293de08 wallet2: fix version check at hf version 1 2023-08-17 13:29:46 -07:00
luigi1111
8123d945f8 Merge pull request #8959
26fa796 docs: update ANONYMITY_NETWORKS (DonW16)
2023-08-17 10:27:34 -05:00
luigi1111
72211163b8 Merge pull request #8956
f7fb5c7 scan_tx: fix custom comparator for == case; fixes #8951 (j-berman)
2023-08-17 10:26:24 -05:00
luigi1111
e3c990f03a Merge pull request #8955
192d87c remove more 'using namespace' statements from headers (jeffro256)
2023-08-17 10:25:51 -05:00
luigi1111
1ab593991c Merge pull request #8950
a0e5c3c wallet2: when checking frozen multisig tx set, don't assume order (jeffro256)
2023-08-17 10:24:53 -05:00
luigi1111
28eca0cb79 Merge pull request #8927
1104b59 Update help for set command in simplewallet Add help for max-reorg-depth and load-deprecated-formats options (MasFlam)
2023-08-17 10:23:10 -05:00
luigi1111
6fc67869a1 Merge pull request #8924
ffbf9f4 blockchain_and_pool: move to crytonote_core and enforce its usage (jeffro256)
d6f86e5 Avoid nullptr dereference when constructing Blockchain and tx_memory_pool (lukas)
2023-08-17 10:21:40 -05:00
luigi1111
3b67d5fc5b Merge pull request #8914
45b52de wallet-rpc: restore from multisig seed (jeffro256)
2023-08-17 10:20:20 -05:00
luigi1111
fc84506a96 Merge pull request #8913
2a2cf03 blockchain_db: add clarification to get_block_already_generated_coins (jeffro256)
2023-08-17 10:19:26 -05:00
luigi1111
30ba5a5280 Merge pull request #8890
e8cac61 core_rpc_server: return ID of submitted block (jeffro256)
2023-08-17 10:17:46 -05:00
luigi1111
83df9b1429 Merge pull request #8882
a8d2a58 wallet2: ensure transfers and sweeps use same fee calc logic (j-berman)
2023-08-17 10:17:22 -05:00
luigi1111
b9fd761a25 Merge pull request #8868
a6ce2dc Write interface for new serialization system (Lee *!* Clagett)
2023-08-17 10:14:17 -05:00
luigi1111
4cabfe7aba Merge pull request #8853
6ff87ef net: tor_address: remove support for v2 onion addresses (tobtoht)
2023-08-17 10:11:12 -05:00
luigi1111
c490e38f56 Merge pull request #8840
503c3e0 core: do not force sync the db when finding a block in regtest mode (Crypto City)
2023-08-17 10:10:14 -05:00
luigi1111
01ee1682aa Merge pull request #8786
0ae5c91 http_client: reduce number of packets sent for small bodies (jeffro256)
2023-08-17 10:08:29 -05:00
teknosquet
f70d65c8bc ea_config: define ELPP_FEATURE_CRASH_LOG for freebsd
Signed-off-by: teknosquet <teknosquet@danwin1210.de>
2023-08-14 02:36:14 -05:00
Lee *!* Clagett
a6ce2dc7c5 Write interface for new serialization system 2023-08-11 16:34:27 -04:00
jeffro256
8190f2532b KV_SERIALIZE: remove extraneous semicolons in DSL
Prereq of https://github.com/monero-project/monero/pull/8867
2023-08-10 11:13:14 -05:00
maogo
eba9011ca0 README: remove obsolete forum 2023-08-10 04:18:24 +02:00
jeffro256
f71e2dcdc8 multisig: better errors for small malformed kex msgs
Resolves https://github.com/monero-project/monero/issues/8493
2023-08-08 12:01:40 -05:00
jeffro256
1e2e7035e9 core_rpc_server: silence unused warnings 2023-08-01 17:46:34 -05:00
jeffro256
b0bf49a65a blockchain_db: add k-anonymity to txid fetching
Read more about k-anonymity [here](https://en.wikipedia.org/wiki/K-anonymity). We implement this feature in the monero daemon for transactions
by providing a "Txid Template", which is simply a txid with all but `num_matching_bits` bits zeroed out, and the number `num_matching_bits`. We add an operation to `BlockchainLMDB` called
`get_txids_loose` which takes a txid template and returns all txids in the database (chain and mempool) that satisfy that template. Thus, a client can
ask about a specific transaction from a daemon without revealing the exact transaction they are inquiring about. The client can control the statistical
chance that other TXIDs (besides the one in question) match the txid template sent to the daemon up to a power of 2. For example, if a client sets their `num_matching_bits`
to 5, then statistically any txid has a 1/(2^5) chance to match. With `num_matching_bits`=10, there is a 1/(2^10) chance, so on and so forth.

Co-authored-by: ACK-J <60232273+ACK-J@users.noreply.github.com>
2023-08-01 17:25:25 -05:00
jeffro256
45b52de28e wallet-rpc: restore from multisig seed 2023-07-28 12:17:14 -05:00
DonW16
26fa796315 docs: update ANONYMITY_NETWORKS
Removed version 2 onion addresses as they're deprecated from TOR and updated I2P/Tor Stream Used Twice section to reference tweets relevant to section.

Fixed grammatical errors and changed the wording within the Wallet RPC section to better explain the differences between a I2P hidden service and a TOR hidden service.
2023-07-28 00:02:33 +02:00
j-berman
f7fb5c7faa scan_tx: fix custom comparator for == case; fixes #8951
Co-authored-by: woodser <woodser@protonmail.com>
2023-07-19 07:48:29 -07:00
jeffro256
192d87cd24 remove more 'using namespace' statements from headers 2023-07-18 22:46:43 -05:00
jeffro256
a0e5c3c326 wallet2: when checking frozen multisig tx set, don't assume order 2023-07-16 13:29:52 -05:00
luigi1111
00fd416a99 Merge pull request #8919
1c20198 Fixup error message. (ComputeryPony)
2023-07-06 21:41:12 -05:00
luigi1111
d5c7d1743f Merge pull request #8904
369a5a8 wallet: respect frozen key images in multisig wallets (jeffro256)
2023-07-06 21:37:58 -05:00
luigi1111
58c5735af0 Merge pull request #8903
2608b24 Add CLSAG serialization to ZMQ code (Lee Clagett)
2023-07-06 21:36:45 -05:00
luigi1111
e67f82a164 Merge pull request #8902
c138a28 wallet2: take ignored-by-value outputs into account in balance (Crypto City)
2023-07-06 21:36:19 -05:00
luigi1111
f44820b2fb Merge pull request #8901
ea053b6 Update tests/hash/main.cpp (0xFFFC0000)
6bae913 Tests: Add blake2b Test Cases for hash testing. 	* Adding blake2b test function to src/tests/hash 	* New files for testvector. 	* Adding the test to CMakeLists.txt 	* Adding brief documentation for the test. (0xFFFC0000)
2023-07-06 21:35:36 -05:00
luigi1111
9537329962 Merge pull request #8899
0961c2a Set SSL SNI even when server verification is disabled (Lee *!* Clagett)
2023-07-06 21:33:57 -05:00
luigi1111
cfa4583695 Merge pull request #8894
c589e15 Speed up perf_timer init on x86 (SChernykh)
2023-07-06 21:32:11 -05:00
luigi1111
c34dc5b215 Merge pull request #8854
d9c7cd5 common: do not use DNS to determine if address is local (tobtoht)
2023-07-06 21:30:34 -05:00
luigi1111
770b8fba3d Merge pull request #8850
d391ac0 blockchain: ensure base fee cannot reach 0 (Crypto City)
2023-07-06 21:30:09 -05:00
luigi1111
00323bae5e Merge pull request #8747
a668312 wallet: remove CLI code for non default ring sizes (Jeffro256)
2023-07-06 21:29:41 -05:00
luigi1111
7213d33017 Merge pull request #8662
16d17f6 add crypto/generators for direct access to canonical fixed generators (koe)
2023-07-06 21:27:56 -05:00
luigi1111
3a72c47445 Merge pull request #8344
70bbd25 core_rpc_server: new file: rpc_ssl.fingerprint (Jeffrey Ryan)
2023-07-06 21:27:16 -05:00
luigi1111
d80d17fbac Merge pull request #8250
ce86368 Remove src/platform (Jeffrey)
2023-07-06 21:26:06 -05:00
luigi1111
41735185a8 Merge pull request #8888
a6639df wallet_rpc_server: dedup transfer RPC responses (jeffro256)
Very special PR.
2023-07-06 21:24:46 -05:00
tobtoht
d9c7cd5a89 common: do not use DNS to determine if address is local
Co-authored-by: j-berman <justinberman@protonmail.com>
2023-07-03 13:34:39 +02:00
Jeffrey Ryan
70bbd2536b core_rpc_server: new file: rpc_ssl.fingerprint 2023-07-02 19:38:51 -05:00
Jeffrey
ce863683ab Remove src/platform
All the files in src/platform are currently unused and unnecessary. See below:

* `mingw/alloca.h`: unused throughout project
* `msc/sys/param.h`:
    1. In `fix_darwin.patch`, `sys/param.h` is well-defined to be used only in OpenBSD environment
    2. `int-util.h` already handles when `sys/param.h` is not present and injects its own values
    3. `db_drivers/liblmdb/mdb.c` is a similar situation: already explicity handles different platforms
    4. `src/crypto/chacha.h` uses `int-util.h` for endianness context
* `msc/alloca.h`: unused
* `msc/inline_c.h`: not needed. the `inline` keyword is supported for C99 I believe, and certainly for C11, C14+
* `msc/stdbool.h`: `stdbool.h` is standard since C99, and MSVC has supported it for a long time (~10 years)
2023-07-02 19:29:18 -05:00
jeffro256
ffbf9f4766 blockchain_and_pool: move to crytonote_core and enforce its usage 2023-07-01 07:12:53 -05:00
MasFlam
1104b59c5b Update help for set command in simplewallet
Add help for max-reorg-depth and load-deprecated-formats options
2023-07-01 12:01:07 +02:00
jeffro256
e8cac61f4b core_rpc_server: return ID of submitted block 2023-06-30 15:31:35 -05:00
lukas
d6f86e58a6 Avoid nullptr dereference when constructing Blockchain and tx_memory_pool 2023-06-30 20:27:05 +02:00
koe
16d17f6707 add crypto/generators for direct access to canonical fixed generators 2023-06-28 09:52:27 -05:00
Jeffro256
a668312cfa wallet: remove CLI code for non default ring sizes 2023-06-27 20:18:21 +02:00
ComputeryPony
1c20198280 Fixup error message.
Looks like the extra MWARNING was supposed to be guarded by the if statement.
2023-06-27 12:56:35 -05:00
luigi1111
0a1eaf26f9 Merge pull request #8884
eeda4a8 wallet2: do not lose exception in current thread on refresh (Crypto City
 f868768 wallet2: fix missing exceptions from failing wallet refresh (Crypto City)
2023-06-27 11:48:27 -05:00
luigi1111
e7dc03f99b Merge pull request #8880
ec0cdc4 depends: remove icu4c (tobtoht)
2023-06-27 11:46:54 -05:00
luigi1111
e4e8edd9c9 Merge pull request #8870
eb94356 Add to_hex::buffer (Lee *!* Clagett)
2023-06-27 11:45:48 -05:00
luigi1111
1261f0ac09 Merge pull request #8869
2c98a82 Add byte_stream alue_type and data() (Lee *!* Clagett)
2023-06-27 11:45:25 -05:00
luigi1111
0fbe21e9e9 Merge pull request #8862
9f80797 protocol: drop peers sending duplicate txes (moneromooo-monero)
2023-06-27 11:44:58 -05:00
luigi1111
f80fb18e5a Merge pull request #8860
c430ba9 depends: update expat to 2.5.0 (tobtoht)
2023-06-27 11:44:23 -05:00
luigi1111
6775a1b50f Merge pull request #8858
25a803f tests: remove unused perl scripts (tobtoht)
2023-06-27 11:43:48 -05:00
luigi1111
29337714c4 Merge pull request #8857
f7deb7d tests: remove daemon_tests (tobtoht)
2023-06-27 11:43:19 -05:00
luigi1111
d732cb3d3d Merge pull request #8856
360a145 utils: remove munin_plugins (tobtoht)
2023-06-27 11:42:34 -05:00
luigi1111
b86a620b4d Merge pull request #8855
bb83eb1 daemon: remove --fluffy-blocks (tobtoht)
2023-06-27 11:41:57 -05:00
luigi1111
1153246b8a Merge pull request #8848
6b8dfb8 daemon: remove os-version (tobtoht)
2023-06-27 11:39:33 -05:00
luigi1111
794f59b8bd Merge pull request #8844
7206ef8 cryptonote_basic: fix amount overflow detection on 32-bit systems (jeffro256)
2023-06-27 11:37:54 -05:00
luigi1111
1df7260bd3 Merge pull request #8839
24d56c5 bump lmdb sync threshold for performance (moneromooo-monero)
2023-06-27 11:36:29 -05:00
luigi1111
a897325fcd Merge pull request #8832
092e964 Fixed RandomX initialization when mining from scratch (SChernykh)
2023-06-27 11:35:22 -05:00
luigi1111
d88296b17d Merge pull request #8817
a32aeb9 Added Alpine Linux to list of packages (Dvd-Znf)
2023-06-27 11:34:22 -05:00
luigi1111
3d9f378ed4 Merge pull request #8804
ca6c42a Message about DNS_PUBLIC to help users with issue #8452 (OrvilleRed)
2023-06-27 11:33:45 -05:00
luigi1111
dd5445d685 Merge pull request #8795
724441a link against libz on non Apple/Windows (moneromooo-monero)
2023-06-27 11:32:53 -05:00
luigi1111
02ebe9090e Merge pull request #8792
04dfdb3 epee: protect base64_chars, removed dead functions, speed up compile (Jeffro256)
2023-06-27 11:32:07 -05:00
luigi1111
570fd364aa Merge pull request #8772
87e2a64 Allow option 'non-interactive' in monerod config file (almalh)
2023-06-27 11:31:27 -05:00
luigi1111
1723bba296 Merge pull request #8767
e212532 depends: upgrade OpenSSL to 3.0.9 (tobtoht)
2023-06-27 11:30:18 -05:00
luigi1111
97354d8533 Merge pull request #8731
6c73dc7 properly terminate interrupted TCP connection. fixes #8685 (j-berman)
2023-06-27 11:28:55 -05:00
luigi1111
57c58fd5bd Merge pull request #8703
c90c1c3 Show IPv6 addresses in connection list (Guillaume Le Vaillant)
2023-06-27 11:28:24 -05:00
luigi1111
6ff41c17aa Merge pull request #8701
7c36110 ci: update copyright (plowsof)
2023-06-27 11:27:47 -05:00
luigi1111
9480525dd2 Merge pull request #8661
f50b9e3 revisions (koe) e5aa058 vtnerd review comments (koe)
c60b11f add compare_func() method so user-defined comparison functions are easier to use (koe)
7329873 adjust is_sorted_and_unique() (koe)
3d60475 comment updates (koe) acfaaed add container helpers (koe)
2023-06-27 11:27:03 -05:00
luigi1111
e752b609fc Merge pull request #8660
2a7435e variant: add mutable unwrap and visitation (koe)
bc3cec4 add variant class with cleaner interface than boost::variant<> (koe)
2023-06-27 11:25:52 -05:00
luigi1111
feb7fa4986 Merge pull request #8659
5c505bd performance test framework updates: allow custom test parameters, better error reporting (koe)
2023-06-27 11:24:47 -05:00
luigi1111
d79eb9fe3e Merge pull request #8598
4f3a54b Remove invoke function in levin handler (Lee Clagett)
2023-06-27 11:23:45 -05:00
luigi1111
6f6e0776dd Merge pull request #8568
e6b86af wallet2: fix rescanning tx via scan_tx (j-berman)
2023-06-27 11:21:31 -05:00
tobtoht
e212532dd1 depends: upgrade OpenSSL to 3.0.9 2023-06-26 13:35:55 +02:00
jeffro256
2a2cf03764 blockchain_db: add clarification to get_block_already_generated_coins 2023-06-21 22:08:22 +02:00
j-berman
e6b86af931 wallet2: fix rescanning tx via scan_tx
- Detach & re-process txs >= lowest scan height
- ensures that if a user calls scan_tx(tx1) after scanning tx2,
the wallet correctly processes tx1 and tx2
- if a user provides a tx with a height higher than the wallet's
last scanned height, the wallet will scan starting from that tx's
height
- scan_tx requires trusted daemon iff need to re-process existing
txs: in addition to querying a daemon for txids, if a user
provides a txid of a tx with height *lower* than any *already*
scanned txs in the wallet, then the wallet will also query the
daemon for all the *higher* txs as well. This is likely
unexpected behavior to a caller, and so to protect a caller from
revealing txid's to an untrusted daemon in an unexpected way,
require the daemon be trusted.
2023-06-15 02:21:29 -07:00
0xFFFC0000
ea053b6c61 Update tests/hash/main.cpp
Removing preprocessor macro and replacing it with constexpr.

Co-authored-by: Jeffro <jeffreyryan@tutanota.com>
2023-06-13 01:20:42 +03:30
jeffro256
369a5a8f9a wallet: respect frozen key images in multisig wallets
Before this change, if a multisig peer asked you to sign a transaction with a frozen enote, the wallet will do it without any error or warning. This change makes it
so that wallets will refuse to sign multisig transactions with frozen enotes.

Disclaimer: This PR was generously funded by @LocalMonero.
2023-06-12 16:47:28 -05:00
0xFFFC0000
6bae91304e Tests: Add blake2b Test Cases for hash testing.
* Adding blake2b test function to src/tests/hash
	* New files for testvector.
	* Adding the test to CMakeLists.txt
	* Adding brief documentation for the test.
2023-06-12 08:29:35 +03:30
Lee Clagett
2608b241c8 Add CLSAG serialization to ZMQ code 2023-06-10 11:55:48 -04:00
Crypto City
c138a28f51 wallet2: take ignored-by-value outputs into account in balance 2023-06-10 06:41:17 +00:00
Lee *!* Clagett
0961c2abe4 Set SSL SNI even when server verification is disabled 2023-06-09 11:16:03 -04:00
SChernykh
c589e1549b Speed up perf_timer init on x86
All Monero binaries have 1 second startup delay because of this code. This is especially noticeable and affects UX in Monero GUI wallet with local node where it often starts another monerod instance to run commands and query node status.
2023-06-08 07:56:05 +02:00
moneromooo-monero
9f80797086 protocol: drop peers sending duplicate txes 2023-06-07 06:56:21 +00:00
jeffro256
7206ef8ab8 cryptonote_basic: fix amount overflow detection on 32-bit systems
On systems where `ULONG_MAX` != `ULLONG_MAX` (e.g. most 32-bit systems), the `round_money_up` function will not correctly detect overflows.
2023-06-02 22:14:26 -05:00
jeffro256
a6639df9e4 wallet_rpc_server: dedup transfer RPC responses 2023-06-02 01:07:30 -05:00
Crypto City
eeda4a8497 wallet2: do not lose exception in current thread on refresh 2023-05-30 17:08:05 +00:00
Crypto City
f8687684e3 wallet2: fix missing exceptions from failing wallet refresh 2023-05-30 16:57:48 +00:00
j-berman
a8d2a58190 wallet2: ensure transfers and sweeps use same fee calc logic
Ensures both transfers and sweeps use a fee that's calculated
from the tx's weight. Using different logic could theoretically
enable distinguishability between the two types of txs. We don't
want that.
2023-05-27 07:27:54 -07:00
tobtoht
ec0cdc4acb depends: remove icu4c 2023-05-26 16:17:31 +02:00
Lee *!* Clagett
eb943562cb Add to_hex::buffer 2023-05-22 13:36:05 -04:00
Lee *!* Clagett
2c98a82e75 Add byte_stream value_type and data() 2023-05-21 13:35:18 -04:00
tobtoht
c430ba95fd depends: update expat to 2.5.0 2023-05-15 17:18:51 +02:00
tobtoht
25a803f31e tests: remove unused perl scripts 2023-05-12 22:07:25 +02:00
luigi1111
94e67bf96b Merge pull request #8842
c32befe fix missing <cstdint> includes (tobtoht)
2023-05-12 14:30:49 -05:00
tobtoht
f7deb7d7ae tests: remove daemon_tests 2023-05-12 21:24:55 +02:00
tobtoht
360a14588f utils: remove munin_plugins 2023-05-12 17:50:50 +02:00
tobtoht
bb83eb151a daemon: remove --fluffy-blocks 2023-05-12 17:39:38 +02:00
tobtoht
6ff87ef89f net: tor_address: remove support for v2 onion addresses 2023-05-12 17:09:54 +02:00
Crypto City
d391ac0f7e blockchain: ensure base fee cannot reach 0
reported by sech1
2023-05-11 13:47:57 +00:00
tobtoht
6b8dfb8fb9 daemon: remove os-version 2023-05-10 23:15:03 +02:00
tobtoht
c32befe4f8 fix missing <cstdint> includes 2023-05-06 18:13:18 +02:00
Crypto City
503c3e06df core: do not force sync the db when finding a block in regtest mode
for a slight performance boost in functional tests
2023-05-05 18:11:57 +00:00
moneromooo-monero
24d56c5975 bump lmdb sync threshold for performance
Force sync every 100k blocks instead of every 1k blocks. Bumping this
value is reported to make a big difference in sync performance, eg:
https://github.com/monero-project/monero/issues/8189
2023-05-05 18:07:44 +00:00
SChernykh
092e964a87 Fixed RandomX initialization when mining from scratch 2023-04-27 16:31:21 +02:00
luigi1111
a2e8d1d427 Merge pull request #8760
1698cb1 remove defunct light wallet code (tobtoht)
2023-04-26 14:02:25 -04:00
luigi1111
28e43b17c2 Merge pull request #8735
4080796 serialization: remove unused function dump_json (Jeffrey Ryan)
2023-04-26 14:01:45 -04:00
tobtoht
1698cb1f84 remove defunct light wallet code 2023-04-25 21:22:10 +02:00
Jeffrey Ryan
408079661d serialization: remove unused function dump_json 2023-04-25 11:39:55 -05:00
luigi1111
1c9686cb45 Merge pull request #8724
d2a591d wallet, simplewallet: Drop support for mine-to-use RPC system (Jeffrey Ryan)
2023-04-25 12:36:11 -04:00
luigi1111
0d9e790311 Merge pull request #8802
eb0e405 gamma picker: relax constructor requirements and test for selecting outputs from first spendable block (jeffro256)
2023-04-25 11:26:20 -04:00
luigi1111
d44350fb7f Merge pull request #8798
f383fd3 wallet2: make m_process_pool_txs local to refresh method (jeffro256)
2023-04-25 11:25:29 -04:00
luigi1111
a5cf8b5c4c Merge pull request #8797
833dd6b add libunbound to package list for OpenBSD (Nihal Jere)
2023-04-25 11:25:00 -04:00
luigi1111
df2eb0da0a Merge pull request #8796
7a4a03d wallet2: do not commit transactions more than once (moneromooo-monero)
2023-04-25 11:24:15 -04:00
luigi1111
63e9b47bbe Merge pull request #8791
3a34c63 depends: cleanup Makefile (tobtoht)
2023-04-25 11:23:19 -04:00
luigi1111
b2d603e61f Merge pull request #8789
df9aa6b epee: remove dead code in net_helper (Jeffro256)
2023-04-25 11:22:50 -04:00
luigi1111
0db1b4503e Merge pull request #8788
c61d33e wallet2: fix outdated wallet check (Crypto City)
2023-04-25 11:22:11 -04:00
luigi1111
b442d5d4c1 Merge pull request #8780
4e16559 rpc: give reason when sending non-hex raw tx (jeffro256)
2023-04-25 11:21:48 -04:00
luigi1111
5387018ade Merge pull request #8771
2eaa523 cryptonote::transaction_prefix: fix IDE parsing error (koe)
2023-04-25 11:21:22 -04:00
luigi1111
8172e4d8ad Merge pull request #8765
630906c cryptonote_basic: remove unused struct (tobtoht)
2023-04-25 11:20:12 -04:00
luigi1111
83100b6cbe Merge pull request #8764
b13ddb9 Handle case where a command line flag is not allowed in the config file (almalh)
2023-04-25 11:19:38 -04:00
luigi1111
37feb225a6 Merge pull request #8750
5a7a5f1 build: BUILD_DEBUG_UTILITIES fix (Jeffro256)
2023-04-25 11:18:40 -04:00
Jeffrey Ryan
d2a591d7c6 wallet, simplewallet: Drop support for mine-to-use RPC system
Using post-PR wallet with pre-PR node will generate error message specific to this PR and not generic "command failed" mesages.
2023-04-25 10:18:20 -05:00
luigi1111
8b617064d4 Merge pull request #8748
11a8360 simplewallet: print fully qualified filename for new wallets (moneromooo-monero)
2023-04-25 11:17:56 -04:00
luigi1111
4931462d1d Merge pull request #8730
9e09093 wallet_rpc_server: allow creating more than 64 addresses at once (moneromooo-monero)
2023-04-25 11:17:22 -04:00
luigi1111
5e19f232d0 Merge pull request #8719
1082720 README: fix void ssl package (tobtoht)
2023-04-25 11:14:14 -04:00
luigi1111
aa5382c470 Merge pull request #8716
9c7d28b wallet2: add on_reorg callback (Crypto City)
2023-04-25 11:13:44 -04:00
luigi1111
9bf06ea75d Merge pull request #8698
5b4fea7 Copyright: Update to 2023 (mj-xmr)
2023-04-25 11:12:56 -04:00
luigi1111
af88341272 Merge pull request #8694
d89e7a2 util: make GMT timestamps explicit for clarity (moneromooo-monero)
2023-04-25 11:11:08 -04:00
luigi1111
ecf0d01aa2 Merge pull request #8679
b986421 adjust multiexp pippenger_cached_data for better reusability (koe)
2023-04-25 11:10:27 -04:00
almalh
87e2a64327 Allow option 'non-interactive' in monerod config file 2023-04-15 18:28:12 -04:00
Guillaume Le Vaillant
c90c1c3fe1 Show IPv6 addresses in connection list 2023-04-14 13:34:30 +02:00
Dvd-Znf
a32aeb9573 Added Alpine Linux to list of packages 2023-04-04 14:33:49 +03:00
jeffro256
eb0e4052b7 gamma picker: relax constructor requirements and test for selecting outputs from first spendable block 2023-04-02 20:06:09 -05:00
luigi1111
44ac52f929 Merge pull request #8810
d594981 Fixed deadlock and crash when syncing with full dataset on Windows (SChernykh)
2023-04-02 20:45:13 -04:00
luigi1111
5f2bbf78a0 Merge pull request #8808
caa7561 cryptonote core/protocol: don't drop peers for soft offenses (jeffro256)
2023-04-02 20:44:18 -04:00
luigi1111
441373b9ef Merge pull request #8794
85a4558 wallet2: fix infinite loop in fake out selection (Crypto City)
2023-04-02 20:43:32 -04:00
Crypto City
85a45587f2 wallet2: fix infinite loop in fake out selection
The gamma picker and the caller code did not quite agree on the
number of rct outputs available for use - by one block - which
caused an infinite loop if the picker could never pick outputs
from that block but already had picked all other outputs from
previous blocks.

Also change the range to select from using code from UkoeHB.
2023-03-30 14:44:36 +00:00
jeffro256
caa7561705 cryptonote core/protocol: don't drop peers for soft offenses
Also: txs with tx_extra which is too large will not get published to ZMQ

Co-authored-by: SChernykh <sergey.v.chernykh@gmail.com>
2023-03-29 02:05:43 -05:00
SChernykh
d59498101c Fixed deadlock and crash when syncing with full dataset on Windows
It's not allowed to use WaitForSingleObject with _beginthread, because the thread closes its own handle before exiting.

So the wait function will either wait on an invalid handle, or on a different handle used by something else.

Or, if it starts waiting before the thread exits, the behavior is undefined according to MS: "If this handle is closed while the wait is still pending, the function's behavior is undefined."

In my test sync I observed threads getting stuck infinitely on WaitForSingleObject, and then rx_set_main_seedhash spamming new threads when RandomX seed changes again. Eventually the system ran out of resources, and monerod aborted with "Couldn't start RandomX seed thread" message.

This PR fixes it by using `_beginthreadex` instead and explicitly closing the handle when it's safe.
2023-03-29 08:43:47 +02:00
OrvilleRed
ca6c42a8e1 Message about DNS_PUBLIC to help users with issue #8452 2023-03-27 00:36:40 -04:00
luigi1111
abe74fda35 Merge pull request #8770
d7a81cc p2p: do not log to global when re-blocking a subnet (moneromooo-monero)
d84a0d7 p2p: avoid spam blocking ipv4 addresses in a blocked subnet (moneromooo-monero)
2023-03-24 22:54:32 -04:00
jeffro256
f383fd3cd0 wallet2: make m_process_pool_txs local to refresh method 2023-03-21 19:18:48 -05:00
moneromooo-monero
7a4a03d9d3 wallet2: do not commit transactions more than once
Fixes #8793
2023-03-21 21:05:53 +00:00
Nihal Jere
833dd6bb92 add libunbound to package list for OpenBSD 2023-03-21 14:20:49 -05:00
moneromooo-monero
724441a782 link against libz on non Apple/Windows
Needed by libcrypto at least
2023-03-21 14:36:48 +00:00
Jeffro256
04dfdb332e epee: protect base64_chars, removed dead functions, speed up compile 2023-03-20 16:02:48 -05:00
tobtoht
3a34c63ba9 depends: cleanup Makefile 2023-03-20 14:39:32 +01:00
jeffro256
0ae5c91e50 http_client: reduce number of packets sent for small bodies 2023-03-19 12:54:14 -05:00
Jeffro256
df9aa6bb04 epee: remove dead code in net_helper 2023-03-19 12:51:27 -05:00
Crypto City
c61d33e24c wallet2: fix outdated wallet check
it was mistaking the number of forks in the fork table for
the last fork, and assuming the table was including every
single fork
2023-03-19 17:43:37 +00:00
luigi1111
f307621678 Merge pull request #8775
1b27fcd device: Add ledger Stax device id to device detection (Francois Beutin)
2023-03-18 18:21:02 -04:00
luigi1111
b7dbf4fd7c Merge pull request #8745
eaf5902 workflows: update dependencies to fix warnings (selsta)
2023-03-18 18:19:25 -04:00
luigi1111
6bebc2d08c Merge pull request #8743
7a44eb7 depends: remove unused packages (tobtoht)
2023-03-18 18:19:01 -04:00
luigi1111
76dd14dfb1 Merge pull request #8733
3771641 Add a size limit for tx_extra in tx pool (tevador)
2023-03-18 18:18:13 -04:00
luigi1111
55fddad446 Merge pull request #8707
7159f92 verRctNonSemanticsSimpleCached: fix fragility (Jeffrey Ryan)
2023-03-18 18:17:05 -04:00
luigi1111
a511202222 Merge pull request #8076
c4af33e Enforce restricted # pool txs served via RPC + optimize chunked reqs (j-berman)
9752116 wallet2, RPC: Optimize RPC calls for periodic refresh from 3 down to 1 call (rbrunner7)
2023-03-18 17:58:27 -04:00
Jeffrey Ryan
7159f92a57 verRctNonSemanticsSimpleCached: fix fragility 2023-03-17 18:45:35 -05:00
jeffro256
4e16559053 rpc: give reason when sending non-hex raw tx 2023-03-17 18:18:06 -05:00
Francois Beutin
1b27fcdf77 device: Add ledger Stax device id to device detection 2023-03-14 10:31:20 +01:00
koe
2eaa523af1 cryptonote::transaction_prefix: fix IDE parsing error 2023-03-09 15:18:21 -06:00
moneromooo-monero
d7a81ccba1 p2p: do not log to global when re-blocking a subnet 2023-03-09 17:17:59 +00:00
j-berman
c4af33eded Enforce restricted # pool txs served via RPC + optimize chunked reqs
- `/getblocks.bin` respects the `RESTRICTED_TX_COUNT` (=100) when
returning pool txs via a restricted RPC daemon.
- A restricted RPC daemon includes a max of `RESTRICTED_TX_COUNT` txs
in the `added_pool_txs` field, and returns any remaining pool hashes
in the `remaining_added_pool_txids` field. The client then requests
the remaining txs via `/gettransactions` in chunks.
- `/gettransactions` no longer does expensive no-ops for ALL pool txs
if the client requests a subset of pool txs. Instead it searches for
the txs the client explicitly requests.
- Reset `m_pool_info_query_time` when a user:
  (1) rescans the chain (so the wallet re-requests the whole pool)
  (2) changes the daemon their wallets points to (a new daemon would
      have a different view of the pool)
- `/getblocks.bin` respects the `req.prune` field when returning
pool txs.
- Pool extension fields in response to `/getblocks.bin` are optional
with default 0'd values.
2023-03-07 20:35:45 +01:00
tobtoht
630906ce5b cryptonote_basic: remove unused struct 2023-03-06 15:15:00 +01:00
almalh
b13ddb9a16 Handle case where a command line flag is not allowed in the config file 2023-03-05 20:32:40 -05:00
moneromooo-monero
d84a0d7430 p2p: avoid spam blocking ipv4 addresses in a blocked subnet 2023-03-01 16:56:56 +00:00
koe
8d94d08816 replace 'multisig()' with 'get_multisig_status()' using multisig_account_status and including '.kex_is_done' member 2023-02-28 12:54:40 -06:00
Jeffro256
5a7a5f17da build: BUILD_DEBUG_UTILITIES fix
Co-authored-by: Jethro Grassie <jtg@xtrabass.com>
2023-02-26 13:38:53 -06:00
tevador
3771641fc5 Add a size limit for tx_extra in tx pool 2023-02-26 10:26:53 +01:00
moneromooo-monero
11a836074d simplewallet: print fully qualified filename for new wallets
from time to time, some people don't realize their wallets get
created in their current working directory
2023-02-24 10:22:48 +00:00
selsta
eaf590274c workflows: update dependencies to fix warnings 2023-02-20 04:11:10 +01:00
tobtoht
7a44eb7901 depends: remove unused packages 2023-02-16 14:42:19 +01:00
luigi1111
c5d10a4ac4 Merge pull request #8737
21fb856 depends: bump openssl to 1.1.1t (tobtoht)
2023-02-15 10:46:23 -05:00
luigi1111
3b765c509f Merge pull request #8736
ac9a897 Revert 'epee: when loading a JSON RPC payload, ensure params is an object' (moneromooo-monero)
2023-02-15 10:45:53 -05:00
luigi1111
3f696f144c Merge pull request #8720
d8a8448 p2p: add plowsof seed nodes (selsta)
69153e8 p2p: remove offline seed nodes (selsta)
2023-02-15 10:42:59 -05:00
koe
2a7435e026 variant: add mutable unwrap and visitation 2023-02-12 13:00:53 -06:00
tobtoht
21fb856eda depends: bump openssl to 1.1.1t
https://www.openssl.org/news/secadv/20230207.txt

Patch can be removed, it was included upstream.
2023-02-07 20:31:25 +01:00
moneromooo-monero
ac9a8978ca Revert "epee: when loading a JSON RPC payload, ensure params is an object"
This reverts commit b67e931843.

This turns out to be a bad idea, because we do have weird RPC which
do actually go counter to this
2023-02-07 12:12:02 +00:00
luigi1111
549a4b424a Merge pull request #8713
eaa3aff depends: bump hidapi/libusb (tobtoht)
2023-02-06 12:37:08 -05:00
luigi1111
cd82b4fed0 Merge pull request #8712
cb756b6 blockchain-stats: print any remaining data at end of loop (Howard Chu)
2023-02-06 12:36:39 -05:00
luigi1111
5fae6d63a8 Merge pull request #8705
b247f98 Demote large pages warning to mdebug (SChernykh)
b27a171 RandomX: print VM allocation warnings only once (SChernykh)
2023-02-06 12:35:37 -05:00
luigi1111
889951e7c5 Merge pull request #8700
3461a19 daemonizer: don't uninstall windows service on exit (selsta)
2023-02-06 12:34:41 -05:00
luigi1111
3ff22aee95 Merge pull request #8699
f3420cb readline_buffer: disable bracketed paste escape sequences (Jeffrey Ryan)
2023-02-06 12:34:06 -05:00
luigi1111
2521f0e238 Merge pull request #8697
e91f35e win-service: enable auto startup (plowsof)
2023-02-06 12:33:03 -05:00
luigi1111
c12bc62306 Merge pull request #8693
bfd7c00 heed NO_COLOR environment variable (moneromooo-monero)
2023-02-06 12:26:02 -05:00
luigi1111
85702d70af Merge pull request #8692
b67e931 epee: when loading a JSON RPC payload, ensure params is an object (moneromooo-monero)
2023-02-06 12:25:13 -05:00
luigi1111
672eedf9c2 Merge pull request #8691
934b798 rpc: do not misidentify coinbase txes as pruned (moneromooo-monero)
2023-02-06 12:24:17 -05:00
j-berman
6c73dc742e properly terminate interrupted TCP connection. fixes #8685 2023-02-04 22:03:51 +01:00
moneromooo-monero
9e09093a8d wallet_rpc_server: allow creating more than 64 addresses at once
it's too low a limit (at least one person mentioned having to
call create_address in a loop due to it)
2023-02-03 16:57:48 +00:00
koe
bc3cec4634 add variant class with cleaner interface than boost::variant<> 2023-01-30 22:03:35 -06:00
selsta
d8a84489d2 p2p: add plowsof seed nodes 2023-01-27 14:15:31 +01:00
selsta
69153e870d p2p: remove offline seed nodes 2023-01-27 14:06:45 +01:00
tobtoht
eaa3aff81e depends: bump hidapi/libusb
fixes Trezor connectivity issues on Windows 10/11

Co-authored-by: selsta <selsta@sent.at>
2023-01-25 21:50:46 +01:00
tobtoht
1082720980 README: fix void ssl package
https://voidlinux.org/news/2021/02/OpenSSL.html
2023-01-23 22:05:01 +01:00
Crypto City
9c7d28b8ed wallet2: add on_reorg callback 2023-01-19 17:34:45 +00:00
Howard Chu
cb756b6094 blockchain-stats: print any remaining data at end of loop
Fix #8711
2023-01-17 17:20:18 +00:00
SChernykh
b247f985db Demote large pages warning to mdebug 2023-01-17 18:13:07 +01:00
mj-xmr
5b4fea72cf Copyright: Update to 2023
Co-authored-by: plowsof <plowsof@protonmail.com>
extra files
2023-01-16 13:00:18 +01:00
SChernykh
b27a17110d RandomX: print VM allocation warnings only once 2023-01-11 19:15:11 +01:00
luigi1111
50aa0e8b7f Merge pull request #8675
1a568de Cache successful erRctNonSemanticsSimple calls (SChernykh)
2023-01-11 12:27:40 -05:00
luigi1111
75d80d431a Merge pull request #8686
7a3a593 common: move boost_serialization_helper.h out and cleanup includes (Jeffrey Ryan)
2023-01-11 12:13:48 -05:00
luigi1111
ac87d8dac9 Merge pull request #8682
96677ff common: add missing includes (selsta)
2023-01-11 12:12:57 -05:00
luigi1111
451ff7bd91 Merge pull request #8677
fe8522c Bump WINVER to 0x0600 (Windows Vista) (SChernykh) dab7d01 Refactored rx-slow-hash.c (SChernykh)
2023-01-11 12:10:02 -05:00
luigi1111
ad80aa0f65 Merge pull request #8671
a160270 update readme with v0.18.1.2 version number (Gingeropolous)
2023-01-11 11:47:11 -05:00
luigi1111
3854cc04be Merge pull request #8663
b1bce85 miscellaneous crypto updates (koe)
2023-01-11 11:45:40 -05:00
luigi1111
d3ad02fffb Merge pull request #8653
61842f9 workflows: set a public DNS when doing tests (selsta)
2023-01-11 11:43:39 -05:00
luigi1111
0cb6a5c78a Merge pull request #8651
6558e7e Correct/modernize build instructions for OpenBSD (Offshore Monero)
0e5ecd4 Turn readline off on OpenBSD because it is broken (Offshore Monero)
2023-01-11 11:43:08 -05:00
luigi1111
9489586add Merge pull request #8648
8687da6 common: DNSResolver can handle hostnames without dot characters (Jeffrey Ryan)
2023-01-11 11:41:11 -05:00
luigi1111
719d5571ac Merge pull request #8645
832173a gpg_keys: bump my key validity by another two years (moneromooo-monero)
2023-01-11 11:40:40 -05:00
luigi1111
b363eebd52 Merge pull request #8643
faaf2af p2p: fix exclusive node DNS resolution for certain hosts (Jeffrey Ryan)
2023-01-11 11:39:42 -05:00
luigi1111
ac8580c1f5 Merge pull request #8640
1a3ae18 p2p: fix back ping to discover healthy peers to connect to (j-berman)
2023-01-11 11:38:38 -05:00
luigi1111
a09b5b3c95 Merge pull request #8632
ab7102e epee: remove dead HTTP code (Jeffrey Ryan)
2023-01-11 11:37:37 -05:00
SChernykh
fe8522c564 Bump WINVER to 0x0600 (Windows Vista)
This is required to use SRW locks in Windows - see `src/crypto/c_threads.h`
2023-01-09 07:48:00 +01:00
SChernykh
dab7d01dc0 Refactored rx-slow-hash.c
- Straight-forward call interface: `void rx_slow_hash(const char *seedhash, const void *data, size_t length, char *result_hash)`
- Consensus chain seed hash is now updated by calling `rx_set_main_seedhash` whenever a block is added/removed or a reorg happens
- `rx_slow_hash` will compute correct hash no matter if `rx_set_main_seedhash` was called or not (the only difference is performance)
- New environment variable `MONERO_RANDOMX_FULL_MEM` to force use the full dataset for PoW verification (faster block verification)
- When dataset is used for PoW verification, dataset updates don't stall other threads (verification is done in light mode then)
- When mining is running, PoW checks now also use dataset for faster verification
2023-01-09 07:43:07 +01:00
plowsof
7c36110ec7 ci: update copyright 2023-01-06 04:58:05 +00:00
Jeffrey Ryan
f3420cb750 readline_buffer: disable bracketed paste escape sequences 2023-01-04 16:04:32 -06:00
koe
b1bce857c9 miscellaneous crypto updates 2023-01-03 16:50:08 -06:00
selsta
3461a19940 daemonizer: don't uninstall windows service on exit 2023-01-03 03:45:43 +01:00
plowsof
e91f35e030 win-service: enable auto startup 2023-01-02 05:18:48 +00:00
moneromooo-monero
d89e7a239d util: make GMT timestamps explicit for clarity
For privacy reasons, time functions use GMT, to avoid logs leaking
timezones. It'd make more sense to use localtime for wallet output
(which are not logged by default), but that adds inconsistencies
which can also be confusing. So add a Z suffix for now to make it
clear these are not local time.
2023-01-01 10:38:13 +00:00
moneromooo-monero
bfd7c00ced heed NO_COLOR environment variable 2023-01-01 10:24:46 +00:00
moneromooo-monero
b67e931843 epee: when loading a JSON RPC payload, ensure params is an object
this makes it easier to spot those mistakes by the caller
2023-01-01 10:10:28 +00:00
moneromooo-monero
934b798c74 rpc: do not misidentify coinbase txes as pruned 2023-01-01 09:30:59 +00:00
rbrunner7
9752116ed3 wallet2, RPC: Optimize RPC calls for periodic refresh from 3 down to 1 call 2022-12-30 13:50:22 +01:00
koe
f50b9e3803 revisions 2022-12-29 17:39:34 -06:00
koe
e5aa058a8d vtnerd review comments 2022-12-24 19:15:27 -06:00
Jeffrey Ryan
7a3a593a77 common: move boost_serialization_helper.h out and cleanup includes 2022-12-22 12:18:02 -06:00
SChernykh
1a568deacb Cache successful verRctNonSemanticsSimple calls 2022-12-20 22:16:39 +01:00
koe
c60b11f3da add compare_func() method so user-defined comparison functions are easier to use 2022-12-19 15:50:16 -06:00
selsta
96677fffcd common: add missing includes 2022-12-18 18:30:08 +01:00
koe
73298734d6 adjust is_sorted_and_unique() 2022-12-18 10:18:46 -06:00
koe
b986421b4f adjust multiexp pippenger_cached_data for better reusability 2022-12-16 11:48:57 -06:00
koe
3d60475753 comment updates 2022-12-15 13:04:34 -06:00
Gingeropolous
a1602700b1 update readme with v0.18.1.2 version number
updated readme with all relevant instances of v0.18.0.0 changed to v0.18.1.2
2022-12-07 07:08:27 -05:00
koe
acfaaeda7a add container helpers 2022-12-01 17:25:26 -06:00
koe
5c505bda29 performance test framework updates: allow custom test parameters, better error reporting 2022-12-01 17:07:52 -06:00
luigi1111
9367b432f6 Merge pull request #8635
8b8326a workflows: ubuntu 18.04 is deprecated (selsta)
2022-12-01 01:11:39 -06:00
luigi1111
7275a4d23b Merge pull request #8627
a7bf3af Fix dandelion++ fluff/stem bug with local txes (Lee Clagett)
2022-12-01 01:10:20 -06:00
luigi1111
2f168da7f7 Merge pull request #8618
1114e7e fix(trezor-tests): fix trezor tests build, fix integrated addr test (Dusan Klinec)
2022-12-01 01:08:53 -06:00
luigi1111
179a87afae Merge pull request #8616
cac5083 wallet2: fix create view-only wallet from existing wallet (j-berman)
2022-12-01 01:08:11 -06:00
luigi1111
1cfe69c7f1 Merge pull request #8610
97b86a0 wallet_api: take priority into account when estimating fee (selsta)
2022-12-01 01:05:14 -06:00
luigi1111
74d82f9e47 Merge pull request #8603
6f00070 workflows: skip ci when only changing documentation (selsta)
2022-12-01 01:03:24 -06:00
luigi1111
a5c7ae2761 Merge pull request #8602
8e98aaa workflows: build gitian on tag (selsta)
2022-12-01 01:02:49 -06:00
luigi1111
4a5f8a0c4d Merge pull request #8575
98ce6f1 depends: remove unused file (selsta)
2022-12-01 01:02:25 -06:00
luigi1111
12489c69cb Merge pull request #8572
50b7492 unit_tests: suppress memwipe unit warning (Jeffrey Ryan)
2022-12-01 01:01:34 -06:00
luigi1111
32a1cd1bf1 Merge pull request #8503
d06202d blockchain_prune: faster (moneromooo-monero)
2022-12-01 01:00:15 -06:00
Offshore Monero
6558e7e2c6 Correct/modernize build instructions for OpenBSD 2022-12-01 04:28:46 +00:00
Offshore Monero
0e5ecd4603 Turn readline off on OpenBSD because it is broken 2022-12-01 04:27:48 +00:00
selsta
61842f9d33 workflows: set a public DNS when doing tests 2022-11-28 11:37:33 +01:00
Jeffrey Ryan
8687da6276 common: DNSResolver can handle hostnames without dot characters
Unrelated, but similar code-wise to #8643. There is a check in `DNSResolver` which automatically fails to resolve hostnames which do not contain the `.` character. This PR removes that check.
2022-11-21 15:54:23 -06:00
Jeffrey Ryan
faaf2af43b p2p: fix exclusive node DNS resolution for certain hosts
Fixes #8633. The function `append_net_address` did not parse hostname + port addresses (e.g. `bar:29080`) correctly if the hostname did not contain a `'.'` character.

@vtnerd comments 1

clear up 2nd conditional statement
2022-11-17 18:55:09 -06:00
moneromooo-monero
832173a490 gpg_keys: bump my key validity by another two years 2022-11-17 17:45:14 +00:00
Dusan Klinec
1114e7eed7 fix(trezor-tests): fix trezor tests build, fix integrated addr test
- fix integrated address test, it was not testing integrated address suport
- fix trezor test build as dependent classes were changed
- add a friend test class for Monero::WalletImpl to support wallet api tests
When using wallet_api in tests, synthetic chain is used. Without being able to set `allow_mismatched_daemon_version` in the underlying wallet, we are not able to use a synthetic chain with the tests
2022-11-17 12:12:23 +01:00
selsta
8e98aaa18d workflows: build gitian on tag 2022-11-17 02:47:27 +01:00
j-berman
1a3ae18ef9 p2p: fix back ping to discover healthy peers to connect to 2022-11-14 16:54:45 -08:00
Jeffrey Ryan
ab7102e31f epee: remove dead HTTP code
http_client.h
2022-11-13 20:27:21 -06:00
selsta
8b8326adfd workflows: ubuntu 18.04 is deprecated 2022-11-14 02:15:26 +01:00
luigi1111
365fd45b03 Merge pull request #8593
be8efec workflows: ubuntu 18.04 is deprecated (selsta)
2022-10-28 00:52:41 -04:00
luigi1111
709ef69b01 Merge pull request #8590
74ec950 readme: fix instructions for win64 cross builds (erciccione)
2022-10-28 00:52:07 -04:00
luigi1111
9579ba58c7 Merge pull request #8580
ebb85d7 Add Gitian builds to README (duggavo)
2022-10-28 00:51:43 -04:00
luigi1111
e7d673e367 Merge pull request #8571
9274426 Keys: Update for expired 'rbrunner7' key, valid 2 years (rbrunner7)
2022-10-28 00:50:39 -04:00
luigi1111
400f236650 Merge pull request #8570
8923441 fix build in netbsd (mmyjona)
2022-10-28 00:50:17 -04:00
luigi1111
5b208f988a Merge pull request #8569
b526a4b levin_abstract_invoke: remove dead code (Jeffrey Ryan)
2022-10-28 00:49:45 -04:00
luigi1111
05ccf6804f Merge pull request #8564
f69adef Fix static builds for Ubuntu 22.04 (AgoraDesk / LocalMonero)
2022-10-28 00:49:22 -04:00
luigi1111
a43a5caefe Merge pull request #8543
d21fd92 rpc: dont shrink slice when loading from binary (Jeffrey Ryan)
2022-10-28 00:48:48 -04:00
luigi1111
8672553e3d Merge pull request #8529
09d69b6 rpc: remove overwriting value (SerHack)
2022-10-28 00:47:55 -04:00
luigi1111
f41c68648c Merge pull request #8527
e988530 Remove redundant check (SerHack)
2022-10-28 00:47:26 -04:00
luigi1111
2ab0732d1a Merge pull request #8525
501db2c Wallet RPC: remove duplicate line (SerHack)
2022-10-28 00:46:50 -04:00
luigi1111
45ffdc26a6 Merge pull request #8517
6f0fb76 blockchain: fix invalid memory read getting fee on empty chain (Crypto City)
2022-10-28 00:46:19 -04:00
luigi1111
aba564c86e Merge pull request #8516
26c630f Update release check-list with lessons learned from v15/v16 fork (Seth For Privacy)
2022-10-28 00:45:42 -04:00
luigi1111
9f5c7209a0 Merge pull request #8355
23fde15 wallet_rpc_server: chunk refresh to keep responding to RPC while refreshing (moneromooo-monero) 5bb2369 wallet_rpc_server: add --no-initial-sync flag for quicker network binding (moneromooo-monero)
2022-10-28 00:44:59 -04:00
luigi1111
0407ee5135 Merge pull request #8319
b15aee2 readme edits squash (Gingeropolous)
2022-10-28 00:43:36 -04:00
Lee Clagett
a7bf3aff2c Fix dandelion++ fluff/stem bug with local txes 2022-10-25 16:09:55 -04:00
j-berman
cac5083427 wallet2: fix create view-only wallet from existing wallet 2022-10-18 13:48:43 -05:00
selsta
97b86a014c wallet_api: take priority into account when estimating fee 2022-10-13 03:35:19 +02:00
selsta
6f000700f2 workflows: skip ci when only changing documentation 2022-10-01 21:32:58 +02:00
luigi1111
fc907a9570 Merge pull request #8587
8e7c7af Move update_checkpoints() to a later stage (SChernykh)
2022-09-26 15:00:35 -05:00
luigi1111
e44bf0b060 Merge pull request #8586
e9ce347 wallet2: fail to establish daemon cxn == 'Disconnected' cxn status (j-berman)
2022-09-26 14:59:43 -05:00
luigi1111
239d210a18 Merge pull request #8576
28f25c0 Second thread pool for IO (SChernykh)
2022-09-26 14:50:56 -05:00
luigi1111
8e04921ac4 Merge pull request #8574
fa7622c depends: remove unused Qt package (selsta)
2022-09-26 14:49:49 -05:00
luigi1111
cfe38f2242 Merge pull request #8420
6d8fa2b workflows: add android to depends (selsta)
2022-09-26 14:49:09 -05:00
luigi1111
0a10a4f870 Merge pull request #8329
4b0785f add an option to force-update multisig key exchange under some circumstances (koe)
2022-09-26 14:46:06 -05:00
Lee Clagett
4f3a54b2a0 Remove invoke function in levin handler 2022-09-26 16:47:18 +00:00
selsta
be8efec6a1 workflows: ubuntu 18.04 is deprecated
And will soon be removed.
2022-09-24 21:02:41 +02:00
erciccione
74ec9503db readme: fix instructions for win64 cross builds 2022-09-23 15:10:50 +02:00
SChernykh
8e7c7af05f Move update_checkpoints() to a later stage
update_checkpoints() makes a few DNS requests and can take up to 20-30 seconds to complete (3-6 seconds on average). It is currently called from core::handle_incoming_block() which holds m_incoming_tx_lock, so it blocks all incoming transactions and blocks processing while update_checkpoints() is running. This PR moves it to until after a new block has been processed and relayed, to avoid full monerod locking.
2022-09-22 13:04:50 +02:00
j-berman
e9ce347f83 wallet2: fail to establish daemon cxn == "Disconnected" cxn status 2022-09-21 21:54:57 -06:00
koe
4b0785f1c9 add an option to force-update multisig key exchange under some circumstances 2022-09-21 12:38:35 -05:00
duggavo
ebb85d7152 Add Gitian builds to README 2022-09-21 13:29:58 +00:00
SChernykh
28f25c0dbc Second thread pool for IO 2022-09-20 09:59:58 +02:00
selsta
98ce6f1864 depends: remove unused file 2022-09-20 00:55:41 +02:00
selsta
fa7622cfdc depends: remove unused Qt package 2022-09-20 00:01:19 +02:00
Jeffrey Ryan
50b7492e67 unit_tests: suppress memwipe unit warning
Fixes warning:
```
warning: ‘*(uint32_t*)quux’ may be used uninitialized [-Wmaybe-uninitialized]
   49 |     MDEBUG(std::hex << std::setw(8) << std::setfill('0') << *(uint32_t*)quux);
warning: ‘quux’ may be used uninitialized [-Wmaybe-uninitialized]
   50 |     if (wipe) { ASSERT_TRUE(memcmp(quux, "bar", 3)); }
```
2022-09-16 10:47:00 -05:00
rbrunner7
9274426183 Keys: Update for expired 'rbrunner7' key, valid 2 years 2022-09-16 15:05:04 +02:00
mmyjona
8923441ff2 fix build in netbsd 2022-09-15 04:38:47 -07:00
luigi1111
c9cfa25183 Merge pull request #8556
b8271ab wallet2: check wallet compatibility with daemon's hard fork version (j-berman)
2022-09-15 00:35:03 -05:00
luigi1111
df37c148d4 Merge pull request #8551
eca7f6a Fix segfault restoring encrypted multisig seed (j-berman)
f713c3c Require user ack multisig is experimental to restore (j-berman)
564a7a3 multisig: fix #8537 seed restore (suggestions by @UkoeHB) (j-berman)
2022-09-15 00:34:05 -05:00
Jeffrey Ryan
b526a4bf1e levin_abstract_invoke: remove dead code 2022-09-14 20:09:29 -05:00
j-berman
b8271ab881 wallet2: check wallet compatibility with daemon's hard fork version 2022-09-12 21:24:24 -06:00
AgoraDesk / LocalMonero
f69adef4c1 Fix static builds for Ubuntu 22.04
Link libbsd, libmd, libprotokit for ZMQ to fix static builds for Ubuntu 22.04
2022-09-13 00:11:02 +08:00
luigi1111
6402dbee69 Merge pull request #8554
76a5b54 Fix missing semi-colon in error message (j-berman)
2022-09-09 12:56:53 -05:00
luigi1111
87a4b37497 Merge pull request #8547
e410ab7 Windows: fix unicode file path support (tobtoht)
2022-09-09 12:54:30 -05:00
luigi1111
ed150fa821 Merge pull request #8538
3987827 Fix shared_ptr cycle in test_epee_connection.test_lifetime (Lee Clagett)
2022-09-09 12:53:51 -05:00
luigi1111
ddb434fc19 Merge pull request #8519
2639c4f rpc: skip bootstrap nodes that are lower than last checkpoint (selsta)
2022-09-09 12:49:46 -05:00
luigi1111
c89d06341a Merge pull request #8513
959a3e6 wallet2: ensure imported outputs subaddresses are created (moneromooo-monero)
a098504 wallet2: better test on whether to allow output import (moneromooo-monero)
c5579ac allow exporting outputs in chunks (moneromooo-monero)
1e912ec wallet2: fixes for export/import output flow (j-berman)
692f1d4 wallet2: do not assume imported outputs must be non empty (moneromooo-monero)
67b6d6a wallet2: prevent importing outputs in a hot wallet (moneromooo-monero)
d9fc666 wallet2: fix missing subaddress indices in 'light' exported outputs (moneromooo-monero)
2022-09-09 12:48:47 -05:00
luigi1111
e553884d1f Merge pull request #8348
a4cb77f epee: update 'http_server_handlers_map2.h' macros to use fully qualified names (Jeffrey Ryan)
2022-09-09 12:46:39 -05:00
j-berman
eca7f6ae98 Fix segfault restoring encrypted multisig seed 2022-09-07 17:24:03 -06:00
j-berman
76a5b54d58 Fix missing semi-colon in error message
Co-authored-by: woodser <woodser@protonmail.com>
2022-09-06 18:41:16 -06:00
selsta
2639c4f2ff rpc: skip bootstrap nodes that are lower than last checkpoint 2022-09-06 22:06:45 +02:00
j-berman
f713c3c335 Require user ack multisig is experimental to restore 2022-09-06 11:59:28 -06:00
j-berman
564a7a31e8 multisig: fix #8537 seed restore (suggestions by @UkoeHB)
- spend secret key is no longer the sum of multisig key shares;
no need to check that is the case upon restore.
- restoring a multisig wallet from multisig info means that the
wallet must have already completed all setup rounds. Upon restore,
set the number of rounds completed accordingly.
2022-09-06 11:59:25 -06:00
tobtoht
e410ab7478 Windows: fix unicode file path support 2022-09-02 12:22:24 +02:00
Jeffrey Ryan
d21fd9242c rpc: dont shrink slice when loading from binary 2022-08-30 19:26:39 -05:00
Lee Clagett
3987827517 Fix shared_ptr cycle in test_epee_connection.test_lifetime 2022-08-26 20:12:13 -04:00
moneromooo-monero
959a3e627f wallet2: ensure imported outputs subaddresses are created
reported by j-berman
2022-08-24 13:52:36 +00:00
luigi1111
5256fdd7a1 Merge pull request #8497
8305a9f depends: remove unused packages (selsta)
2022-08-22 22:52:50 -05:00
luigi1111
2807a24ecb Merge pull request #8496
7b15f21 README: unbound is not vendored anymore (selsta)
2022-08-22 22:52:27 -05:00
luigi1111
af8b0fb815 Merge pull request #8495
796513f repo: remove ldns leftovers (selsta)
2022-08-22 22:51:55 -05:00
luigi1111
4e42d6c69d Merge pull request #8490
f8d76ec version: bump master version number (selsta)
2022-08-22 22:50:47 -05:00
luigi1111
f46f16467a Merge pull request #8486
6b61628 dns_util: remove outdated DNSSEC DS trust anchor (selsta)
2022-08-22 22:50:20 -05:00
luigi1111
ab63fbc549 Merge pull request #8465
04a1e28 ledger support for hf 15 (BP+, view tags) (j-berman)
2022-08-22 22:49:47 -05:00
luigi1111
386032dad9 Merge pull request #8462
f7f1445 device: set ledger min app version (selsta)
2022-08-22 22:49:07 -05:00
luigi1111
8112c52404 Merge pull request #8460
85e697f randomx: update submodule (selsta)
2022-08-22 22:48:29 -05:00
luigi1111
77053298ed Merge pull request #8450
600de07 wallet_rpc_server: longer timeout for stop_mining (moneromooo-monero)
ac6db92 functional_tests: silence the cpu power test program (moneromooo-monero)
2022-08-22 22:47:45 -05:00
luigi1111
ae6ec3913d Merge pull request #8444
308e3fa gpg_keys: add jeffro256 key (Jeffrey Ryan)
2022-08-22 22:47:12 -05:00
luigi1111
5e2c851132 Merge pull request #8442
ef1924a Bump to v0.18.1.0 (Seth For Privacy)
89a2df6 Migrate VERSION variable to non-export (Seth For Privacy)
b83874e Set version in ENV var (Seth For Privacy)
bb955d1 Bump Gitian build instructions to v0.18.0.0 (Seth For Privacy)
2022-08-22 22:46:34 -05:00
luigi1111
53a8cf7f8c Merge pull request #8428
7a31d25 keccak: error out if passed mdlen 100 (moneromooo-monero)
2022-08-22 22:45:59 -05:00
luigi1111
ce80747c58 Merge pull request #8427
1fc60ca Publish submitted txs via zmq (j-berman)
2022-08-22 22:45:14 -05:00
luigi1111
f0f3879ba4 Merge pull request #8419
8ea6c33 Fix some paths for toolchain / build (Howard Chu)
2022-08-22 22:44:34 -05:00
luigi1111
645d752b19 Merge pull request #8415
628fdcd continue pool pruning even if a tx can't be found (j-berman)
2022-08-22 22:44:04 -05:00
luigi1111
3c78f4d3d4 Merge pull request #8381
f797655 Fixed get_block_template_backlog performance (SChernykh)
2022-08-22 22:43:12 -05:00
luigi1111
2056ef78a0 Merge pull request #8379
4a4936b Fix use of rtxn without a mdb_txn_safe wrapper (Howard Chu)
2022-08-22 22:41:08 -05:00
luigi1111
df02b56289 Merge pull request #8359
4d7f6f5 GCC: fix some unused warnings (Jeffrey Ryan)
2022-08-22 22:40:09 -05:00
luigi1111
67a27fb384 Merge pull request #8352
552528b Remove async_blocked_mode_client (Jeffrey Ryan)
3ee2174 string_coding: unused functions (Jeffrey Ryan)
285d9f0 http_server_handlers_map2: dead macros (Jeffrey Ryan)
2022-08-22 22:39:34 -05:00
luigi1111
8d0487d6b7 Merge pull request #8333
0093bc2 Focus Doxygen documentation (Jeffrey Ryan)
2022-08-22 22:38:56 -05:00
luigi1111
c286e030d4 Merge pull request #8323
564fa30 DOCS: Rework Portable storage format example (Jeffrey Ryan)
2022-08-22 22:38:26 -05:00
luigi1111
080fc69435 Merge pull request #8299
a0df140 feat(trezor): add HF15 support, BP+ (Dusan Klinec)
2022-08-22 22:37:08 -05:00
SerHack
09d69b6946 rpc: remove overwriting value 2022-08-22 10:34:50 +02:00
SerHack
e988530e01 Remove redundant check 2022-08-22 10:19:12 +02:00
SerHack
501db2cedb Wallet RPC: remove duplicate line 2022-08-21 10:52:33 +02:00
Crypto City
6f0fb76025 blockchain: fix invalid memory read getting fee on empty chain 2022-08-19 14:39:27 +00:00
Seth For Privacy
26c630f659 Update release check-list with lessons learned from v15/v16 fork 2022-08-19 08:14:20 -04:00
moneromooo-monero
a0985044d9 wallet2: better test on whether to allow output import
Being offline is not a good enough heuristic, so we keep track
of whether the wallet ever refreshed from a daemon, which is a
lot better, and probably the best we can do without manual user
designation (which would break existing cold wallet setups till
the user designates those wallets)
2022-08-18 19:29:03 +00:00
moneromooo-monero
c5579ac236 allow exporting outputs in chunks
this will make it easier huge wallets to do so without hitting
random limits (eg, max string size in node).
2022-08-18 06:53:41 +00:00
j-berman
1e912ecd8a wallet2: fixes for export/import output flow
- only allow offline wallets to import outputs
- don't import empty outputs
- export subaddress indexes when exporting outputs
2022-08-16 14:22:42 +00:00
moneromooo-monero
692f1d4e3d wallet2: do not assume imported outputs must be non empty 2022-08-16 14:22:33 +00:00
moneromooo-monero
67b6d6ae2c wallet2: prevent importing outputs in a hot wallet 2022-08-16 14:22:33 +00:00
moneromooo-monero
d9fc666db8 wallet2: fix missing subaddress indices in "light" exported outputs 2022-08-16 14:22:24 +00:00
moneromooo-monero
d06202dcc0 blockchain_prune: faster
on my anecdotal SSD, goes from about 9 hours to 1h20.
2022-08-15 16:16:18 +00:00
selsta
8305a9f9ef depends: remove unused packages 2022-08-11 18:19:54 +02:00
selsta
7b15f21ef0 README: unbound is not vendored anymore 2022-08-11 00:48:50 +02:00
selsta
796513ff5f repo: remove ldns leftovers 2022-08-11 00:21:42 +02:00
Seth For Privacy
ef1924a9cf Bump to v0.18.1.0 2022-08-09 08:20:54 -04:00
selsta
f8d76ecb57 version: bump master version number
Otherwise Ledger rejects the wallet.
2022-08-09 03:37:27 +02:00
moneromooo-monero
e0b3507c88 tests: update block_weight for 2021 scaling
the test was still performed with consensus rules from before
that change
2022-08-08 06:04:54 +00:00
j-berman
04a1e2875d ledger support for hf 15 (BP+, view tags) 2022-08-06 15:00:49 -07:00
selsta
6b61628881 dns_util: remove outdated DNSSEC DS trust anchor 2022-08-06 19:46:53 +02:00
SChernykh
f79765579c Fixed get_block_template_backlog performance
Before the fix, it processed all transactions in the mempool which could be very slow when mempool grows to several MBs in size. I observed `get_block_template_backlog` taking up to 15 seconds of CPU time under high mempool load.

After the fix, only transactions that can potentially be mined in the next block will be processed (a bit more than the current block median weight).
2022-07-26 07:21:21 +02:00
selsta
f7f14459f5 device: set ledger min app version 2022-07-24 21:01:22 +02:00
selsta
85e697fa7b randomx: update submodule 2022-07-24 17:38:59 +02:00
Jeffrey Ryan
564fa30966 DOCS: Rework Portable storage format example
@jtgrassie pointed out that the example I provided was colored incorrectly. He also made the good point that the image wasn't easy to review/correct. I reworked the example so that it's text-only. It's easier to review and edit, and reveals the structure better in my opinion. Also this is easier for people who can't distinguish colors as easily.

Make sure to double-check this work because there's a decent chance I screwed up the comments. The actual byte data was generated and should be solid.
2022-07-22 12:20:03 -05:00
j-berman
1fc60cac58 Publish submitted txs via zmq 2022-07-21 11:36:00 -07:00
moneromooo-monero
600de07bcf wallet_rpc_server: longer timeout for stop_mining
That RPC will wait for mining to actually stop, which can be a while
if randomx has just started on randomx_init_dataset.

This fixes occasional failures in the mining functional test
2022-07-21 12:00:05 +00:00
moneromooo-monero
ac6db928c2 functional_tests: silence the cpu power test program
it's very spammy and drowns the test output
2022-07-21 12:00:05 +00:00
Howard Chu
4a4936b8af Fix use of rtxn without a mdb_txn_safe wrapper 2022-07-20 20:58:03 +01:00
Jeffrey Ryan
308e3fa302 gpg_keys: add jeffro256 key 2022-07-18 12:55:43 -05:00
Seth For Privacy
89a2df67cd Migrate VERSION variable to non-export 2022-07-18 10:32:54 -04:00
Seth For Privacy
b83874e9bd Set version in ENV var 2022-07-18 10:14:44 -04:00
Seth For Privacy
bb955d1a73 Bump Gitian build instructions to v0.18.0.0 2022-07-18 08:32:55 -04:00
Jeffrey Ryan
0093bc230a Focus Doxygen documentation
Right now Doxygen is documenting everything in the repo including submodules, everything in contrib,
util, tests, etc. This bogs down the documentation to the point where it is very hard to navigate. I think
it would be a good move to focus on documenting only the main C++ code which is specific to this repo.

Right now this means documenting `src/` (without SUPERCOP), `contrib/epee/`, `external/easylogging++`. After this commit,
Doxygen went from running >6000 graphs to about 2200 graphs.
2022-07-11 20:47:55 -05:00
Jeffrey Ryan
4d7f6f5cd5 GCC: fix some unused warnings
hash_extra: don't test for success in `jh_hash` and `skein_hash` since its guaranteed
device_ledger: move anonymous global variable apdu_verbose into .cpp file
Add comments to `refreshed` method variable in wallet2
2022-07-11 20:32:03 -05:00
moneromooo-monero
7a31d25b67 keccak: error out if passed mdlen 100
If we were to call it with 100, it would cause rsiz to be 0,
leading to an infinite loop.
This is really a pedantic patch, but since there's already a
range test, might as well make it better.
2022-07-11 17:43:59 +00:00
selsta
6d8fa2b9a9 workflows: add android to depends 2022-07-05 22:03:18 +02:00
Howard Chu
8ea6c339e4 Fix some paths for toolchain / build 2022-07-05 20:04:37 +01:00
j-berman
628fdcdd49 continue pool pruning even if a tx can't be found 2022-07-01 09:44:58 -07:00
moneromooo-monero
a46b6ba25c contrib: add more valgrind suppressions for spurious issues 2022-06-21 11:35:03 +00:00
moneromooo-monero
7f3e31d797 unit_tests: fix accessing invalid memory in tree_hash test 2022-06-21 11:34:26 +00:00
Dusan Klinec
a0df140fd6 feat(trezor): add HF15 support, BP+
- BP+ support added for Trezor
- old Trezor firmware version support removed, code cleanup
2022-06-20 19:42:56 +02:00
Jeffrey Ryan
552528b0ea Remove async_blocked_mode_client 2022-06-17 00:27:06 -05:00
moneromooo-monero
23fde151ee wallet_rpc_server: chunk refresh to keep responding to RPC while refreshing 2022-06-03 07:15:15 +00:00
moneromooo-monero
5bb2369b55 wallet_rpc_server: add --no-initial-sync flag for quicker network binding 2022-05-25 09:02:27 +00:00
Jeffrey Ryan
3ee2174892 string_coding: unused functions 2022-05-23 16:03:42 -05:00
Jeffrey Ryan
285d9f04d5 http_server_handlers_map2: dead macros 2022-05-23 15:31:13 -05:00
Jeffrey Ryan
a4cb77f9f3 epee: update 'http_server_handlers_map2.h' macros to use fully qualified names
quick patch which fixes the issue where if you use some macros from `http_server_handlers_map2.h` you have to be in the `epee` namespace or it doesn't compile. Now can remove `using namespace epee;` from header file `core_rpc_server.h`, which caused a couple of name qualifying mistakes
2022-05-23 14:46:36 -05:00
Gingeropolous
b15aee2b0d readme edits squash 2022-05-22 22:59:18 -04:00
1046 changed files with 36405 additions and 58546 deletions

View File

@@ -0,0 +1,22 @@
name: 'set-make-job-count'
description: 'Set the MAKE_JOB_COUNT environment variable to a value suitable for the host runner'
runs:
using: "composite"
steps:
# Each job runner requires 2.25 GiB (i.e. 1024 * 9/4 MiB) memory and
# a dedicated logical CPU core
- name: set-jobs-macOS
if: runner.os == 'macOS'
run: |
echo MAKE_JOB_COUNT=$(expr $(printf '%s\n%s' $(( $(sysctl -n hw.memsize) * 4 / (1073741824 * 9) )) $(sysctl -n hw.logicalcpu) | sort -n | head -n1) '|' 1) >> $GITHUB_ENV
shell: bash
- name: set-jobs-windows
if: runner.os == 'Windows'
run: |
echo MAKE_JOB_COUNT=$(expr $(printf '%s\n%s' $(( $(grep MemTotal: /proc/meminfo | cut -d: -f2 | cut -dk -f1) * 4 / (1048576 * 9) )) $(nproc) | sort -n | head -n1) '|' 1) >> $GITHUB_ENV
shell: msys2 {0}
- name: set-jobs-linux
if: runner.os == 'Linux'
run: |
echo MAKE_JOB_COUNT=$(expr $(printf '%s\n%s' $(( $(grep MemTotal: /proc/meminfo | cut -d: -f2 | cut -dk -f1) * 4 / (1048576 * 9) )) $(nproc) | sort -n | head -n1) '|' 1) >> $GITHUB_ENV
shell: bash

View File

@@ -2,6 +2,9 @@ name: ci/gh-actions/cli
on:
push:
paths-ignore:
- 'docs/**'
- '**/README.md'
pull_request:
paths-ignore:
- 'docs/**'
@@ -9,40 +12,49 @@ on:
# The below variables reduce repetitions across similar targets
env:
REMOVE_BUNDLED_BOOST : rm -rf /usr/local/share/boost
BUILD_DEFAULT_LINUX: |
cmake -S . -B build -D ARCH="default" -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Release && cmake --build build -j3
APT_INSTALL_LINUX: 'sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev libprotobuf-dev protobuf-compiler ccache'
REMOVE_BUNDLED_PACKAGES : sudo rm -rf /usr/local
# ARCH="default" (not "native") ensures, that a different execution host can execute binaries compiled elsewhere.
BUILD_DEFAULT_LINUX: 'cmake -S . -B build -D ARCH="default" -D BUILD_TESTS=ON -D ENABLE_FUZZ_TEST=ON -D CMAKE_BUILD_TYPE=Release && cmake --build build --target all && cmake --build build --target wallet_api'
APT_INSTALL_LINUX: 'apt -y install build-essential cargo cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler ccache curl git'
APT_SET_CONF: |
echo "Acquire::Retries \"3\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
echo "Acquire::http::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
tee -a /etc/apt/apt.conf.d/80-custom << EOF
Acquire::Retries "3";
Acquire::http::Timeout "120";
Acquire::ftp::Timeout "120";
EOF
CCACHE_SETTINGS: |
ccache --max-size=150M
ccache --set-config=compression=true
ccache --max-size=150M
ccache --set-config=compression=true
USE_DEVICE_TREZOR_MANDATORY: ON
jobs:
build-macos:
name: 'macOS (brew)'
runs-on: macOS-latest
env:
CCACHE_TEMPDIR: /tmp/.ccache-temp
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- uses: actions/cache@v2
with:
path: /Users/runner/Library/Caches/ccache
key: ccache-${{ runner.os }}-build-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-build-
- name: install dependencies
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libpgm miniupnpc ldns expat libunwind-headers protobuf ccache
- name: build
run: |
${{env.CCACHE_SETTINGS}}
make -j3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v4
with:
path: /Users/runner/Library/Caches/ccache
key: ccache-${{ runner.os }}-build-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-build-
- uses: ./.github/actions/set-make-job-count
- name: install dependencies
run: |
brew uninstall cmake
brew update
brew install --quiet cmake boost hidapi openssl zmq miniupnpc expat libunwind-headers protobuf ccache
- name: build
run: |
${{env.CCACHE_SETTINGS}}
make -j${{env.MAKE_JOB_COUNT}}
build-windows:
name: 'Windows (MSYS2)'
runs-on: windows-latest
env:
CCACHE_TEMPDIR: C:\Users\runneradmin\.ccache-temp
@@ -51,132 +63,198 @@ jobs:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- uses: actions/cache@v2
with:
path: C:\Users\runneradmin\.ccache
key: ccache-${{ runner.os }}-build-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-build-
- uses: eine/setup-msys2@v2
with:
update: true
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-ccache mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf-c mingw-w64-x86_64-libusb mingw-w64-x86_64-unbound git
- name: build
run: |
${{env.CCACHE_SETTINGS}}
make release-static-win64 -j2
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v4
with:
path: C:\Users\runneradmin\.ccache
key: ccache-${{ runner.os }}-build-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-build-
- uses: msys2/setup-msys2@v2
with:
update: true
install: mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-ccache mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf mingw-w64-x86_64-libusb mingw-w64-x86_64-unbound mingw-w64-x86_64-rust git pkg-config
- uses: ./.github/actions/set-make-job-count
- name: build
run: |
${{env.CCACHE_SETTINGS}}
make release-static -j${{env.MAKE_JOB_COUNT}}
# See the OS labels and monitor deprecations here:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
build-arch:
name: 'Arch Linux'
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- name: install dependencies
run: pacman -Syyu --noconfirm base-devel git rust cmake boost openssl zeromq unbound libsodium readline expat gtest python3 doxygen graphviz hidapi libusb protobuf
- name: configure git
run: git config --global --add safe.directory '*'
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ./.github/actions/set-make-job-count
- name: build
env:
CMAKE_BUILD_PARALLEL_LEVEL: ${{env.MAKE_JOB_COUNT}}
run: ${{env.BUILD_DEFAULT_LINUX}}
build-debian:
# Oldest supported Debian version
name: 'Debian 11'
runs-on: ubuntu-latest
container:
image: debian:11
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: set apt conf
run: ${{env.APT_SET_CONF}}
- name: update apt
run: apt update
- name: install monero dependencies
run: ${{env.APT_INSTALL_LINUX}}
- name: install rust
# Debian 11 ships Rust 1.48.0. We need >=1.69 to build FCMP++.
run: |
curl -O https://static.rust-lang.org/rustup/archive/1.27.1/x86_64-unknown-linux-gnu/rustup-init
echo "6aeece6993e902708983b209d04c0d1dbb14ebb405ddb87def578d41f920f56d rustup-init" | sha256sum -c
chmod +x rustup-init
./rustup-init -y --default-toolchain 1.69
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: configure git
run: git config --global --add safe.directory '*'
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ./.github/actions/set-make-job-count
- name: build
env:
CMAKE_BUILD_PARALLEL_LEVEL: ${{env.MAKE_JOB_COUNT}}
run: ${{env.BUILD_DEFAULT_LINUX}}
build-ubuntu:
runs-on: ${{ matrix.os }}
env:
CCACHE_TEMPDIR: /tmp/.ccache-temp
strategy:
matrix:
os: [ubuntu-latest, ubuntu-18.04]
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- uses: actions/cache@v2
with:
path: ~/.ccache
key: ccache-${{ runner.os }}-build-${{ matrix.os }}-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-build-${{ matrix.os }}
- name: remove bundled boost
run: ${{env.REMOVE_BUNDLED_BOOST}}
- name: set apt conf
run: ${{env.APT_SET_CONF}}
- name: update apt
run: sudo apt update
- name: install monero dependencies
run: ${{env.APT_INSTALL_LINUX}}
- name: build
run: |
${{env.CCACHE_SETTINGS}}
${{env.BUILD_DEFAULT_LINUX}}
libwallet-ubuntu:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
env:
CCACHE_TEMPDIR: /tmp/.ccache-temp
strategy:
fail-fast: false
matrix:
include:
# Most popular Ubuntu LTS version
- name: Ubuntu 22.04
container: ubuntu:22.04
container:
image: ${{ matrix.container }}
env:
DEBIAN_FRONTEND: noninteractive
CCACHE_TEMPDIR: /tmp/.ccache-temp
CCACHE_DIR: ~/.ccache
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- uses: actions/cache@v2
with:
path: ~/.ccache
key: ccache-${{ runner.os }}-libwallet-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-libwallet-
- name: remove bundled boost
run: ${{env.REMOVE_BUNDLED_BOOST}}
- name: set apt conf
run: ${{env.APT_SET_CONF}}
- name: update apt
run: sudo apt update
- name: install monero dependencies
run: ${{env.APT_INSTALL_LINUX}}
- name: build
run: |
${{env.CCACHE_SETTINGS}}
cmake .
make wallet_api -j3
- name: set apt conf
run: ${{env.APT_SET_CONF}}
- name: update apt
run: apt update
- name: install monero dependencies
run: ${{env.APT_INSTALL_LINUX}}
- name: configure git
run: git config --global --add safe.directory '*'
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-${{ matrix.container }}-build-${{ github.sha }}
restore-keys: ccache-${{ matrix.container }}-build-
- uses: ./.github/actions/set-make-job-count
- name: build
env:
CMAKE_BUILD_PARALLEL_LEVEL: ${{env.MAKE_JOB_COUNT}}
run: |
${{env.CCACHE_SETTINGS}}
${{env.BUILD_DEFAULT_LINUX}}
test-ubuntu:
needs: build-ubuntu
name: "${{ matrix.name }} (tests)"
runs-on: ubuntu-latest
env:
CCACHE_TEMPDIR: /tmp/.ccache-temp
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: ccache
uses: actions/cache@v2
with:
path: ~/.ccache
key: ccache-${{ runner.os }}-build-ubuntu-latest-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-build-ubuntu-latest
- name: remove bundled boost
run: ${{env.REMOVE_BUNDLED_BOOST}}
- name: set apt conf
run: ${{env.APT_SET_CONF}}
- name: update apt
run: sudo apt update
- name: install monero dependencies
run: ${{env.APT_INSTALL_LINUX}}
- name: install Python dependencies
run: pip install requests psutil monotonic
- name: tests
strategy:
matrix:
include:
# Oldest supported Ubuntu LTS version
- name: Ubuntu 20.04
container: ubuntu:20.04
container:
image: ${{ matrix.container }}
env:
CTEST_OUTPUT_ON_FAILURE: ON
run: |
${{env.CCACHE_SETTINGS}}
${{env.BUILD_DEFAULT_LINUX}}
cmake --build build --target test
# ARCH="default" (not "native") ensures, that a different execution host can execute binaries compiled elsewhere.
# BUILD_SHARED_LIBS=ON speeds up the linkage part a bit, reduces size, and is the only place where the dynamic linkage is tested.
DEBIAN_FRONTEND: noninteractive
CCACHE_TEMPDIR: /tmp/.ccache-temp
CCACHE_DIR: ~/.ccache
# Setting up a loop device (losetup) requires additional capabilities.
# tests/create_test_disks.sh
options: --privileged
steps:
- name: set apt conf
run: ${{env.APT_SET_CONF}}
- name: update apt
run: apt update
- name: install monero dependencies
run: ${{env.APT_INSTALL_LINUX}}
- name: install pip
run: apt install -y python3-pip
- name: install Python dependencies
run: pip install requests psutil monotonic zmq deepdiff
- name: configure git
run: git config --global --add safe.directory '*'
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-${{ matrix.container }}-build-${{ github.sha }}
restore-keys: ccache-${{ matrix.container }}-build-
- name: create dummy disk drives for testing
run: tests/create_test_disks.sh >> $GITHUB_ENV
- uses: ./.github/actions/set-make-job-count
- name: tests
env:
CTEST_OUTPUT_ON_FAILURE: ON
DNS_PUBLIC: tcp://9.9.9.9
CMAKE_BUILD_PARALLEL_LEVEL: ${{env.MAKE_JOB_COUNT}}
run: |
${{env.CCACHE_SETTINGS}}
${{env.BUILD_DEFAULT_LINUX}}
cmake --build build --target test
source-archive:
runs-on: ubuntu-20.04
name: "source archive"
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: archive
run: |
pip install git-archive-all
export VERSION="monero-$(git describe)"
export OUTPUT="$VERSION.tar"
echo "OUTPUT=$OUTPUT" >> $GITHUB_ENV
/home/runner/.local/bin/git-archive-all --prefix "$VERSION/" --force-submodules "$OUTPUT"
- uses: actions/upload-artifact@v2
with:
name: ${{ env.OUTPUT }}
path: /home/runner/work/monero/monero/${{ env.OUTPUT }}
- name: set apt conf
run: ${{env.APT_SET_CONF}}
- name: update apt
run: apt update
- name: install dependencies
run: apt install -y git python3-pip
- name: configure git
run: git config --global --add safe.directory '*'
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: archive
run: |
pip install git-archive-all
export VERSION="monero-$(git describe)"
export OUTPUT="$VERSION.tar"
echo "OUTPUT=$OUTPUT" >> $GITHUB_ENV
git-archive-all --prefix "$VERSION/" --force-submodules "$OUTPUT"
- uses: actions/upload-artifact@v4
with:
name: ${{ env.OUTPUT }}
path: ${{ env.OUTPUT }}

View File

@@ -2,6 +2,9 @@ name: ci/gh-actions/depends
on:
push:
paths-ignore:
- 'docs/**'
- '**/README.md'
pull_request:
paths-ignore:
- 'docs/**'
@@ -9,97 +12,127 @@ on:
env:
APT_SET_CONF: |
echo "Acquire::Retries \"3\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
echo "Acquire::http::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
tee -a /etc/apt/apt.conf.d/80-custom << EOF
Acquire::Retries "3";
Acquire::http::Timeout "120";
Acquire::ftp::Timeout "120";
EOF
CCACHE_SETTINGS: |
ccache --max-size=150M
ccache --set-config=compression=true
USE_DEVICE_TREZOR_MANDATORY: ON
jobs:
build-cross:
runs-on: ubuntu-18.04
env:
CCACHE_TEMPDIR: /tmp/.ccache-temp
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
env:
DEBIAN_FRONTEND: noninteractive
CCACHE_TEMPDIR: /tmp/.ccache-temp
strategy:
fail-fast: false
matrix:
toolchain:
- name: "RISCV 64bit"
host: "riscv64-linux-gnu"
packages: "python3 gperf g++-riscv64-linux-gnu"
rust_host: "riscv64gc-unknown-linux-gnu"
packages: "g++-riscv64-linux-gnu"
- name: "ARM v7"
host: "arm-linux-gnueabihf"
packages: "python3 gperf g++-arm-linux-gnueabihf"
rust_host: "armv7-unknown-linux-gnueabihf"
packages: "g++-arm-linux-gnueabihf"
- name: "ARM v8"
host: "aarch64-linux-gnu"
packages: "python3 gperf g++-aarch64-linux-gnu"
- name: "i686 Win"
host: "i686-w64-mingw32"
packages: "python3 g++-mingw-w64-i686 qttools5-dev-tools"
rust_host: "aarch64-unknown-linux-gnu"
packages: "g++-aarch64-linux-gnu"
- name: "i686 Linux"
host: "i686-pc-linux-gnu"
packages: "gperf cmake g++-multilib python3-zmq"
rust_host: "i686-unknown-linux-gnu"
packages: "g++-multilib"
- name: "Win64"
host: "x86_64-w64-mingw32"
packages: "cmake python3 g++-mingw-w64-x86-64 qttools5-dev-tools"
rust_host: "x86_64-pc-windows-gnu"
packages: "g++-mingw-w64-x86-64"
- name: "x86_64 Linux"
host: "x86_64-unknown-linux-gnu"
packages: "gperf cmake python3-zmq libdbus-1-dev libharfbuzz-dev"
rust_host: "x86_64-unknown-linux-gnu"
- name: "Cross-Mac x86_64"
host: "x86_64-apple-darwin11"
packages: "cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
host: "x86_64-apple-darwin"
rust_host: "x86_64-apple-darwin"
packages: "clang-18 lld-18"
- name: "Cross-Mac aarch64"
host: "aarch64-apple-darwin11"
packages: "cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
host: "arm64-apple-darwin"
rust_host: "aarch64-apple-darwin"
packages: "clang-18 lld-18"
- name: "x86_64 Freebsd"
host: "x86_64-unknown-freebsd"
packages: "clang-8 gperf cmake python3-zmq libdbus-1-dev libharfbuzz-dev"
rust_host: "x86_64-unknown-freebsd"
packages: "clang"
- name: "ARMv7 Android"
host: "arm-linux-android"
rust_host: "armv7-linux-androideabi"
packages: "unzip"
- name: "ARMv8 Android"
host: "aarch64-linux-android"
rust_host: "aarch64-linux-android"
packages: "unzip"
name: ${{ matrix.toolchain.name }}
steps:
- uses: actions/checkout@v1
- name: set apt conf
run: ${{env.APT_SET_CONF}}
- name: install dependencies
run: apt update; apt -y install build-essential cmake pkg-config curl git ca-certificates ccache ${{ matrix.toolchain.packages }}
- name: install rust
# We can't use the latest Rust due to LLVM 17 not working with old `ld`s (such as in Ubuntu 20.04) for RISC-V
# We could update ld (a pain), update Ubuntu (requires a large amount of changes), or downgrade Rust
# We can't use Rust 1.70 due to LLVM 16 requiring ld >= 2.40 when building for Windows
run: |
curl -O https://static.rust-lang.org/rustup/archive/1.27.1/x86_64-unknown-linux-gnu/rustup-init
echo "6aeece6993e902708983b209d04c0d1dbb14ebb405ddb87def578d41f920f56d rustup-init" | sha256sum -c
chmod +x rustup-init
./rustup-init -y --default-toolchain 1.69 --target ${{ matrix.toolchain.rust_host }}
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: configure git
run: git config --global --add safe.directory '*'
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
# Most volatile cache
- name: ccache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-${{ matrix.toolchain.host }}-${{ github.sha }}
restore-keys: ccache-${{ matrix.toolchain.host }}-
# Less volatile cache
- name: depends cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: contrib/depends/built
key: depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
restore-keys: |
depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
depends-${{ matrix.toolchain.host }}-
# Static cache
- name: OSX SDK cache
uses: actions/cache@v2
with:
path: contrib/depends/sdk-sources
key: sdk-${{ matrix.toolchain.host }}-${{ matrix.toolchain.osx_sdk }}
restore-keys: sdk-${{ matrix.toolchain.host }}-${{ matrix.toolchain.osx_sdk }}
- name: set apt conf
run: ${{env.APT_SET_CONF}}
- name: install dependencies
run: sudo apt update; sudo apt -y install build-essential libtool cmake autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache ${{ matrix.toolchain.packages }}
- name: prepare w64-mingw32
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'i686-w64-mingw32' }}
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' }}
run: |
sudo update-alternatives --set ${{ matrix.toolchain.host }}-g++ $(which ${{ matrix.toolchain.host }}-g++-posix)
sudo update-alternatives --set ${{ matrix.toolchain.host }}-gcc $(which ${{ matrix.toolchain.host }}-gcc-posix)
update-alternatives --set ${{ matrix.toolchain.host }}-g++ $(which ${{ matrix.toolchain.host }}-g++-posix)
update-alternatives --set ${{ matrix.toolchain.host }}-gcc $(which ${{ matrix.toolchain.host }}-gcc-posix)
- name: prepare apple-darwin
if: ${{ matrix.toolchain.host == 'x86_64-apple-darwin' || matrix.toolchain.host == 'arm64-apple-darwin' }}
run: |
echo "/usr/lib/llvm-18/bin/" >> $GITHUB_PATH
- uses: ./.github/actions/set-make-job-count
- name: build
run: |
${{env.CCACHE_SETTINGS}}
make depends target=${{ matrix.toolchain.host }} -j2
- uses: actions/upload-artifact@v2
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'x86_64-apple-darwin11' || matrix.toolchain.host == 'x86_64-unknown-linux-gnu' }}
make depends target=${{ matrix.toolchain.host }} -j${{env.MAKE_JOB_COUNT}}
- uses: actions/upload-artifact@v4
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'x86_64-apple-darwin' || matrix.toolchain.host == 'arm64-apple-darwin' || matrix.toolchain.host == 'x86_64-unknown-linux-gnu' }}
with:
name: ${{ matrix.toolchain.name }}
path: |
/home/runner/work/monero/monero/build/${{ matrix.toolchain.host }}/release/bin/monero-wallet-cli*
/home/runner/work/monero/monero/build/${{ matrix.toolchain.host }}/release/bin/monerod*
build/${{ matrix.toolchain.host }}/release/bin/monero-wallet-cli*
build/${{ matrix.toolchain.host }}/release/bin/monerod*

109
.github/workflows/guix.yml vendored Normal file
View File

@@ -0,0 +1,109 @@
name: ci/gh-actions/guix
on:
push:
paths:
- 'contrib/depends/**'
- 'contrib/guix/**'
- '!contrib/**.md'
- '.github/workflows/guix.yml'
- '**/Cargo.lock'
pull_request:
paths:
- 'contrib/depends/**'
- 'contrib/guix/**'
- '!contrib/**.md'
- '.github/workflows/guix.yml'
- '**/Cargo.lock'
jobs:
cache-sources:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: depends sources cache
id: cache
uses: actions/cache@v4
with:
path: contrib/depends/sources
key: sources-${{ hashFiles('contrib/depends/packages/*') }}
- name: download depends sources
if: steps.cache.outputs.cache-hit != 'true'
run: make -C contrib/depends download
build-guix:
runs-on: ubuntu-24.04
needs: [cache-sources]
strategy:
fail-fast: false
matrix:
toolchain:
- target: "x86_64-linux-gnu"
- target: "aarch64-linux-gnu"
- target: "arm-linux-gnueabihf"
- target: "riscv64-linux-gnu"
- target: "x86_64-w64-mingw32"
- target: "x86_64-unknown-freebsd"
- target: "x86_64-apple-darwin"
- target: "arm64-apple-darwin"
- target: "aarch64-linux-android"
name: ${{ matrix.toolchain.target }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: remove bundled packages
# This is faster than rm -rf
run: |
sudo mkdir /empty
sudo rsync -a --delete /empty/ /usr/local
- name: depends sources cache
uses: actions/cache/restore@v4
with:
path: contrib/depends/sources
key: sources-${{ hashFiles('contrib/depends/packages/*') }}
- name: install dependencies
run: sudo apt update; sudo apt -y install guix git ca-certificates
- name: apparmor workaround
# https://bugs.launchpad.net/ubuntu/+source/guix/+bug/2064115
run: |
sudo tee /etc/apparmor.d/guix << EOF
abi <abi/4.0>,
include <tunables/global>
profile guix /usr/bin/guix flags=(unconfined) {
userns,
include if exists <local/guix>
}
EOF
sudo /etc/init.d/apparmor reload
sudo aa-enforce guix || true
sudo apt purge apparmor
- name: build
run: ADDITIONAL_GUIX_TIMEMACHINE_FLAGS="--disable-authentication" SUBSTITUTE_URLS='http://bordeaux.guix.gnu.org' HOSTS="${{ matrix.toolchain.target }}" ./contrib/guix/guix-build
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.toolchain.target }}
path: |
guix/guix-build-*/output/${{ matrix.toolchain.target }}/*
guix/guix-build-*/logs/${{ matrix.toolchain.target }}/*
bundle-logs:
runs-on: ubuntu-24.04
needs: [build-guix]
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: print hashes
run: |
echo '```' >> $GITHUB_STEP_SUMMARY
find **/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@v4
with:
name: "logs"
path: '**/logs/**'

6
.gitignore vendored
View File

@@ -25,10 +25,8 @@ miniupnpcstrings.h
version/
ClangBuildAnalyzerSession.txt
# gitian
contrib/gitian/builder/
contrib/gitian/docker/
contrib/gitian/sigs/
# guix
/guix
# Created by https://www.gitignore.io

6
.gitmodules vendored
View File

@@ -4,9 +4,6 @@
[submodule "external/rapidjson"]
path = external/rapidjson
url = https://github.com/Tencent/rapidjson
[submodule "external/trezor-common"]
path = external/trezor-common
url = https://github.com/trezor/trezor-common.git
[submodule "external/randomx"]
path = external/randomx
url = https://github.com/tevador/RandomX
@@ -14,3 +11,6 @@
path = external/supercop
url = https://github.com/monero-project/supercop
branch = monero
[submodule "external/gtest"]
path = external/gtest
url = https://github.com/google/googletest.git

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2024, The Monero Project
#
# All rights reserved.
#
@@ -28,6 +28,9 @@
#
# Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
cmake_minimum_required(VERSION 3.10)
message(STATUS "CMake version ${CMAKE_VERSION}")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
list(INSERT CMAKE_MODULE_PATH 0
@@ -37,15 +40,15 @@ include(CheckCXXCompilerFlag)
include(CheckLinkerFlag)
include(CheckLibraryExists)
include(CheckFunctionExists)
if (POLICY CMP0148)
cmake_policy(SET CMP0148 OLD) # https://cmake.org/cmake/help/latest/policy/CMP0148.html
endif()
include(FindPythonInterp)
if (IOS)
INCLUDE(CmakeLists_IOS.txt)
endif()
cmake_minimum_required(VERSION 3.5)
message(STATUS "CMake version ${CMAKE_VERSION}")
project(monero)
option (USE_CCACHE "Use ccache if a usable instance is found" ON)
@@ -96,7 +99,7 @@ enable_language(C ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
@@ -219,7 +222,7 @@ function(forbid_undefined_symbols)
file(MAKE_DIRECTORY "${TEST_PROJECT}")
file(WRITE "${TEST_PROJECT}/CMakeLists.txt"
[=[
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.10)
project(test)
option(EXPECT_SUCCESS "" ON)
file(WRITE "${CMAKE_SOURCE_DIR}/incorrect_source.cpp" "void undefined_symbol(); void symbol() { undefined_symbol(); }")
@@ -279,7 +282,10 @@ if (NOT ARCH OR ARCH STREQUAL "" OR ARCH STREQUAL "native" OR ARCH STREQUAL "def
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "")
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR})
endif()
set(ARCH_ID "${CMAKE_SYSTEM_PROCESSOR}")
# On Windows, CMake sets CMAKE{_HOST,}_SYSTEM_PROCESSOR to the value of the
# PROCESSOR_ARCHITECTURE environment variable. On some systems it may be set to
# AMD64. Lowercase it to ensure checks for "x86_64" or "amd64" work as expected.
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" ARCH_ID)
else()
set(ARCH_ID "${ARCH}")
endif()
@@ -335,6 +341,11 @@ set(RISCV 1)
set(RISCV32 1)
endif()
if(ARCH_ID STREQUAL "loongarch64")
set(LOONGARCH 1)
set(LOONGARCH64 1)
endif()
if(WIN32 OR ARM OR PPC64LE OR PPC64 OR PPC)
set(OPT_FLAGS_RELEASE "-O2")
else()
@@ -349,6 +360,7 @@ else()
message(STATUS "Building without build tag")
endif()
option(MANUAL_SUBMODULES "Skip submodule up-to-date checks" OFF)
if(NOT MANUAL_SUBMODULES)
find_package(Git)
if(GIT_FOUND)
@@ -366,7 +378,6 @@ if(NOT MANUAL_SUBMODULES)
message(STATUS "Checking submodules")
check_submodule(external/miniupnp)
check_submodule(external/rapidjson)
check_submodule(external/trezor-common)
check_submodule(external/randomx)
check_submodule(external/supercop)
endif()
@@ -375,33 +386,19 @@ endif()
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG ${OPT_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${OPT_FLAGS_RELEASE}")
# set this to 0 if per-block checkpoint needs to be disabled
set(PER_BLOCK_CHECKPOINT 1)
option(PER_BLOCK_CHECKPOINT "Enable per-block checkpoint" ON)
if(PER_BLOCK_CHECKPOINT)
add_definitions("-DPER_BLOCK_CHECKPOINT")
set(Blocks "blocks")
else()
set(Blocks "")
endif()
list(INSERT CMAKE_MODULE_PATH 0
"${CMAKE_SOURCE_DIR}/cmake")
if (NOT DEFINED ENV{DEVELOPER_LOCAL_TOOLS})
message(STATUS "Could not find DEVELOPER_LOCAL_TOOLS in env (not required)")
set(BOOST_IGNORE_SYSTEM_PATHS_DEFAULT OFF)
elseif ("$ENV{DEVELOPER_LOCAL_TOOLS}" EQUAL 1)
message(STATUS "Found: env DEVELOPER_LOCAL_TOOLS = 1")
set(BOOST_IGNORE_SYSTEM_PATHS_DEFAULT ON)
else()
message(STATUS "Found: env DEVELOPER_LOCAL_TOOLS = 0")
set(BOOST_IGNORE_SYSTEM_PATHS_DEFAULT OFF)
option(BOOST_IGNORE_SYSTEM_PATHS "Ignore boost system paths for local boost installation" OFF)
if (BOOST_IGNORE_SYSTEM_PATHS)
set(Boost_NO_SYSTEM_PATHS TRUE)
endif()
message(STATUS "BOOST_IGNORE_SYSTEM_PATHS defaults to ${BOOST_IGNORE_SYSTEM_PATHS_DEFAULT}")
option(BOOST_IGNORE_SYSTEM_PATHS "Ignore boost system paths for local boost installation" ${BOOST_IGNORE_SYSTEM_PATHS_DEFAULT})
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
enable_testing()
@@ -412,7 +409,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
else()
set(DEFAULT_BUILD_DEBUG_UTILITIES OFF)
endif()
option(BUILD_DEBUG_UTILITIES "Build debug utilities." DEFAULT_BUILD_DEBUG_UTILITIES)
option(BUILD_DEBUG_UTILITIES "Build debug utilities." ${DEFAULT_BUILD_DEBUG_UTILITIES})
if(OSSFUZZ)
message(STATUS "Using OSS-Fuzz fuzzing system")
@@ -449,22 +446,15 @@ endif()
# Check if we're on OpenBSD. See the README.md for build instructions.
if(CMAKE_SYSTEM_NAME MATCHES "kOpenBSD.*|OpenBSD.*")
set(OPENBSD TRUE)
elseif(CMAKE_SYSTEM_NAME MATCHES "kNetBSD.*|NetBSD.*")
set(NETBSD TRUE)
elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
set(BSDI TRUE)
endif()
# TODO: check bsdi, NetBSD, to see if they need the same FreeBSD changes
#
# elseif(CMAKE_SYSTEM_NAME MATCHES "kNetBSD.*|NetBSD.*")
# set(NETBSD TRUE)
# elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
# set(BSDI TRUE)
include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external external/supercop/include)
if(APPLE)
cmake_policy(SET CMP0042 NEW)
endif()
if(MSVC OR MINGW)
if(MINGW)
set(DEFAULT_STATIC true)
else()
set(DEFAULT_STATIC false)
@@ -486,37 +476,16 @@ else()
endif()
set(PIC_FLAG "-fPIC")
if(MINGW)
string(REGEX MATCH "^[^/]:/[^/]*" msys2_install_path "${CMAKE_C_COMPILER}")
message(STATUS "MSYS location: ${msys2_install_path}")
set(CMAKE_INCLUDE_PATH "${msys2_install_path}/mingw${ARCH_WIDTH}/include")
# This is necessary because otherwise CMake will make Boost libraries -lfoo
# rather than a full path. Unfortunately, this makes the shared libraries get
# linked due to a bug in CMake which misses putting -static flags around the
# -lfoo arguments.
set(DEFLIB ${msys2_install_path}/mingw${ARCH_WIDTH}/lib)
list(REMOVE_ITEM CMAKE_C_IMPLICIT_LINK_DIRECTORIES ${DEFLIB})
list(REMOVE_ITEM CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES ${DEFLIB})
endif()
if(STATIC)
if(MSVC)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll.a .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
endif()
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DZMQ_STATIC")
endif()
option(SANITIZE "Use ASAN memory sanitizer" OFF)
if(SANITIZE)
if (MSVC)
message(FATAL_ERROR "Cannot sanitize with MSVC")
else()
message(STATUS "Using ASAN")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
endif()
message(STATUS "Using ASAN")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address,undefined")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address,undefined")
endif()
# Set default blockchain storage location:
@@ -531,7 +500,7 @@ add_definitions("-DBLOCKCHAIN_DB=${BLOCKCHAIN_DB}")
# Can't install hook in static build on OSX, because OSX linker does not support --wrap
# On ARM, having libunwind package (with .so's only) installed breaks static link.
# When possible, avoid stack tracing using libunwind in favor of using easylogging++.
if (APPLE)
if (APPLE OR NETBSD)
set(DEFAULT_STACK_TRACE OFF)
set(LIBUNWIND_LIBRARIES "")
elseif (DEPENDS AND NOT LINUX)
@@ -621,7 +590,7 @@ function(set_default_arch)
set(ARCH ${ARCH} CACHE STRING "CPU to build for: -march value or 'default' to not pass -march at all")
endfunction()
if (NOT (MSVC OR ARCH))
if (NOT ARCH)
set_default_arch()
endif()
@@ -703,17 +672,6 @@ endif()
# Trezor support check
include(CheckTrezor)
if(MSVC)
add_definitions("/bigobj /MP /W3 /GS- /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4345 /D_WIN32_WINNT=0x0600 /DWIN32_LEAN_AND_MEAN /DGTEST_HAS_TR1_TUPLE=0 /FIinline_c.h /D__SSE4_1__")
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Dinline=__inline")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:10485760")
if(STATIC)
foreach(VAR CMAKE_C_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE)
string(REPLACE "/MD" "/MT" ${VAR} "${${VAR}}")
endforeach()
endif()
include_directories(SYSTEM src/platform/msc)
else()
include(TestCXXAcceptsFlag)
message(STATUS "Building on ${CMAKE_SYSTEM_PROCESSOR} for ${ARCH}")
if(ARCH STREQUAL "default")
@@ -748,7 +706,7 @@ else()
message(STATUS "AES support explicitly disabled")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_AES")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_AES")
elseif(NOT ARM AND NOT PPC64LE AND NOT PPC64 AND NOT PPC AND NOT S390X AND NOT RISCV)
elseif(NOT ARM AND NOT PPC64LE AND NOT PPC64 AND NOT PPC AND NOT S390X AND NOT RISCV AND NOT LOONGARCH)
message(STATUS "AES support enabled")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
@@ -758,6 +716,8 @@ else()
message(STATUS "AES support not available on s390x")
elseif(RISCV)
message(STATUS "AES support not available on RISC-V")
elseif(LOONGARCH)
message(STATUS "AES support not available on LOONGARCH")
elseif(ARM6)
message(STATUS "AES support not available on ARMv6")
elseif(ARM7)
@@ -789,12 +749,11 @@ else()
set(WARNINGS "${WARNINGS} -Wno-error=unused-value -Wno-error=unused-but-set-variable")
set(MINGW_FLAG "${MINGW_FLAG} -DWIN32_LEAN_AND_MEAN")
set(Boost_THREADAPI win32)
include_directories(SYSTEM src/platform/mingw)
# mingw doesn't support LTO (multiple definition errors at link time)
set(USE_LTO_DEFAULT false)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,10485760")
if(NOT BUILD_64)
add_definitions(-DWINVER=0x0501 -D_WIN32_WINNT=0x0501)
add_definitions(-DWINVER=0x0600 -D_WIN32_WINNT=0x0600)
endif()
endif()
set(C_WARNINGS "-Waggregate-return -Wnested-externs -Wold-style-definition -Wstrict-prototypes")
@@ -878,12 +837,6 @@ else()
set(LD_SECURITY_FLAGS "${LD_SECURITY_FLAGS} -Wl,-z,noexecheap")
endif()
if(BACKCOMPAT)
add_linker_flag_if_supported(-Wl,--wrap=__divmoddi4 LD_BACKCOMPAT_FLAGS)
add_linker_flag_if_supported(-Wl,--wrap=glob LD_BACKCOMPAT_FLAGS)
message(STATUS "Using Lib C back compat flags: ${LD_BACKCOMPAT_FLAGS}")
endif()
# some windows linker bits
if (WIN32)
add_linker_flag_if_supported(-Wl,--dynamicbase LD_SECURITY_FLAGS)
@@ -904,7 +857,7 @@ else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${PIC_FLAG} ${C_SECURITY_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_CPP_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${PIC_FLAG} ${CXX_SECURITY_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${LD_BACKCOMPAT_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS}")
# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
# is fixed in the code (Issue #847), force compiler to be conservative.
@@ -1004,6 +957,9 @@ else()
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default -DGTEST_HAS_TR1_TUPLE=0")
if(ARM)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-aligned-allocation")
endif()
endif()
set(DEBUG_FLAGS "-g3")
@@ -1059,11 +1015,6 @@ else()
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${STATIC_FLAGS} ")
endif()
endif()
if (${BOOST_IGNORE_SYSTEM_PATHS} STREQUAL "ON")
set(Boost_NO_SYSTEM_PATHS TRUE)
endif()
set(OLD_LIB_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(Boost_NO_BOOST_CMAKE ON)
@@ -1075,48 +1026,74 @@ if(STATIC)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON)
endif()
find_package(Boost 1.58 QUIET REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options locale)
add_definitions(-DBOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES})
# Find Boost headers
set(BOOST_MIN_VER 1.62)
find_package(Boost ${BOOST_MIN_VER} QUIET REQUIRED)
if(NOT Boost_FOUND)
die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (>=1.58) or the equivalent")
die("Could not find Boost libraries, please make sure you have installed Boost or libboost-all-dev (>=${BOOST_MIN_VER}) or the equivalent")
elseif(Boost_FOUND)
message(STATUS "Found Boost Version: ${Boost_VERSION}")
if (Boost_VERSION VERSION_LESS 10 AND Boost_VERSION VERSION_LESS 1.62.0 AND NOT (OPENSSL_VERSION VERSION_LESS 1.1))
set(BOOST_BEFORE_1_62 true)
message(STATUS "Found Boost Version: ${Boost_VERSION_STRING}")
set(BOOST_COMPONENTS filesystem thread date_time chrono serialization program_options)
if (WIN32)
list(APPEND BOOST_COMPONENTS locale)
endif()
if (NOT Boost_VERSION VERSION_LESS 10 AND Boost_VERSION VERSION_LESS 106200 AND NOT (OPENSSL_VERSION VERSION_LESS 1.1))
set(BOOST_BEFORE_1_62 true)
# Boost System is header-only since 1.69
if (Boost_VERSION_STRING VERSION_LESS 1.69.0)
list(APPEND BOOST_COMPONENTS system)
endif()
if (BOOST_BEFORE_1_62)
message(FATAL_ERROR "Boost ${Boost_VERSION} (older than 1.62) is too old to link with OpenSSL ${OPENSSL_VERSION} (1.1 or newer) found at ${OPENSSL_INCLUDE_DIR} and ${OPENSSL_LIBRARIES}. "
"Update Boost or install OpenSSL 1.0 and set path to it when running cmake: "
"cmake -DOPENSSL_ROOT_DIR='/usr/include/openssl-1.0'")
# Boost Regex is header-only since 1.77
if (Boost_VERSION_STRING VERSION_LESS 1.77.0)
list(APPEND BOOST_COMPONENTS regex)
endif()
message(STATUS "Boost components: ${BOOST_COMPONENTS}")
# Find required Boost libraries
find_package(Boost ${BOOST_MIN_VER} QUIET REQUIRED COMPONENTS ${BOOST_COMPONENTS})
set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES})
endif()
add_definitions(-DBOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION)
add_definitions(-DBOOST_NO_AUTO_PTR)
add_definitions(-DBOOST_UUID_DISABLE_ALIGNMENT) # This restores UUID's std::has_unique_object_representations property
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
if(MINGW)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
if(DEPENDS)
set(ICU_LIBRARIES icuio icui18n icuuc icudata icutu iconv)
else()
set(ICU_LIBRARIES icuio icuin icuuc icudt icutu iconv)
if(NOT DEPENDS)
# This is an extremely ugly hack to get around Boost not being built with static ICU.
# We reported the issue, we are waiting for upstream to fix this issue: https://github.com/boostorg/boost/issues/1079#issue-3384962885
# This hack links shared ICU libs to avoid linker errors we get in MSYS2 compilation (undefined symbols to ICU).
set(OLD_LIB_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a")
find_library(ICUIO_LIBRARIES NAMES icuio REQUIRED)
find_library(ICUIN_LIBRARIES NAMES icuin REQUIRED)
find_library(ICUUC_LIBRARIES NAMES icuuc REQUIRED)
find_library(ICUDT_LIBRARIES NAMES icudt REQUIRED)
find_library(ICUTU_LIBRARIES NAMES icutu REQUIRED)
find_library(ICONV_LIBRARIES NAMES iconv REQUIRED)
set(ICU_LIBRARIES ${ICUIO_LIBRARIES} ${ICUIN_LIBRARIES} ${ICUUC_LIBRARIES} ${ICUDT_LIBRARIES} ${ICUTU_LIBRARIES} ${ICONV_LIBRARIES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_LIB_SUFFIXES})
endif()
elseif(APPLE OR OPENBSD OR ANDROID)
set(EXTRA_LIBRARIES "")
elseif(FREEBSD)
set(EXTRA_LIBRARIES execinfo)
set(EXTRA_LIBRARIES execinfo elf)
elseif(DRAGONFLY)
find_library(COMPAT compat)
set(EXTRA_LIBRARIES execinfo ${COMPAT})
elseif(CMAKE_SYSTEM_NAME MATCHES "(SunOS|Solaris)")
set(EXTRA_LIBRARIES socket nsl resolv)
elseif(NOT MSVC AND NOT DEPENDS)
elseif(NOT DEPENDS)
find_library(RT rt)
set(EXTRA_LIBRARIES ${RT})
find_library(Z z)
set(EXTRA_LIBRARIES ${RT} ${Z})
endif()
list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
@@ -1124,7 +1101,7 @@ list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
if (HIDAPI_FOUND OR LibUSB_COMPILE_TEST_PASSED)
if (APPLE)
if(DEPENDS)
list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework AppKit -framework IOKit")
list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework AppKit -framework IOKit -framework Security")
else()
find_library(COREFOUNDATION CoreFoundation)
find_library(APPKIT AppKit)
@@ -1139,7 +1116,9 @@ if (HIDAPI_FOUND OR LibUSB_COMPILE_TEST_PASSED)
endif()
endif()
option(USE_READLINE "Build with GNU readline support." ON)
if(NOT OPENBSD)
option(USE_READLINE "Build with GNU readline support." ON)
endif()
if(USE_READLINE AND NOT DEPENDS)
find_package(Readline)
if(READLINE_FOUND AND GNU_READLINE_FOUND)
@@ -1160,52 +1139,20 @@ elseif(USE_READLINE AND DEPENDS AND NOT MINGW)
set(EPEE_READLINE epee_readline)
endif()
if(ANDROID)
set(ATOMIC libatomic.a)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=user-defined-warnings")
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND ARCH_WIDTH EQUAL "32" AND NOT IOS AND NOT FREEBSD)
find_library(ATOMIC atomic)
if (ATOMIC_FOUND)
list(APPEND EXTRA_LIBRARIES ${ATOMIC})
endif()
if(STATIC)
set(sodium_USE_STATIC_LIBS ON)
endif()
find_package(Sodium REQUIRED)
find_path(ZMQ_INCLUDE_PATH zmq.h)
find_library(ZMQ_LIB zmq)
find_library(PGM_LIBRARY pgm)
find_library(NORM_LIBRARY norm)
find_library(GSSAPI_LIBRARY gssapi_krb5)
find_library(PROTOLIB_LIBRARY protolib)
find_library(SODIUM_LIBRARY sodium)
if(NOT ZMQ_INCLUDE_PATH)
message(FATAL_ERROR "Could not find required header zmq.h")
endif()
if(NOT ZMQ_LIB)
message(FATAL_ERROR "Could not find required libzmq")
endif()
if(PGM_LIBRARY)
set(ZMQ_LIB "${ZMQ_LIB};${PGM_LIBRARY}")
endif()
if(NORM_LIBRARY)
set(ZMQ_LIB "${ZMQ_LIB};${NORM_LIBRARY}")
endif()
if(GSSAPI_LIBRARY)
set(ZMQ_LIB "${ZMQ_LIB};${GSSAPI_LIBRARY}")
endif()
if(PROTOLIB_LIBRARY)
set(ZMQ_LIB "${ZMQ_LIB};${PROTOLIB_LIBRARY}")
endif()
if(SODIUM_LIBRARY)
set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}")
endif()
find_package(PkgConfig REQUIRED)
pkg_check_modules(libzmq REQUIRED IMPORTED_TARGET libzmq)
include(external/supercop/functions.cmake) # place after setting flags and before src directory inclusion
add_subdirectory(contrib)
add_subdirectory(src)
find_package(PythonInterp)
option(ENABLE_FUZZ_TEST "Enable fuzz testing." OFF)
if(BUILD_TESTS)
message(STATUS "Building tests")
add_subdirectory(tests)

View File

@@ -1,4 +1,4 @@
# Portions Copyright (c) 2017-2022, The Monero Project
# Portions Copyright (c) 2017-2024, The Monero Project
# This file is based off of the https://code.google.com/archive/p/ios-cmake/
# It has been altered for Monero iOS development
#

View File

@@ -1,23 +1,17 @@
# Multistage docker build, requires docker 17.05
# builder stage
FROM ubuntu:20.04 as builder
FROM ubuntu:20.04 AS builder
RUN set -ex && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends --yes install \
automake \
autotools-dev \
bsdmainutils \
build-essential \
ca-certificates \
ccache \
cmake \
curl \
git \
libtool \
pkg-config \
gperf
pkg-config
WORKDIR /src
COPY . .

View File

@@ -754,7 +754,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.
INPUT = .
INPUT = contrib/epee external/easylogging++ src
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -805,7 +805,7 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*
EXCLUDE_PATTERNS = */build/* */contrib/depends/*
EXCLUDE_PATTERNS = */src/crypto/crypto_ops_builder/ref10*
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
@@ -1074,7 +1074,7 @@ HTML_STYLESHEET =
# defined cascading style sheet that is included after the standard style sheets
# created by doxygen. Using this option one can overrule certain style aspects.
# This is preferred over using HTML_STYLESHEET since it does not replace the
# standard style sheet and is therefor more robust against future updates.
# standard style sheet and is therefore more robust against future updates.
# Doxygen will copy the style sheet file to the output directory. For an example
# see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

View File

@@ -1,4 +1,4 @@
Copyright (c) 2014-2022, The Monero Project
Copyright (c) 2014-2024, The Monero Project
All rights reserved.

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2024, The Monero Project
#
# All rights reserved.
#
@@ -48,14 +48,14 @@ all: release-all
depends:
cd contrib/depends && $(MAKE) HOST=$(target) && cd ../.. && mkdir -p build/$(target)/release
cd build/$(target)/release && cmake -DCMAKE_TOOLCHAIN_FILE=$(CURDIR)/contrib/depends/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
cd build/$(target)/release && USE_DEVICE_TREZOR_MANDATORY=1 cmake -DCMAKE_TOOLCHAIN_FILE=$(CURDIR)/contrib/depends/$(target)/share/toolchain.cmake ../../.. && $(MAKE)
cmake-debug:
mkdir -p $(builddir)/debug
cd $(builddir)/debug && cmake -D CMAKE_BUILD_TYPE=Debug $(topdir)
debug: cmake-debug
cd $(builddir)/debug && $(MAKE)
cd $(builddir)/debug && cmake --build .
# Temporarily disable some tests:
# * libwallet_api_tests fail (Issue #895)
@@ -75,24 +75,12 @@ debug-all:
mkdir -p $(builddir)/debug
cd $(builddir)/debug && cmake -D BUILD_TESTS=ON -D BUILD_SHARED_LIBS=OFF -D CMAKE_BUILD_TYPE=Debug $(topdir) && $(MAKE)
debug-static-all:
mkdir -p $(builddir)/debug
cd $(builddir)/debug && cmake -D BUILD_TESTS=ON -D STATIC=ON -D CMAKE_BUILD_TYPE=Debug $(topdir) && $(MAKE)
debug-static-win64:
mkdir -p $(builddir)/debug
cd $(builddir)/debug && cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) $(topdir) && $(MAKE)
debug-static-win32:
mkdir -p $(builddir)/debug
cd $(builddir)/debug && cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="win-x32" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/32-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) $(topdir) && $(MAKE)
cmake-release:
mkdir -p $(builddir)/release
cd $(builddir)/release && cmake -D CMAKE_BUILD_TYPE=Release $(topdir)
release: cmake-release
cd $(builddir)/release && $(MAKE)
cd $(builddir)/release && cmake --build .
release-test:
mkdir -p $(builddir)/release
@@ -104,60 +92,12 @@ release-all:
release-static:
mkdir -p $(builddir)/release
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="default" -D CMAKE_BUILD_TYPE=Release $(topdir) && cmake --build .
coverage:
mkdir -p $(builddir)/debug
cd $(builddir)/debug && cmake -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Debug -D COVERAGE=ON $(topdir) && $(MAKE) && $(MAKE) test
# Targets for specific prebuilt builds which will be advertised for updates by their build tag
release-static-linux-armv6:
mkdir -p $(builddir)/release
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv6zk" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv6" $(topdir) && $(MAKE)
release-static-linux-armv7:
mkdir -p $(builddir)/release
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv7" $(topdir) && $(MAKE)
release-static-android-armv7:
mkdir -p $(builddir)/release/translations
cd $(builddir)/release/translations && cmake ../../../translations && $(MAKE)
cd $(builddir)/release && CC=arm-linux-androideabi-clang CXX=arm-linux-androideabi-clang++ cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D ANDROID=true -D BUILD_TAG="android-armv7" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARM_MODE=ON -D CMAKE_ANDROID_ARCH_ABI="armeabi-v7a" ../.. && $(MAKE)
release-static-android-armv8:
mkdir -p $(builddir)/release/translations
cd $(builddir)/release/translations && cmake ../../../translations && $(MAKE)
cd $(builddir)/release && CC=aarch64-linux-android-clang CXX=aarch64-linux-android-clang++ cmake -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D ANDROID=true -D BUILD_TAG="android-armv8" -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARCH_ABI="arm64-v8a" ../.. && $(MAKE)
release-static-linux-armv8:
mkdir -p $(builddir)/release
cd $(builddir)/release && cmake -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv8" $(topdir) && $(MAKE)
release-static-linux-x86_64:
mkdir -p $(builddir)/release
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-x64" $(topdir) && $(MAKE)
release-static-freebsd-x86_64:
mkdir -p $(builddir)/release
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="freebsd-x64" $(topdir) && $(MAKE)
release-static-mac-x86_64:
mkdir -p $(builddir)/release
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="mac-x64" $(topdir) && $(MAKE)
release-static-linux-i686:
mkdir -p $(builddir)/release
cd $(builddir)/release && cmake -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-x86" $(topdir) && $(MAKE)
release-static-win64:
mkdir -p $(builddir)/release
cd $(builddir)/release && cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) $(topdir) && $(MAKE)
release-static-win32:
mkdir -p $(builddir)/release
cd $(builddir)/release && cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x32" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/32-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) $(topdir) && $(MAKE)
fuzz:
mkdir -p $(builddir)/fuzz
cd $(builddir)/fuzz && cmake -D STATIC=ON -D SANITIZE=ON -D BUILD_TESTS=ON -D USE_LTO=OFF -D CMAKE_C_COMPILER=afl-gcc -D CMAKE_CXX_COMPILER=afl-g++ -D ARCH="x86-64" -D CMAKE_BUILD_TYPE=fuzz -D BUILD_TAG="linux-x64" $(topdir) && $(MAKE)

258
README.md
View File

@@ -1,6 +1,6 @@
# Monero
Copyright (c) 2014-2022 The Monero Project.
Copyright (c) 2014-2024, The Monero Project
Portions Copyright (c) 2012-2013 The Cryptonote developers.
## Table of Contents
@@ -20,6 +20,7 @@ Portions Copyright (c) 2012-2013 The Cryptonote developers.
- [Release staging schedule and protocol](#release-staging-schedule-and-protocol)
- [Compiling Monero from source](#compiling-monero-from-source)
- [Dependencies](#dependencies)
- [Guix builds](#guix-builds)
- [Internationalization](#Internationalization)
- [Using Tor](#using-tor)
- [Pruning](#Pruning)
@@ -29,7 +30,6 @@ Portions Copyright (c) 2012-2013 The Cryptonote developers.
## Development resources
- Web: [getmonero.org](https://getmonero.org)
- Forum: [forum.getmonero.org](https://forum.getmonero.org)
- Mail: [dev@getmonero.org](mailto:dev@getmonero.org)
- GitHub: [https://github.com/monero-project/monero](https://github.com/monero-project/monero)
- IRC: [#monero-dev on Libera](https://web.libera.chat/#monero-dev)
@@ -102,9 +102,7 @@ The Bitcoin donation address is:
Core development funding and/or some supporting services are also graciously provided by [sponsors](https://www.getmonero.org/community/sponsorships/):
[<img width="150" src="https://www.getmonero.org/img/sponsors/tarilabs.png"/>](https://tarilabs.com/)
[<img width="150" src="https://www.getmonero.org/img/sponsors/globee.png"/>](https://globee.com/)
[<img width="150" src="https://www.getmonero.org/img/sponsors/symas.png"/>](https://symas.com/)
[<img width="150" src="https://www.getmonero.org/img/sponsors/forked_logo.png"/>](http://www.forked.net/)
[<img width="150" src="https://www.getmonero.org/img/sponsors/macstadium.png"/>](https://www.macstadium.com/)
There are also several mining pools that kindly donate a portion of their fees, [a list of them can be found on our Bitcointalk post](https://bitcointalk.org/index.php?topic=583449.0).
@@ -117,10 +115,11 @@ See [LICENSE](LICENSE).
If you want to help out, see [CONTRIBUTING](docs/CONTRIBUTING.md) for a set of guidelines.
## Scheduled software upgrades
## Scheduled software/network upgrades
Monero uses a fixed-schedule software upgrade (hard fork) mechanism to implement new features. This means that users of Monero (end users and service providers) should run current versions and upgrade their software on a regular schedule. Software upgrades occur during the months of April and October. The required software for these upgrades will be available prior to the scheduled date. Please check the repository prior to this date for the proper Monero software version. Below is the historical schedule and the projected schedule for the next upgrade.
Dates are provided in the format YYYY-MM-DD.
Monero uses a scheduled software/network upgrade (hard fork) mechanism to implement new features into the Monero software and network. This means that users of Monero (end users and service providers) should run current versions and upgrade their software when new releases are available. Software upgrades occur when new features are developed and implemented in the codebase. Network upgrades occur in tandem with software upgrades that modify the consensus rules of the Monero network. The required software for network upgrades will be available prior to the scheduled network upgrade date. Please check the repository prior to this date for the proper Monero software version. Below is the historical schedule and the projected schedule for the next upgrade.
Dates are provided in the format YYYY-MM-DD. The "Minimum" is the software version that follows the new consensus rules. The "Recommended" version may include bug fixes and other new features that do not affect the consensus rules.
| Software upgrade block height | Date | Fork version | Minimum Monero version | Recommended Monero version | Details |
@@ -138,8 +137,8 @@ Dates are provided in the format YYYY-MM-DD.
| 1978433 | 2019-11-30 | v12 | v0.15.0.0 | v0.16.0.0 | New PoW based on RandomX, only allow >= 2 outputs, change to the block median used to calculate penalty, v1 coinbases are forbidden, rct sigs in coinbase forbidden, 10 block lock time for incoming outputs
| 2210000 | 2020-10-17 | v13 | v0.17.0.0 | v0.17.3.2 | New CLSAG transaction format
| 2210720 | 2020-10-18 | v14 | v0.17.1.1 | v0.17.3.2 | forbid old MLSAG transaction format
| 2688888 | 2022-08-13 | v15 | v0.18.0.0 | v0.18.0.0 | ringsize = 16, bulletproofs+, view tags, adjusted dynamic block weight algorithm
| 2689608 | 2022-08-14 | v16 | v0.18.0.0 | v0.18.0.0 | forbid old v14 transaction format
| 2688888 | 2022-08-13 | v15 | v0.18.0.0 | v0.18.4.3 | ringsize = 16, bulletproofs+, view tags, adjusted dynamic block weight algorithm
| 2689608 | 2022-08-14 | v16 | v0.18.0.0 | v0.18.4.3 | forbid old v14 transaction format
| XXXXXXX | XXX-XX-XX | XXX | vX.XX.X.X | vX.XX.X.X | XXX |
X's indicate that these details have not been determined as of commit date.
@@ -165,22 +164,19 @@ library archives (`.a`).
| Dep | Min. version | Vendored | Debian/Ubuntu pkg | Arch pkg | Void pkg | Fedora pkg | Optional | Purpose |
| ------------ | ------------- | -------- | -------------------- | ------------ | ------------------ | ------------------- | -------- | --------------- |
| GCC | 5 | NO | `build-essential` | `base-devel` | `base-devel` | `gcc` | NO | |
| CMake | 3.5 | NO | `cmake` | `cmake` | `cmake` | `cmake` | NO | |
| GCC | 7 | NO | `build-essential` | `base-devel` | `base-devel` | `gcc` | NO | |
| CMake | 3.10 | NO | `cmake` | `cmake` | `cmake` | `cmake` | NO | |
| pkg-config | any | NO | `pkg-config` | `base-devel` | `base-devel` | `pkgconf` | NO | |
| Boost | 1.58 | NO | `libboost-all-dev` | `boost` | `boost-devel` | `boost-devel` | NO | C++ libraries |
| OpenSSL | basically any | NO | `libssl-dev` | `openssl` | `libressl-devel` | `openssl-devel` | NO | sha256 sum |
| Boost | 1.66 | NO | `libboost-all-dev` | `boost` | `boost-devel` | `boost-devel` | NO | C++ libraries |
| OpenSSL | basically any | NO | `libssl-dev` | `openssl` | `openssl-devel` | `openssl-devel` | NO | sha256 sum |
| libzmq | 4.2.0 | NO | `libzmq3-dev` | `zeromq` | `zeromq-devel` | `zeromq-devel` | NO | ZeroMQ library |
| OpenPGM | ? | NO | `libpgm-dev` | `libpgm` | | `openpgm-devel` | NO | For ZeroMQ |
| libnorm[2] | ? | NO | `libnorm-dev` | | | | YES | For ZeroMQ |
| libunbound | 1.4.16 | YES | `libunbound-dev` | `unbound` | `unbound-devel` | `unbound-devel` | NO | DNS resolver |
| libunbound | 1.4.16 | NO | `libunbound-dev` | `unbound` | `unbound-devel` | `unbound-devel` | NO | DNS resolver |
| libsodium | ? | NO | `libsodium-dev` | `libsodium` | `libsodium-devel` | `libsodium-devel` | NO | cryptography |
| libunwind | any | NO | `libunwind8-dev` | `libunwind` | `libunwind-devel` | `libunwind-devel` | YES | Stack traces |
| liblzma | any | NO | `liblzma-dev` | `xz` | `liblzma-devel` | `xz-devel` | YES | For libunwind |
| libreadline | 6.3.0 | NO | `libreadline6-dev` | `readline` | `readline-devel` | `readline-devel` | YES | Input editing |
| ldns | 1.6.17 | NO | `libldns-dev` | `ldns` | `libldns-devel` | `ldns-devel` | YES | SSL toolkit |
| expat | 1.1 | NO | `libexpat1-dev` | `expat` | `expat-devel` | `expat-devel` | YES | XML parsing |
| GTest | 1.5 | YES | `libgtest-dev`[1] | `gtest` | `gtest-devel` | `gtest-devel` | YES | Test suite |
| GTest | 1.5 | YES | `libgtest-dev` | `gtest` | `gtest-devel` | `gtest-devel` | YES | Test suite |
| ccache | any | NO | `ccache` | `ccache` | `ccache` | `ccache` | YES | Compil. cache |
| Doxygen | any | NO | `doxygen` | `doxygen` | `doxygen` | `doxygen` | YES | Documentation |
| Graphviz | any | NO | `graphviz` | `graphviz` | `graphviz` | `graphviz` | YES | Documentation |
@@ -191,37 +187,26 @@ library archives (`.a`).
| protoc | ? | NO | `protobuf-compiler` | `protobuf` | `protobuf` | `protobuf-compiler` | YES | Hardware wallet |
| libudev | ? | NO | `libudev-dev` | `systemd` | `eudev-libudev-devel` | `systemd-devel` | YES | Hardware wallet |
[1] On Debian/Ubuntu `libgtest-dev` only includes sources and headers. You must
build the library binary manually. This can be done with the following command `sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake . && sudo make`
then:
* on Debian:
`sudo mv libg* /usr/lib/`
* on Ubuntu:
`sudo mv lib/libg* /usr/lib/`
[2] libnorm-dev is needed if your zmq library was built with libnorm, and not needed otherwise
Install all dependencies at once on Debian/Ubuntu:
```
sudo apt update && sudo apt install build-essential cmake pkg-config libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev libpgm-dev qttools5-dev-tools libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler libudev-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev python3 ccache doxygen graphviz
sudo apt update && sudo apt install build-essential cmake pkg-config libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libexpat1-dev qttools5-dev-tools libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler libudev-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-program-options-dev libboost-regex-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev python3 ccache doxygen graphviz git curl autoconf libtool gperf
```
Install all dependencies at once on Arch:
```
sudo pacman -Syu --needed base-devel cmake boost openssl zeromq libpgm unbound libsodium libunwind xz readline ldns expat gtest python3 ccache doxygen graphviz qt5-tools hidapi libusb protobuf systemd
sudo pacman -Syu --needed base-devel cmake boost openssl zeromq unbound libsodium libunwind xz readline expat python3 ccache doxygen graphviz qt5-tools hidapi libusb protobuf systemd
```
Install all dependencies at once on Fedora:
```
sudo dnf install gcc gcc-c++ cmake pkgconf boost-devel openssl-devel zeromq-devel openpgm-devel unbound-devel libsodium-devel libunwind-devel xz-devel readline-devel ldns-devel expat-devel gtest-devel ccache doxygen graphviz qt5-linguist hidapi-devel libusbx-devel protobuf-devel protobuf-compiler systemd-devel
sudo dnf install gcc gcc-c++ cmake pkgconf boost-devel openssl-devel zeromq-devel unbound-devel libsodium-devel libunwind-devel xz-devel readline-devel expat-devel ccache doxygen graphviz qt5-linguist hidapi-devel libusbx-devel protobuf-devel protobuf-compiler systemd-devel
```
Install all dependencies at once on openSUSE:
```
sudo zypper ref && sudo zypper in cppzmq-devel ldns-devel libboost_chrono-devel libboost_date_time-devel libboost_filesystem-devel libboost_locale-devel libboost_program_options-devel libboost_regex-devel libboost_serialization-devel libboost_system-devel libboost_thread-devel libexpat-devel libminiupnpc-devel libsodium-devel libunwind-devel unbound-devel cmake doxygen ccache fdupes gcc-c++ libevent-devel libopenssl-devel pkgconf-pkg-config readline-devel xz-devel libqt5-qttools-devel patterns-devel-C-C++-devel_C_C++
sudo zypper ref && sudo zypper in cppzmq-devel libboost_chrono-devel libboost_date_time-devel libboost_filesystem-devel libboost_locale-devel libboost_program_options-devel libboost_regex-devel libboost_serialization-devel libboost_system-devel libboost_thread-devel libexpat-devel libminiupnpc-devel libsodium-devel libunwind-devel unbound-devel cmake doxygen ccache fdupes gcc-c++ libevent-devel libopenssl-devel pkgconf-pkg-config readline-devel xz-devel libqt5-qttools-devel patterns-devel-C-C++-devel_C_C++
```
Install all dependencies at once on macOS with the provided Brewfile:
@@ -301,14 +286,6 @@ invokes cmake commands as needed.
make debug
```
* **Optional**: to build statically-linked binaries:
```bash
make release-static
```
Dependencies need to be built with -fPIC. Static libraries usually aren't, so you may have to build them yourself with -fPIC. Refer to their documentation for how to build them.
* **Optional**: build documentation in `doc/html` (omit `HAVE_DOT=YES` if `graphviz` is not installed):
```bash
@@ -323,13 +300,13 @@ Dependencies need to be built with -fPIC. Static libraries usually aren't, so yo
#### On the Raspberry Pi
Tested on a Raspberry Pi Zero with a clean install of minimal Raspbian Stretch (2017-09-07 or later) from https://www.raspberrypi.org/downloads/raspbian/. If you are using Raspian Jessie, [please see note in the following section](#note-for-raspbian-jessie-users).
Tested on a Raspberry Pi 5B with a clean installation of Raspberry Pi OS (64-bit) with Debian 12 from https://www.raspberrypi.com/software/operating-systems/.
* `apt-get update && apt-get upgrade` to install all of the latest software
* `apt-get update && apt-get upgrade` to install the latest software
* Install the dependencies for Monero from the 'Debian' column in the table above.
* Increase the system swap size:
* **Optional**: increase the system swap size:
```bash
sudo /etc/init.d/dphys-swapfile stop
@@ -343,9 +320,9 @@ Tested on a Raspberry Pi Zero with a clean install of minimal Raspbian Stretch (
* Clone Monero and checkout the most recent release version:
```bash
git clone https://github.com/monero-project/monero.git
git clone --recursive https://github.com/monero-project/monero.git
cd monero
git checkout v0.18.0.0
git checkout v0.18.4.1
```
* Build:
@@ -354,7 +331,7 @@ Tested on a Raspberry Pi Zero with a clean install of minimal Raspbian Stretch (
USE_SINGLE_BUILDDIR=1 make release
```
* Wait 4-6 hours
* Wait a few hours
* The resulting executables can be found in `build/release/bin`
@@ -366,46 +343,9 @@ Tested on a Raspberry Pi Zero with a clean install of minimal Raspbian Stretch (
* You may wish to reduce the size of the swap file after the build has finished, and delete the boost directory from your home directory
#### *Note for Raspbian Jessie users:*
If you are using the older Raspbian Jessie image, compiling Monero is a bit more complicated. The version of Boost available in the Debian Jessie repositories is too old to use with Monero, and thus you must compile a newer version yourself. The following explains the extra steps and has been tested on a Raspberry Pi 2 with a clean install of minimal Raspbian Jessie.
* As before, `apt-get update && apt-get upgrade` to install all of the latest software, and increase the system swap size
```bash
sudo /etc/init.d/dphys-swapfile stop
sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=2048
sudo /etc/init.d/dphys-swapfile start
```
* Then, install the dependencies for Monero except for `libunwind` and `libboost-all-dev`
* Install the latest version of boost (this may first require invoking `apt-get remove --purge libboost*-dev` to remove a previous version if you're not using a clean install):
```bash
cd
wget https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2
tar xvfo boost_1_72_0.tar.bz2
cd boost_1_72_0
./bootstrap.sh
sudo ./b2
```
* Wait ~8 hours
```bash
sudo ./bjam cxxflags=-fPIC cflags=-fPIC -a install
```
* Wait ~4 hours
* From here, follow the [general Raspberry Pi instructions](#on-the-raspberry-pi) from the "Clone Monero and checkout most recent release version" step.
#### On Windows:
Binaries for Windows are built on Windows using the MinGW toolchain within
Binaries for Windows can be built on Windows using the MinGW toolchain within
[MSYS2 environment](https://www.msys2.org). The MSYS2 environment emulates a
POSIX system. The toolchain runs within the environment and *cross-compiles*
binaries that can run outside of the environment as a regular Windows
@@ -413,40 +353,21 @@ application.
**Preparing the build environment**
* Download and install the [MSYS2 installer](https://www.msys2.org), either the 64-bit or the 32-bit package, depending on your system.
* Open the MSYS shell via the `MSYS2 Shell` shortcut
* Download and install the [MSYS2 installer](https://www.msys2.org). Installing MSYS2 requires 64-bit Windows 10 or newer.
* Open the MSYS shell via the `MSYS2 MSYS` shortcut
* Update packages using pacman:
```bash
pacman -Syu
```
* Exit the MSYS shell using Alt+F4
* Edit the properties for the `MSYS2 Shell` shortcut changing "msys2_shell.bat" to "msys2_shell.cmd -mingw64" for 64-bit builds or "msys2_shell.cmd -mingw32" for 32-bit builds
* Restart MSYS shell via modified shortcut and update packages again using pacman:
```bash
pacman -Syu
```
* Install dependencies:
To build for 64-bit Windows:
```bash
pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-unbound
```
To build for 32-bit Windows:
```bash
pacman -S mingw-w64-i686-toolchain make mingw-w64-i686-cmake mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-zeromq mingw-w64-i686-libsodium mingw-w64-i686-hidapi mingw-w64-i686-unbound
```
* Open the MingW shell via `MinGW-w64-Win64 Shell` shortcut on 64-bit Windows
or `MinGW-w64-Win64 Shell` shortcut on 32-bit Windows. Note that if you are
running 64-bit Windows, you will have both 64-bit and 32-bit MinGW shells.
* Open the MingW shell via `MSYS2 MINGW64` shortcut.
**Cloning**
@@ -464,39 +385,28 @@ application.
cd monero
```
* If you would like a specific [version/tag](https://github.com/monero-project/monero/tags), do a git checkout for that version. eg. 'v0.18.0.0'. If you don't care about the version and just want binaries from master, skip this step:
* If you would like a specific [version/tag](https://github.com/monero-project/monero/tags), do a git checkout for that version. eg. 'v0.18.4.1'. If you don't care about the version and just want binaries from master, skip this step:
```bash
git checkout v0.18.0.0
git checkout v0.18.4.1
```
* If you are on a 64-bit system, run:
* To build Monero, run:
```bash
make release-static-win64
make release-static -j $(nproc)
```
* If you are on a 32-bit system, run:
The resulting executables can be found in `build/release/bin`
* **Optional**: to build Windows binaries suitable for debugging, run:
```bash
make release-static-win32
make debug -j $(nproc)
```
* The resulting executables can be found in `build/release/bin`
* **Optional**: to build Windows binaries suitable for debugging on a 64-bit system, run:
```bash
make debug-static-win64
```
* **Optional**: to build Windows binaries suitable for debugging on a 32-bit system, run:
```bash
make debug-static-win32
```
* The resulting executables can be found in `build/debug/bin`
The resulting executables can be found in `build/debug/bin`
### On FreeBSD:
@@ -507,12 +417,12 @@ Monero is also available as a port or package as `monero-cli`.
### On OpenBSD:
You will need to add a few packages to your system. `pkg_add cmake gmake zeromq libiconv boost`.
You will need to add a few packages to your system. `pkg_add cmake gmake zeromq libiconv boost libunbound`.
The `doxygen` and `graphviz` packages are optional and require the xbase set.
Running the test suite also requires `py-requests` package.
Running the test suite also requires `py3-requests` package.
Build monero: `env DEVELOPER_LOCAL_TOOLS=1 BOOST_ROOT=/usr/local gmake release-static`
Build monero: `gmake`
Note: you may encounter the following error when compiling the latest version of Monero as a normal user:
@@ -544,27 +454,26 @@ cd ../..
Then you can run make as usual.
### Building portable statically linked binaries
By default, in either dynamically or statically linked builds, binaries target the specific host processor on which the build happens and are not portable to other processors. Portable binaries can be built using the following targets:
* ```make release-static-linux-x86_64``` builds binaries on Linux on x86_64 portable across POSIX systems on x86_64 processors
* ```make release-static-linux-i686``` builds binaries on Linux on x86_64 or i686 portable across POSIX systems on i686 processors
* ```make release-static-linux-armv8``` builds binaries on Linux portable across POSIX systems on armv8 processors
* ```make release-static-linux-armv7``` builds binaries on Linux portable across POSIX systems on armv7 processors
* ```make release-static-linux-armv6``` builds binaries on Linux portable across POSIX systems on armv6 processors
* ```make release-static-win64``` builds binaries on 64-bit Windows portable across 64-bit Windows systems
* ```make release-static-win32``` builds binaries on 64-bit or 32-bit Windows portable across 32-bit Windows systems
### Cross Compiling
You can also cross-compile static binaries on Linux for Windows and macOS with the `depends` system.
* ```make depends target=x86_64-linux-gnu``` for 64-bit linux binaries.
* ```make depends target=x86_64-w64-mingw32``` for 64-bit windows binaries.
* Requires: `python3 g++-mingw-w64-x86-64 wine1.6 bc`
* ```make depends target=x86_64-apple-darwin11``` for macOS binaries.
* Requires: `cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev`
* Requires: `g++-mingw-w64-x86-64`
* You also need to run:
```shell
update-alternatives --set x86_64-w64-mingw32-g++ $(which x86_64-w64-mingw32-g++-posix) && \
update-alternatives --set x86_64-w64-mingw32-gcc $(which x86_64-w64-mingw32-gcc-posix)
```
* ```make depends target=x86_64-apple-darwin``` for Intel macOS binaries.
* Requires: `clang-18 lld-18`
* ```make depends target=arm64-apple-darwin``` for Apple Silicon macOS binaries.
* Requires: `clang-18 lld-18`
* You also need to run:
```shell
export PATH="/usr/lib/llvm-18/bin/:$PATH"
```
* ```make depends target=i686-linux-gnu``` for 32-bit linux binaries.
* Requires: `g++-multilib bc`
* ```make depends target=i686-w64-mingw32``` for 32-bit windows binaries.
@@ -585,7 +494,21 @@ The required packages are the names for each toolchain on apt. Depending on your
Using `depends` might also be easier to compile Monero on Windows than using MSYS. Activate Windows Subsystem for Linux (WSL) with a distro (for example Ubuntu), install the apt build-essentials and follow the `depends` steps as depicted above.
The produced binaries still link libc dynamically. If the binary is compiled on a current distribution, it might not run on an older distribution with an older installation of libc. Passing `-DBACKCOMPAT=ON` to cmake will make sure that the binary will run on systems having at least libc version 2.17.
The produced binaries still link libc dynamically. If the binary is compiled on a current distribution, it might not run on an older distribution with an older installation of libc.
### Trezor hardware wallet support
If you have an issue with building Monero with Trezor support, you can disable it by setting `USE_DEVICE_TREZOR=OFF`, e.g.,
```bash
USE_DEVICE_TREZOR=OFF make release
```
For more information, please check out Trezor [src/device_trezor/README.md](src/device_trezor/README.md).
### Guix builds
See [contrib/guix/README.md](contrib/guix/README.md).
## Installing Monero from a package
@@ -593,30 +516,27 @@ The produced binaries still link libc dynamically. If the binary is compiled on
Packages are available for
* Debian Buster
See the [instructions in the whonix/monero-gui repository](https://gitlab.com/whonix/monero-gui#how-to-install-monero-using-apt-get)
* Debian Bullseye and Sid
* Debian 12 (Bookworm) or later
```bash
sudo apt install monero
```
More info and versions in the [Debian package tracker](https://tracker.debian.org/pkg/monero).
More info and versions in the [Debian package tracker](https://tracker.debian.org/pkg/monero).
* Arch Linux [(via Community packages)](https://www.archlinux.org/packages/community/x86_64/monero/):
* Arch Linux:
```bash
sudo pacman -S monero
```
* Void Linux:
* NixOS:
```bash
xbps-install -S monero
nix-shell -p monero-cli
```
* GuixSD
* Guix:
```bash
guix package -i monero
@@ -632,6 +552,12 @@ More info and versions in the [Debian package tracker](https://tracker.debian.or
emerge net-p2p/monero
```
* Alpine Linux:
```bash
apk add monero
```
* macOS [(homebrew)](https://brew.sh/)
```bash
brew install monero
@@ -653,8 +579,8 @@ More info and versions in the [Debian package tracker](https://tracker.debian.or
docker run -it -d -v /monero/chain:/home/monero/.bitmonero -v /monero/wallet:/wallet -p 18080:18080 monero
```
* The build needs 3 GB space.
* Wait one hour or more
* The build needs 3 GB space.
* Wait one hour or more
Packaging for your favorite distribution would be a welcome contribution!
@@ -709,25 +635,13 @@ setting the following configuration parameters and environment variables:
monerod.conf to disable listening for connections on external interfaces.
* `--no-igd` on the command line or `no-igd=1` in monerod.conf to disable IGD
(UPnP port forwarding negotiation), which is pointless with Tor.
* `DNS_PUBLIC=tcp` or `DNS_PUBLIC=tcp://x.x.x.x` where x.x.x.x is the IP of the
desired DNS server, for DNS requests to go over TCP, so that they are routed
through Tor. When IP is not specified, monerod uses the default list of
servers defined in [src/common/dns_utils.cpp](src/common/dns_utils.cpp).
* `TORSOCKS_ALLOW_INBOUND=1` to tell torsocks to allow monerod to bind to interfaces
to accept connections from the wallet. On some Linux systems, torsocks
allows binding to localhost by default, so setting this variable is only
necessary to allow binding to local LAN/VPN interfaces to allow wallets to
connect from remote hosts. On other systems, it may be needed for local wallets
as well.
* Do NOT pass `--detach` when running through torsocks with systemd, (see
[utils/systemd/monerod.service](utils/systemd/monerod.service) for details).
* If you use the wallet with a Tor daemon via the loopback IP (eg, 127.0.0.1:9050),
then use `--untrusted-daemon` unless it is your own hidden service.
Example command line to start monerod through Tor:
```bash
DNS_PUBLIC=tcp torsocks monerod --p2p-bind-ip 127.0.0.1 --no-igd
monerod --proxy 127.0.0.1:9050 --p2p-bind-ip 127.0.0.1 --no-igd
```
A helper script is in contrib/tor/monero-over-tor.sh. It assumes Tor is installed

View File

@@ -1,50 +0,0 @@
# Copyright (c) 2014-2022, The Monero Project
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other
# materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be
# used to endorse or promote products derived from this software without specific
# prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if (NOT CMAKE_HOST_WIN32)
set (CMAKE_SYSTEM_NAME Windows)
endif()
set (GCC_PREFIX i686-w64-mingw32)
set (CMAKE_C_COMPILER ${GCC_PREFIX}-gcc)
set (CMAKE_CXX_COMPILER ${GCC_PREFIX}-g++)
set (CMAKE_AR ar CACHE FILEPATH "" FORCE)
set (CMAKE_NM nm CACHE FILEPATH "" FORCE)
set (CMAKE_LINKER ld CACHE FILEPATH "" FORCE)
#set (CMAKE_RANLIB ${GCC_PREFIX}-gcc-ranlib CACHE FILEPATH "" FORCE)
set (CMAKE_RC_COMPILER windres)
set (CMAKE_FIND_ROOT_PATH "${MSYS2_FOLDER}/mingw32")
# Ensure cmake doesn't find things in the wrong places
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target
set (MINGW_FLAG "-m32")
set (USE_LTO_DEFAULT false)

View File

@@ -1,50 +0,0 @@
# Copyright (c) 2014-2022, The Monero Project
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other
# materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be
# used to endorse or promote products derived from this software without specific
# prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if (NOT CMAKE_HOST_WIN32)
set (CMAKE_SYSTEM_NAME Windows)
endif()
set (GCC_PREFIX x86_64-w64-mingw32)
set (CMAKE_C_COMPILER ${GCC_PREFIX}-gcc)
set (CMAKE_CXX_COMPILER ${GCC_PREFIX}-g++)
set (CMAKE_AR ar CACHE FILEPATH "" FORCE)
set (CMAKE_NM nm CACHE FILEPATH "" FORCE)
set (CMAKE_LINKER ld CACHE FILEPATH "" FORCE)
#set (CMAKE_RANLIB ${GCC_PREFIX}-gcc-ranlib CACHE FILEPATH "" FORCE)
set (CMAKE_RC_COMPILER windres)
set (CMAKE_FIND_ROOT_PATH "${MSYS2_FOLDER}/mingw64")
# Ensure cmake doesn't find things in the wrong places
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target
set (MINGW_FLAG "-m64")
set (USE_LTO_DEFAULT false)

View File

@@ -6,7 +6,7 @@ macro(CHECK_LINKER_FLAG flag VARIABLE)
message(STATUS "Looking for ${flag} linker flag")
endif()
set(_cle_source ${CMAKE_SOURCE_DIR}/cmake/CheckLinkerFlag.c)
set(_cle_source ${monero_SOURCE_DIR}/cmake/CheckLinkerFlag.c)
set(saved_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
set(CMAKE_C_FLAGS "${flag}")

View File

@@ -1,62 +1,75 @@
OPTION(USE_DEVICE_TREZOR "Trezor support compilation" ON)
OPTION(USE_DEVICE_TREZOR_LIBUSB "Trezor LibUSB compilation" ON)
OPTION(USE_DEVICE_TREZOR_UDP_RELEASE "Trezor UdpTransport in release mode" OFF)
OPTION(USE_DEVICE_TREZOR_DEBUG "Trezor Debugging enabled" OFF)
OPTION(TREZOR_DEBUG "Main trezor debugging switch" OFF)
# Helper function to fix cmake < 3.6.0 FindProtobuf variables
function(_trezor_protobuf_fix_vars)
if(${CMAKE_VERSION} VERSION_LESS "3.6.0")
foreach(UPPER
PROTOBUF_SRC_ROOT_FOLDER
PROTOBUF_IMPORT_DIRS
PROTOBUF_DEBUG
PROTOBUF_LIBRARY
PROTOBUF_PROTOC_LIBRARY
PROTOBUF_INCLUDE_DIR
PROTOBUF_PROTOC_EXECUTABLE
PROTOBUF_LIBRARY_DEBUG
PROTOBUF_PROTOC_LIBRARY_DEBUG
PROTOBUF_LITE_LIBRARY
PROTOBUF_LITE_LIBRARY_DEBUG
)
if (DEFINED ${UPPER})
string(REPLACE "PROTOBUF_" "Protobuf_" Camel ${UPPER})
if (NOT DEFINED ${Camel})
set(${Camel} ${${UPPER}} PARENT_SCOPE)
endif()
endif()
endforeach()
# Function for setting default options default values via env vars
function(_trezor_default_val val_name val_default)
if(NOT DEFINED ENV{${val_name}})
set(ENV{${val_name}} ${val_default})
endif()
endfunction()
# Define default options via env vars
_trezor_default_val(USE_DEVICE_TREZOR ON)
_trezor_default_val(USE_DEVICE_TREZOR_MANDATORY OFF)
_trezor_default_val(USE_DEVICE_TREZOR_PROTOBUF_TEST ON)
_trezor_default_val(USE_DEVICE_TREZOR_LIBUSB ON)
_trezor_default_val(USE_DEVICE_TREZOR_UDP_RELEASE OFF)
_trezor_default_val(USE_DEVICE_TREZOR_DEBUG OFF)
_trezor_default_val(TREZOR_DEBUG OFF)
# Main options
OPTION(USE_DEVICE_TREZOR "Trezor support compilation" $ENV{USE_DEVICE_TREZOR})
OPTION(USE_DEVICE_TREZOR_MANDATORY "Trezor compilation is mandatory, fail build if Trezor support cannot be compiled" $ENV{USE_DEVICE_TREZOR_MANDATORY})
OPTION(USE_DEVICE_TREZOR_PROTOBUF_TEST "Trezor Protobuf test" $ENV{USE_DEVICE_TREZOR_PROTOBUF_TEST})
OPTION(USE_DEVICE_TREZOR_LIBUSB "Trezor LibUSB compilation" $ENV{USE_DEVICE_TREZOR_LIBUSB})
OPTION(USE_DEVICE_TREZOR_UDP_RELEASE "Trezor UdpTransport in release mode" $ENV{USE_DEVICE_TREZOR_UDP_RELEASE})
OPTION(USE_DEVICE_TREZOR_DEBUG "Trezor Debugging enabled" $ENV{USE_DEVICE_TREZOR_DEBUG})
OPTION(TREZOR_DEBUG "Main Trezor debugging switch" $ENV{TREZOR_DEBUG})
macro(trezor_fatal_msg msg)
if ($ENV{USE_DEVICE_TREZOR_MANDATORY})
message(FATAL_ERROR
"${msg}\n"
"==========================================================================\n"
"[ERROR] To compile without Trezor support, set USE_DEVICE_TREZOR=OFF. "
"It is possible both via cmake variable and environment variable, e.g., "
"`USE_DEVICE_TREZOR=OFF make release`\n"
"For more information, please check src/device_trezor/README.md\n"
)
else()
message(WARNING
"${msg}\n"
"==========================================================================\n"
"[WARNING] Trezor support cannot be compiled! Skipping Trezor compilation. \n"
"For more information, please check src/device_trezor/README.md\n")
set(USE_DEVICE_TREZOR OFF)
return() # finish this cmake file processing (as this is macro).
endif()
endmacro()
# Use Trezor master switch
if (USE_DEVICE_TREZOR)
# Protobuf is required to build protobuf messages for Trezor
include(FindProtobuf OPTIONAL)
find_package(Protobuf)
_trezor_protobuf_fix_vars()
# Look for protobuf-config.cmake, provided by Protobuf
find_package(Protobuf CONFIG)
# Protobuf handling the cache variables set in docker.
if(NOT Protobuf_FOUND AND NOT Protobuf_LIBRARY AND NOT Protobuf_PROTOC_EXECUTABLE AND NOT Protobuf_INCLUDE_DIR)
message(STATUS "Could not find Protobuf")
elseif(NOT Protobuf_LIBRARY OR NOT EXISTS "${Protobuf_LIBRARY}")
message(STATUS "Protobuf library not found: ${Protobuf_LIBRARY}")
unset(Protobuf_FOUND)
elseif(NOT Protobuf_PROTOC_EXECUTABLE OR NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
message(STATUS "Protobuf executable not found: ${Protobuf_PROTOC_EXECUTABLE}")
unset(Protobuf_FOUND)
elseif(NOT Protobuf_INCLUDE_DIR OR NOT EXISTS "${Protobuf_INCLUDE_DIR}")
message(STATUS "Protobuf include dir not found: ${Protobuf_INCLUDE_DIR}")
unset(Protobuf_FOUND)
if (Protobuf_FOUND)
# https://github.com/protocolbuffers/protobuf/issues/14576
find_program(Protobuf_PROTOC_EXECUTABLE protoc REQUIRED)
set(Protobuf_LIBRARY protobuf::libprotobuf) # Compatibility with FindProtobuf.cmake
else()
message(STATUS "Protobuf lib: ${Protobuf_LIBRARY}, inc: ${Protobuf_INCLUDE_DIR}, protoc: ${Protobuf_PROTOC_EXECUTABLE}")
set(Protobuf_INCLUDE_DIRS ${Protobuf_INCLUDE_DIR})
set(Protobuf_FOUND 1) # override found if all rquired info was provided by variables
# Look for FindProtobuf.cmake, provided by CMake
find_package(Protobuf)
endif()
# Early fail for optional Trezor support
if (NOT Protobuf_FOUND)
trezor_fatal_msg("Trezor: protobuf library not found")
endif()
if (Protobuf_VERSION VERSION_GREATER_EQUAL 22.0)
add_definitions(-DPROTOBUF_HAS_ABSEIL)
endif()
if(TREZOR_DEBUG)
set(USE_DEVICE_TREZOR_DEBUG 1)
message(STATUS "Trezor: debug build enabled")
endif()
# Compile debugging support (for tests)
@@ -64,118 +77,132 @@ if (USE_DEVICE_TREZOR)
add_definitions(-DWITH_TREZOR_DEBUGGING=1)
endif()
else()
message(STATUS "Trezor support disabled by USE_DEVICE_TREZOR")
endif()
if(Protobuf_FOUND AND USE_DEVICE_TREZOR)
if (NOT "$ENV{TREZOR_PYTHON}" STREQUAL "")
set(TREZOR_PYTHON "$ENV{TREZOR_PYTHON}" CACHE INTERNAL "Copied from environment variable TREZOR_PYTHON")
else()
find_package(Python QUIET COMPONENTS Interpreter) # cmake 3.12+
if(Python_Interpreter_FOUND)
set(TREZOR_PYTHON "${Python_EXECUTABLE}")
endif()
endif()
if(NOT TREZOR_PYTHON)
find_package(PythonInterp)
if(PYTHONINTERP_FOUND AND PYTHON_EXECUTABLE)
set(TREZOR_PYTHON "${PYTHON_EXECUTABLE}")
endif()
endif()
if(NOT TREZOR_PYTHON)
message(STATUS "Trezor: Python not found")
endif()
message(STATUS "Trezor: support disabled by USE_DEVICE_TREZOR")
endif()
# Protobuf compilation test
if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON)
if(Protobuf_FOUND AND USE_DEVICE_TREZOR)
execute_process(COMMAND ${Protobuf_PROTOC_EXECUTABLE} -I "${CMAKE_CURRENT_LIST_DIR}" -I "${Protobuf_INCLUDE_DIR}" "${CMAKE_CURRENT_LIST_DIR}/test-protobuf.proto" --cpp_out ${CMAKE_BINARY_DIR} RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR)
if(RET)
message(STATUS "Protobuf test generation failed: ${OUT} ${ERR}")
trezor_fatal_msg("Trezor: Protobuf test generation failed: ${OUT} ${ERR}")
endif()
try_compile(Protobuf_COMPILE_TEST_PASSED
"${CMAKE_BINARY_DIR}"
SOURCES
"${CMAKE_BINARY_DIR}/test-protobuf.pb.cc"
"${CMAKE_CURRENT_LIST_DIR}/test-protobuf.cpp"
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${Protobuf_INCLUDE_DIR};${CMAKE_BINARY_DIR}"
"-DCMAKE_CXX_STANDARD=11"
LINK_LIBRARIES ${Protobuf_LIBRARY}
OUTPUT_VARIABLE OUTPUT
)
if(NOT Protobuf_COMPILE_TEST_PASSED)
message(STATUS "Protobuf Compilation test failed: ${OUTPUT}.")
if(ANDROID)
set(CMAKE_TRY_COMPILE_LINKER_FLAGS "${CMAKE_TRY_COMPILE_LINKER_FLAGS} -llog")
set(CMAKE_TRY_COMPILE_LINK_LIBRARIES "${CMAKE_TRY_COMPILE_LINK_LIBRARIES} log")
endif()
if(USE_DEVICE_TREZOR_PROTOBUF_TEST)
if(PROTOBUF_LDFLAGS)
set(PROTOBUF_TRYCOMPILE_LINKER "${PROTOBUF_LDFLAGS}")
else()
set(PROTOBUF_TRYCOMPILE_LINKER "${Protobuf_LIBRARY}")
endif()
try_compile(Protobuf_COMPILE_TEST_PASSED
"${CMAKE_BINARY_DIR}"
SOURCES
"${CMAKE_BINARY_DIR}/test-protobuf.pb.cc"
"${CMAKE_CURRENT_LIST_DIR}/test-protobuf.cpp"
CMAKE_FLAGS
CMAKE_EXE_LINKER_FLAGS ${CMAKE_TRY_COMPILE_LINKER_FLAGS}
"-DINCLUDE_DIRECTORIES=${Protobuf_INCLUDE_DIR};${CMAKE_BINARY_DIR}"
"-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}"
LINK_LIBRARIES "${PROTOBUF_TRYCOMPILE_LINKER}" ${CMAKE_TRY_COMPILE_LINK_LIBRARIES}
OUTPUT_VARIABLE OUTPUT
)
if(NOT Protobuf_COMPILE_TEST_PASSED)
trezor_fatal_msg("Trezor: Protobuf Compilation test failed: ${OUTPUT}.")
endif()
else ()
message(STATUS "Trezor: Protobuf Compilation test skipped, build may fail later")
endif()
endif()
# Try to build protobuf messages
if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON AND Protobuf_COMPILE_TEST_PASSED)
set(ENV{PROTOBUF_INCLUDE_DIRS} "${Protobuf_INCLUDE_DIR}")
set(ENV{PROTOBUF_PROTOC_EXECUTABLE} "${Protobuf_PROTOC_EXECUTABLE}")
set(TREZOR_PROTOBUF_PARAMS "")
if (USE_DEVICE_TREZOR_DEBUG)
set(TREZOR_PROTOBUF_PARAMS "--debug")
endif()
execute_process(COMMAND ${TREZOR_PYTHON} tools/build_protob.py ${TREZOR_PROTOBUF_PARAMS} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../src/device_trezor/trezor RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR)
if(Protobuf_FOUND AND USE_DEVICE_TREZOR)
# .proto files to compile
set(_proto_files "messages.proto"
"messages-common.proto"
"messages-management.proto"
"messages-monero.proto")
if (TREZOR_DEBUG)
list(APPEND _proto_files "messages-debug.proto")
endif ()
set(_proto_include_dir "${CMAKE_CURRENT_LIST_DIR}/../src/device_trezor/trezor/protob")
set(_proto_files_absolute)
foreach(file IN LISTS _proto_files)
list(APPEND _proto_files_absolute "${_proto_include_dir}/${file}")
endforeach ()
set(_proto_out_dir "${CMAKE_CURRENT_LIST_DIR}/../src/device_trezor/trezor/messages")
execute_process(COMMAND ${Protobuf_PROTOC_EXECUTABLE} --cpp_out "${_proto_out_dir}" "-I${_proto_include_dir}" ${_proto_files_absolute} RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR)
if(RET)
message(WARNING "Trezor protobuf messages could not be regenerated (err=${RET}, python ${PYTHON})."
"OUT: ${OUT}, ERR: ${ERR}."
"Please read src/device_trezor/trezor/tools/README.md")
else()
message(STATUS "Trezor protobuf messages regenerated out: \"${OUT}.\"")
set(DEVICE_TREZOR_READY 1)
add_definitions(-DDEVICE_TREZOR_READY=1)
add_definitions(-DPROTOBUF_INLINE_NOT_IN_HEADERS=0)
trezor_fatal_msg("Trezor: protobuf messages could not be (re)generated (err=${RET}). OUT: ${OUT}, ERR: ${ERR}.")
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DTREZOR_DEBUG=1)
if(FREEBSD)
# FreeBSD defines `minor` in usr/include/sys/types.h which conflicts with this file
# https://github.com/trezor/trezor-firmware/issues/4460
file(READ "${_proto_out_dir}/messages-monero.pb.h" file_content)
string(REPLACE "// @@protoc_insertion_point(includes)"
"// @@protoc_insertion_point(includes)\n#ifdef minor\n#undef minor\n#endif"
updated_content "${file_content}")
file(WRITE "${_proto_out_dir}/messages-monero.pb.h" "${updated_content}")
endif()
message(STATUS "Trezor: protobuf messages regenerated out.")
set(DEVICE_TREZOR_READY 1)
add_definitions(-DDEVICE_TREZOR_READY=1)
add_definitions(-DPROTOBUF_INLINE_NOT_IN_HEADERS=0)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DTREZOR_DEBUG=1)
endif()
if(USE_DEVICE_TREZOR_UDP_RELEASE)
message(STATUS "Trezor: UDP transport enabled (emulator)")
add_definitions(-DUSE_DEVICE_TREZOR_UDP_RELEASE=1)
endif()
if (Protobuf_INCLUDE_DIR)
include_directories(${Protobuf_INCLUDE_DIR})
endif()
# LibUSB support, check for particular version
# Include support only if compilation test passes
if (USE_DEVICE_TREZOR_LIBUSB)
find_package(LibUSB)
endif()
if (LibUSB_COMPILE_TEST_PASSED)
add_definitions(-DHAVE_TREZOR_LIBUSB=1)
if(LibUSB_INCLUDE_DIRS)
include_directories(${LibUSB_INCLUDE_DIRS})
endif()
endif()
set(TREZOR_LIBUSB_LIBRARIES "")
if(LibUSB_COMPILE_TEST_PASSED)
list(APPEND TREZOR_LIBUSB_LIBRARIES ${LibUSB_LIBRARIES} ${LIBUSB_DEP_LINKER})
message(STATUS "Trezor: compatible LibUSB found at: ${LibUSB_INCLUDE_DIRS}")
elseif(USE_DEVICE_TREZOR_LIBUSB AND NOT ANDROID)
trezor_fatal_msg("Trezor: LibUSB not found or test failed, please install libusb-1.0.26")
endif()
if (BUILD_GUI_DEPS)
set(TREZOR_DEP_LIBS "")
set(TREZOR_DEP_LINKER "")
if (Protobuf_LIBRARY)
list(APPEND TREZOR_DEP_LIBS ${Protobuf_LIBRARY})
string(APPEND TREZOR_DEP_LINKER " -lprotobuf")
endif()
if(USE_DEVICE_TREZOR_UDP_RELEASE)
add_definitions(-DUSE_DEVICE_TREZOR_UDP_RELEASE=1)
endif()
if (Protobuf_INCLUDE_DIR)
include_directories(${Protobuf_INCLUDE_DIR})
endif()
# LibUSB support, check for particular version
# Include support only if compilation test passes
if (USE_DEVICE_TREZOR_LIBUSB)
find_package(LibUSB)
endif()
if (LibUSB_COMPILE_TEST_PASSED)
add_definitions(-DHAVE_TREZOR_LIBUSB=1)
if(LibUSB_INCLUDE_DIRS)
include_directories(${LibUSB_INCLUDE_DIRS})
endif()
endif()
set(TREZOR_LIBUSB_LIBRARIES "")
if(LibUSB_COMPILE_TEST_PASSED)
list(APPEND TREZOR_LIBUSB_LIBRARIES ${LibUSB_LIBRARIES} ${LIBUSB_DEP_LINKER})
message(STATUS "Trezor compatible LibUSB found at: ${LibUSB_INCLUDE_DIRS}")
endif()
if (BUILD_GUI_DEPS)
set(TREZOR_DEP_LIBS "")
set(TREZOR_DEP_LINKER "")
if (Protobuf_LIBRARY)
list(APPEND TREZOR_DEP_LIBS ${Protobuf_LIBRARY})
string(APPEND TREZOR_DEP_LINKER " -lprotobuf")
endif()
if (TREZOR_LIBUSB_LIBRARIES)
list(APPEND TREZOR_DEP_LIBS ${TREZOR_LIBUSB_LIBRARIES})
string(APPEND TREZOR_DEP_LINKER " -lusb-1.0 ${LIBUSB_DEP_LINKER}")
endif()
if (TREZOR_LIBUSB_LIBRARIES)
list(APPEND TREZOR_DEP_LIBS ${TREZOR_LIBUSB_LIBRARIES})
string(APPEND TREZOR_DEP_LINKER " -lusb-1.0 ${LIBUSB_DEP_LINKER}")
endif()
endif()
endif()

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2024, The Monero Project
#
# All rights reserved.
#
@@ -44,7 +44,7 @@ if (CCACHE_FOUND)
# Try to compile a test program with ccache, in order to verify if it really works. (needed on exotic setups)
set(TEST_PROJECT "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeTmp")
file(WRITE "${TEST_PROJECT}/CMakeLists.txt" [=[
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)
project(test)
option (CCACHE "")
file(WRITE "${CMAKE_SOURCE_DIR}/test.cpp" "int main() { return 0; }")

View File

@@ -41,13 +41,17 @@ if(HIDAPI_FOUND)
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARY}")
if((STATIC AND UNIX AND NOT APPLE) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux") OR ANDROID)
find_library(LIBUSB-1.0_LIBRARY usb-1.0)
find_library(LIBUDEV_LIBRARY udev)
if(LIBUSB-1.0_LIBRARY)
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUSB-1.0_LIBRARY}")
if(LIBUDEV_LIBRARY)
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUDEV_LIBRARY}")
elseif(NOT ANDROID)
message(WARNING "libudev library not found, binaries may fail to link.")
# Hidapi is built without the udev backend in depends
if (NOT DEPENDS)
find_library(LIBUDEV_LIBRARY udev)
if(LIBUDEV_LIBRARY)
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUDEV_LIBRARY}")
elseif(NOT ANDROID)
message(WARNING "libudev library not found, binaries may fail to link.")
endif()
endif()
else()
message(WARNING "libusb-1.0 library not found, binaries may fail to link.")

View File

@@ -95,11 +95,31 @@ if ( LibUSB_FOUND )
endif ( LibUSB_FOUND )
if ( LibUSB_FOUND )
check_library_exists ( "${LibUSB_LIBRARIES}" usb_open "" LibUSB_FOUND )
check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_device_list "" LibUSB_VERSION_1.0 )
check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_port_numbers "" LibUSB_VERSION_1.0.16 )
if (APPLE)
if(DEPENDS)
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES "-framework Foundation -framework IOKit -framework Security")
else()
find_library(COREFOUNDATION CoreFoundation)
find_library(IOKIT IOKit)
find_library(SECURITY_FRAMEWORK Security)
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${IOKIT})
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${COREFOUNDATION})
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${SECURITY_FRAMEWORK})
if((STATIC AND UNIX AND NOT APPLE) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux") OR ANDROID)
if(STATIC)
find_library(OBJC objc.a)
set(LIBUSB_DEP_LINKER ${OBJC})
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LIBUSB_DEP_LINKER})
endif()
endif()
endif()
if (WIN32)
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES setupapi)
endif()
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LibUSB_LIBRARIES})
set(CMAKE_REQUIRED_LIBRARIES ${TEST_COMPILE_EXTRA_LIBRARIES})
if((STATIC AND UNIX AND NOT APPLE AND NOT FREEBSD AND NOT DEPENDS) OR ANDROID)
find_library(LIBUDEV_LIBRARY udev)
if(LIBUDEV_LIBRARY)
set(LibUSB_LIBRARIES "${LibUSB_LIBRARIES};${LIBUDEV_LIBRARY}")
@@ -108,37 +128,20 @@ if ( LibUSB_FOUND )
endif()
endif()
check_library_exists ( "${LibUSB_LIBRARIES}" usb_open "" LibUSB_FOUND )
check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_device_list "" LibUSB_VERSION_1.0 )
check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_port_numbers "" LibUSB_VERSION_1.0.16 )
# Library 1.0.16+ compilation test.
# The check_library_exists does not work well on Apple with shared libs.
if (APPLE OR LibUSB_VERSION_1.0.16 OR STATIC)
if (APPLE)
if(DEPENDS)
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES "-framework Foundation -framework IOKit")
else()
find_library(COREFOUNDATION CoreFoundation)
find_library(IOKIT IOKit)
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${IOKIT})
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${COREFOUNDATION})
if(STATIC)
find_library(OBJC objc.a)
set(LIBUSB_DEP_LINKER ${OBJC})
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LIBUSB_DEP_LINKER})
endif()
endif()
endif()
if (WIN32)
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES setupapi)
endif()
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LibUSB_LIBRARIES})
try_compile(LibUSB_COMPILE_TEST_PASSED
${CMAKE_BINARY_DIR}
"${CMAKE_CURRENT_LIST_DIR}/test-libusb-version.c"
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${LibUSB_INCLUDE_DIRS}"
"-DLINK_DIRECTORIES=${LibUSB_LIBRARIES}"
LINK_LIBRARIES ${TEST_COMPILE_EXTRA_LIBRARIES}
LINK_LIBRARIES ${LibUSB_LIBRARIES} ${TEST_COMPILE_EXTRA_LIBRARIES}
OUTPUT_VARIABLE OUTPUT)
unset(TEST_COMPILE_EXTRA_LIBRARIES)
message(STATUS "LibUSB Compilation test: ${LibUSB_COMPILE_TEST_PASSED}")

View File

@@ -23,8 +23,7 @@
find_path(Readline_ROOT_DIR
NAMES include/readline/readline.h
PATHS /usr/local/opt/readline/ /opt/homebrew/opt/readline/ /opt/local/ /usr/local/ /usr/
NO_DEFAULT_PATH
HINTS /usr/local/opt/readline/ /opt/homebrew/opt/readline/ /opt/local/ /usr/local/ /usr/
)
find_path(Readline_INCLUDE_DIR

297
cmake/FindSodium.cmake Normal file
View File

@@ -0,0 +1,297 @@
# Written in 2016 by Henrik Steffen Gaßmann <henrik@gassmann.onl>
#
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
#
# You should have received a copy of the CC0 Public Domain Dedication
# along with this software. If not, see
#
# http://creativecommons.org/publicdomain/zero/1.0/
#
########################################################################
# Tries to find the local libsodium installation.
#
# On Windows the sodium_DIR environment variable is used as a default
# hint which can be overridden by setting the corresponding cmake variable.
#
# Once done the following variables will be defined:
#
# sodium_FOUND
# sodium_INCLUDE_DIR
# sodium_LIBRARY_DEBUG
# sodium_LIBRARY_RELEASE
#
#
# Furthermore an imported "sodium" target is created.
#
if (CMAKE_C_COMPILER_ID STREQUAL "GNU"
OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
set(_GCC_COMPATIBLE 1)
endif()
# static library option
if (NOT DEFINED sodium_USE_STATIC_LIBS)
option(sodium_USE_STATIC_LIBS "enable to statically link against sodium" OFF)
endif()
if(NOT (sodium_USE_STATIC_LIBS EQUAL sodium_USE_STATIC_LIBS_LAST))
unset(sodium_LIBRARY CACHE)
unset(sodium_LIBRARY_DEBUG CACHE)
unset(sodium_LIBRARY_RELEASE CACHE)
unset(sodium_DLL_DEBUG CACHE)
unset(sodium_DLL_RELEASE CACHE)
set(sodium_USE_STATIC_LIBS_LAST ${sodium_USE_STATIC_LIBS} CACHE INTERNAL "internal change tracking variable")
endif()
########################################################################
# UNIX
if (UNIX)
# import pkg-config
find_package(PkgConfig QUIET)
if (PKG_CONFIG_FOUND)
pkg_check_modules(sodium_PKG QUIET libsodium)
endif()
if(sodium_USE_STATIC_LIBS)
foreach(_libname ${sodium_PKG_STATIC_LIBRARIES})
if (NOT _libname MATCHES "^lib.*\\.a$") # ignore strings already ending with .a
list(INSERT sodium_PKG_STATIC_LIBRARIES 0 "lib${_libname}.a")
endif()
endforeach()
list(REMOVE_DUPLICATES sodium_PKG_STATIC_LIBRARIES)
# if pkgconfig for libsodium doesn't provide
# static lib info, then override PKG_STATIC here..
if (NOT sodium_PKG_STATIC_FOUND)
set(sodium_PKG_STATIC_LIBRARIES libsodium.a)
endif()
set(XPREFIX sodium_PKG_STATIC)
else()
if (NOT sodium_PKG_FOUND)
set(sodium_PKG_LIBRARIES sodium)
endif()
set(XPREFIX sodium_PKG)
endif()
find_path(sodium_INCLUDE_DIR sodium.h
HINTS ${${XPREFIX}_INCLUDE_DIRS}
)
find_library(sodium_LIBRARY_DEBUG NAMES ${${XPREFIX}_LIBRARIES}
HINTS ${${XPREFIX}_LIBRARY_DIRS}
)
find_library(sodium_LIBRARY_RELEASE NAMES ${${XPREFIX}_LIBRARIES}
HINTS ${${XPREFIX}_LIBRARY_DIRS}
)
########################################################################
# Windows
elseif (WIN32)
set(sodium_DIR "$ENV{sodium_DIR}" CACHE FILEPATH "sodium install directory")
mark_as_advanced(sodium_DIR)
find_path(sodium_INCLUDE_DIR sodium.h
HINTS ${sodium_DIR}
PATH_SUFFIXES include
)
if (MSVC)
# detect target architecture
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/arch.cpp" [=[
#if defined _M_IX86
#error ARCH_VALUE x86_32
#elif defined _M_X64
#error ARCH_VALUE x86_64
#endif
#error ARCH_VALUE unknown
]=])
try_compile(_UNUSED_VAR "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/arch.cpp"
OUTPUT_VARIABLE _COMPILATION_LOG
)
string(REGEX REPLACE ".*ARCH_VALUE ([a-zA-Z0-9_]+).*" "\\1" _TARGET_ARCH "${_COMPILATION_LOG}")
# construct library path
if (_TARGET_ARCH STREQUAL "x86_32")
string(APPEND _PLATFORM_PATH "Win32")
elseif(_TARGET_ARCH STREQUAL "x86_64")
string(APPEND _PLATFORM_PATH "x64")
else()
message(FATAL_ERROR "the ${_TARGET_ARCH} architecture is not supported by Findsodium.cmake.")
endif()
string(APPEND _PLATFORM_PATH "/$$CONFIG$$")
if (MSVC_VERSION LESS 1900)
math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 60")
else()
math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 50")
endif()
string(APPEND _PLATFORM_PATH "/v${_VS_VERSION}")
if (sodium_USE_STATIC_LIBS)
string(APPEND _PLATFORM_PATH "/static")
else()
string(APPEND _PLATFORM_PATH "/dynamic")
endif()
string(REPLACE "$$CONFIG$$" "Debug" _DEBUG_PATH_SUFFIX "${_PLATFORM_PATH}")
string(REPLACE "$$CONFIG$$" "Release" _RELEASE_PATH_SUFFIX "${_PLATFORM_PATH}")
find_library(sodium_LIBRARY_DEBUG libsodium.lib
HINTS ${sodium_DIR}
PATH_SUFFIXES ${_DEBUG_PATH_SUFFIX}
)
find_library(sodium_LIBRARY_RELEASE libsodium.lib
HINTS ${sodium_DIR}
PATH_SUFFIXES ${_RELEASE_PATH_SUFFIX}
)
if (NOT sodium_USE_STATIC_LIBS)
set(CMAKE_FIND_LIBRARY_SUFFIXES_BCK ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
find_library(sodium_DLL_DEBUG libsodium
HINTS ${sodium_DIR}
PATH_SUFFIXES ${_DEBUG_PATH_SUFFIX}
)
find_library(sodium_DLL_RELEASE libsodium
HINTS ${sodium_DIR}
PATH_SUFFIXES ${_RELEASE_PATH_SUFFIX}
)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BCK})
endif()
elseif(_GCC_COMPATIBLE)
if (sodium_USE_STATIC_LIBS)
find_library(sodium_LIBRARY_DEBUG libsodium.a
HINTS ${sodium_DIR}
PATH_SUFFIXES lib
)
find_library(sodium_LIBRARY_RELEASE libsodium.a
HINTS ${sodium_DIR}
PATH_SUFFIXES lib
)
else()
find_library(sodium_LIBRARY_DEBUG libsodium.dll.a
HINTS ${sodium_DIR}
PATH_SUFFIXES lib
)
find_library(sodium_LIBRARY_RELEASE libsodium.dll.a
HINTS ${sodium_DIR}
PATH_SUFFIXES lib
)
file(GLOB _DLL
LIST_DIRECTORIES false
RELATIVE "${sodium_DIR}/bin"
"${sodium_DIR}/bin/libsodium*.dll"
)
find_library(sodium_DLL_DEBUG ${_DLL} libsodium
HINTS ${sodium_DIR}
PATH_SUFFIXES bin
)
find_library(sodium_DLL_RELEASE ${_DLL} libsodium
HINTS ${sodium_DIR}
PATH_SUFFIXES bin
)
endif()
else()
message(FATAL_ERROR "this platform is not supported by FindSodium.cmake")
endif()
########################################################################
# unsupported
else()
message(FATAL_ERROR "this platform is not supported by FindSodium.cmake")
endif()
########################################################################
# common stuff
# extract sodium version
if (sodium_INCLUDE_DIR)
set(_VERSION_HEADER "${_INCLUDE_DIR}/sodium/version.h")
if (EXISTS _VERSION_HEADER)
file(READ "${_VERSION_HEADER}" _VERSION_HEADER_CONTENT)
string(REGEX REPLACE ".*#[ \t]*define[ \t]*SODIUM_VERSION_STRING[ \t]*\"([^\n]*)\".*" "\\1"
sodium_VERSION "${_VERSION_HEADER_CONTENT}")
set(sodium_VERSION "${sodium_VERSION}" PARENT_SCOPE)
endif()
endif()
# communicate results
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Sodium # The name must be either uppercase or match the filename case.
REQUIRED_VARS
sodium_LIBRARY_RELEASE
sodium_LIBRARY_DEBUG
sodium_INCLUDE_DIR
VERSION_VAR
sodium_VERSION
)
if(Sodium_FOUND)
set(sodium_LIBRARIES
optimized ${sodium_LIBRARY_RELEASE} debug ${sodium_LIBRARY_DEBUG})
endif()
# mark file paths as advanced
mark_as_advanced(sodium_INCLUDE_DIR)
mark_as_advanced(sodium_LIBRARY_DEBUG)
mark_as_advanced(sodium_LIBRARY_RELEASE)
if (WIN32)
mark_as_advanced(sodium_DLL_DEBUG)
mark_as_advanced(sodium_DLL_RELEASE)
endif()
# create imported target
if(sodium_USE_STATIC_LIBS)
set(_LIB_TYPE STATIC)
else()
set(_LIB_TYPE SHARED)
endif()
if(NOT TARGET sodium)
add_library(sodium ${_LIB_TYPE} IMPORTED)
endif()
set_target_properties(sodium PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${sodium_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
)
if (sodium_USE_STATIC_LIBS)
set_target_properties(sodium PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "SODIUM_STATIC"
IMPORTED_LOCATION "${sodium_LIBRARY_RELEASE}"
IMPORTED_LOCATION_DEBUG "${sodium_LIBRARY_DEBUG}"
)
else()
if (UNIX)
set_target_properties(sodium PROPERTIES
IMPORTED_LOCATION "${sodium_LIBRARY_RELEASE}"
IMPORTED_LOCATION_DEBUG "${sodium_LIBRARY_DEBUG}"
)
elseif (WIN32)
set_target_properties(sodium PROPERTIES
IMPORTED_IMPLIB "${sodium_LIBRARY_RELEASE}"
IMPORTED_IMPLIB_DEBUG "${sodium_LIBRARY_DEBUG}"
)
if (NOT (sodium_DLL_DEBUG MATCHES ".*-NOTFOUND"))
set_target_properties(sodium PROPERTIES
IMPORTED_LOCATION_DEBUG "${sodium_DLL_DEBUG}"
)
endif()
if (NOT (sodium_DLL_RELEASE MATCHES ".*-NOTFOUND"))
set_target_properties(sodium PROPERTIES
IMPORTED_LOCATION_RELWITHDEBINFO "${sodium_DLL_RELEASE}"
IMPORTED_LOCATION_MINSIZEREL "${sodium_DLL_RELEASE}"
IMPORTED_LOCATION_RELEASE "${sodium_DLL_RELEASE}"
)
endif()
endif()
endif()

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2024, The Monero Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2024, The Monero Project
#
# All rights reserved.
#

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2024, The Monero Project
#
# All rights reserved.
#

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2024, The Monero Project
#
# All rights reserved.
#

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2022, The Monero Project
// Copyright (c) 2014-2024, The Monero Project
//
// All rights reserved.
//

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2022, The Monero Project
// Copyright (c) 2014-2024, The Monero Project
//
// All rights reserved.
//

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2022, The Monero Project
// Copyright (c) 2014-2024, The Monero Project
//
// All rights reserved.
//

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2022, The Monero Project
// Copyright (c) 2014-2024, The Monero Project
//
// All rights reserved.
//

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2014-2022, The Monero Project
# Copyright (c) 2014-2024, The Monero Project
#
# All rights reserved.
#

View File

@@ -5,9 +5,6 @@
# execute brew bundle in the directory containing the Brewfile
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-versions"
tap "homebrew/core"
brew "autoconf"
brew "autogen"
@@ -25,7 +22,6 @@ brew "unbound"
brew "libsodium"
brew "miniupnpc"
brew "readline"
brew "ldns"
brew "expat"
brew "ccache"
brew "doxygen"
@@ -33,3 +29,4 @@ brew "graphviz"
brew "libunwind-headers"
brew "xz"
brew "protobuf"
brew "libusb"

View File

@@ -8,3 +8,4 @@ i686*
mips*
arm*
aarch64*
riscv64*

View File

@@ -1,5 +1,9 @@
.NOTPARALLEL :
# Pattern rule to print variables, e.g. make print-all_packages
print-%: FORCE
@echo '$($*)'
SOURCES_PATH ?= $(BASEDIR)/sources
BASE_CACHE ?= $(BASEDIR)/built
FALLBACK_DOWNLOAD_PATH ?= https://downloads.getmonero.org/depends-sources
@@ -21,18 +25,24 @@ host_toolchain:=$(HOST)-
endif
ifneq ($(DEBUG),)
release_type=Debug
release_type=debug
else
release_type=Release
release_type=release
endif
ifneq ($(TESTS),)
build_tests=ON
release_type=Debug
release_type=debug
else
build_tests=OFF
endif
ifeq ($(release_type),debug)
cmake_release_type=Debug
else
cmake_release_type=Release
endif
base_build_dir=$(BASEDIR)/work/build
base_staging_dir=$(BASEDIR)/work/staging
base_download_dir=$(BASEDIR)/work/download
@@ -68,21 +78,6 @@ $(host_arch)_$(host_os)_prefix=$(BASEDIR)/$(host)
$(host_arch)_$(host_os)_host=$(host)
host_prefix=$($(host_arch)_$(host_os)_prefix)
build_prefix=$(host_prefix)/native
ifeq ($(host_os),mingw32)
host_cmake=Windows
endif
ifeq ($(host_os),linux)
host_cmake=Linux
endif
ifeq ($(host_os),freebsd)
host_cmake=FreeBSD
endif
ifeq ($(host_os),darwin)
host_cmake=Darwin
endif
ifeq ($(host_os),android)
host_cmake=Android
endif
AT_$(V):=
AT_:=@
@@ -96,6 +91,7 @@ include builders/$(build_os).mk
include builders/default.mk
include packages/packages.mk
ifeq ($(GUIX_ENVIRONMENT),)
build_id_string:=$(BUILD_ID_SALT)
build_id_string+=$(shell $(build_CC) --version 2>/dev/null)
build_id_string+=$(shell $(build_AR) --version 2>/dev/null)
@@ -109,9 +105,12 @@ $(host_arch)_$(host_os)_id_string+=$(shell $(host_AR) --version 2>/dev/null)
$(host_arch)_$(host_os)_id_string+=$(shell $(host_CXX) --version 2>/dev/null)
$(host_arch)_$(host_os)_id_string+=$(shell $(host_RANLIB) --version 2>/dev/null)
$(host_arch)_$(host_os)_id_string+=$(shell $(host_STRIP) --version 2>/dev/null)
else
build_id_string:=$(realpath $(GUIX_ENVIRONMENT))
$(host_arch)_$(host_os)_id_string:=$(realpath $(GUIX_ENVIRONMENT))
endif
qt_packages_$(NO_QT) = $(qt_packages)
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_)
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages)
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
all_packages = $(packages) $(native_packages)
@@ -122,18 +121,8 @@ $(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain)
include funcs.mk
CONF_PKGS := cmake-conf mxe-conf
build-only-$(1)_$(3): CMAKE_RUNRESULT_FILE = $(PREFIX)/share/cmake/modules/TryRunResults.cmake
build-only-$(1)_$(3): CMAKE_TOOLCHAIN_FILE = $(PREFIX)/$(3)/share/cmake/mxe-conf.cmake
build-only-$(1)_$(3): CMAKE_TOOLCHAIN_DIR = $(PREFIX)/$(3)/share/cmake/mxe-conf.d
build-only-$(1)_$(3): CMAKE_STATIC_BOOL = $(if $(findstring shared,$(3)),OFF,ON)
build-only-$(1)_$(3): CMAKE_SHARED_BOOL = $(if $(findstring shared,$(3)),ON,OFF)
toolchain_path=$($($(host_arch)_$(host_os)_native_toolchain)_prefixbin)
final_build_id_long+=$(shell $(build_SHA256SUM) config.site.in)
final_build_id_long+=$(shell $(build_SHA256SUM) toolchain.cmake.in)
final_build_id_long+=:[sha256sum]:$(shell $(build_SHA256SUM) toolchain.cmake.in)
final_build_id+=$(shell echo -n "$(final_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH))
$(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages)
$(AT)rm -rf $(@D)
@@ -143,31 +132,11 @@ $(host_prefix)/.stamp_$(final_build_id): $(native_packages) $(packages)
$(AT)cd $(@D); $(foreach package,$^, tar xf $($(package)_cached); )
$(AT)touch $@
$(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_build_id)
$(AT)@mkdir -p $(@D)
$(AT)sed -e 's|@HOST@|$(host)|' \
-e 's|@CC@|$(toolchain_path)$(host_CC)|' \
-e 's|@CXX@|$(toolchain_path)$(host_CXX)|' \
-e 's|@AR@|$(toolchain_path)$(host_AR)|' \
-e 's|@RANLIB@|$(toolchain_path)$(host_RANLIB)|' \
-e 's|@NM@|$(toolchain_path)$(host_NM)|' \
-e 's|@STRIP@|$(toolchain_path)$(host_STRIP)|' \
-e 's|@build_os@|$(build_os)|' \
-e 's|@host_os@|$(host_os)|' \
-e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \
-e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS) $(host_$(release_type)_CXXFLAGS))|' \
-e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS) $(host_$(release_type)_CPPFLAGS))|' \
-e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \
-e 's|@allow_host_packages@|$(ALLOW_HOST_PACKAGES)|' \
-e 's|@debug@|$(DEBUG)|' \
$< > $@
$(AT)touch $@
$(host_prefix)/share/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(final_build_id)
$(AT)@mkdir -p $(@D)
$(AT)sed -e 's|@HOST@|$(host)|' \
-e 's|@CC@|$(toolchain_path)$(host_CC)|' \
-e 's|@CXX@|$(toolchain_path)$(host_CXX)|' \
-e 's|@CC@|$(host_CC)|' \
-e 's|@CXX@|$(host_CXX)|' \
-e 's|@AR@|$(toolchain_path)$(host_AR)|' \
-e 's|@RANLIB@|$(toolchain_path)$(host_RANLIB)|' \
-e 's|@NM@|$(toolchain_path)$(host_NM)|' \
@@ -180,9 +149,9 @@ $(host_prefix)/share/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_
-e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \
-e 's|@allow_host_packages@|$(ALLOW_HOST_PACKAGES)|' \
-e 's|@debug@|$(DEBUG)|' \
-e 's|@release_type@|$(release_type)|' \
-e 's|@release_type@|$(cmake_release_type)|' \
-e 's|@build_tests@|$(build_tests)|' \
-e 's|@depends@|$(host_cmake)|' \
-e 's|@cmake_system_name@|$($(host_os)_cmake_system)|' \
-e 's|@prefix@|$($(host_arch)_$(host_os)_prefix)|'\
-e 's|@arch@|$(host_arch)|'\
$< > $@
@@ -207,24 +176,27 @@ check-packages:
check-sources:
@$(foreach package,$(all_packages),$(call check_or_remove_sources,$(package));)
$(host_prefix)/share/config.site: check-packages
$(host_prefix)/share/toolchain.cmake: check-packages
check-packages: check-sources
install: check-packages $(host_prefix)/share/config.site
install: check-packages $(host_prefix)/share/toolchain.cmake
download-one: check-sources $(all_sources)
download-osx:
@$(MAKE) -s HOST=x86_64-apple-darwin11 download-one
@$(MAKE) -s HOST=x86_64-apple-darwin download-one
download-linux:
@$(MAKE) -s HOST=x86_64-unknown-linux-gnu download-one
download-win:
@$(MAKE) -s HOST=x86_64-w64-mingw32 download-one
download: download-osx download-linux download-win
download-freebsd:
@$(MAKE) -s HOST=x86_64-unknown-freebsd download-one
download-android:
@$(MAKE) -s HOST=aarch64-linux-android download-one
download: download-osx download-linux download-win download-freebsd download-android
$(foreach package,$(all_packages),$(eval $(call ext_add_stages,$(package))))
.PHONY: install cached download-one download-osx download-linux download-win download check-packages check-sources
.PHONY: install cached download-one download-osx download-linux download-win download-freebsd download-android download check-packages check-sources
.PHONY: FORCE

View File

@@ -1,6 +1,6 @@
### Usage
To build dependencies for the current arch+OS:
To build dependencies for the current arch+OS, from this working directory:
```bash
make
@@ -20,17 +20,19 @@ make HOST=x86_64-w64-mingw32 -j4
A toolchain will be generated that's suitable for plugging into Monero's
cmake. In the above example, a dir named x86_64-w64-mingw32 will be
created. To use it for Monero:
created. To use it for Monero, from the top of the Monero source tree:
```bash
cmake -DCMAKE_TOOLCHAIN=`pwd`/contrib/depends/x86_64-w64-mingw32
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$PWD/../contrib/depends/x86_64-w64-mingw32/share/toolchain.cmake ..
```
Common `host-platform-triplets` for cross compilation are:
- `i686-w64-mingw32` for Win32
- `x86_64-w64-mingw32` for Win64
- `x86_64-apple-darwin11` for MacOSX x86_64
- `x86_64-apple-darwin` for MacOSX x86_64
- `arm-linux-gnueabihf` for Linux ARM 32 bit
- `aarch64-linux-gnu` for Linux ARM 64 bit
- `riscv64-linux-gnu` for Linux RISCV 64 bit

File diff suppressed because it is too large Load Diff

View File

@@ -1,81 +0,0 @@
depends_prefix="`dirname ${ac_site_file}`/.."
cross_compiling=maybe
host_alias=@HOST@
ac_tool_prefix=${host_alias}-
if test -z $with_boost; then
with_boost=$depends_prefix
fi
if test -z $with_qt_plugindir; then
with_qt_plugindir=$depends_prefix/plugins
fi
if test -z $with_qt_translationdir; then
with_qt_translationdir=$depends_prefix/translations
fi
if test x@host_os@ = xdarwin; then
BREW=no
PORT=no
fi
if test x@host_os@ = xmingw32; then
if test -z $with_qt_incdir; then
with_qt_incdir=$depends_prefix/include
fi
if test -z $with_qt_libdir; then
with_qt_libdir=$depends_prefix/lib
fi
fi
PATH=$depends_prefix/native/bin:$PATH
PKG_CONFIG="`which pkg-config` --static"
# These two need to remain exported because pkg-config does not see them
# otherwise. That means they must be unexported at the end of configure.ac to
# avoid ruining the cache. Sigh.
export PKG_CONFIG_PATH=$depends_prefix/share/pkgconfig:$depends_prefix/lib/pkgconfig
if test -z "@allow_host_packages@"; then
export PKGCONFIG_LIBDIR=
fi
CPPFLAGS="-I$depends_prefix/include/ $CPPFLAGS"
LDFLAGS="-L$depends_prefix/lib $LDFLAGS"
CC="@CC@"
CXX="@CXX@"
OBJC="${CC}"
CCACHE=$depends_prefix/native/bin/ccache
PYTHONPATH=$depends_prefix/native/lib/python/dist-packages:$PYTHONPATH
if test -n "@AR@"; then
AR=@AR@
ac_cv_path_ac_pt_AR=${AR}
fi
if test -n "@RANLIB@"; then
RANLIB=@RANLIB@
ac_cv_path_ac_pt_RANLIB=${RANLIB}
fi
if test -n "@NM@"; then
NM=@NM@
ac_cv_path_ac_pt_NM=${NM}
fi
if test -n "@debug@"; then
enable_reduce_exports=no
fi
if test -n "@CFLAGS@"; then
CFLAGS="@CFLAGS@ $CFLAGS"
fi
if test -n "@CXXFLAGS@"; then
CXXFLAGS="@CXXFLAGS@ $CXXFLAGS"
fi
if test -n "@CPPFLAGS@"; then
CPPFLAGS="@CPPFLAGS@ $CPPFLAGS"
fi
if test -n "@LDFLAGS@"; then
LDFLAGS="@LDFLAGS@ $LDFLAGS"
fi

File diff suppressed because it is too large Load Diff

View File

@@ -1,18 +1,25 @@
define int_vars
#Set defaults for vars which may be overridden per-package
$(1)_cc=$($($(1)_type)_CC)
$(1)_cxx=$($($(1)_type)_CXX)
$(1)_objc=$($($(1)_type)_OBJC)
$(1)_objcxx=$($($(1)_type)_OBJCXX)
$(1)_ar=$($($(1)_type)_AR)
$(1)_ranlib=$($($(1)_type)_RANLIB)
$(1)_libtool=$($($(1)_type)_LIBTOOL)
$(1)_nm=$($($(1)_type)_NM)
$(1)_cflags=$($($(1)_type)_CFLAGS) $($($(1)_type)_$(release_type)_CFLAGS)
$(1)_cxxflags=$($($(1)_type)_CXXFLAGS) $($($(1)_type)_$(release_type)_CXXFLAGS)
$(1)_arflags=$($($(1)_type)_ARFLAGS) $($($(1)_type)_$(release_type)_ARFLAGS)
$(1)_ldflags=$($($(1)_type)_LDFLAGS) $($($(1)_type)_$(release_type)_LDFLAGS) -L$($($(1)_type)_prefix)/lib
$(1)_cppflags=$($($(1)_type)_CPPFLAGS) $($($(1)_type)_$(release_type)_CPPFLAGS) -I$($($(1)_type)_prefix)/include
$(1)_cc=$$($$($(1)_type)_CC)
$(1)_cxx=$$($$($(1)_type)_CXX)
$(1)_objc=$$($$($(1)_type)_OBJC)
$(1)_objcxx=$$($$($(1)_type)_OBJCXX)
$(1)_ar=$$($$($(1)_type)_AR)
$(1)_ranlib=$$($$($(1)_type)_RANLIB)
$(1)_libtool=$$($$($(1)_type)_LIBTOOL)
$(1)_nm=$$($$($(1)_type)_NM)
$(1)_cflags=$$($$($(1)_type)_CFLAGS) \
$$($$($(1)_type)_$$(release_type)_CFLAGS)
$(1)_cxxflags=$$($$($(1)_type)_CXXFLAGS) \
$$($$($(1)_type)_$$(release_type)_CXXFLAGS)
$(1)_arflags=$$($$($(1)_type)_ARFLAGS) \
$$($$($(1)_type)_$(release_type)_ARFLAGS)
$(1)_ldflags=$$($$($(1)_type)_LDFLAGS) \
$$($$($(1)_type)_$$(release_type)_LDFLAGS) \
-L$$($($(1)_type)_prefix)/lib
$(1)_cppflags=$$($$($(1)_type)_CPPFLAGS) \
$$($$($(1)_type)_$$(release_type)_CPPFLAGS) \
-I$$($$($(1)_type)_prefix)/include
$(1)_recipe_hash:=
endef
@@ -37,6 +44,7 @@ endef
define int_get_build_recipe_hash
$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | cut -d" " -f1))
final_build_id_long+=:[$(1)_all_file_checksums]$(foreach checksum,$($(1)_all_file_checksums),$(shell echo ":$(checksum)")):
$(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1))
endef
@@ -46,7 +54,7 @@ $(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type
$(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))
$(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps) $($($(1)_type)_id_string))
$(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH)))
final_build_id_long+=$($(package)_build_id_long)
final_build_id_long+=:[recipe]:$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type):[deps]$(foreach dep,$($(1)_build_id_deps),$(shell echo ":$(dep)")):[$($(1)_type)_id]:$($($(1)_type)_id_string):
#compute package-specific paths
$(1)_build_subdir?=.
@@ -78,7 +86,7 @@ $(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path))
#default commands
$(1)_fetch_cmds ?= $(call fetch_file,$(1),$(subst \:,:,$$($(1)_download_path_fixed)),$$($(1)_download_file),$($(1)_file_name),$($(1)_sha256_hash))
$(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash) $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && tar --strip-components=1 -xf $$($(1)_source)
$(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash) $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && tar --no-same-owner --strip-components=1 -xf $$($(1)_source)
$(1)_preprocess_cmds ?=
$(1)_build_cmds ?=
$(1)_config_cmds ?=
@@ -138,13 +146,22 @@ $(1)_build_env+=$($(1)_build_env_$(host_arch)) $($(1)_build_env_$(host_arch)_$(r
$(1)_build_env+=$($(1)_build_env_$(host_os)) $($(1)_build_env_$(host_os)_$(release_type))
$(1)_build_env+=$($(1)_build_env_$(host_arch)_$(host_os)) $($(1)_build_env_$(host_arch)_$(host_os)_$(release_type))
$(1)_stage_env+=$$($(1)_stage_env_$(release_type))
$(1)_stage_env+=$($(1)_stage_env_$(host_arch)) $($(1)_stage_env_$(host_arch)_$(release_type))
$(1)_stage_env+=$($(1)_stage_env_$(host_os)) $($(1)_stage_env_$(host_os)_$(release_type))
$(1)_stage_env+=$($(1)_stage_env_$(host_arch)_$(host_os)) $($(1)_stage_env_$(host_arch)_$(host_os)_$(release_type))
$(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
$(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
$(1)_config_env+=CMAKE_MODULE_PATH=$($($(1)_type)_prefix)/lib/cmake
$(1)_config_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_build_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_stage_env+=PATH="$(build_prefix)/bin:$(PATH)"
$(1)_autoconf=./configure --host=$($($(1)_type)_host) --disable-dependency-tracking --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
$(1)_autoconf=./configure --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) --with-pic $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
ifeq ($(filter $(1),libusb unbound),)
$(1)_autoconf += --disable-dependency-tracking
endif
ifneq ($($(1)_nm),)
$(1)_autoconf += NM="$$($(1)_nm)"
endif
@@ -169,6 +186,22 @@ endif
ifneq ($($(1)_ldflags),)
$(1)_autoconf += LDFLAGS="$$($(1)_ldflags)"
endif
$(1)_cmake=env CC="$$($(1)_cc)" \
CFLAGS="$$($(1)_cppflags) $$($(1)_cflags)" \
CXX="$$($(1)_cxx)" \
CXXFLAGS="$$($(1)_cppflags) $$($(1)_cxxflags)" \
LDFLAGS="$$($(1)_ldflags)" \
cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" $$($(1)_config_opts)
ifeq ($($(1)_type),build)
$(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib"
else
ifneq ($(host),$(build))
$(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system)
$(1)_cmake += -DCMAKE_C_COMPILER_TARGET=$(host)
$(1)_cmake += -DCMAKE_CXX_COMPILER_TARGET=$(host)
endif
endif
endef
define int_add_cmds
@@ -264,4 +297,4 @@ $(foreach package,$(all_packages),$(eval $(call int_config_attach_build_config,$
$(foreach package,$(all_packages),$(eval $(call int_add_cmds,$(package))))
#special exception: if a toolchain package exists, all non-native packages depend on it
$(foreach package,$(packages),$(eval $($(package)_unpacked): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) ))
$(foreach package,$(packages),$(eval $($(package)_extracted): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) ))

View File

@@ -1,12 +1,20 @@
ANDROID_API=21
ifeq ($(host_arch),arm)
host_toolchain=arm-linux-androideabi-
host_toolchain=armv7a-linux-androideabi$(ANDROID_API)-
else ifeq ($(host_arch),aarch64)
host_toolchain=aarch64-linux-android$(ANDROID_API)-
endif
android_CC=$(host_toolchain)clang
android_CXX=$(host_toolchain)clang++
android_RANLIB=:
clear_guix_env=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
-u LIBRARY_PATH
android_CC=$(clear_guix_env) $(build_prefix)/bin/$(host_toolchain)clang
android_CXX=$(clear_guix_env) $(build_prefix)/bin/$(host_toolchain)clang++
android_AR=llvm-ar
android_RANLIB=llvm-ranlib
android_CFLAGS=-pipe
android_CXXFLAGS=$(android_CFLAGS)
@@ -20,3 +28,8 @@ android_debug_CXXFLAGS=$(android_debug_CFLAGS)
android_native_toolchain=android_ndk
# CMake 3.24 fails to detect API level for Android, even if set explicitly in
# toolchain.cmake. It also tries to manually construct paths to clang(++), but we
# want it to always use the options defined here. It's easier to just pretend
# we're a generic Linux target, than to hack around it.
android_cmake_system=Linux

View File

@@ -1,21 +1,67 @@
OSX_MIN_VERSION=10.8
LD64_VERSION=609
ifeq (aarch64, $(host_arch))
CC_target=arm64-apple-$(host_os)
else
CC_target=$(host)
endif
darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -B$(host_prefix)/native/bin/$(host)-
darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)-
OSX_MIN_VERSION=11.0
OSX_SDK_VERSION=11.0
XCODE_VERSION=12.2
XCODE_BUILD_ID=12B45b
LD64_VERSION=711
OSX_SDK=$(host_prefix)/native/SDK
darwin_native_toolchain=darwin_sdk
clang_prog=clang
clangxx_prog=clang++
darwin_AR=llvm-ar
darwin_DSYMUTIL=dsymutil
darwin_NM=llvm-nm
darwin_OBJDUMP=llvm-objdump
darwin_RANLIB=llvm-ranlib
darwin_STRIP=llvm-strip
# Flag explanations:
#
# -mlinker-version
#
# Ensures that modern linker features are enabled. See here for more
# details: https://github.com/bitcoin/bitcoin/pull/19407.
#
# -isysroot$(OSX_SDK) -nostdlibinc
#
# Disable default include paths built into the compiler as well as
# those normally included for libc and libc++. The only path that
# remains implicitly is the clang resource dir.
#
# -iwithsysroot / -iframeworkwithsysroot
#
# Adds the desired paths from the SDK
#
darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
-u LIBRARY_PATH \
$(clang_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
-mlinker-version=$(LD64_VERSION) \
-isysroot$(OSX_SDK) -nostdlibinc \
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
-u LIBRARY_PATH \
$(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
-mlinker-version=$(LD64_VERSION) \
-isysroot$(OSX_SDK) -nostdlibinc \
-iwithsysroot/usr/include/c++/v1 \
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
darwin_CFLAGS=-pipe
darwin_CXXFLAGS=$(darwin_CFLAGS)
darwin_LDFLAGS=-Wl,-platform_version,macos,$(OSX_MIN_VERSION),$(OSX_SDK_VERSION) -Wl,-no_adhoc_codesign -fuse-ld=lld
darwin_ARFLAGS=cr
darwin_release_CFLAGS=-O1
darwin_release_CFLAGS=-O2
darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
darwin_debug_CFLAGS=-O1
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
darwin_native_toolchain=native_cctools darwin_sdk
darwin_cmake_system=Darwin

View File

@@ -1,5 +1,11 @@
freebsd_CC=clang-8
freebsd_CXX=clang++-8
freebsd_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
-u LIBRARY_PATH clang --target=$(host) --sysroot=$(host_prefix)/native -iwithsysroot/usr/include
freebsd_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
-u LIBRARY_PATH clang++ --target=$(host) -stdlib=libc++ --sysroot=$(host_prefix)/native \
-iwithsysroot/usr/include/c++/v1 -iwithsysroot/usr/include
freebsd_AR=ar
freebsd_RANLIB=ranlib
freebsd_NM=nm
@@ -16,3 +22,4 @@ freebsd_debug_CXXFLAGS=$(freebsd_debug_CFLAGS)
freebsd_native_toolchain=freebsd_base
freebsd_cmake_system=FreeBSD

View File

@@ -10,6 +10,7 @@ linux_debug_CXXFLAGS=$(linux_debug_CFLAGS)
linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
ifeq ($(GUIX_ENVIRONMENT),)
ifeq (86,$(findstring 86,$(build_arch)))
i686_linux_CC=gcc -m32
i686_linux_CXX=g++ -m32
@@ -30,3 +31,6 @@ i686_linux_CXX=$(default_host_CXX) -m32
x86_64_linux_CC=$(default_host_CC) -m64
x86_64_linux_CXX=$(default_host_CXX) -m64
endif
endif
linux_cmake_system=Linux

View File

@@ -9,3 +9,5 @@ mingw32_debug_CFLAGS=-O1
mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS)
mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
mingw32_cmake_system=Windows

View File

@@ -1,13 +1,8 @@
package=android_ndk
$(package)_version=17b
$(package)_version=27c
$(package)_download_path=https://dl.google.com/android/repository/
$(package)_file_name=android-ndk-r$($(package)_version)-linux-x86_64.zip
$(package)_sha256_hash=5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd
define $(package)_set_vars
$(package)_config_opts_arm=--arch arm
$(package)_config_opts_aarch64=--arch arm64
endef
$(package)_file_name=android-ndk-r$($(package)_version)-linux.zip
$(package)_sha256_hash=59c2f6dc96743b5daf5d1626684640b20a6bd2b1d85b13156b90333741bad5cc
define $(package)_extract_cmds
echo $($(package)_sha256_hash) $($(1)_source_dir)/$($(package)_file_name) | sha256sum -c &&\
@@ -15,8 +10,6 @@ define $(package)_extract_cmds
endef
define $(package)_stage_cmds
android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api 21 \
--install-dir $(build_prefix) --stl=libc++ $($(package)_config_opts) &&\
mv $(build_prefix) $($(package)_staging_dir)/$(host_prefix)
mkdir -p $($(package)_staging_prefix_dir) && \
mv android-ndk-r$($(package)_version)/toolchains/llvm/prebuilt/linux-x86_64/* $($(package)_staging_prefix_dir)
endef

View File

@@ -1,41 +1,37 @@
package=boost
$(package)_version=1_64_0
$(package)_download_path=https://downloads.sourceforge.net/project/boost/boost/1.64.0/
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
$(package)_sha256_hash=7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7cb683332
$(package)_dependencies=libiconv
$(package)_patches=fix_aroptions.patch fix_arm_arch.patch
package=boost
$(package)_version=1.84.0
$(package)_download_path=https://archives.boost.io/release/$($(package)_version)/source/
$(package)_file_name=$(package)_$(subst .,_,$($(package)_version)).tar.bz2
$(package)_sha256_hash=cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454
define $(package)_set_vars
$(package)_config_opts_release=variant=release
$(package)_config_opts_debug=variant=debug
$(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam
$(package)_config_opts+=--layout=system --user-config=user-config.jam
$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
$(package)_config_opts_linux=threadapi=pthread runtime-link=shared
$(package)_config_opts_android=threadapi=pthread runtime-link=static target-os=android
$(package)_config_opts_darwin=--toolset=darwin runtime-link=shared
$(package)_config_opts_darwin=runtime-link=shared target-os=darwin
$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
$(package)_config_opts_x86_64_mingw32=address-model=64
$(package)_config_opts_i686_mingw32=address-model=32
$(package)_config_opts_i686_linux=address-model=32 architecture=x86
$(package)_toolset_$(host_os)=gcc
$(package)_archiver_$(host_os)=$($(package)_ar)
$(package)_toolset_darwin=darwin
$(package)_archiver_darwin=$($(package)_libtool)
$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,locale
$(package)_cxxflags=-std=c++11
$(package)_cxxflags_linux=-fPIC
$(package)_cxxflags_freebsd=-fPIC
$(package)_config_libraries_$(host_os)="chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization"
$(package)_config_libraries_mingw32="chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,locale"
$(package)_cxxflags=-std=c++17
$(package)_cxxflags_linux+=-fPIC
$(package)_cxxflags_freebsd+=-fPIC
$(package)_cxxflags_darwin+=-ffile-prefix-map=$($(package)_extract_dir)=/usr
endef
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/fix_aroptions.patch &&\
patch -p1 < $($(package)_patch_dir)/fix_arm_arch.patch &&\
echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <arflags>\"$($(package)_arflags)\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
endef
define $(package)_config_cmds
./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries)
./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries_$(host_os))
endef
define $(package)_build_cmds

View File

@@ -1,10 +1,14 @@
package=darwin_sdk
$(package)_version=11.1
$(package)_download_path=https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/
$(package)_file_name=MacOSX$($(package)_version).sdk.tar.xz
$(package)_sha256_hash=68797baaacb52f56f713400de306a58a7ca00b05c3dc6d58f0a8283bcac721f8
$(package)_version=12.2
$(package)_download_path=https://bitcoincore.org/depends-sources/sdks
$(package)_file_name=Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz
$(package)_sha256_hash=df75d30ecafc429e905134333aeae56ac65fac67cb4182622398fd717df77619
# Prevent clang from including readline headers from the SDK. We statically link
# our own version of readline.
define $(package)_stage_cmds
mkdir -p $($(package)_staging_dir)/$(host_prefix)/native/SDK &&\
mv * $($(package)_staging_dir)/$(host_prefix)/native/SDK
mkdir -p $($(package)_staging_prefix_dir)/SDK &&\
rm -rf usr/include/readline && \
mv * $($(package)_staging_prefix_dir)/SDK
endef

View File

@@ -1,30 +0,0 @@
package=eudev
$(package)_version=v3.2.6
$(package)_download_path=https://github.com/gentoo/eudev/archive/
$(package)_download_file=$($(package)_version).tar.gz
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=a96ecb8637667897b8bd4dee4c22c7c5f08b327be45186e912ce6bc768385852
define $(package)_set_vars
$(package)_config_opts=--disable-gudev --disable-introspection --disable-hwdb --disable-manpages --disable-shared
endef
define $(package)_config_cmds
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
endef
define $(package)_build_cmd
$(MAKE)
endef
define $(package)_preprocess_cmds
cd $($(package)_build_subdir); autoreconf -f -i
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds
rm lib/*.la
endef

View File

@@ -1,28 +0,0 @@
package=expat
$(package)_version=2.4.1
$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_2_4_1
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=2f9b6a580b94577b150a7d5617ad4643a4301a6616ff459307df3e225bcfbf40
define $(package)_set_vars
$(package)_config_opts=--enable-static
$(package)_config_opts=--disable-shared
$(package)_config_opts+=--prefix=$(host_prefix)
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds
rm lib/*.la
endef

View File

@@ -1,23 +1,20 @@
package=freebsd_base
$(package)_version=11.3
$(package)_download_path=https://download.freebsd.org/ftp/releases/amd64/$($(package)_version)-RELEASE/
$(package)_version=12.3
$(package)_download_path=https://archive.freebsd.org/old-releases/amd64/$($(package)_version)-RELEASE/
$(package)_download_file=base.txz
$(package)_file_name=freebsd-base-$($(package)_version).txz
$(package)_sha256_hash=4599023ac136325b86f2fddeec64c1624daa83657e40b00b2ef944c81463a4ff
$(package)_sha256_hash=e85b256930a2fbc04b80334106afecba0f11e52e32ffa197a88d7319cf059840
define $(package)_extract_cmds
echo $($(package)_sha256_hash) $($(1)_source_dir)/$($(package)_file_name) | sha256sum -c &&\
tar xf $($(1)_source_dir)/$($(package)_file_name) ./lib/ ./usr/lib/ ./usr/include/
endef
define $(package)_build_cmds
mkdir bin &&\
echo "#!/bin/sh\n\nexec /usr/bin/clang-8 -target x86_64-unknown-freebsd$($(package)_version) --sysroot=$(host_prefix)/native $$$$""@" > bin/clang-8 &&\
echo "#!/bin/sh\n\nexec /usr/bin/clang++-8 -target x86_64-unknown-freebsd$($(package)_version) --sysroot=$(host_prefix)/native $$$$""@" > bin/clang++-8 &&\
chmod 755 bin/*
endef
# Prevent clang from including OpenSSL headers from the system base. We
# statically link our own version of OpenSSL.
define $(package)_stage_cmds
mkdir $($(package)_staging_dir)/$(host_prefix)/native &&\
mv bin lib usr $($(package)_staging_dir)/$(host_prefix)/native
mkdir $($(package)_staging_prefix_dir) &&\
rm -rf usr/include/openssl &&\
mv lib usr $($(package)_staging_prefix_dir)
endef

View File

@@ -1,30 +0,0 @@
package=graphviz
$(package)_version=2.40.1
$(package)_download_path=www.graphviz.org/pub/graphviz/stable/SOURCES/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=ca5218fade0204d59947126c38439f432853543b0818d9d728c589dfe7f3a421
define $(package)_preprocess_cmds
./autogen.sh
endef
define $(package)_set_vars
$(package)_config_opts=--disable-shared --enable-multibye --without-purify --without-curses
$(package)_config_opts_release=--disable-debug-mode
$(package)_config_opts_linux=--with-pic
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds
endef

View File

@@ -1,39 +0,0 @@
package=gtest
$(package)_version=1.8.1
$(package)_download_path=https://github.com/google/googletest/archive/
$(package)_download_file=release-$($(package)_version).tar.gz
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c
$(package)_cxxflags=-std=c++11
$(package)_cxxflags_linux=-fPIC
define $(package)_config_cmds
cd googletest && \
CC="$(host_prefix)/native/bin/$($(package)_cc)" \
CXX="$(host_prefix)/native/bin/$($(package)_cxx)" \
AR="$(host_prefix)/native/bin/$($(package)_ar)" \
RANLIB="$(host_prefix)/native/bin/$($(package)_ranlib)" \
LIBTOOL="$(host_prefix)/native/bin/$($(package)_libtool)" \
CXXFLAGS="$($(package)_cxxflags)" \
CCFLAGS="$($(package)_ccflags)" \
CPPFLAGS="$($(package)_cppflags)" \
CFLAGS="$($(package)_cflags) $($(package)_cppflags)" \
LDLAGS="$($(package)_ldflags)" \
cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix) \
-DTOOLCHAIN_PREFIX=$(host_toolchain) \
-DCMAKE_AR="$(host_prefix)/native/bin/$($(package)_ar)" \
-DCMAKE_RANLIB="$(host_prefix)/native/bin/$($(package)_ranlib)" \
-DCMAKE_CXX_FLAGS_DEBUG=ON
endef
# -DCMAKE_TOOLCHAIN_FILE=$(HOST)/share/toolchain.cmake
define $(package)_build_cmds
cd googletest && CC="$(host_prefix)/native/bin/$($(package)_cc)" $(MAKE)
endef
define $(package)_stage_cmds
mkdir $($(package)_staging_prefix_dir)/lib $($(package)_staging_prefix_dir)/include &&\
cp googletest/libgtest.a $($(package)_staging_prefix_dir)/lib/ &&\
cp googletest/libgtest_main.a $($(package)_staging_prefix_dir)/lib/ &&\
cp -a googletest/include/* $($(package)_staging_prefix_dir)/include/
endef

View File

@@ -1,27 +1,30 @@
package=hidapi
$(package)_version=0.11.0
$(package)_download_path=https://github.com/libusb/hidapi/archive
$(package)_version=0.14.0
$(package)_download_path=https://github.com/libusb/hidapi/archive/refs/tags
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=391d8e52f2d6a5cf76e2b0c079cfefe25497ba1d4659131297081fc0cd744632
$(package)_linux_dependencies=libusb eudev
$(package)_patches=missing_win_include.patch
$(package)_sha256_hash=a5714234abe6e1f53647dd8cba7d69f65f71c558b7896ed218864ffcf405bcbd
$(package)_linux_dependencies=libusb
# -DHIDAPI_NO_ICONV=ON
#
# `FindIconv.cmake` in CMake 3.16 fails to detect iconv for riscv64, arm, and aarch64 linux targets.
# Disable it if we're not building in a release environment.
define $(package)_set_vars
$(package)_config_opts=--enable-static --disable-shared
$(package)_config_opts+=--prefix=$(host_prefix)
$(package)_config_opts_linux+=libudev_LIBS="-L$(host_prefix)/lib -ludev"
$(package)_config_opts_linux+=libudev_CFLAGS=-I$(host_prefix)/include
$(package)_config_opts_linux+=libusb_LIBS="-L$(host_prefix)/lib -lusb-1.0"
$(package)_config_opts_linux+=libusb_CFLAGS=-I$(host_prefix)/include/libusb-1.0
$(package)_config_opts_linux+=--with-pic
$(package)_config_opts := -DBUILD_SHARED_LIBS=OFF
$(package)_config_opts += -DHIDAPI_WITH_HIDRAW=OFF
ifeq ($(GUIX_ENVIRONMENT),)
$(package)_config_opts += -DHIDAPI_NO_ICONV=ON
endif
endef
# Remove blobs
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/missing_win_include.patch && ./bootstrap
rm -rf documentation testgui windows/test/data m4
endef
define $(package)_config_cmds
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
$($(package)_cmake) .
endef
define $(package)_build_cmds
@@ -31,8 +34,3 @@ endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds
rm lib/*.la
endef

View File

@@ -1,27 +0,0 @@
package=icu4c
$(package)_version=55.2
$(package)_download_path=https://github.com/unicode-org/icu/releases/download/release-55-2/
$(package)_file_name=$(package)-55_2-src.tgz
$(package)_sha256_hash=eda2aa9f9c787748a2e2d310590720ca8bcc6252adf6b4cfb03b65bef9d66759
$(package)_patches=icu-001-dont-build-static-dynamic-twice.patch
define $(package)_set_vars
$(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -DU_USING_ICU_NAMESPACE=0 -DU_STATIC_IMPLEMENTATION -DU_COMBINED_IMPLEMENTATION -fPIC -DENABLE_STATIC=YES -DPGKDATA_MODE=static"
endef
define $(package)_config_cmds
patch -p1 < $($(package)_patch_dir)/icu-001-dont-build-static-dynamic-twice.patch &&\
mkdir builda &&\
mkdir buildb &&\
cd builda &&\
sh ../source/runConfigureICU Linux &&\
make &&\
cd ../buildb &&\
sh ../source/runConfigureICU MinGW --enable-static=yes --disable-shared --disable-layout --disable-layoutex --disable-tests --disable-samples --prefix=$(host_prefix) --with-cross-build=`pwd`/../builda &&\
$(MAKE) $($(package)_build_opts)
endef
define $(package)_stage_cmds
cd buildb &&\
$(MAKE) $($(package)_build_opts) DESTDIR=$($(package)_staging_dir) install lib/*
endef

View File

@@ -1,34 +0,0 @@
package=ldns
$(package)_version=1.7.1
$(package)_download_path=https://www.nlnetlabs.nl/downloads/$(package)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=8ac84c16bdca60e710eea75782356f3ac3b55680d40e1530d7cea474ac208229
$(package)_dependencies=openssl
define $(package)_set_vars
$(package)_config_opts=--disable-shared --enable-static --with-drill
$(package)_config_opts+=--with-ssl=$(host_prefix)
$(package)_config_opts_release=--disable-debug-mode
$(package)_config_opts_linux=--with-pic
endef
define $(package)_preprocess_cmds
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install-h install-lib
endef
define $(package)_postprocess_cmds
rm lib/*.la
endef

View File

@@ -1,23 +0,0 @@
package=libICE
$(package)_version=1.0.9
$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202
$(package)_dependencies=xtrans xproto
define $(package)_set_vars
$(package)_config_opts=--disable-static --disable-docs --disable-specs --without-xsltproc
$(package)_config_opts_linux=--with-pic
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

View File

@@ -1,23 +0,0 @@
package=libSM
$(package)_version=1.2.2
$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd
$(package)_dependencies=xtrans xproto libICE
define $(package)_set_vars
$(package)_config_opts=--without-libuuid --without-xsltproc --disable-docs --disable-static
$(package)_config_opts_linux=--with-pic
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

View File

@@ -1,35 +0,0 @@
package=libiconv
$(package)_version=1.15
$(package)_download_path=https://ftp.gnu.org/gnu/libiconv
$(package)_file_name=libiconv-$($(package)_version).tar.gz
$(package)_sha256_hash=ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178
$(package)_patches=fix-whitespace.patch
define $(package)_set_vars
$(package)_config_opts=--disable-nls
$(package)_config_opts=--enable-static
$(package)_config_opts=--disable-shared
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
endef
define $(package)_preprocess_cmds
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux/ &&\
patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch
endef
define $(package)_config_cmds
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds
rm lib/*.la
endef

View File

@@ -1,31 +1,24 @@
package=libusb
$(package)_version=1.0.22
$(package)_download_path=https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-$($(package)_version)/
$(package)_version=1.0.27
$(package)_download_path=https://github.com/libusb/libusb/releases/download/v$($(package)_version)
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157
$(package)_sha256_hash=ffaa41d741a8a3bee244ac8e54a72ea05bf2879663c098c82fc5757853441575
define $(package)_preprocess_cmds
autoreconf -i
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
endef
define $(package)_set_vars
$(package)_config_opts=--disable-shared
$(package)_config_opts_linux=--with-pic --disable-udev
$(package)_config_opts_linux=--disable-udev
$(package)_config_opts_mingw32=--disable-udev
$(package)_config_opts_darwin=--disable-udev
$(package)_config_opts_freebsd=--disable-udev
endef
ifneq ($(host_os),darwin)
define $(package)_config_cmds
cp -f $(BASEDIR)/config.guess config.guess &&\
cp -f $(BASEDIR)/config.sub config.sub &&\
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
endef
else
define $(package)_config_cmds
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
endef
endif
define $(package)_config_cmds
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
endef
define $(package)_build_cmd
$(MAKE)
@@ -35,5 +28,6 @@ define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds cp -f lib/libusb-1.0.a lib/libusb.a
define $(package)_postprocess_cmds
cp -f lib/libusb-1.0.a lib/libusb.a
endef

View File

@@ -1,20 +0,0 @@
package=native_biplist
$(package)_version=0.9
$(package)_download_path=https://pypi.python.org/packages/source/b/biplist
$(package)_file_name=biplist-$($(package)_version).tar.gz
$(package)_sha256_hash=b57cadfd26e4754efdf89e9e37de87885f9b5c847b2615688ca04adfaf6ca604
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
$(package)_patches=sorted_list.patch
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/sorted_list.patch
endef
define $(package)_build_cmds
python setup.py build
endef
define $(package)_stage_cmds
mkdir -p $($(package)_install_libdir) && \
python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
endef

View File

@@ -1,25 +0,0 @@
package=native_ccache
$(package)_version=3.3.4
$(package)_download_path=https://samba.org/ftp/ccache
$(package)_file_name=ccache-$($(package)_version).tar.bz2
$(package)_sha256_hash=fa9d7f38367431bc86b19ad107d709ca7ecf1574fdacca01698bdf0a47cd8567
define $(package)_set_vars
$(package)_config_opts=
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds
rm -rf lib include
endef

View File

@@ -1,28 +0,0 @@
package=native_cctools
$(package)_version=04663295d0425abfac90a42440a7ec02d7155fea
$(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive
$(package)_download_file=$($(package)_version).tar.gz
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=70a7189418c2086d20c299c5d59250cf5940782c778892ccc899c66516ed240e
$(package)_build_subdir=cctools
$(package)_dependencies=native_clang native_libtapi
define $(package)_set_vars
$(package)_config_opts=--target=$(host) --disable-lto-support --with-libtapi=$(host_prefix)
$(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib
$(package)_cc=$(host_prefix)/native/bin/clang
$(package)_cxx=$(host_prefix)/native/bin/clang++
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install && \
cp $($(package)_extract_dir)/cctools/misc/install_name_tool $($(package)_staging_prefix_dir)/bin/
endef

View File

@@ -1,26 +0,0 @@
package=native_cdrkit
$(package)_version=1.1.11
$(package)_download_path=https://distro.ibiblio.org/fatdog/source/600/c
$(package)_file_name=cdrkit-$($(package)_version).tar.bz2
$(package)_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564
$(package)_patches=cdrkit-deterministic.patch
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/cdrkit-deterministic.patch
endef
define $(package)_config_cmds
cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix)
endef
define $(package)_build_cmds
$(MAKE) genisoimage
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) -C genisoimage install
endef
define $(package)_postprocess_cmds
rm bin/isovfy bin/isoinfo bin/isodump bin/isodebug bin/devdump
endef

View File

@@ -1,29 +0,0 @@
package=native_clang
$(package)_version=9.0.0
$(package)_download_path=https://releases.llvm.org/$($(package)_version)
$(package)_download_file=clang+llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-18.04.tar.xz
$(package)_file_name=clang-llvm-$($(package)_version)-x86_64-linux-gnu-ubuntu-18.04.tar.xz
$(package)_sha256_hash=a23b082b30c128c9831dbdd96edad26b43f56624d0ad0ea9edec506f5385038d
define $(package)_extract_cmds
echo $($(package)_sha256_hash) $($(package)_source) | sha256sum -c &&\
mkdir -p toolchain/bin toolchain/lib/clang/3.5/include && \
tar --strip-components=1 -C toolchain -xf $($(package)_source) && \
rm -f toolchain/lib/libc++abi.so* && \
echo "#!/bin/sh" > toolchain/bin/$(host)-dsymutil && \
echo "exit 0" >> toolchain/bin/$(host)-dsymutil && \
chmod +x toolchain/bin/$(host)-dsymutil
endef
define $(package)_stage_cmds
cd $($(package)_extract_dir)/toolchain && \
mkdir -p $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include && \
mkdir -p $($(package)_staging_prefix_dir)/bin $($(package)_staging_prefix_dir)/include && \
cp bin/clang $($(package)_staging_prefix_dir)/bin/ &&\
cp -P bin/clang++ $($(package)_staging_prefix_dir)/bin/ &&\
cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \
cp -rf lib/clang/$($(package)_version)/include/* $($(package)_staging_prefix_dir)/lib/clang/$($(package)_version)/include/ && \
cp bin/dsymutil $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \
if `test -d include/c++/`; then cp -rf include/c++/ $($(package)_staging_prefix_dir)/include/; fi && \
if `test -d lib/c++/`; then cp -rf lib/c++/ $($(package)_staging_prefix_dir)/lib/; fi
endef

View File

@@ -1,23 +0,0 @@
package=native_cmake
$(package)_version=3.14.0
$(package)_version_dot=v3.14
$(package)_download_path=https://cmake.org/files/$($(package)_version_dot)/
$(package)_file_name=cmake-$($(package)_version).tar.gz
$(package)_sha256_hash=aa76ba67b3c2af1946701f847073f4652af5cbd9f141f221c97af99127e75502
define $(package)_set_vars
$(package)_config_opts=
endef
define $(package)_config_cmds
./bootstrap &&\
./configure $($(package)_config_opts)
endef
define $(package)_build_cmd
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

View File

@@ -1,17 +0,0 @@
package=native_ds_store
$(package)_version=1.1.0
$(package)_download_path=https://github.com/al45tair/ds_store/archive/
$(package)_download_file=v$($(package)_version).tar.gz
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=a9f4c0755c6be7224ff7029e188dd262e830bb81e801424841db9eb0780ec8ed
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
$(package)_dependencies=native_biplist
define $(package)_build_cmds
python setup.py build
endef
define $(package)_stage_cmds
mkdir -p $($(package)_install_libdir) && \
python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
endef

View File

@@ -1,22 +0,0 @@
package=native_libdmg-hfsplus
$(package)_version=0.1
$(package)_download_path=https://github.com/theuni/libdmg-hfsplus/archive
$(package)_file_name=libdmg-hfsplus-v$($(package)_version).tar.gz
$(package)_sha256_hash=6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3
$(package)_build_subdir=build
define $(package)_preprocess_cmds
mkdir build
endef
define $(package)_config_cmds
cmake -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix)/bin ..
endef
define $(package)_build_cmds
$(MAKE) -C dmg
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) -C dmg install
endef

View File

@@ -1,28 +0,0 @@
package=native_libtapi
$(package)_version=664b8414f89612f2dfd35a9b679c345aa5389026
$(package)_download_path=https://github.com/tpoechtrager/apple-libtapi/archive
$(package)_download_file=$($(package)_version).tar.gz
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=62e419c12d1c9fad67cc1cd523132bc00db050998337c734c15bc8d73cc02b61
$(package)_build_subdir=build
$(package)_dependencies=native_clang
define $(package)_config_cmds
echo -n $(build_prefix) > INSTALLPREFIX; \
CC=$(host_prefix)/native/bin/clang CXX=$(host_prefix)/native/bin/clang++ \
cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix) \
-DLLVM_INCLUDE_TESTS=OFF \
-DCMAKE_BUILD_TYPE=RELEASE \
-DTAPI_REPOSITORY_STRING="1100.0.11" \
-DTAPI_FULL_VERSION="11.0.0" \
-DCMAKE_CXX_FLAGS="-I $($(package)_extract_dir)/src/llvm/projects/clang/include -I $($(package)_build_dir)/projects/clang/include" \
$($(package)_extract_dir)/src/llvm
endef
define $(package)_build_cmds
$(MAKE) clangBasic && $(MAKE) libtapi
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install-libtapi install-tapi-headers
endef

View File

@@ -1,21 +0,0 @@
package=native_mac_alias
$(package)_version=1.1.0
$(package)_download_path=https://github.com/al45tair/mac_alias/archive/
$(package)_download_file=v$($(package)_version).tar.gz
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=b10cb44ecb64fc25283fae7a9cf365d2829377d84e37b9c21100aca8757509be
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
$(package)_patches=python3.patch
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/python3.patch
endef
define $(package)_build_cmds
python setup.py build
endef
define $(package)_stage_cmds
mkdir -p $($(package)_install_libdir) && \
python setup.py install --root=$($(package)_staging_dir) --prefix=$(build_prefix) --install-lib=$($(package)_install_libdir)
endef

View File

@@ -1,8 +1,9 @@
package=protobuf3
$(package)_version=3.6.1
package=native_protobuf
$(package)_version=21.12
$(package)_version_protobuf_cpp=3.21.12
$(package)_download_path=https://github.com/protocolbuffers/protobuf/releases/download/v$($(package)_version)/
$(package)_file_name=protobuf-cpp-$($(package)_version).tar.gz
$(package)_sha256_hash=b3732e471a9bb7950f090fd0457ebd2536a9ba0891b7f3785919c654fe2a2529
$(package)_file_name=protobuf-cpp-$($(package)_version_protobuf_cpp).tar.gz
$(package)_sha256_hash=4eab9b524aa5913c6fffb20b2a8abf5ef7f95a80bc0701f3a6dbb4c607f73460
$(package)_cxxflags=-std=c++11
define $(package)_set_vars
@@ -15,13 +16,13 @@ define $(package)_config_cmds
endef
define $(package)_build_cmds
$(MAKE) -C src
$(MAKE) -C src protoc
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) -C src install
$(MAKE) DESTDIR=$($(package)_staging_dir) -C src install-binPROGRAMS install-nobase_dist_protoDATA
endef
define $(package)_postprocess_cmds
rm lib/libprotoc.a
rm -rf lib/
endef

View File

@@ -46,6 +46,7 @@ define $(package)_set_vars
endef
define $(package)_preprocess_cmds
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . && \
cp $($(package)_patch_dir)/fallback.c ncurses
endef

View File

@@ -1,21 +1,21 @@
package=openssl
$(package)_version=1.1.1l
$(package)_download_path=https://www.openssl.org/source
$(package)_version=3.5.4
$(package)_download_path=https://github.com/openssl/openssl/releases/download/openssl-$($(package)_version)
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
$(package)_patches=fix_darwin.patch
$(package)_sha256_hash=967311f84955316969bdb1d8d4b983718ef42338639c621ec4c34fddef355e99
$(package)_patches=fix-android.patch
define $(package)_set_vars
$(package)_config_env=AR="$($(package)_ar)" ARFLAGS=$($(package)_arflags) RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
$(package)_config_env_android=ANDROID_NDK_HOME="$(host_prefix)/native" PATH="$(host_prefix)/native/bin" CC=clang AR=ar RANLIB=ranlib
$(package)_build_env_android=ANDROID_NDK_HOME="$(host_prefix)/native"
$(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl
$(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
$(package)_config_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native" PATH="$(host_prefix)/native/bin"
$(package)_build_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native"
$(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl --libdir=$(host_prefix)/lib
$(package)_config_opts+=no-apps
$(package)_config_opts+=no-capieng
$(package)_config_opts+=no-dso
$(package)_config_opts+=no-dtls1
$(package)_config_opts+=no-ec_nistp_64_gcc_128
$(package)_config_opts+=no-gost
$(package)_config_opts+=no-heartbeats
$(package)_config_opts+=no-md2
$(package)_config_opts+=no-rc5
$(package)_config_opts+=no-rdrand
@@ -23,13 +23,13 @@ $(package)_config_opts+=no-rfc3779
$(package)_config_opts+=no-sctp
$(package)_config_opts+=no-shared
$(package)_config_opts+=no-ssl-trace
$(package)_config_opts+=no-ssl2
$(package)_config_opts+=no-ssl3
$(package)_config_opts+=no-tests
$(package)_config_opts+=no-unit-test
$(package)_config_opts+=no-weak-ssl-ciphers
$(package)_config_opts+=no-winstore
$(package)_config_opts+=no-zlib
$(package)_config_opts+=no-zlib-dynamic
$(package)_config_opts+=$($(package)_cflags) $($(package)_cppflags)
$(package)_config_opts_linux=-fPIC -Wa,--noexecstack
$(package)_config_opts_freebsd=-fPIC -Wa,--noexecstack
$(package)_config_opts_x86_64_linux=linux-x86_64
@@ -39,7 +39,8 @@ $(package)_config_opts_aarch64_linux=linux-generic64
$(package)_config_opts_arm_android=--static android-arm
$(package)_config_opts_aarch64_android=--static android-arm64
$(package)_config_opts_aarch64_darwin=darwin64-arm64-cc
$(package)_config_opts_riscv64_linux=linux-generic64
$(package)_config_opts_riscv64_linux=linux64-riscv64
$(package)_config_opts_loongarch64_linux=linux-generic64
$(package)_config_opts_mipsel_linux=linux-generic32
$(package)_config_opts_mips_linux=linux-generic32
$(package)_config_opts_powerpc_linux=linux-generic32
@@ -50,12 +51,13 @@ $(package)_config_opts_x86_64_freebsd=BSD-x86_64
endef
define $(package)_preprocess_cmds
sed -i.old 's|"engines", "apps", "test", "util", "tools", "fuzz"|"engines", "tools"|' Configure && \
patch -p1 < $($(package)_patch_dir)/fix_darwin.patch
sed -i.old 's|crypto ssl apps util tools fuzz providers doc|crypto ssl util tools providers|' build.info && \
patch -p1 < $($(package)_patch_dir)/fix-android.patch && \
rm -rf doc demos apps test
endef
define $(package)_config_cmds
./Configure $($(package)_config_opts)
./Configure $($(package)_config_opts) ARFLAGS=$($(package)_arflags)
endef
define $(package)_build_cmds

View File

@@ -1,39 +1,30 @@
packages:=boost openssl zeromq libiconv expat ldns unbound
native_packages := native_protobuf
packages := boost openssl zeromq unbound sodium protobuf
# ccache is useless in gitian builds
ifneq ($(GITIAN),1)
native_packages := native_ccache
ifneq ($(host_os),android)
packages += libusb
endif
hardware_packages := hidapi protobuf libusb
hardware_native_packages := native_protobuf
android_native_packages = android_ndk
android_packages = ncurses readline sodium
darwin_native_packages = $(hardware_native_packages)
darwin_packages = ncurses readline sodium $(hardware_packages)
# not really native...
freebsd_native_packages = freebsd_base
freebsd_packages = ncurses readline sodium
linux_packages = eudev ncurses readline sodium $(hardware_packages)
linux_native_packages = $(hardware_native_packages)
qt_packages = qt
ifeq ($(build_tests),ON)
packages += gtest
ifneq ($(host_os),freebsd)
ifneq ($(host_os),android)
packages += hidapi
endif
endif
ifneq ($(host_arch),riscv64)
linux_packages += unwind
ifneq ($(host_os),mingw32)
packages += ncurses readline
endif
mingw32_packages = icu4c sodium $(hardware_packages)
mingw32_native_packages = $(hardware_native_packages)
linux_native_packages :=
linux_packages :=
freebsd_native_packages := freebsd_base
freebsd_packages :=
ifneq ($(build_os),darwin)
darwin_native_packages += darwin_sdk native_clang native_cctools native_libtapi
darwin_native_packages := darwin_sdk
endif
darwin_packages :=
android_native_packages := android_ndk
android_packages :=

View File

@@ -1,21 +1,17 @@
package=protobuf
$(package)_version=$(native_$(package)_version)
$(package)_version_protobuf_cpp=$(native_$(package)_version_protobuf_cpp)
$(package)_download_path=$(native_$(package)_download_path)
$(package)_file_name=$(native_$(package)_file_name)
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
$(package)_dependencies=native_$(package)
$(package)_cxxflags=-std=c++11
$(package)_patches=visibility.patch
define $(package)_set_vars
$(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
$(package)_config_opts_linux=--with-pic
endef
define $(package)_preprocess_cmds
patch -p0 < $($(package)_patch_dir)/visibility.patch
endef
define $(package)_config_cmds
$($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
endef
@@ -25,12 +21,7 @@ define $(package)_build_cmds
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) -C src install-libLTLIBRARIES install-nobase_includeHEADERS &&\
$(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA
$(MAKE) DESTDIR=$($(package)_staging_dir) -C src install-nobase_includeHEADERS &&\
$(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA &&\
cp src/.libs/libprotobuf.a $($(package)_staging_prefix_dir)/lib/
endef
define $(package)_postprocess_cmds
rm lib/libprotoc.a &&\
rm lib/*.la
endef

View File

@@ -1,175 +0,0 @@
PACKAGE=qt
$(package)_version=5.15.1
$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules
$(package)_suffix=everywhere-src-$($(package)_version).tar.xz
$(package)_file_name=qtbase-$($(package)_suffix)
$(package)_sha256_hash=33960404d579675b7210de103ed06a72613bfc4305443e278e2d32a3eb1f3d8c
$(package)_build_subdir=qtbase
$(package)_qt_libs=corelib
$(package)_patches=fix_qt_pkgconfig.patch fix_no_printer.patch fix_rcc_determinism.patch no-xlib.patch
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=46e0c0e3a511fbcc803a4146204062e47f6ed43b34d98a3c27372a03b8746bd8
$(package)_qttools_file_name=qttools-$($(package)_suffix)
$(package)_qttools_sha256_hash=c98ee5f0f980bf68cbf0c94d62434816a92441733de50bd9adbe9b9055f03498
$(package)_extra_sources = $($(package)_qttranslations_file_name)
$(package)_extra_sources += $($(package)_qttools_file_name)
define $(package)_set_vars
$(package)_config_opts_release = -release
$(package)_config_opts_debug = -debug
$(package)_config_opts += -bindir $(build_prefix)/bin
$(package)_config_opts += -c++std c++11
$(package)_config_opts += -confirm-license
$(package)_config_opts += -dbus-runtime
$(package)_config_opts += -hostprefix $(build_prefix)
$(package)_config_opts += -no-compile-examples
$(package)_config_opts += -no-cups
$(package)_config_opts += -no-egl
$(package)_config_opts += -no-eglfs
$(package)_config_opts += -no-evdev
$(package)_config_opts += -no-gui
$(package)_config_opts += -no-freetype
$(package)_config_opts += -no-gif
$(package)_config_opts += -no-glib
$(package)_config_opts += -no-icu
$(package)_config_opts += -no-ico
$(package)_config_opts += -no-iconv
$(package)_config_opts += -no-kms
$(package)_config_opts += -no-linuxfb
$(package)_config_opts += -no-libjpeg
$(package)_config_opts += -no-libudev
$(package)_config_opts += -no-mtdev
$(package)_config_opts += -no-openvg
$(package)_config_opts += -no-reduce-relocations
$(package)_config_opts += -no-sql-db2
$(package)_config_opts += -no-sql-ibase
$(package)_config_opts += -no-sql-oci
$(package)_config_opts += -no-sql-tds
$(package)_config_opts += -no-sql-mysql
$(package)_config_opts += -no-sql-odbc
$(package)_config_opts += -no-sql-psql
$(package)_config_opts += -no-sql-sqlite
$(package)_config_opts += -no-sql-sqlite2
$(package)_config_opts += -no-use-gold-linker
$(package)_config_opts += -nomake examples
$(package)_config_opts += -nomake tests
$(package)_config_opts += -opensource
$(package)_config_opts += -no-openssl
$(package)_config_opts += -optimized-qmake
$(package)_config_opts += -pch
$(package)_config_opts += -pkg-config
$(package)_config_opts += -prefix $(host_prefix)
$(package)_config_opts += -no-libpng
$(package)_config_opts += -qt-pcre
$(package)_config_opts += -qt-harfbuzz
$(package)_config_opts += -no-zlib
$(package)_config_opts += -static
$(package)_config_opts += -silent
$(package)_config_opts += -v
$(package)_config_opts += -no-feature-bearermanagement
$(package)_config_opts += -no-feature-colordialog
$(package)_config_opts += -no-feature-dial
$(package)_config_opts += -no-feature-filesystemwatcher
$(package)_config_opts += -no-feature-fontcombobox
$(package)_config_opts += -no-feature-ftp
$(package)_config_opts += -no-feature-image_heuristic_mask
$(package)_config_opts += -no-feature-keysequenceedit
$(package)_config_opts += -no-feature-lcdnumber
$(package)_config_opts += -no-feature-pdf
$(package)_config_opts += -no-feature-printdialog
$(package)_config_opts += -no-feature-printer
$(package)_config_opts += -no-feature-printpreviewdialog
$(package)_config_opts += -no-feature-printpreviewwidget
$(package)_config_opts += -no-feature-sessionmanager
$(package)_config_opts += -no-feature-sql
$(package)_config_opts += -no-feature-statemachine
$(package)_config_opts += -no-feature-syntaxhighlighter
$(package)_config_opts += -no-feature-textbrowser
$(package)_config_opts += -no-feature-textodfwriter
$(package)_config_opts += -no-feature-topleveldomain
$(package)_config_opts += -no-feature-udpsocket
$(package)_config_opts += -no-feature-undocommand
$(package)_config_opts += -no-feature-undogroup
$(package)_config_opts += -no-feature-undostack
$(package)_config_opts += -no-feature-undoview
$(package)_config_opts += -no-feature-vnc
$(package)_config_opts += -no-feature-wizard
$(package)_config_opts_linux = -no-fontconfig
$(package)_config_opts_linux += -no-opengl
$(package)_config_opts_linux += -no-xcb
$(package)_config_opts_linux += -no-feature-xlib
endef
define $(package)_fetch_cmds
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttranslations_file_name),$($(package)_qttranslations_file_name),$($(package)_qttranslations_sha256_hash)) && \
$(call fetch_file,$(package),$($(package)_download_path),$($(package)_qttools_file_name),$($(package)_qttools_file_name),$($(package)_qttools_sha256_hash))
endef
define $(package)_extract_cmds
mkdir -p $($(package)_extract_dir) && \
echo "$($(package)_sha256_hash) $($(package)_source)" > $($(package)_extract_dir)/.$($(package)_file_name).hash && \
echo "$($(package)_qttranslations_sha256_hash) $($(package)_source_dir)/$($(package)_qttranslations_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
echo "$($(package)_qttools_sha256_hash) $($(package)_source_dir)/$($(package)_qttools_file_name)" >> $($(package)_extract_dir)/.$($(package)_file_name).hash && \
$(build_SHA256SUM) -c $($(package)_extract_dir)/.$($(package)_file_name).hash && \
mkdir qtbase && \
tar --strip-components=1 -xf $($(package)_source) -C qtbase && \
mkdir qttranslations && \
tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttranslations_file_name) -C qttranslations && \
mkdir qttools && \
tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_qttools_file_name) -C qttools
endef
define $(package)_preprocess_cmds
sed -i.old "s|FT_Get_Font_Format|FT_Get_X11_Font_Format|" qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp && \
sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
sed -i.old "/updateqm.depends =/d" qttranslations/translations/translations.pro && \
sed -i.old "s/src_plugins.depends = src_sql src_network/src_plugins.depends = src_network/" qtbase/src/src.pro && \
cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \
sed -i.old "s/arm-linux-gnueabi-/$(host)-/g" qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch && \
patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch && \
echo "!host_build: QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "!host_build: QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
echo "QMAKE_LINK_OBJECT_MAX = 10" >> qtbase/mkspecs/win32-g++/qmake.conf && \
echo "QMAKE_LINK_OBJECT_SCRIPT = object_script" >> qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "s|QMAKE_CFLAGS += |!host_build: QMAKE_CFLAGS = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "s|QMAKE_CXXFLAGS += |!host_build: QMAKE_CXXFLAGS = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "0,/^QMAKE_LFLAGS_/s|^QMAKE_LFLAGS_|!host_build: QMAKE_LFLAGS = $($(package)_ldflags)\n&|" qtbase/mkspecs/win32-g++/qmake.conf && \
sed -i.old "s/LIBRARY_PATH/(CROSS_)?\0/g" qtbase/mkspecs/features/toolchain.prf
endef
define $(package)_config_cmds
export PKG_CONFIG_SYSROOT_DIR=/ && \
export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \
./configure $($(package)_config_opts) && \
echo "CONFIG += force_bootstrap" >> mkspecs/qconfig.pri && \
$(MAKE) sub-src-clean && \
cd ../qttranslations && ../qtbase/bin/qmake qttranslations.pro -o Makefile && \
cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. &&\
cd qttools/src/linguist/lrelease/ && ../../../../qtbase/bin/qmake lrelease.pro -o Makefile
endef
define $(package)_build_cmds
$(MAKE) -C src $(addprefix sub-,$($(package)_qt_libs)) && \
$(MAKE) -C ../qttools/src/linguist/lrelease && \
$(MAKE) -C ../qttranslations
endef
define $(package)_stage_cmds
$(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && cd .. &&\
$(MAKE) -C qttools/src/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install_target && \
$(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets
endef
define $(package)_postprocess_cmds
rm -rf native/mkspecs/ native/lib/ lib/cmake/ && \
rm -f lib/lib*.la lib/*.prl plugins/*/*.prl
endef

View File

@@ -15,6 +15,10 @@ define $(package)_set_vars
$(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC"
endef
define $(package)_preprocess_cmds
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub support
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef

View File

@@ -3,7 +3,6 @@ $(package)_version=1.0.18
$(package)_download_path=https://download.libsodium.org/libsodium/releases/
$(package)_file_name=libsodium-$($(package)_version).tar.gz
$(package)_sha256_hash=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1
$(package)_patches=disable-glibc-getrandom-getentropy.patch fix-whitespace.patch
define $(package)_set_vars
$(package)_config_opts=--enable-static --disable-shared
@@ -11,9 +10,7 @@ $(package)_config_opts+=--prefix=$(host_prefix)
endef
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/disable-glibc-getrandom-getentropy.patch &&\
autoconf &&\
patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux
endef
define $(package)_config_cmds

View File

@@ -1,26 +1,30 @@
package=unbound
$(package)_version=1.15.0
$(package)_version=1.22.0
$(package)_download_path=https://www.nlnetlabs.nl/downloads/$(package)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=a480dc6c8937447b98d161fe911ffc76cfaffa2da18788781314e81339f1126f
$(package)_dependencies=openssl expat ldns
$(package)_patches=disable-glibc-reallocarray.patch
$(package)_sha256_hash=c5dd1bdef5d5685b2cedb749158dd152c52d44f65529a34ac15cd88d4b1b3d43
$(package)_dependencies=openssl
$(package)_patches=no-expat.patch
define $(package)_set_vars
$(package)_config_opts=--disable-shared --enable-static --without-pyunbound --prefix=$(host_prefix) --with-libexpat=$(host_prefix) --with-ssl=$(host_prefix) --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only
$(package)_config_opts_linux=--with-pic
$(package)_config_opts=--disable-shared --enable-static --without-pyunbound --prefix=$(host_prefix)
$(package)_config_opts+=--with-libexpat=no --with-ssl=$(host_prefix) --with-libevent=no
$(package)_config_opts+=--without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only
$(package)_config_opts_w64=--enable-static-exe --sysconfdir=/etc --prefix=$(host_prefix) --target=$(host_prefix)
$(package)_config_opts_x86_64_darwin=ac_cv_func_SHA384_Init=yes
$(package)_build_opts_mingw32=LDFLAGS="$($(package)_ldflags) -lpthread"
$(package)_cflags_mingw32+="-D_WIN32_WINNT=0x600"
endef
# Remove blobs
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/disable-glibc-reallocarray.patch &&\
autoconf
patch -p1 < $($(package)_patch_dir)/no-expat.patch &&\
rm configure~ doc/*.odp doc/*.pdf contrib/*.tar.gz contrib/*.tar.bz2 &&\
rm -rf testdata dnscrypt/testdata
endef
define $(package)_config_cmds
$($(package)_autoconf) ac_cv_func_getentropy=no
$($(package)_autoconf) ac_cv_func_getentropy=no AR_FLAGS=$($(package)_arflags)
endef
define $(package)_build_cmds
@@ -32,4 +36,5 @@ define $(package)_stage_cmds
endef
define $(package)_postprocess_cmds
rm -rf share
endef

View File

@@ -1,29 +0,0 @@
package=unwind
$(package)_version=1.5.0
$(package)_download_path=https://download.savannah.nongnu.org/releases/libunwind
$(package)_file_name=lib$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=90337653d92d4a13de590781371c604f9031cdb50520366aa1e3a91e1efb1017
$(package)_patches=fix_obj_order.patch
define $(package)_preprocess_cmds
patch -p0 < $($(package)_patch_dir)/fix_obj_order.patch
endef
define $(package)_config_cmds
cp -f $(BASEDIR)/config.guess config/config.guess &&\
cp -f $(BASEDIR)/config.sub config/config.sub &&\
$($(package)_autoconf) --disable-shared --enable-static --disable-tests --disable-documentation AR_FLAGS=$($(package)_arflags)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
define $(package)_postprocess_cmds
rm lib/*.la
endef

View File

@@ -1,21 +0,0 @@
package=xproto
$(package)_version=7.0.26
$(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=636162c1759805a5a0114a369dffdeccb8af8c859ef6e1445f26a4e6e046514f
define $(package)_set_vars
$(package)_config_opts=--disable-shared
endef
define $(package)_config_cmds
$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

View File

@@ -1,19 +1,16 @@
package=zeromq
$(package)_version=4.3.4
$(package)_version=4.3.5
$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5
$(package)_patches=06aba27b04c5822cb88a69677382a0f053367143.patch
$(package)_sha256_hash=6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43
define $(package)_set_vars
$(package)_config_opts=--without-documentation --disable-shared --without-libsodium --disable-curve
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
$(package)_cxxflags=-std=c++11
endef
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/06aba27b04c5822cb88a69677382a0f053367143.patch
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config
endef
define $(package)_config_cmds

View File

@@ -1,11 +0,0 @@
--- boost_1_64_0/tools/build/src/tools/darwin.jam.O 2017-04-17 03:22:26.000000000 +0100
+++ boost_1_64_0/tools/build/src/tools/darwin.jam 2022-05-04 17:26:29.984464447 +0000
@@ -505,7 +505,7 @@
if $(instruction-set) {
options = -arch$(_)$(instruction-set) ;
} else {
- options = -arch arm ;
+# options = -arch arm ;
}
}
}

View File

@@ -1,28 +0,0 @@
--- boost_1_64_0/tools/build/src/tools/gcc.jam.O 2017-04-17 03:22:26.000000000 +0100
+++ boost_1_64_0/tools/build/src/tools/gcc.jam 2019-11-15 15:46:16.957937137 +0000
@@ -243,6 +243,8 @@
{
ECHO notice: using gcc archiver :: $(condition) :: $(archiver[1]) ;
}
+ local arflags = [ feature.get-values <arflags> : $(options) ] ;
+ toolset.flags gcc.archive .ARFLAGS $(condition) : $(arflags) ;
# - Ranlib.
local ranlib = [ common.get-invocation-command gcc
@@ -970,6 +972,7 @@
# logic in intel-linux, but that is hardly worth the trouble as on Linux, 'ar'
# is always available.
.AR = ar ;
+.ARFLAGS = rc ;
.RANLIB = ranlib ;
toolset.flags gcc.archive AROPTIONS <archiveflags> ;
@@ -1011,7 +1014,7 @@
#
actions piecemeal archive
{
- "$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
+ "$(.AR)" $(AROPTIONS) $(.ARFLAGS) "$(<)" "$(>)"
"$(.RANLIB)" "$(<)"
}

View File

@@ -1,67 +0,0 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Fri, 12 Aug 2016 02:01:20 +1000
Subject: [PATCH 1/3] fix windres invocation options
windres doesn't recognise various gcc flags like -mms-bitfields,
-fopenmp, -mthreads etc. (basically not `-D` or `-I`)
diff --git a/Modules/Platform/Windows-windres.cmake b/Modules/Platform/Windows-windres.cmake
index 1111111..2222222 100644
--- a/Modules/Platform/Windows-windres.cmake
+++ b/Modules/Platform/Windows-windres.cmake
@@ -1 +1 @@
-set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <FLAGS> <SOURCE> <OBJECT>")
+set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <SOURCE> <OBJECT>")
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Tue, 25 Jul 2017 20:34:56 +1000
Subject: [PATCH 2/3] add option to disable -isystem
taken from (not accepted):
https://gitlab.kitware.com/cmake/cmake/merge_requests/895
see also:
https://gitlab.kitware.com/cmake/cmake/issues/16291
https://gitlab.kitware.com/cmake/cmake/issues/16919
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
index 1111111..2222222 100644
--- a/Modules/Compiler/GNU.cmake
+++ b/Modules/Compiler/GNU.cmake
@@ -42,7 +42,7 @@ macro(__compiler_gnu lang)
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG")
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
- if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4) # work around #4462
+ if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4 AND (NOT MXE_DISABLE_INCLUDE_SYSTEM_FLAG)) # work around #4462
set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
endif()
endmacro()
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Tue, 15 Aug 2017 15:25:06 +1000
Subject: [PATCH 3/3] add CPACK_NSIS_EXECUTABLE variable
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 1111111..2222222 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -384,7 +384,9 @@ int cmCPackNSISGenerator::InitializeInternal()
}
#endif
- nsisPath = cmSystemTools::FindProgram("makensis", path, false);
+ this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLE", "makensis");
+ nsisPath = cmSystemTools::FindProgram(
+ this->GetOption("CPACK_NSIS_EXECUTABLE"), path, false);
if (nsisPath.empty()) {
cmCPackLogger(

View File

@@ -1,21 +0,0 @@
From a77b066311da42ed7654e39c0356a3b951b2e296 Mon Sep 17 00:00:00 2001
From: selsta <selsta@sent.at>
Date: Wed, 10 Nov 2021 02:28:54 +0100
Subject: [PATCH] windows: add missing include for mingw32
---
windows/hid.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/windows/hid.c b/windows/hid.c
index 24756a4..6d8394c 100644
--- a/windows/hid.c
+++ b/windows/hid.c
@@ -33,6 +33,7 @@ typedef LONG NTSTATUS;
#endif
#ifdef __MINGW32__
+#include <devpropdef.h>
#include <ntdef.h>
#include <winbase.h>
#endif

View File

@@ -1,37 +0,0 @@
Don't build object files twice
When passed --enable-static and --enable-shared, icu will generate
both a shared and a static version of its libraries.
However, in order to do so, it builds each and every object file
twice: once with -fPIC (for the shared library), and once without
-fPIC (for the static library). While admittedly building -fPIC for a
static library generates a slightly suboptimal code, this is what all
the autotools-based project are doing. They build each object file
once, and they use it for both the static and shared libraries.
icu builds the object files for the shared library as .o files, and
the object files for static library as .ao files. By simply changing
the suffix of object files used for static libraries to ".o", we tell
icu to use the ones built for the shared library (i.e, with -fPIC),
and avoid the double build of icu.
On a fast build server, this brings the target icu build from
3m41.302s down to 1m43.926s (approximate numbers: some other builds
are running on the system at the same time).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/source/config/mh-linux
===================================================================
--- a/source/config/mh-linux
+++ b/source/config/mh-linux
@@ -38,7 +38,7 @@
## Shared object suffix
SO = so
## Non-shared intermediate object suffix
-STATIC_O = ao
+STATIC_O = o
## Compilation rules
%.$(STATIC_O): $(srcdir)/%.c

View File

@@ -1,13 +0,0 @@
diff --git a/preload/configure b/preload/configure
index aab5c77..e20b8f0 100755
--- a/preload/configure
+++ b/preload/configure
@@ -588,7 +588,7 @@ MAKEFLAGS=
PACKAGE_NAME='libiconv'
PACKAGE_TARNAME='libiconv'
PACKAGE_VERSION='0'
-PACKAGE_STRING='libiconv 0'
+PACKAGE_STRING='libiconv0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

View File

@@ -1,29 +0,0 @@
--- a/biplist/__init__.py 2014-10-26 19:03:11.000000000 +0000
+++ b/biplist/__init__.py 2016-07-19 19:30:17.663521999 +0000
@@ -541,7 +541,7 @@
return HashableWrapper(n)
elif isinstance(root, dict):
n = {}
- for key, value in iteritems(root):
+ for key, value in sorted(iteritems(root)):
n[self.wrapRoot(key)] = self.wrapRoot(value)
return HashableWrapper(n)
elif isinstance(root, list):
@@ -616,7 +616,7 @@
elif isinstance(obj, dict):
size = proc_size(len(obj))
self.incrementByteCount('dictBytes', incr=1+size)
- for key, value in iteritems(obj):
+ for key, value in sorted(iteritems(obj)):
check_key(key)
self.computeOffsets(key, asReference=True)
self.computeOffsets(value, asReference=True)
@@ -714,7 +714,7 @@
keys = []
values = []
objectsToWrite = []
- for key, value in iteritems(obj):
+ for key, value in sorted(iteritems(obj)):
keys.append(key)
values.append(value)
for key in keys:

View File

@@ -0,0 +1,12 @@
diff --git a/cctools/ld64/src/ld/Options.cpp b/cctools/ld64/src/ld/Options.cpp
index 3bb8324..033760d 100644
--- a/cctools/ld64/src/ld/Options.cpp
+++ b/cctools/ld64/src/ld/Options.cpp
@@ -4279,7 +4279,6 @@ void Options::buildSearchPaths(int argc, const char* argv[])
fVerbose = true;
extern const char ldVersionString[];
fprintf(stderr, "%s", ldVersionString);
- fprintf(stderr, "BUILD " __TIME__ " " __DATE__"\n");
fprintf(stderr, "configured to support archs: %s\n", ALL_SUPPORTED_ARCHS);
// if only -v specified, exit cleanly
if ( argc == 2 ) {

View File

@@ -1,86 +0,0 @@
--- cdrkit-1.1.11.old/genisoimage/tree.c 2008-10-21 19:57:47.000000000 -0400
+++ cdrkit-1.1.11/genisoimage/tree.c 2013-12-06 00:23:18.489622668 -0500
@@ -1139,8 +1139,9 @@
scan_directory_tree(struct directory *this_dir, char *path,
struct directory_entry *de)
{
- DIR *current_dir;
+ int current_file;
char whole_path[PATH_MAX];
+ struct dirent **d_list;
struct dirent *d_entry;
struct directory *parent;
int dflag;
@@ -1164,7 +1165,8 @@
this_dir->dir_flags |= DIR_WAS_SCANNED;
errno = 0; /* Paranoia */
- current_dir = opendir(path);
+ //current_dir = opendir(path);
+ current_file = scandir(path, &d_list, NULL, alphasort);
d_entry = NULL;
/*
@@ -1173,12 +1175,12 @@
*/
old_path = path;
- if (current_dir) {
+ if (current_file >= 0) {
errno = 0;
- d_entry = readdir(current_dir);
+ d_entry = d_list[0];
}
- if (!current_dir || !d_entry) {
+ if (current_file < 0 || !d_entry) {
int ret = 1;
#ifdef USE_LIBSCHILY
@@ -1191,8 +1193,8 @@
de->isorec.flags[0] &= ~ISO_DIRECTORY;
ret = 0;
}
- if (current_dir)
- closedir(current_dir);
+ if(d_list)
+ free(d_list);
return (ret);
}
#ifdef ABORT_DEEP_ISO_ONLY
@@ -1208,7 +1210,7 @@
errmsgno(EX_BAD, "use Rock Ridge extensions via -R or -r,\n");
errmsgno(EX_BAD, "or allow deep ISO9660 directory nesting via -D.\n");
}
- closedir(current_dir);
+ free(d_list);
return (1);
}
#endif
@@ -1250,13 +1252,13 @@
* The first time through, skip this, since we already asked
* for the first entry when we opened the directory.
*/
- if (dflag)
- d_entry = readdir(current_dir);
+ if (dflag && current_file >= 0)
+ d_entry = d_list[current_file];
dflag++;
- if (!d_entry)
+ if (current_file < 0)
break;
-
+ current_file--;
/* OK, got a valid entry */
/* If we do not want all files, then pitch the backups. */
@@ -1348,7 +1350,7 @@
insert_file_entry(this_dir, whole_path, d_entry->d_name);
#endif /* APPLE_HYB */
}
- closedir(current_dir);
+ free(d_list);
#ifdef APPLE_HYB
/*

View File

@@ -0,0 +1,31 @@
diff --git a/src/llvm/CMakeLists.txt b/src/llvm/CMakeLists.txt
index ab92717c8..4ad621ea3 100644
--- a/src/llvm/CMakeLists.txt
+++ b/src/llvm/CMakeLists.txt
@@ -752,9 +752,10 @@ set(LLVM_SRPM_USER_BINARY_SPECFILE ${CMAKE_CURRENT_SOURCE_DIR}/llvm.spec.in
set(LLVM_SRPM_BINARY_SPECFILE ${CMAKE_CURRENT_BINARY_DIR}/llvm.spec)
set(LLVM_SRPM_DIR "${CMAKE_CURRENT_BINARY_DIR}/srpm")
-# SVN_REVISION and GIT_COMMIT get set by the call to add_version_info_from_vcs.
-# DUMMY_VAR contains a version string which we don't care about.
-add_version_info_from_vcs(DUMMY_VAR)
+# A call to add_version_info_from_vcs() was removed, leaving SVN_REVISION
+# and GIT_COMMIT unset. Accordingly, LLVM_RPM_SPEC_REVISION is left empty.
+# This variable appears to be unused. Since it may be used in a future
+# update of native_libtapi this change serves as a precautionairy measure.
if ( SVN_REVISION )
set(LLVM_RPM_SPEC_REVISION "r${SVN_REVISION}")
elseif ( GIT_COMMIT )
diff --git a/src/llvm/cmake/modules/GenerateVersionFromCVS.cmake b/src/llvm/cmake/modules/GenerateVersionFromCVS.cmake
index 6b1c71983..e16326ed6 100644
--- a/src/llvm/cmake/modules/GenerateVersionFromCVS.cmake
+++ b/src/llvm/cmake/modules/GenerateVersionFromCVS.cmake
@@ -24,7 +24,7 @@ include(VersionFromVCS)
set(ENV{TERM} "dumb")
function(append_info name path)
- add_version_info_from_vcs(REVISION ${path})
+ set(REVISION "git-0000000")
string(STRIP "${REVISION}" REVISION)
file(APPEND "${HEADER_FILE}.txt"
"#define ${name} \"${REVISION}\"\n")

View File

@@ -1,72 +0,0 @@
diff -dur a/mac_alias/alias.py b/mac_alias/alias.py
--- a/mac_alias/alias.py 2015-10-19 12:12:48.000000000 +0200
+++ b/mac_alias/alias.py 2016-04-03 12:13:12.037159417 +0200
@@ -243,10 +243,10 @@
alias = Alias()
alias.appinfo = appinfo
- alias.volume = VolumeInfo (volname.replace('/',':'),
+ alias.volume = VolumeInfo (volname.decode().replace('/',':'),
voldate, fstype, disktype,
volattrs, volfsid)
- alias.target = TargetInfo (kind, filename.replace('/',':'),
+ alias.target = TargetInfo (kind, filename.decode().replace('/',':'),
folder_cnid, cnid,
crdate, creator_code, type_code)
alias.target.levels_from = levels_from
@@ -261,9 +261,9 @@
b.read(1)
if tag == TAG_CARBON_FOLDER_NAME:
- alias.target.folder_name = value.replace('/',':')
+ alias.target.folder_name = value.decode().replace('/',':')
elif tag == TAG_CNID_PATH:
- alias.target.cnid_path = struct.unpack(b'>%uI' % (length // 4),
+ alias.target.cnid_path = struct.unpack('>%uI' % (length // 4),
value)
elif tag == TAG_CARBON_PATH:
alias.target.carbon_path = value
@@ -298,9 +298,9 @@
alias.target.creation_date \
= mac_epoch + datetime.timedelta(seconds=seconds)
elif tag == TAG_POSIX_PATH:
- alias.target.posix_path = value
+ alias.target.posix_path = value.decode()
elif tag == TAG_POSIX_PATH_TO_MOUNTPOINT:
- alias.volume.posix_path = value
+ alias.volume.posix_path = value.decode()
elif tag == TAG_RECURSIVE_ALIAS_OF_DISK_IMAGE:
alias.volume.disk_image_alias = Alias.from_bytes(value)
elif tag == TAG_USER_HOME_LENGTH_PREFIX:
@@ -422,13 +422,13 @@
# (so doing so is ridiculous, and nothing could rely on it).
b.write(struct.pack(b'>h28pI2shI64pII4s4shhI2s10s',
self.target.kind,
- carbon_volname, voldate,
+ carbon_volname, int(voldate),
self.volume.fs_type,
self.volume.disk_type,
self.target.folder_cnid,
carbon_filename,
self.target.cnid,
- crdate,
+ int(crdate),
self.target.creator_code,
self.target.type_code,
self.target.levels_from,
@@ -449,12 +449,12 @@
b.write(struct.pack(b'>hhQhhQ',
TAG_HIGH_RES_VOLUME_CREATION_DATE,
- 8, long(voldate * 65536),
+ 8, int(voldate * 65536),
TAG_HIGH_RES_CREATION_DATE,
- 8, long(crdate * 65536)))
+ 8, int(crdate * 65536)))
if self.target.cnid_path:
- cnid_path = struct.pack(b'>%uI' % len(self.target.cnid_path),
+ cnid_path = struct.pack('>%uI' % len(self.target.cnid_path),
*self.target.cnid_path)
b.write(struct.pack(b'>hh', TAG_CNID_PATH,
len(cnid_path)))

View File

@@ -0,0 +1,27 @@
OpenSSL's build system tries to be helpful by constructing the compiler name
for us. This doesn't work with our setup. Instead, we want it to use
$($(package)_cc), to ensure certain environment flags are unset.
diff --git a/Configurations/15-android.conf b/Configurations/15-android.conf
index 41ad9223e0..ea27a3bbba 100644
--- a/Configurations/15-android.conf
+++ b/Configurations/15-android.conf
@@ -124,17 +124,7 @@
$user{RANLIB} = ":";
}
} elsif ($is_standalone_toolchain) {
- my $cc = $user{CC} // "clang";
- # One can probably argue that both clang and gcc should be
- # probed, but support for "standalone toolchain" was added
- # *after* announcement that gcc is being phased out, so
- # favouring clang is considered adequate. Those who insist
- # have option to enforce test for gcc with CC=gcc.
- if (which("$triarch-$cc") !~ m|^$ndk|) {
- die "no NDK $triarch-$cc on \$PATH";
- }
- $user{CC} = $cc;
- $user{CROSS_COMPILE} = "$triarch-";
+
} elsif ($user{CC} eq "clang") {
die "no NDK clang on \$PATH";
} else {

View File

@@ -1,60 +0,0 @@
From 96ac8f13f4d0ee96baf5724d9f96c44c34b8606c Mon Sep 17 00:00:00 2001
From: David Carlier <devnexen@gmail.com>
Date: Tue, 24 Aug 2021 22:40:14 +0100
Subject: [PATCH] Darwin platform allows to build on releases before
Yosemite/ios 8.
issue #16407 #16408
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16409)
---
crypto/rand/rand_unix.c | 5 +----
include/crypto/rand.h | 10 ++++++++++
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/crypto/rand/rand_unix.c b/crypto/rand/rand_unix.c
index 43f1069d151d..0f4525106af7 100644
--- a/crypto/rand/rand_unix.c
+++ b/crypto/rand/rand_unix.c
@@ -34,9 +34,6 @@
#if defined(__OpenBSD__)
# include <sys/param.h>
#endif
-#if defined(__APPLE__)
-# include <CommonCrypto/CommonRandom.h>
-#endif
#if defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__)
# include <sys/types.h>
@@ -381,7 +378,7 @@ static ssize_t syscall_random(void *buf, size_t buflen)
if (errno != ENOSYS)
return -1;
}
-# elif defined(__APPLE__)
+# elif defined(OPENSSL_APPLE_CRYPTO_RANDOM)
if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
return (ssize_t)buflen;
diff --git a/include/crypto/rand.h b/include/crypto/rand.h
index 5350d3a93119..674f840fd13c 100644
--- a/include/crypto/rand.h
+++ b/include/crypto/rand.h
@@ -20,6 +20,16 @@
# include <openssl/rand.h>
+# if defined(__APPLE__) && !defined(OPENSSL_NO_APPLE_CRYPTO_RANDOM)
+# include <Availability.h>
+# if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000) || \
+ (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000)
+# define OPENSSL_APPLE_CRYPTO_RANDOM 1
+# include <CommonCrypto/CommonCryptoError.h>
+# include <CommonCrypto/CommonRandom.h>
+# endif
+# endif
+
/* forward declaration */
typedef struct rand_pool_st RAND_POOL;

View File

@@ -1,159 +0,0 @@
--- src/google/protobuf/descriptor.cc.O 2018-07-30 22:16:10.000000000 +0000
+++ src/google/protobuf/descriptor.cc 2022-05-06 13:38:14.827309092 +0000
@@ -32,6 +32,9 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
#include <algorithm>
#include <functional>
#include <google/protobuf/stubs/hash.h>
@@ -7274,3 +7277,6 @@
} // namespace protobuf
} // namespace google
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif
--- src/google/protobuf/extension_set.cc.O 2018-07-23 20:56:42.000000000 +0000
+++ src/google/protobuf/extension_set.cc 2022-05-06 14:48:55.369877050 +0000
@@ -32,6 +32,9 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
#include <google/protobuf/stubs/hash.h>
#include <tuple>
#include <utility>
@@ -1914,3 +1917,6 @@
} // namespace internal
} // namespace protobuf
} // namespace google
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif
--- src/google/protobuf/extension_set_heavy.cc.O 2018-07-30 22:16:10.000000000 +0000
+++ src/google/protobuf/extension_set_heavy.cc 2022-05-06 14:14:27.847320946 +0000
@@ -35,6 +35,10 @@
// Contains methods defined in extension_set.h which cannot be part of the
// lite library because they use descriptors or reflection.
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
+
#include <google/protobuf/stubs/casts.h>
#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/io/coded_stream.h>
@@ -814,3 +818,6 @@
} // namespace internal
} // namespace protobuf
} // namespace google
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif
--- src/google/protobuf/generated_message_reflection.cc.O 2018-07-23 20:56:42.000000000 +0000
+++ src/google/protobuf/generated_message_reflection.cc 2022-05-06 13:38:49.655540772 +0000
@@ -32,6 +32,9 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
#include <algorithm>
#include <set>
@@ -2420,3 +2423,6 @@
} // namespace internal
} // namespace protobuf
} // namespace google
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif
--- src/google/protobuf/map_field.cc.O 2018-07-23 20:56:42.000000000 +0000
+++ src/google/protobuf/map_field.cc 2022-05-06 13:34:44.913905697 +0000
@@ -28,6 +28,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
+
#include <google/protobuf/map_field.h>
#include <google/protobuf/map_field_inl.h>
@@ -462,3 +466,6 @@
} // namespace internal
} // namespace protobuf
} // namespace google
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif
--- src/google/protobuf/text_format.cc.O 2018-07-30 22:16:11.000000000 +0000
+++ src/google/protobuf/text_format.cc 2022-05-06 13:34:58.881999517 +0000
@@ -32,6 +32,10 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
+
#include <algorithm>
#include <float.h>
#include <math.h>
@@ -2258,3 +2262,6 @@
} // namespace protobuf
} // namespace google
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif
--- src/google/protobuf/wire_format.cc.O 2018-07-23 20:56:42.000000000 +0000
+++ src/google/protobuf/wire_format.cc 2022-05-06 13:06:23.294219228 +0000
@@ -32,6 +32,10 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
+
#include <stack>
#include <string>
#include <vector>
@@ -1445,3 +1449,7 @@
} // namespace internal
} // namespace protobuf
} // namespace google
+
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif
--- src/google/protobuf/stubs/status.cc.O 2018-07-23 20:56:42.000000000 +0000
+++ src/google/protobuf/stubs/status.cc 2022-05-06 15:18:53.393208814 +0000
@@ -27,6 +27,11 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility push(hidden)
+#endif
+
#include <google/protobuf/stubs/status.h>
#include <ostream>
@@ -132,3 +137,6 @@
} // namespace util
} // namespace protobuf
} // namespace google
+#if defined(__APPLE__) && defined(__arm64__)
+#pragma GCC visibility pop
+#endif

View File

@@ -1,19 +0,0 @@
--- x/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h
+++ y/qtbase/src/plugins/platforms/cocoa/qprintengine_mac_p.h
@@ -52,6 +52,7 @@
//
#include <QtCore/qglobal.h>
+#include <qpa/qplatformprintdevice.h>
#ifndef QT_NO_PRINTER
--- x/qtbase/src/plugins/plugins.pro
+++ y/qtbase/src/plugins/plugins.pro
@@ -9,6 +9,3 @@ qtHaveModule(gui) {
!android:qtConfig(library): SUBDIRS *= generic
}
qtHaveModule(widgets): SUBDIRS += styles
-
-!winrt:qtHaveModule(printsupport): \
- SUBDIRS += printsupport

View File

@@ -1,11 +0,0 @@
--- old/qtbase/mkspecs/features/qt_module.prf
+++ new/qtbase/mkspecs/features/qt_module.prf
@@ -269,7 +269,7 @@ load(qt_installs)
load(qt_targets)
# this builds on top of qt_common
-!internal_module:if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) {
+if(unix|mingw):!if(darwin:debug_and_release:CONFIG(debug, debug|release)) {
CONFIG += create_pc
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
host_build: \

View File

@@ -1,15 +0,0 @@
--- old/qtbase/src/tools/rcc/rcc.cpp
+++ new/qtbase/src/tools/rcc/rcc.cpp
@@ -207,7 +207,11 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib)
if (lib.formatVersion() >= 2) {
// last modified time stamp
const QDateTime lastModified = m_fileInfo.lastModified();
- lib.writeNumber8(quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0));
+ quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0);
+ static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong();
+ if (sourceDate != 0)
+ lastmod = sourceDate;
+ lib.writeNumber8(lastmod);
if (text || pass1)
lib.writeChar('\n');
}

View File

@@ -1,69 +0,0 @@
From 9563cef873ae82e06f60708d706d054717e801ce Mon Sep 17 00:00:00 2001
From: Carl Dong <contact@carldong.me>
Date: Thu, 18 Jul 2019 17:22:05 -0400
Subject: [PATCH] Wrap xlib related code blocks in #if's
They are not necessary to compile QT.
---
qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
index 7c62c2e2b3..c05c6c0a07 100644
--- a/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
+++ b/qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp
@@ -49,7 +49,9 @@
#include <QtGui/QWindow>
#include <QtGui/QBitmap>
#include <QtGui/private/qguiapplication_p.h>
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
#include <X11/cursorfont.h>
+#endif
#include <xcb/xfixes.h>
#include <xcb/xcb_image.h>
@@ -391,6 +393,7 @@ void QXcbCursor::changeCursor(QCursor *cursor, QWindow *window)
xcb_flush(xcb_connection());
}
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
static int cursorIdForShape(int cshape)
{
int cursorId = 0;
@@ -444,6 +447,7 @@ static int cursorIdForShape(int cshape)
}
return cursorId;
}
+#endif
xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape)
{
@@ -556,7 +560,9 @@ static xcb_cursor_t loadCursor(void *dpy, int cshape)
xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
{
xcb_connection_t *conn = xcb_connection();
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
int cursorId = cursorIdForShape(cshape);
+#endif
xcb_cursor_t cursor = XCB_NONE;
// Try Xcursor first
@@ -586,6 +592,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
// Non-standard X11 cursors are created from bitmaps
cursor = createNonStandardCursor(cshape);
+#if QT_CONFIG(xcb_xlib) && QT_CONFIG(library)
// Create a glpyh cursor if everything else failed
if (!cursor && cursorId) {
cursor = xcb_generate_id(conn);
@@ -593,6 +600,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
cursorId, cursorId + 1,
0xFFFF, 0xFFFF, 0xFFFF, 0, 0, 0);
}
+#endif
if (cursor && cshape >= 0 && cshape < Qt::LastCursor && connection()->hasXFixes()) {
const char *name = cursorNames[cshape].front();
---
2.22.0

View File

@@ -1,25 +0,0 @@
diff --git a/configure.ac b/configure.ac
index 9e2de27c..0fa85c2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -807,6 +807,10 @@ AS_IF([test "x$EMSCRIPTEN" = "x"],[
# include <sys/random.h>
#endif
]], [[
+#ifdef __linux__
+# error getrandom() is currently disabled on Linux to support glibc < 2.25
+#endif
+
unsigned char buf;
(void) getrandom((void *) &buf, 1U, 0U);
]])],
@@ -825,6 +829,9 @@ unsigned char buf;
# include <sys/random.h>
#endif
]], [[
+#ifdef __linux__
+# error getentropy() is currently disabled on Linux to support glibc < 2.25
+#endif
#ifdef __APPLE__
# error getentropy() is currently disabled on Apple operating systems
#endif

Some files were not shown because too many files have changed in this diff Show More