Commit graph

13779 commits

Author SHA1 Message Date
Jason Rhinelander
2db8e978ab
Off-by-one wallet decoy selection bug fix (stable branch)
This corrects an off-by-one error in decoy selection that would never
select immediately-spendable outputs, and so immediately spending an
output would reveal the true output in question.

From Monero, PR 8794.

The infinite loop quoted here is *also* something that I encountered,
though only in regression testing (which uses a fake, sparse chain).
2023-05-24 16:31:50 -03:00
KeeJef
56ac7a51db Update GPG keys 2023-05-18 10:09:36 -03:00
Jason Rhinelander
b309bf8bb6
Merge pull request #1627 from jagerman/hf19-3-stable
Hard spoon 19.3 (stable edition)
2023-01-25 11:34:03 -04:00
Jason Rhinelander
e95f1c32b4
Merge pull request #1622 from jagerman/fix-ping-pubkey-param-stable
Fix pubkey parameter name in ping endpoints
2023-01-24 23:32:43 -04:00
Jason Rhinelander
e13657522b
v10.3.0 2023-01-24 11:44:52 -04:00
Jason Rhinelander
c2cfe12fbf
Schedule 19.3 hard spoon
- Scheduled for Feb 9th, 0:00 UTC.
- Bump required lokinet version to latest stable
- Bump SS version to 2.5.0
2023-01-24 11:43:43 -04:00
Jason Rhinelander
876d3dd0c7
Fix HF19.2 timestamp
The timestamp in the file didn't match the comment or the block height
(this doesn't break anything; the timestamp is only used for future
block arrival estimates).
2023-01-24 11:43:04 -04:00
Jason Rhinelander
3ba73ebf18
Fix pubkey parameter name in ping endpoints
Lokinet and SS are actually sending `pubkey_ed25519` for the parameter,
but oxen-core is expecting `ed25519_pubkey`.  Fixes oxen-core to match
what lokinet/ss are actually sending.
2023-01-11 15:02:40 -04:00
Jason Rhinelander
a62209e6ed Fix macos no-dynamic-libs check 2022-11-30 22:57:49 -04:00
Jason Rhinelander
c5a0a36da9 curl: latest version; don't attempt to use nghttp2
If installed on the system curl will try linking to it dynamically,
which we definitely don't want.  If not installed, nghttp2 support would
get disabled, which is now always the case with this commit.
2022-11-30 17:41:22 -04:00
Jason Rhinelander
6f42206e62
Don't build curl with nghttp3/quic support
We aren't statically building them, and it will fail if ngtcp2 headers
are installed on the system but from some version curl doesn't like.
2022-11-29 18:34:26 -04:00
Jason Rhinelander
d478f363e7
Update sqlite static build to latest version 2022-11-04 12:05:30 -03:00
Jason Rhinelander
ca3fe62367
Bump version, required (local) lokinet version 2022-10-24 21:38:32 -03:00
Jason Rhinelander
77cfa7c340
Merge pull request #1611 from darcys22/archive-batching-stable
Archiving batching
2022-10-24 20:04:31 -03:00
Sean Darcy
d6b2333891 Creates archiving for reward batching
This adds a new table to the batching schema to copy the accrued
balances every so often. This means that we can jump back to a
previous point without popping blocks.

The archiving is triggered in sql every 100 blocks and added to the
archive table, then pruned from the archive table at a later time to
ensure the size is kept small. Rebuilding 100 blocks is pretty
reasonable and should be less than 10s.

For longer distance pop_blocks and blockchain detached every 10k blocks
is kept in the archiving table. This takes longer to rebuild but is
better than rebuilding from scratch.

