oxen-io / lokinet

Lokinet is an anonymous, decentralized and IP based overlay network for the internet.
https://lokinet.org/
GNU General Public License v3.0
1.72k stars 220 forks source link

rpc refactor #2115

Closed majestrate closed 1 year ago

majestrate commented 1 year ago

current rpc code is horrible

we want to:

majestrate commented 1 year ago

right now the RPC has to:

majestrate commented 1 year ago

open issues to inform how the new behavior would want to change:

https://github.com/oxen-io/lokinet/issues/2114

majestrate commented 1 year ago

we have one unprivileged category llarp which should be deprecated.

we want to define 2 new ones, a privileged category and an unprivileged category.

majestrate commented 1 year ago

easy endpoints to redo from old rpc:

new rpc feature idea list:

majestrate commented 1 year ago

first step would be to make the easy endpoints as a way to set up documentation generation in the build system to generate markdown for api.oxen.io

majestrate commented 1 year ago

the gui uses the llarp.get_status endpoint so that is a good first endpoint to create as the output is already defined and needs to be backward compatible.

majestrate commented 1 year ago

llarp.get_status is a very simple endpoint that introduces the concept of calling in the mainloop and using oxenmq's deferred calling.

majestrate commented 1 year ago

ideally we want all our new code in here to have a new category namespacing with proper permissions. this means anything in the llarp category will have to be some kind of "alias" for new handlers in the new rpc categories. (not an actual alias in the implementation but from the perspective of the user it would look like one)

majestrate commented 1 year ago

clarification:

generating documentation would be done by taking comments in the code from the build system and making cmake spit out markdown files.