From b30f4bb2b770ea2ae22d36295465e62ca4311e37 Mon Sep 17 00:00:00 2001 From: Daniel Olshansky Date: Wed, 13 Dec 2023 19:52:13 -0800 Subject: [PATCH] Updated the the quickstart guide --- Makefile | 3 --- docusaurus/docs/quickstart.md | 42 +++++++++++++---------------- pkg/relayer/proxy/relay_verifier.go | 9 ++++--- 3 files changed, 24 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index 9ed705bed..167c61c7e 100644 --- a/Makefile +++ b/Makefile @@ -523,13 +523,10 @@ go_docs: check_godoc ## Generate documentation for the project openapi_gen: ## Generate the OpenAPI spec for the Ignite API ignite generate openapi --yes - .PHONY: docusaurus_start docusaurus_start: ## Start the Docusaurus server (cd docusaurus && npm run start) - - ###################### ### Ignite Helpers ### ###################### diff --git a/docusaurus/docs/quickstart.md b/docusaurus/docs/quickstart.md index 77df9b314..1665e3002 100644 --- a/docusaurus/docs/quickstart.md +++ b/docusaurus/docs/quickstart.md @@ -18,6 +18,7 @@ title: Quickstart - [Send a relay](#send-a-relay) - [Send a relay a shannon](#send-a-relay-a-shannon) - [Explore the tools](#explore-the-tools) + - [E2E Tests](#e2e-tests) - [poktrolld](#poktrolld) - [Makefile](#makefile) - [Ignite](#ignite) @@ -177,7 +178,7 @@ TODO(@red-0ne): Link to the document for all the config files once ready. ::: We already have a supplier pre-configured (try running `make supplier_list`) to -supply services for anvil (an local ethereum testing node), so we can simply +supply services for `anvil` (an local ethereum testing node), so we can simply reused that for simplicity. Next, run the stake command: @@ -225,7 +226,7 @@ TODO(@Olshansk, @red-0ne, @okdas): This part is still a WIP and the last sentenc will likely throw an error. ::: -However, the appgate server above is not configured to sign relays on behalf of Shannon. +However, the appgate server above is not configured to sign relays on behalf of `SHANNON_ADDRESS`. To do so, you'll need to create a similar configuration like so: @@ -246,6 +247,12 @@ poktrolld --home=./localnet/poktrolld appgate-server \ --node tcp://127.0.0.1:36657 ``` +:::warning +You might need to add the following to your `/etc/hosts` file: +127.0.0.1 anvil +127.0.0.1 relayminers +::: + Repeat sending the relay to the new port: ```bash @@ -269,6 +276,16 @@ functionality in your day-to-day development. However, knowing of their existenc will help you when you need to do something that you haven't done before. ::: +### E2E Tests + +The `e2e` package contains a collection of end-to-end tests that leverage +[Cucumber & Gherkin](https://cucumber.io/docs/gherkin/). You can execute all of +them with: + +```bash +make test_e2e +``` + ### poktrolld Run `poktrolld --help` in order to explore all the different. You will likely @@ -282,24 +299,3 @@ improve our development experience. ### Ignite Run `ignite --help` in order to explore all the different commands. - -``` - -Things to add: - -``` - -flow: curl (client) -> AppGateServer -> Supplier -> Anvil -defaut: localhost -> k8s -> k8s -> k8s -quickstart: localhost -> localhost -.-> k8s -> k8s - -``` - -1. Update /etc/hosts -127.0.0.1 anvil -127.0.0.1 relayminers - - -TODO(@okdas): avoid restarting celestia when restarting localnet -TODO(@Olshansk): A script that runs all the things at once -``` diff --git a/pkg/relayer/proxy/relay_verifier.go b/pkg/relayer/proxy/relay_verifier.go index 4d583c13c..e9febb940 100644 --- a/pkg/relayer/proxy/relay_verifier.go +++ b/pkg/relayer/proxy/relay_verifier.go @@ -94,10 +94,11 @@ func (rp *relayerProxy) VerifyRelayRequest( }). Msg("verifying relay request session") - // TODO_IN_THIS_PR: Slow down blocks OR/AND increase numBlocksPerSession AND/OR make the following change: - currentBlock := rp.blockClient.LastNBlocks(ctx, 1)[0] - session, err := rp.sessionQuerier.GetSession(ctx, appAddress, service.Id, currentBlock.Height()) - // session, err := rp.sessionQuerier.GetSession(ctx, appAddress, service.Id, relayRequest.Meta.SessionHeader.SessionStartBlockHeight) + // TODO_IN_THIS_PR: Either slow down blocks, or increase numBlocksPerSession, + // or create a ticket related to session rollovers and link to it here. + // currentBlock := rp.blockClient.LastNBlocks(ctx, 1)[0] + // session, err := rp.sessionQuerier.GetSession(ctx, appAddress, service.Id, currentBlock.Height()) + session, err := rp.sessionQuerier.GetSession(ctx, appAddress, service.Id, relayRequest.Meta.SessionHeader.SessionStartBlockHeight) if err != nil { return err