The blockchain detached function is also added to our regular blockchain
detached hooks so that it gets called every time the blockchain
detaches. Which appears to have caused some issues previously when some
of the modules would detach but batching would be stuck in an advanced
state.
2022-10-18 08:12:00 +11:00
Jason Rhinelander
3072aba3e6
Merge pull request #1605 from jagerman/aux-ping-errors
Allow lokinet/ss to send an error ping
2022-10-17 13:38:53 -03:00
Jason Rhinelander
9b812505fa
Merge pull request #1599 from darcys22/exception-throw
change naked throws to throw exceptions
2022-10-17 13:37:20 -03:00
Jason Rhinelander
0caf7ee006
Merge pull request #1608 from jagerman/zlib-bump-stable
zlib security update
2022-10-17 13:35:37 -03:00
Jason Rhinelander
f697b455f9
Merge pull request #1603 from jagerman/sn-self-info
Put current info for ourself in service node list
2022-10-17 12:01:42 -03:00
Sean Darcy
4a99dfc36d change naked throws to throw exceptions 2022-10-17 07:25:44 +11:00
Jason Rhinelander
90c84867e0
zlib security update 2022-10-14 22:28:43 -03:00
Jason Rhinelander
b90e2f0e00 Allow lokinet/ss to send an error ping
This lets lokinet or SS signal to oxend that something is known to be
wrong, and so oxend should not send a proof so that, hopefully, the
problem gets noticed and fixed.
2022-10-14 20:38:57 -03:00
Jason Rhinelander
c074c21eba Put current info for ourself in service node list
Currently we're putting the last-uptime-received data in the service
node list info, even when we have more updated info that hasn't yet been
accepted by the network.

This causes problems for lokinet, in particular, because it ignores any
SNs in the list without ed25519 pubkeys, including itself, which can
result in lokinet thinking it is deregistered for a while after the SN
becomes registered.

