diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f65f145e..72caca59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,11 +12,11 @@ concurrency: env: GO_VERSION: "1.21" # https://go.dev/dl/ - STRINGER_VERSION: "0.15.0" # https://pkg.go.dev/golang.org/x/tools/cmd/stringer?tab=versions + STRINGER_VERSION: "0.23.0" # https://pkg.go.dev/golang.org/x/tools/cmd/stringer?tab=versions # Protoc dependencies. - PROTOC_VERSION: "25.3" # https://github.com/protocolbuffers/protobuf/releases + PROTOC_VERSION: "27.1" # https://github.com/protocolbuffers/protobuf/releases PROTOC_GEN_GO_VERSION: "1.31.0" # https://pkg.go.dev/google.golang.org/protobuf/cmd/protoc-gen-go?tab=versions - PROTOC_GEN_GO_GRPC_VERSION: "1.3.0" # https://pkg.go.dev/google.golang.org/grpc/cmd/protoc-gen-go-grpc?tab=versions + PROTOC_GEN_GO_GRPC_VERSION: "1.4.0" # https://pkg.go.dev/google.golang.org/grpc/cmd/protoc-gen-go-grpc?tab=versions ARCH: "linux-x86_64" jobs: diff --git a/README.md b/README.md index 0497e363..e988b903 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,7 @@ We run a lot of different blockchain technologies. Different tools often have in - [Install](#install) - [Features](#features) - [Testing](#testing) -- [Contributing](#contributing) -- [Reference](#reference) +- [References](#references) ## Install @@ -23,7 +22,7 @@ Requirements: To install, clone this repo and run: ```bash -$ make install +make install ``` By default, the commands will be in `$HOME/go/bin/`, so for ease, we recommend adding that path to your shell's startup file by adding the following line: @@ -85,28 +84,29 @@ Note: Do not modify this section! It is auto-generated by `cobra` using `make ge To test the features of `polycli`, we'll run geth in `dev` mode but you can run any node you want. ```bash -$ make geth -INFO [07-10|10:43:12.499] Starting Geth in ephemeral dev mode... -... +make geth ``` You can then fund the default load testing account and run some tests. ```bash -$ make geth-loadtest -10:57AM INF Starting Load Test -10:57AM INF Connecting with RPC endpoint to initialize load test parameters -... +make geth-loadtest ``` You can view the state of the chain using `polycli`. ```bash -$ polycli monitor --rpc-url http://127.0.0.1:8545 +polycli monitor --rpc-url http://127.0.0.1:8545 ``` ![polycli monitor](doc/assets/monitor.gif) +Note that if you want to debug the monitor, you can use the following command. + +```bash +polycli monitor --rpc-url http://34.117.145.249:80 -v 700 &> log.txt +``` + You can also interact manually with your node, you can attach a Javascript console to your node using IPC. First, wait for the IPC endpoint to open. @@ -123,17 +123,7 @@ INFO [07-10|10:44:29.256] Generated ephemeral JWT secret secret=0x7511 Then, attach a console to your node. ```bash -$ geth attach /var/folders/7m/3_x4ns7557x52hb6vncqkx8h0000gn/T/geth.ipc -Welcome to the Geth JavaScript console! - -instance: Geth/v1.12.0-stable/darwin-amd64/go1.20.4 -coinbase: 0x760f66cae63cb561ed0ef29d5e005f44215e2ba2 -at block: 8 (Mon Jul 10 2023 10:49:07 GMT+0200 (CEST)) - datadir: - modules: admin:1.0 clique:1.0 debug:1.0 engine:1.0 eth:1.0 miner:1.0 net:1.0 rpc:1.0 txpool:1.0 web3:1.0 - -To exit, press ctrl-d or type exit -> +geth attach /var/folders/7m/3_x4ns7557x52hb6vncqkx8h0000gn/T/geth.ipc ``` From there, you can do anything such as funding the default load testing account with some currency. @@ -149,21 +139,14 @@ true You can then generate some load to make sure that blocks with transactions are being created. Note that the chain id of local geth is `1337`. ```bash -$ polycli loadtest --verbosity 700 --chain-id 1337 --concurrency 1 --requests 1000 --rate-limit 5 --mode c --rpc-url http://127.0.0.1:8545 +polycli loadtest --verbosity 700 --chain-id 1337 --concurrency 1 --requests 1000 --rate-limit 5 --mode c --rpc-url http://127.0.0.1:8545 ``` -## Monitor Debug -`polycli monitor --rpc-url http://34.117.145.249:80 -v 700 &> log.txt` - -# Contributing - -- If you add a new loadtest mode, don't forget to update the loadtest mode string by running the following command: `cd cmd/loadtest && stringer -type=loadTestMode`. You can install [stringer](https://pkg.go.dev/golang.org/x/tools/cmd/stringer) with `go install golang.org/x/tools/cmd/stringer@latest`. - ## Contact For more discussions, please head to the [R&D Discord](https://discord.gg/0xPolygonRnD) -# Reference +## References Sending some value to the default load testing account. @@ -195,3 +178,5 @@ curl -v -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0", "id": 1, "meth websocat ws://34.208.176.205:9944 {"jsonrpc":"2.0", "id": 1, "method": "chain_subscribeNewHead", "params": []} ``` + +If you add a new loadtest mode, don't forget to update the loadtest mode string by running the following command: `cd cmd/loadtest && stringer -type=loadTestMode`. You can install [stringer](https://pkg.go.dev/golang.org/x/tools/cmd/stringer) with `go install golang.org/x/tools/cmd/stringer@latest`. diff --git a/proto/gen/pb/block.pb.go b/proto/gen/pb/block.pb.go index bfeefcc7..397b95b0 100644 --- a/proto/gen/pb/block.pb.go +++ b/proto/gen/pb/block.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 -// protoc v4.25.3 +// protoc v5.27.1 // source: block.proto package pb diff --git a/proto/gen/pb/transaction.pb.go b/proto/gen/pb/transaction.pb.go index 3b96da15..9134c504 100644 --- a/proto/gen/pb/transaction.pb.go +++ b/proto/gen/pb/transaction.pb.go @@ -3,7 +3,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.31.0 -// protoc v4.25.3 +// protoc v5.27.1 // source: transaction.proto package pb