From fe2cbb393b14570d9ee800190c6a478ec5de3b4b Mon Sep 17 00:00:00 2001 From: Logan Lamb Date: Tue, 14 May 2024 18:43:26 +0000 Subject: [PATCH] CI - testnet --- .github/workflows/test_firedancer_testnet.yml | 33 +++++++++++++++++++ contrib/test/test_firedancer_testnet.sh | 6 ++-- src/flamenco/gossip/fd_gossip.c | 6 +++- 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/test_firedancer_testnet.yml diff --git a/.github/workflows/test_firedancer_testnet.yml b/.github/workflows/test_firedancer_testnet.yml new file mode 100644 index 0000000000..34a0441da3 --- /dev/null +++ b/.github/workflows/test_firedancer_testnet.yml @@ -0,0 +1,33 @@ +name: Firedancer Testnet +on: + workflow_call: + workflow_dispatch: + pull_request: + types: [synchronize, opened, reopened, ready_for_review] +jobs: + firedancer-testnet: + runs-on: private + if: github.event.pull_request.draft == false + env: + CC: gcc + EXTRAS: no-solana + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: ./.github/actions/deps + - uses: ./.github/actions/hugepages + with: + count_gigantic: 128 + count_huge: 1000 # TODO: this is required until we can handle anonymouse workspaces and loose huge pages in fddev + + - name: build + run: | + ./contrib/make-j fddev all + - name: test firedancer - testnet + run: | + sudo prlimit --pid=$$ --nofile=1048576 + sudo prlimit --pid=$$ --memlock=unlimited + ./contrib/test/test_firedancer_testnet.sh + diff --git a/contrib/test/test_firedancer_testnet.sh b/contrib/test/test_firedancer_testnet.sh index 31dbaa0719..376d05174f 100755 --- a/contrib/test/test_firedancer_testnet.sh +++ b/contrib/test/test_firedancer_testnet.sh @@ -43,7 +43,7 @@ if ! command -v fddev > /dev/null; then fi if [ -z "${ENTRYPOINT-}" ]; then - ENTRYPOINT=entrypoint3.testnet.solana.com + ENTRYPOINT=147.75.84.157 fi snapshot=$(download_snapshot http://$ENTRYPOINT:8899/snapshot.tar.bz2) @@ -54,8 +54,8 @@ echo " port = 8720 [tiles] [tiles.gossip] - entrypoints = [\"$(dig +short $ENTRYPOINT)\"] - peer_ports = [8001] + entrypoints = [\"$ENTRYPOINT\"] + peer_ports = [8000] gossip_listen_port = 8720 [tiles.repair] repair_intake_listen_port = 8721 diff --git a/src/flamenco/gossip/fd_gossip.c b/src/flamenco/gossip/fd_gossip.c index de70496c7f..6643d8720b 100644 --- a/src/flamenco/gossip/fd_gossip.c +++ b/src/flamenco/gossip/fd_gossip.c @@ -1235,6 +1235,10 @@ fd_gossip_handle_prune(fd_gossip_t * glob, const fd_gossip_peer_addr_t * from, f signdata.destination = msg->data.destination; signdata.wallclock = msg->data.wallclock; + /* Verify the signature. You would think that solana would use + msg->pubkey.uc for this, but that pubkey is actually ignored. The + inclusion of two pubkeys in this message is confusing and + problematic. */ uchar buf[FD_ETH_PAYLOAD_MAX]; fd_bincode_encode_ctx_t ctx; ctx.data = buf; @@ -1247,7 +1251,7 @@ fd_gossip_handle_prune(fd_gossip_t * glob, const fd_gossip_peer_addr_t * from, f if (fd_ed25519_verify( /* msg */ buf, /* sz */ (ulong)((uchar*)ctx.data - buf), /* sig */ msg->data.signature.uc, - /* public_key */ msg->pubkey.uc, + /* public_key */ msg->data.pubkey.uc, sha )) { FD_LOG_WARNING(("received prune_msg with invalid signature")); return;