This updates `get_service_nodes` to always include current info (rather
than latest proof info) for itself when querying a service node.
2022-10-14 14:03:20 -03:00
Jason Rhinelander
9efff5f3bd
Merge pull request #1602 from jagerman/stable-oxenc-variant
Update variant header from oxenmq to oxenc
2022-10-14 14:03:08 -03:00
Jason Rhinelander
d4d4692a23 Update variant header from oxenmq to oxenc
The latest oxenmq dropped the long-deprecated compat header.
2022-10-13 13:37:23 -03:00
Jason Rhinelander
2a70f32f57
Merge remote-tracking branch 'origin/dev' into stable 2022-08-31 15:02:21 -03:00
Jason Rhinelander
c4397d200d
Merge pull request #1592 from jagerman/static-dep-updates
Dependency/submodule updates
2022-08-31 15:01:52 -03:00
Jason Rhinelander
d0df2b9684
downgrade boost
1.80.0 breaks hard in an android-sdk build
2022-08-31 14:18:44 -03:00
Jason Rhinelander
39a2cdcf74
Add kitware cmake to bionic build 2022-08-31 14:18:44 -03:00
Jason Rhinelander
600fb3aa96
Dependency/submodule updates 2022-08-31 12:46:53 -03:00
Jason Rhinelander
1ba2086090
Merge remote-tracking branch 'origin/dev' into stable 2022-08-30 23:45:42 -03:00
Jason Rhinelander
f1ee71a1d4
Merge pull request #1591 from darcys22/atomic-sn-reg-cmd
Atomic values for the get_service_node_registration_cmd endpoint
2022-08-30 23:25:32 -03:00
Jason Rhinelander
a2a59ee341
Merge pull request #1589 from jagerman/oxen10-2
Oxen 10.2 version bumps
2022-08-30 21:11:25 -03:00
Sean Darcy
872210608b use new basis points function in rpc_command_executor 2022-08-31 10:02:46 +10:00
Jason Rhinelander
3662cb21fb Remove pre-HF19 registration commands from oxend 2022-08-31 10:01:21 +10:00
Sean Darcy
a9c83bd0b2 Atomic values for the get_service_node_registration_cmd endpoint 2022-08-31 09:58:15 +10:00
Jason Rhinelander
c3a00f57a2
Oxen 10.2 version bumps & mandatory upgrade date
- 10.2.0 oxend version
- keep lokinet at 0.9.9
- require storage server 2.4.0
- schedule 10.2.0 mandatory date as 14 September 00:00 UTC (10am in
  Australia Eastern Time; 8pm (on the 13th) in US Eastern time.
2022-08-30 19:06:58 -03:00
Jason Rhinelander
2f1e2557ff
Fix pulse not avoiding small contributor unlocks 2022-08-25 11:24:26 -03:00
Jason Rhinelander
d955607306
Merge pull request #1588 from darcys22/create-hwdev-file-by-default-for-hw-devices
Create HWDEV file by default for hardware wallets
2022-08-22 17:27:11 -03:00
Jason Rhinelander
5f338c2492
Merge pull request #1585 from jagerman/fix-block-notify-race
Fix block notify race condition, and drain some of the swamp
2022-08-22 17:25:21 -03:00
Jason Rhinelander
e730b2fcbb
Merge pull request #1583 from darcys22/small-contributor-atomic-amount-fix
fix for small contributor
2022-08-22 17:24:04 -03:00
Jason Rhinelander
45f302506e
Merge pull request #1581 from jagerman/diet-oaes
Slim down oaes_lib
2022-08-22 17:22:20 -03:00
Sean Darcy
9ae474eb76 Create HWDEV file by default for hardware wallets
This modifies the current behaviour from only creating the hwdev.txt
file, when a new wallet is created if content is specified as an
argument to always creating the file. This file is used by the GUI
wallet to detect if the device is a hardware device and the CLI wallet
behaviour is kept the same to keep behavious consistent between CLI and
RPC wallets.
2022-08-19 15:28:17 +10:00
Sean Darcy
d6b8b2d036 fix for small contributor unlocks
The checking if the service node contributers are small miscalculated
atomic oxen. This brings in the correct figure for HF20 and in the
interim brings measures into the wallet and blink to prevent small
contributors from being to unlock in HF19.
2022-08-11 15:09:04 +10:00
Jason Rhinelander
0bc3c2f880
Rewrite trash tools::Notify
This was nasty.

Remove --block-rate-notify entirely; it's nearly useless on Oxen.

block and reorg notify remain, but now use a post-block hook rather than
shoving toxic Notify crap into cryptonote_core headers.
2022-07-27 17:25:48 -03:00
Jason Rhinelander
edbce1bf8c
Add and use post-block-added hooks; fix block notify race
Add hooks that are called *after* a block is successfully added to the
blockchain.

This also fixes a race condition with OMQ notify.block subscriptions:
because the notification was firing during (instead of after) block
addition, the lokinet/storage server receiving the notify would race to
fetch the block info, but that request could happen *before* the block
addition is finished, ending up with lokinet/SS sometimes getting a
stale block.
2022-07-27 17:25:12 -03:00
Jason Rhinelander
59f90dcf75
Rename block_added hook to block_add
This hook *isn't* called after a block is added, but rather it is part
of the block addition process and can abort the whole thing by raising
an exception (or returning false, prior to this PR).

This is unintuitive and causes bugs if using it as a "block has been
added" hook.
2022-07-27 15:20:35 -03:00
Jason Rhinelander
9c9552380d
Make hooks use exceptions on error rather than bool returns
bool returns suck in general, but in most cases here they are also a
pain in the ass because *each* place that returns false is also issuing
a log statement.  If only there were a way to return error information
to the common caller to have the common caller handle it... oh wait,
there is!
2022-07-27 15:10:52 -03:00
Jason Rhinelander
f382c1971e
Replace hook virtual calls with std::function
- Instead of inheriting from a pure virtual base class, we know just use
  lambdas for hook callbacks.
- The signature of hooks also changes to take an info struct rather than
  a list of parameters, so that you don't have to change everything to
  ignore unwanted parameters if someone adds something to a hook.
2022-07-27 14:20:29 -03:00
Jason Rhinelander
76908d9d5d
Add missing header
This was previously being included via oaes_lib.h.
2022-07-22 14:18:24 -03:00