Commit Graph

1341 Commits

Author SHA1 Message Date
Jason Rhinelander 0dada891a6
Bump oxen-mq to latest release
Fixes an issue with recent macos not liking oxenmq's RNG code.
2023-07-17 13:54:02 -03:00
Jason Rhinelander ab1a84f6c5
Fix comment about the hash in use 2023-04-21 18:29:40 -03:00
Jason Rhinelander 0ff8fb8922
Remove TIMESTAMP||EXPIRY|| from store endpoint docs
They aren't used anymore as of the latest version.
2023-02-21 18:49:27 -04:00
Jason Rhinelander b0015833f1
RPC doc fixes
- Batch requests now allow up to 20 subrequests, not just 5.
- Add an example showing how different mailbox retrieval limits can
  reasonably differ.
2023-02-21 18:18:05 -04:00
Jason Rhinelander 13effb23e8
Merge pull request #473 from mdPlusPlus/dev
Fix more typos
2023-02-15 21:10:29 -04:00
mdPlusPlus 8e72692dc6 Fix more typos 2023-02-16 00:23:30 +01:00
Jason Rhinelander fc32085574
Merge pull request #471 from mdPlusPlus/dev
Fix typo
2023-02-08 17:59:34 -04:00
mdPlusPlus a0bccc0a38 Fix typo 2023-02-07 18:41:05 +01:00
Jason Rhinelander a61c332c86
Merge pull request #469 from jagerman/misc-updates
Misc updates
2023-01-25 11:41:46 -04:00
Jason Rhinelander 295017a08e
Fix macos static lib detection
macos grep stopped recognizing \t at some point.
2023-01-24 12:05:25 -04:00
Jason Rhinelander d4379fc53f
Fix openssl build flags 2023-01-17 19:59:17 -04:00
Jason Rhinelander 1ac5ef63dd
Remove deprecated fields
- Finally removed "difficulty".  It has not been used for a long time
  (and even back then never changed from the value 1).
- Removed constants/handling of already-past hard forks
2023-01-17 19:16:58 -04:00
Jason Rhinelander 0554aa9e84 Version bump 2023-01-17 19:02:34 -04:00
Jason Rhinelander e279651bb5 Dependency updates
- Update oxen-encoding, oxen-mq, oxen-logging to latest
- Update curl to latest, and disable nghttp2 etc. to make static build
  work again on macos
- Latest stable openssl
2023-01-17 19:02:34 -04:00
Jason Rhinelander 351850d2c6
Merge pull request #468 from jagerman/fix-store-sig_ts
Fix store sig_timestamp handling
2023-01-17 19:02:15 -04:00
Jason Rhinelander 71f3d311da
Merge pull request #467 from jagerman/expire-shorten
Expiry shortening, extending, retrieval & hash de-timestamping
2023-01-17 19:01:58 -04:00
Jason Rhinelander b3272c8326
Merge pull request #464 from jagerman/30d-storage
Allow 30-day TTL for owned messages
2023-01-17 19:01:35 -04:00
Jason Rhinelander 4d865196a1
Merge pull request #463 from jagerman/oxen-core-rpc-fixes
Oxen core rpc fixes
2023-01-16 18:49:05 -04:00
Jason Rhinelander 2c48803c8c
Fix store sig_timestamp handling
`sig_timestamp` wasn't being properly used for the signature
verification in `store`; rather `timestamp` was always used even when
both were present (and so `sig_timestamp` was effectively useless).
This fixes it.
2023-01-16 18:44:44 -04:00
Jason Rhinelander 562b29f357
Add `set -e` to format verify script
Without this it was "passing" when clang-format-11 wasn't a valid
command.
2023-01-13 21:28:40 -04:00
Jason Rhinelander 95f632bbe9
Bump clang-format to 14
Our lint ci image no longer has an available clang-format-11.
2023-01-13 21:27:39 -04:00
Jason Rhinelander a099ff651a
Network test fixes
- various msg_id calculations needed to be updated for the HF19.3
  message hash change
- test_subkey_auth.py was using some old method names that no longer
  work
2023-01-13 21:18:46 -04:00
Jason Rhinelander 9bb1c548fd
Reformatting 2023-01-13 21:18:46 -04:00
Jason Rhinelander 5d71a4c293
TTL change test suite fixes 2023-01-13 21:18:46 -04:00
Jason Rhinelander cc62974186
Add tests for shorten/extend options 2023-01-13 21:18:45 -04:00
Jason Rhinelander 0980e8807d
Fix bt-to-json skipping empty dicts 2023-01-13 21:18:45 -04:00
Jason Rhinelander baaedc929b
Drop timestamp/expiry from message hash
Originally the message hash included the timestamp and expiry of the
message when building the hash.

This breaks things in a couple of ways:
- the hash isn't reproducible because the message expiry is no longer
  fixed.
- libsession-util needs de-duplication of identical messages even if the
  timestamps differ.

