Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/gateway api #3970

Merged
merged 4 commits into from
Oct 19, 2023
Merged

Feature/gateway api #3970

merged 4 commits into from
Oct 19, 2023

Conversation

jstuczyn
Copy link
Contributor

@jstuczyn jstuczyn commented Oct 6, 2023

Description

Closes: #3893
Closes: #4017

This PR does slightly more than what its ticket might suggest. This is a next, albeit small, step towards the completed project smoosh. It introduces initial http API that will be used by nym-nodes, but currently only enabled on gateways. This enables gateways to self-describe themselves. In particular, what is relevant in this issue, to specify whether they support wss and on which port. Nym-api then aggregates this information and serves it to the clients.

Checklist:

  • added a changelog entry to CHANGELOG.md

@jstuczyn jstuczyn force-pushed the feature/gateway-api branch 2 times, most recently from 725c8c6 to 6dc7fc9 Compare October 11, 2023 16:52
@jstuczyn jstuczyn marked this pull request as ready for review October 12, 2023 10:31
@jstuczyn jstuczyn requested review from octol and durch as code owners October 12, 2023 10:31
@jstuczyn
Copy link
Contributor Author

pinging @durch as I've slightly refactored the wireguard routes -> I've moved the things to different directories and slightly adjusted types

@jstuczyn jstuczyn force-pushed the feature/gateway-api branch 2 times, most recently from d2a5a40 to c980c4e Compare October 19, 2023 09:16
initial router

started expanding the API

initial empty openapi/swagger

populated build-info endpoint

wip: populating rest of swagger

missing swagger data + using closure capture for immutable state

running the api as a proper task in gateway 'run'

fixing some version/feature clashes

refactored routes structures

initial host information endpoint

expanded on gateway-related endpoints

signing host information

moved all models to separate crate

unified http api client

routes unification + node api client

new generic cache and refresher

nym-api caching node self described information

removed old cache type

temporarily wired up NymContractCache to NodeDescriptionProvider

caching self reported host info

clients using self-described gateway information

fixed request timeouts for wasm

fixed wasm builds

post rebase fixes

cargo fmt

brought in wg routes into nym-node router

added ErrorResponse for wireguard routes

basic swagger support for wg endpoints

turns out swagger can be happy with strongly typed requests

output type support for wg routes

using concrete error type for nym node request error

fixed the registration test

landing page configurability

increased configurability

fixed build and lints of other crates

added default user-agent to http-api-client

reduced severity of gateway details lookup failure

changed default http port from 80 to 8080

nym-api using new default port for queries

added health endpoint

nym-api trying multiple ports for the client

using camelcase for node status

corrected health endpoint description

restored and revamped 'force_tls' flag to filter all gateways that support the wss protocol

fixed 'pub_key' path param in open api schema

derived Debug on 'NymNodeDescription'

ensuring valid public ips

added init and run flags to set hostname and public ips

fixed listening address being pushed to public ip

fixed the positional local flag

logging remote ip address of the request

updated helper function to query for described gateways

enabled tls in gateway client

removed hack-opts from mix fetch

additional changes after rebasing against origin/develop
@jstuczyn jstuczyn force-pushed the feature/gateway-api branch from c980c4e to d15c92f Compare October 19, 2023 09:19
@jstuczyn jstuczyn enabled auto-merge (squash) October 19, 2023 10:34
@benedettadavico benedettadavico self-requested a review October 19, 2023 10:36
Copy link
Contributor

@benedettadavico benedettadavico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@jstuczyn jstuczyn merged commit f328f3f into develop Oct 19, 2023
@jstuczyn jstuczyn deleted the feature/gateway-api branch October 19, 2023 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants