Skip to content

Commit

Permalink
Ping/Pong Extensions (#706)
Browse files Browse the repository at this point in the history
* portalnetwork: custom pingpong payload types and methods

* client: add client info as client attribute

* remove duplicate type name

* network: add capabilites and ephemeralHeadersCount to network attributes

* history: add history related capabilities

* network: add pingPongPayload method

* network: refactor Ping/Pong methods

* fix ping message test

* move HISTORY_RADIUS conditional to correct case

* CLI: add system arch and commit hash to args

* CLI: use simpleGit to find commit hash

* client: remove node builtins

* client: use info from opts

* CLI: modify ping endpoints to use BASIC_RADIUS ping type

* update packagelock

* update network capabilities array

* include radius in type 0 payload

* RPC: change PING methods to type 0

* enforce 1st ping MUST be type 0

* fix Docker build with json assertion

* Use correct type on error response

* test PING/PONG extensions

* fix PONG bug

* test ClientInfo functions

* CLI: replace simple-git with execSync

* update extensions types

* update test vectors

* CLI: update pong payload handling

* Copy git directory in dockerfile

* Update Dockerfile

Co-authored-by: Kolby Moroz Liebl <[email protected]>

* fix .git copy statement

* fix dockerfile again

* Propagate os/cpu/commit to portalnetwork constructor

* update package-lock

---------

Co-authored-by: acolytec3 <[email protected]>
Co-authored-by: Kolby Moroz Liebl <[email protected]>
  • Loading branch information
3 people authored Jan 27, 2025
1 parent 624f4fc commit 70ca320
Show file tree
Hide file tree
Showing 17 changed files with 1,457 additions and 2,195 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2

WORKDIR /ultralight

COPY .git .git
COPY node_modules node_modules
COPY packages/portalnetwork/dist packages/portalnetwork/dist
COPY packages/cli/dist packages/cli/dist
Expand All @@ -20,4 +21,4 @@ ENV BINDADDRESS=
ENV RPCPORT=
ENV PK=

ENTRYPOINT node ultralight/packages/cli/dist/index.js --bindAddress=BINDADDRESS --rpcPort=RPCPORT
ENTRYPOINT node packages/cli/dist/index.js --bindAddress=BINDADDRESS --rpcPort=RPCPORT
Loading

0 comments on commit 70ca320

Please sign in to comment.