This removes the use of timestamp/expiry starting at HF19.3.
2023-01-13 21:18:45 -04:00
Jason Rhinelander f475f35034
Add expiry retrieval, expiry extend-only mode
- Adds `get_expiries` endpoint to retrieve expiries
- Adds `extend=True` parameter to the expire_msgs endpoint.  This is
  just like `shorten=True` but in the opposite direction (i.e. it allows
  you to only extend).
- Adds `unchanged` key to the result of a expire_msgs: this is a dict of
  all the hashes -> expiries of all hashes that were *not* updated when
  using one of the new shorten/extend options.
2023-01-13 21:18:45 -04:00
Jason Rhinelander 5492481860
Add "shorten" option to expire_msgs
This allows updating expiries on messages but only if it would shorten
those expiries.
2023-01-11 20:25:20 -04:00
Jason Rhinelander ae8ba81549
Add _format helper 2023-01-09 18:32:47 -04:00
Jason Rhinelander b663a46e07
Increase max batch request size to 20 subrequests
With upcoming config changes we have various use for batch requests to
fetch/store/etc. from multiple namespaces and the limit of 5 is likely
going to be too restrictive quite soon.
2023-01-09 18:08:52 -04:00
Jason Rhinelander ed9e467058
Allow 30-day TTL for owned messages
The 30-day TTL is available for new private namespace messages, and
(authenticated) expiry updates, but not for new public namespace
messages.
2023-01-06 19:31:07 -04:00
Jason Rhinelander ab7b3c177b
Allow missing aux pubkeys
Current oxend sends an empty string but that is dumb; this allows SS to
deal with an omitted key as well.
2022-12-19 12:58:57 -04:00
Jason Rhinelander 535582e138
Fix typo 2022-12-16 13:57:35 -04:00
Jason Rhinelander f7a04485b3
zlib version bump 2022-10-14 22:30:41 -03:00
Jason Rhinelander 7c7843d75f
Fix linkage/includes for fmt
We get fmt transitively via oxen::logging.

Use fmt directly rather than using spdlog's private embedded copy.
2022-08-31 17:39:20 -03:00
Jason Rhinelander e91154f9a0
Static dep updates 2022-08-31 12:31:04 -03:00
Jason Rhinelander 905143a1ff
submodule/dependency updates 2022-08-31 12:05:25 -03:00
Jason Rhinelander 860cffe17e
Merge pull request #459 from jagerman/message-monitoring
authenticated message subscription endpoints
2022-08-30 19:33:22 -03:00
Jason Rhinelander 13e3a1adcb
Merge namespace/data values into a single subscription
Maintaining multiple subscriptions for the same account on the same
connection for each different set of namespaces/want_data is painful, so
merge them into one.

This has some implications about allowing a single connection to renew
namespace and want_data subscriptions (even if those namespaces and/or
want_data flag aren't getting specified in renewals), but that is
relatively minor and it allows considerable simplification of
subscriptions.
2022-08-30 14:48:33 -03:00
Jason Rhinelander 0eb0f8babe
Clarify "subkey" vs "subkey tag" descriptions 2022-08-11 22:48:14 -03:00
Jason Rhinelander c97971c419
Add test case for multi-sub request 2022-08-11 22:48:14 -03:00
Jason Rhinelander a60a07f6dd
Allow subscribing to multiple pubkeys at once
The PN server potentially needs to subscribe to many addresses at once;
this allows it to do so in a single request rather than needing many
separate small requests.
2022-08-11 22:48:14 -03:00
Jason Rhinelander f8900e572f
Add testnet network tests for monitoring endpoint 2022-08-11 22:48:13 -03:00
Jason Rhinelander f402017baa
Message monitoring
This PR adds endpoints to storage server that allows someone to maintain
a oxenmq connection to one or more swarm members and receive pushed
notifications through that connection when new messages are delivered.

This is authenticated: subscribing requires a signature from the mailbox
owner signed within the past 14 days, and connections have to be
refreshed at least once/hour to keep the push notifications alive.

The immediate use for this will be for more efficient push notifications
for mobile clients using the push notification server, but this
mechanism will eventually also allow clients (over lokinet) to get
messages pushed to them rather than having to frequently poll.
2022-08-11 22:45:40 -03:00
Jason Rhinelander a682570aed
Bump oxenc for bt_dict_producer fix 2022-08-11 22:42:30 -03:00
Jason Rhinelander f94f7df9dd
Merge pull request #460 from jagerman/nearest-swarm-fixes
Nearest swarm fixes, ip update fixes & optimizations
2022-08-11 22:41:14 -03:00
Jason Rhinelander b346c7f55d
Merge pull request #461 from darcys22/subkey-tag-revocation
Add subkey tag revocation
2022-08-11 22:38:17 -03:00
Sean Darcy ad9fd5d3c2 Revoking Subkeys
This adds a new endpoint to the storage server to revoke a subkey. The
storage server will keep track of previously revoked subkeys and will
now check that a message authenticated by a subkey does not use one of
these revoked subkeys.
2022-08-12 11:22:51 +10:00
Jason Rhinelander 06490d966f
Remove unused function 2022-07-28 17:18:51 -03:00