Commit Graph

2086 Commits

Author SHA1 Message Date
Jędrzej Stuczyński a607bf5c3c fix: incorrect method signature 2025-06-03 09:34:57 +01:00
Jędrzej Stuczyński 93ac879c82 missing MixnetQueryClient variants 2025-06-03 09:34:56 +01:00
Jędrzej Stuczyński e8e75c6b03 post rebasing fixes 2025-06-03 09:34:56 +01:00
Jędrzej Stuczyński abd2a095ad passing shutdown to nym apis client 2025-06-03 09:34:56 +01:00
Jędrzej Stuczyński ffe8cb31e4 additional bugfixes and debugging nym-api deadlock 2025-06-03 09:34:56 +01:00
Jędrzej Stuczyński 89a3480c2a instantiate mixnet contract with custom key rotation validity 2025-06-03 09:34:56 +01:00
Jędrzej Stuczyński 729f455e80 clippy 2025-06-03 09:34:53 +01:00
Jędrzej Stuczyński 4bff5631b6 post rebase fixes 2025-06-03 09:34:26 +01:00
Jędrzej Stuczyński 6720f9db74 bug fixes... 2025-06-03 09:34:25 +01:00
Jędrzej Stuczyński e3c1e0c485 v2 nym-api endpoints to retrieve nodes with additional metadata information 2025-06-03 09:34:25 +01:00
Jędrzej Stuczyński 0c653cef51 retrieving rotation id when pulling topology 2025-06-03 09:34:25 +01:00
Jędrzej Stuczyński 58087a029b controlling announced sphinx keys within nym-api 2025-06-03 09:34:25 +01:00
Jędrzej Stuczyński 8544c2eb2e processing loop of KeyRotationController 2025-06-03 09:34:24 +01:00
Jędrzej Stuczyński 440a0dc6a4 logic for migrating config file 2025-06-03 09:34:24 +01:00
Jędrzej Stuczyński 874d4c70d6 multi api client + retrieving rotation id 2025-06-03 09:34:23 +01:00
Jędrzej Stuczyński 73860e253a finish packet decoding 2025-06-03 09:33:43 +01:00
Jędrzej Stuczyński f06ad1d51c unified nym-api contract cache refreshing 2025-06-03 09:33:43 +01:00
Jędrzej Stuczyński 0177f6f2f7 wip: introducing cached queries for key rotation info from nym api 2025-06-03 09:33:43 +01:00
Jędrzej Stuczyński 8eb45c2f7a added basic key rotation information to mixnet contract 2025-06-03 09:33:43 +01:00
Jędrzej Stuczyński a0c6ab8f83 attaching key rotation information to reply surbs 2025-06-03 09:33:42 +01:00
Jędrzej Stuczyński b95afd11af further propagation of key rotation information 2025-06-03 09:33:42 +01:00
Jędrzej Stuczyński 85b51f21e5 wip: choosing correct key for packet processing 2025-06-03 09:33:42 +01:00
Jędrzej Stuczyński 30163a0174 wip: wrap node's sphinx key with a manager 2025-06-03 09:33:42 +01:00
Jędrzej Stuczyński 4139a6a675 wip 2025-06-03 09:33:42 +01:00
Jack Wampler 8384a411df Bug Fix for Wallet build (#5820)
revert url used for connection-tester
2025-06-02 14:19:43 -06:00
Jack Wampler c56ebd9ceb Url scheme warning log (#5819)
fix conditions for logging about url scheme
2025-06-02 09:11:16 -06:00
Jędrzej Stuczyński b081b20a83 chore: adjust heuristic for wireguard peer activity (#5818)
* chore: adjust heuristic for wireguard peer activity

* fixed incorrect delta_tx calculation + typo
2025-06-02 15:37:37 +01:00
Andrej Mihajlov 62520c9308 Update sqlx cache 2025-05-30 09:28:48 +02:00
Andrej Mihajlov 1a38a2503e Stick to OffsetDateTime 2025-05-30 09:28:48 +02:00
Andrej Mihajlov 318f293983 All count() calls return i64 from now on 2025-05-30 09:28:48 +02:00
Andrej Mihajlov 5f2aba19c2 Update to sqlx 0.8.6 2025-05-30 09:28:48 +02:00
Jack Wampler 814ee45b4d HTTP Client Retries, Fallbacks, and Redirects (#5789)
updates to nym HTTP api client with multiple features relating to request domains
2025-05-29 10:37:07 -06:00
Jędrzej Stuczyński 2de8f8bc21 feature: nympool contract (#5464)
* squashed nym-pool commits

initialised nym-pool contract and updated all bls12_381 to make it possible

create scaffolding for tests

ability to control the contract admin

introducing contract grants

grant type validation

basic grant operations + stubs for other messages

added queries

use transaction stubs

added expiration information to grant queries

setting initial grant state based on the current environment

allowance logic for attempting to spend part of a grant

implemented all remaining transactions

made public api for coin locking perform validation

tests for locked tokens storage

nympool storage tests

added messages for changing granter set

tests and fixes for sufficient tokens when inserting grants

tests for initial state + more bugfixes

queries tests

additional tests for transactions and fixes

post rebase fixes

updated contract dependencies

removed redundant wasm constructor

dont ask me why this suddenly became an issue - no clue

removed redundant wasm constructor

dont ask me why this suddenly became an issue - no clue

* missing schema + added nym_pool to the main Makefile
2025-05-29 10:31:01 +01:00
Simon Wicky b69c2e1e94 Nym Statistics API (#5800)
* move stats types from vpn-client to here

* base stats api

* change storage schema

* add link to nymAPI for whitelisting

* remove outdated comment

* more comments update

* example of chrono vs time

* Add build.rs
- exports DATABASE_URL so cargo check works
- exports SQLX_OFFLINE for CI
- added pg_up.sh which spawns PG container
  - required for cargo sqlx prepare

* fixes time vs chrono issue and cleaner build with docker

* add correct swagger types, with feature locking where relevant

* apply dynco suggestions

---------

Co-authored-by: dynco-nym <173912580+dynco-nym@users.noreply.github.com>
2025-05-28 10:23:11 +02:00
Jędrzej Stuczyński 4a1ce8154a chore: resolve 1.87 clippy warnings (#5802)
* Clippy in wallet & sdk

* Clippy in wallet

* Pin rust to 1.86 in builder

* apply changes from b7da75a18c

* missing nym-node features

* Box all the things

* additional boxes in the wallet

* post rebasing clippy

---------

Co-authored-by: dynco-nym <173912580+dynco-nym@users.noreply.github.com>
2025-05-27 11:08:36 +01:00
Jędrzej Stuczyński f925c6caf0 QoL: RequestPath trait for http-api-client (#5788)
* qol: RequestPath trait for http-api-client

* additional test case

* applied the change to other trait methods
2025-05-27 10:30:13 +01:00
Bogdan-Ștefan Neacşu ed16505137 Fix contains ticketbook function that always returned true (#5787) 2025-05-20 17:18:06 +03:00
Jack Wampler 47d222b13d more relaxed usage of reqwest accept-encoding (#5779) 2025-05-16 13:03:24 -06:00
Jon Häggblad fafad41230 Skip refreshing the topology on startup as we already have an initial set (#5768) 2025-05-16 09:11:34 +02:00
Jon Häggblad 79df17710d Teach HttpClientError how to report its status code and timeout (#5770) 2025-05-16 08:54:41 +02:00
Jon Häggblad e898f202b7 Fetch the topology from the nym-api concurrently (#5767)
* Fetch the topology from the nym-api concurrently

* Add path to get_json instrument
2025-05-15 15:00:41 +02:00
Jon Häggblad 87aab4e31e Instrument create_request (#5760)
In the vpn-api client we create requests directly, so let's instrument
them as well as the currently instrumented top-level function get_json
doesn't capture that.
2025-05-15 12:46:33 +02:00
Jędrzej Stuczyński 370a4a3a03 feat: use bincode by default in NymApiClient + remove feature-lock (#5761) 2025-05-14 17:33:10 +01:00
Bogdan-Ștefan Neacşu ea90d7b558 Decrease default average packet delay to 15 ms (#5754)
* Decrease default average packet delay to 15 ms

* Add upgrade for config value

* Fix ip packet router too

* Fix clippy

* Remove message_sending_average_delay from template too
2025-05-14 16:24:34 +03:00
Jędrzej Stuczyński 6559fadf7f feat: expires header for /active nym-api responses (#5755)
* refactor FormattedResponse to allow attaching additional headers

* helper method for including expiration headers

* add expires header for /active nodes responses

* added additional 'with_expires_header_delta' builder to FormattedResponse to allow setting expiration header with time delta
2025-05-13 16:01:57 +01:00
Simon Wicky a3a234b41b [Feature] RememberMe is the new don't ForgetMe (#5742)
* move SessionType into statsitcis common crate

* add RememberMe to clients config

* change stats collection logic to handle remember me

* set up sdk client to send remember me message

* bump NS API version
2025-05-09 14:43:32 +02:00
Jędrzej Stuczyński 8730a84a8e feat: nym-api bincode + yaml support (#5745)
* introduce 'Bincode' variant for FormattedResponse

* allow nym-api to return responses in bincode (and also yaml)

* client parsing support

* cargo fmt

* missing changes to nym-api tests

* fixed node status api build + adjusted NymApiClient construction

* NMv2 fixes + further api changes

* feature-locking http-api-common to fix wasm build
2025-05-09 10:11:22 +01:00
Jon Häggblad 419e16eb31 Remove pretty_env_logger and switch remaining crates to use tracing (#5749)
* Remove pretty_env_logger dependency

* Switch remaining instances of pretty_env_logger to tracing
2025-05-08 15:05:08 +02:00
Simon Wicky f4e4f262ae fix parralel feature in ecash crate with send + sync (#5744) 2025-05-07 14:27:15 +02:00
Jędrzej Stuczyński b04d3ba376 add reserved byte to reply surb serialisation (#5731) 2025-04-25 10:05:38 +01:00