From 81aeb1d327fa82310bbbbfba09fe58e8bb095d10 Mon Sep 17 00:00:00 2001 From: jeff <113397187+cyberhorsey@users.noreply.github.com> Date: Thu, 24 Nov 2022 20:04:29 -0800 Subject: [PATCH 1/2] chore(relayer): root health check (#338) --- .github/workflows/docker.yml | 1 - packages/relayer/http/routes.go | 1 + packages/relayer/http/server.go | 4 +--- packages/relayer/http/server_test.go | 13 +++++++++++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 23dbacd2036..7b375a00ad6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -5,7 +5,6 @@ on: branches: [main] paths: - "packages/relayer/**" - jobs: push-docker-image: name: Build and push docker image diff --git a/packages/relayer/http/routes.go b/packages/relayer/http/routes.go index 6effc11542e..e6a074db1f6 100644 --- a/packages/relayer/http/routes.go +++ b/packages/relayer/http/routes.go @@ -2,6 +2,7 @@ package http func (srv *Server) configureRoutes() { srv.echo.GET("/healthz", srv.Health) + srv.echo.GET("/", srv.Health) srv.echo.GET("/events", srv.GetEventsByAddress) } diff --git a/packages/relayer/http/server.go b/packages/relayer/http/server.go index 85171f087c7..8ab615f66b9 100644 --- a/packages/relayer/http/server.go +++ b/packages/relayer/http/server.go @@ -55,8 +55,8 @@ func NewServer(opts NewServerOpts) (*Server, error) { corsOrigins = []string{"*"} } - srv.configureRoutes() srv.configureMiddleware(corsOrigins) + srv.configureRoutes() return srv, nil } @@ -111,8 +111,6 @@ func (srv *Server) configureMiddleware(corsOrigins []string) { })) srv.configureAndStartPrometheus() - - srv.configureRoutes() } func (srv *Server) configureAndStartPrometheus() { diff --git a/packages/relayer/http/server_test.go b/packages/relayer/http/server_test.go index 471b9b7d011..cd20ec0158f 100644 --- a/packages/relayer/http/server_test.go +++ b/packages/relayer/http/server_test.go @@ -89,6 +89,19 @@ func Test_Health(t *testing.T) { } } +func Test_Root(t *testing.T) { + srv := newTestServer("") + + req, _ := http.NewRequest(echo.GET, "/", nil) + rec := httptest.NewRecorder() + + srv.ServeHTTP(rec, req) + + if rec.Code != http.StatusOK { + t.Fatalf("Test_Root expected code %v, got %v", http.StatusOK, rec.Code) + } +} + func Test_Metrics(t *testing.T) { srv := newTestServer("") From 4fe1fa4c61ec0197add7a376713835f25b1b70cf Mon Sep 17 00:00:00 2001 From: 1xDeFi <90858998+1xDeFi@users.noreply.github.com> Date: Fri, 25 Nov 2022 05:56:33 +0100 Subject: [PATCH 2/2] docs: add Taiko meaning to FAQ (#337) --- packages/website/faq/index.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/website/faq/index.md b/packages/website/faq/index.md index 41710ff898f..630b7ea163e 100644 --- a/packages/website/faq/index.md +++ b/packages/website/faq/index.md @@ -60,3 +60,11 @@ Taiko implements a ZK-EVM that supports every EVM opcode, producing a validity p A zero-knowledge proof is a method by which one party (the prover) can prove to another party (the verifier) that something is true, without revealing any information apart from the fact that this specific statement is true. There are 2 types of zero-knowledge proofs: ZK-SNARKs and ZK-STARKs. Taiko uses ZK-SNARKs in its design. + +## What does "Taiko" mean? + +It comes from an old Chinese saying 一鼓作气 (Yīgǔzuòqì) meaning "Do it all at once". + +The first drum beat cheers people up, the second weakens them, and the third devitalizes them. The first is the most powerful. +Taiko is the "drum". +