From d5f202f80be3a50553e771510bbfb35e2d8dd780 Mon Sep 17 00:00:00 2001 From: itsdevbear Date: Sat, 3 Feb 2024 20:41:11 -0500 Subject: [PATCH] remove old stuff --- Makefile | 6 +- build/scripts/cosmos.mk | 1 + examples/beacond/contracts/main/main.go | 77 ----- examples/beacond/docker/base.Dockerfile | 11 +- examples/beacond/docker/docker-compose.yml | 278 ------------------ examples/beacond/docker/ethgen/genesis.json | 61 ---- examples/beacond/docker/ethgen/jwt.hex | 1 - .../beacond/docker/ethgen/p2p-secret-0.key | 1 - .../beacond/docker/ethgen/p2p-secret-1.key | 1 - .../beacond/docker/ethgen/p2p-secret-2.key | 1 - .../beacond/docker/ethgen/p2p-secret-3.key | 1 - examples/beacond/docker/network-init-3.sh | 81 ----- examples/beacond/docker/network-init-4.sh | 98 ------ examples/beacond/docker/nginx.conf | 19 -- examples/beacond/docker/reset-temp.sh | 32 -- .../docker/seed/scripts/get-seed-address.sh | 33 --- .../docker/seed/scripts/liveness-probe.sh | 58 ---- .../docker/seed/scripts/readiness-probe.sh | 42 --- examples/beacond/docker/seed/scripts/reset.sh | 30 -- .../beacond/docker/seed/scripts/seed-start.sh | 33 --- .../docker/seed/scripts/seed0-init-step1.sh | 78 ----- .../docker/seed/scripts/seed0-init-step2.sh | 47 --- .../docker/seed/scripts/seed1-init-step1.sh | 53 ---- .../docker/seed/scripts/seed1-init-step2.sh | 45 --- .../docker/seed/scripts/seed2-init-step2.sh | 45 --- .../docker/seed/scripts/set-moniker.sh | 32 -- .../seed/scripts/set-persistent-peers.sh | 33 --- .../docker/seed/scripts/set-seed-address.sh | 33 --- 28 files changed, 8 insertions(+), 1223 deletions(-) delete mode 100644 examples/beacond/contracts/main/main.go delete mode 100644 examples/beacond/docker/docker-compose.yml delete mode 100644 examples/beacond/docker/ethgen/genesis.json delete mode 100644 examples/beacond/docker/ethgen/jwt.hex delete mode 100644 examples/beacond/docker/ethgen/p2p-secret-0.key delete mode 100644 examples/beacond/docker/ethgen/p2p-secret-1.key delete mode 100644 examples/beacond/docker/ethgen/p2p-secret-2.key delete mode 100644 examples/beacond/docker/ethgen/p2p-secret-3.key delete mode 100755 examples/beacond/docker/network-init-3.sh delete mode 100755 examples/beacond/docker/network-init-4.sh delete mode 100644 examples/beacond/docker/nginx.conf delete mode 100755 examples/beacond/docker/reset-temp.sh delete mode 100644 examples/beacond/docker/seed/scripts/get-seed-address.sh delete mode 100644 examples/beacond/docker/seed/scripts/liveness-probe.sh delete mode 100644 examples/beacond/docker/seed/scripts/readiness-probe.sh delete mode 100644 examples/beacond/docker/seed/scripts/reset.sh delete mode 100644 examples/beacond/docker/seed/scripts/seed-start.sh delete mode 100755 examples/beacond/docker/seed/scripts/seed0-init-step1.sh delete mode 100644 examples/beacond/docker/seed/scripts/seed0-init-step2.sh delete mode 100644 examples/beacond/docker/seed/scripts/seed1-init-step1.sh delete mode 100644 examples/beacond/docker/seed/scripts/seed1-init-step2.sh delete mode 100644 examples/beacond/docker/seed/scripts/seed2-init-step2.sh delete mode 100644 examples/beacond/docker/seed/scripts/set-moniker.sh delete mode 100644 examples/beacond/docker/seed/scripts/set-persistent-peers.sh delete mode 100644 examples/beacond/docker/seed/scripts/set-seed-address.sh diff --git a/Makefile b/Makefile index c595e3ada3..859809976f 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ include build/scripts/cosmos.mk build/scripts/constants.mk BUILD_TARGETS := build install -build: BUILD_ARGS=-o $(OUT_DIR)/ +build: BUILD_ARGS=-o $(OUT_DIR)/beacond build-linux-amd64: GOOS=linux GOARCH=amd64 LEDGER_ENABLED=false $(MAKE) build @@ -19,8 +19,8 @@ build-linux-arm64: GOOS=linux GOARCH=arm64 LEDGER_ENABLED=false $(MAKE) build $(BUILD_TARGETS): forge-build sync $(OUT_DIR)/ - @echo "Building ${TESTAPP_DIR}" - @cd ${CURRENT_DIR}/$(TESTAPP_DIR) && go $@ -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./... + @echo "Building ${TESTAPP_CMD_DIR}" + @cd ${CURRENT_DIR}/$(TESTAPP_CMD_DIR) && go $@ -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./. $(OUT_DIR)/: mkdir -p $(OUT_DIR)/ diff --git a/build/scripts/cosmos.mk b/build/scripts/cosmos.mk index 40416381db..71b2d9ac6f 100644 --- a/build/scripts/cosmos.mk +++ b/build/scripts/cosmos.mk @@ -11,6 +11,7 @@ CURRENT_DIR = $(shell pwd) OUT_DIR ?= $(CURDIR)/build/bin BINDIR ?= $(GOPATH)/build/bin TESTAPP_DIR = examples/beacond +TESTAPP_CMD_DIR = $(TESTAPP_DIR)/cmd PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git) # process build tags diff --git a/examples/beacond/contracts/main/main.go b/examples/beacond/contracts/main/main.go deleted file mode 100644 index efc5f2c6db..0000000000 --- a/examples/beacond/contracts/main/main.go +++ /dev/null @@ -1,77 +0,0 @@ -// SPDX-License-Identifier: MIT -// -// Copyright (c) 2023 Berachain Foundation -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following -// conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. -// - -// nolint -// -//nolint:nolintlint // testing file. -package main - -import ( - "context" - "math/big" - - "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethclient" - - "github.com/itsdevbear/bolaris/beacon/logs/callback" - "github.com/itsdevbear/bolaris/examples/beacond/contracts" - evmv1 "github.com/itsdevbear/bolaris/types/evm/v1" -) - -func main() { - ssc := &contracts.StakingCallbacks{} - - sc, err := callback.NewFrom(ssc) - if err != nil { - panic(err) - } - - ethclient, err := ethclient.Dial("http://localhost:8545") - if err != nil { - panic(err) - } - - logs, err := ethclient.FilterLogs(context.Background(), ethereum.FilterQuery{ - Addresses: []common.Address{common.HexToAddress("0xB0ce0be267f1B1db9b30CD3E61DF1C6937129A84")}, - FromBlock: big.NewInt(135), - ToBlock: big.NewInt(1000), - }) - - if err != nil { - panic(err) - } - - for _, log := range logs { - // Handle the log - err = sc.HandleLog(context.Background(), evmv1.NewLogFromGethLog(log)) - if err != nil { - panic(err) - } - } - - _ = sc -} diff --git a/examples/beacond/docker/base.Dockerfile b/examples/beacond/docker/base.Dockerfile index 3fc79d5089..a7d72c1384 100644 --- a/examples/beacond/docker/base.Dockerfile +++ b/examples/beacond/docker/base.Dockerfile @@ -24,7 +24,7 @@ ARG BUILD_TAGS="netgo,ledger,muslc" ARG NAME=beacond ARG APP_NAME=beacond ARG DB_BACKEND=pebbledb -ARG CMD_PATH=./app/beacond +ARG CMD_PATH=./examples/beacond/cmd ARG FOUNDRY_DIR=contracts @@ -83,7 +83,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ -X github.com/cosmos/cosmos-sdk/types.DBBackend=$DB_BACKEND \ -w -s -linkmode=external -extldflags '-Wl,-z,muldefs -static'" \ -trimpath \ - -o /workdir/build/bin/ \ + -o /workdir/build/bin/beacond \ ${CMD_PATH} ####################################################### @@ -96,14 +96,11 @@ FROM ${RUNNER_IMAGE} ARG APP_NAME # Copy over built executable into a fresh container. -COPY --from=builder /workdir/build/bin/${APP_NAME} /bin/ +COPY --from=builder /workdir/build/bin/${APP_NAME} / RUN apk add bash jq sed curl WORKDIR / -COPY ./app/docker/seed/scripts scripts/ -RUN chmod +x scripts/* - -CMD ["sh", "-c", "sleep infinity"] \ No newline at end of file +ENTRYPOINT [ "./beacond" ] \ No newline at end of file diff --git a/examples/beacond/docker/docker-compose.yml b/examples/beacond/docker/docker-compose.yml deleted file mode 100644 index 60bf6cdbd9..0000000000 --- a/examples/beacond/docker/docker-compose.yml +++ /dev/null @@ -1,278 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -version: "3.3" - -services: - node0: - container_name: beacond-node0 - image: "beacond/seed:v0.0.0" - ports: - - "26656-26658:26656-26658" - - "9090-9091:9090-9091" - environment: - - ID=0 - - CHAINID=berachain-localnet-666 - - DIALURL=http://beacond-reth0:8551 - - JWTSECRETPATH=/root/ethgen/jwt.hex - volumes: - - type: bind - source: ./temp/seed0 - target: /root - - type: bind - source: ./ethgen - target: /root/ethgen - networks: - localnet: - ipv4_address: 192.168.10.10 - - - # Other nodes will use reth0 as their bootnode - # enode://c58ccefeae4d769d0212d0e9d44aa0a5bc49765d472e758ce16fe9518acb74e576a522a783677ad370f3c3a4991f831a89e0dc02ac18667dd824eb5931d3fca5@192.168.10.11:30303 - reth0: - container_name: beacond-reth0 - image: ghcr.io/paradigmxyz/reth - command: > - node --http.api eth,net,txpool,rpc,web3 - --chain /root/ethgen/genesis.json - --http - --authrpc.jwtsecret /root/ethgen/jwt.hex - --http.addr 192.168.10.11 - --http.port 8545 - --authrpc.port 8551 - --http.corsdomain "*" - --authrpc.addr 192.168.10.11 - --discovery.addr 192.168.10.11 - --discovery.port 30303 - --addr 192.168.10.11 - --port 30303 - --p2p-secret-key /root/ethgen/p2p-secret-0.key - --builder.deadline 3 - --builder.max-tasks 24 - volumes: - - type: bind - source: ./ethgen - target: /root/ethgen - networks: - localnet: - ipv4_address: 192.168.10.11 - ports: - - "8545:8545" - - "8551:8551" - - "30303:30303" - - node1: - container_name: beacond-node1 - image: "beacond/seed:v0.0.0" - ports: - - "36656-36658:26656-26658" - - "10090-10091:9090-9091" - environment: - - ID=1 - - CHAINID=berachain-localnet-666 - - DIALURL=http://beacond-reth1:9551 - - JWTSECRETPATH=/root/ethgen/jwt.hex - volumes: - - type: bind - source: ./temp/seed1 - target: /root - - type: bind - source: ./ethgen - target: /root/ethgen - networks: - localnet: - ipv4_address: 192.168.10.12 - - # enode://0b5632872cfca278b2a0403c9d691789a198f6950cd7bbee1b7aaa2f2afa55330a5daafe955a90f2ae510b40049d4b20bc1f0b0f4c7b017391664e9521692da3@192.168.10.13:40303 - reth1: - container_name: beacond-reth1 - image: ghcr.io/paradigmxyz/reth - command: > - node --http.api eth,net,txpool,rpc,web3 - --chain /root/ethgen/genesis.json - --http - --authrpc.jwtsecret /root/ethgen/jwt.hex - --http.addr 192.168.10.13 - --http.port 9545 - --authrpc.port 9551 - --http.corsdomain "*" - --authrpc.addr 192.168.10.13 - --discovery.addr 192.168.10.13 - --discovery.port 40303 - --addr 192.168.10.13 - --port 40303 - --p2p-secret-key /root/ethgen/p2p-secret-1.key - --bootnodes enode://c58ccefeae4d769d0212d0e9d44aa0a5bc49765d472e758ce16fe9518acb74e576a522a783677ad370f3c3a4991f831a89e0dc02ac18667dd824eb5931d3fca5@192.168.10.11:30303 - --builder.deadline 3 - --builder.max-tasks 24 - volumes: - - type: bind - source: ./ethgen - target: /root/ethgen - networks: - localnet: - ipv4_address: 192.168.10.13 - ports: - - "9545:9545" - - "9551:9551" - - "40303:40303" - - node2: - container_name: beacond-node2 - image: "beacond/seed:v0.0.0" - ports: - - "46656-46658:26656-26658" - - "11090-11091:9090-9091" - environment: - - ID=2 - - CHAINID=berachain-localnet-666 - - DIALURL=http://beacond-reth2:10551 - - JWTSECRETPATH=/root/ethgen/jwt.hex - volumes: - - type: bind - source: ./temp/seed2 - target: /root - - type: bind - source: ./ethgen - target: /root/ethgen - networks: - localnet: - ipv4_address: 192.168.10.14 - - - # enode://3d356b2c6425336a48f42a401081addaa5c1643c7bfb9df5e3792228383a4b14ad699ab13ecfedcaf60fcd6bd62c6149736e4e5e03635375215f0d770dc74c1f@192.168.10.15:50303 - reth2: - container_name: beacond-reth2 - image: ghcr.io/paradigmxyz/reth - command: > - node --http.api eth,net,txpool,rpc,web3 - --chain /root/ethgen/genesis.json - --http - --http.port 10545 - --authrpc.port 10551 - --authrpc.jwtsecret /root/ethgen/jwt.hex - --http.corsdomain "*" - --http.addr 192.168.10.15 - --authrpc.addr 192.168.10.15 - --discovery.addr 192.168.10.15 - --discovery.port 50303 - --addr 192.168.10.15 - --port 50303 - --p2p-secret-key /root/ethgen/p2p-secret-2.key - --bootnodes enode://c58ccefeae4d769d0212d0e9d44aa0a5bc49765d472e758ce16fe9518acb74e576a522a783677ad370f3c3a4991f831a89e0dc02ac18667dd824eb5931d3fca5@192.168.10.11:30303 - --builder.deadline 3 - --builder.max-tasks 24 - volumes: - - type: bind - source: ./ethgen - target: /root/ethgen - networks: - localnet: - ipv4_address: 192.168.10.15 - ports: - - "10545:10545" - - "10551:10551" - - "50303:50303" - - - node3: - container_name: beacond-node3 - image: "beacond/seed:v0.0.0" - ports: - - "56665-56667:26656-26658" - - "12096-12097:9090-9091" - environment: - - ID=3 - - CHAINID=berachain-localnet-666 - - DIALURL=http://192.168.10.17:11551 - - JWTSECRETPATH=/root/ethgen/jwt.hex - volumes: - - type: bind - source: ./temp/seed3 - target: /root - - type: bind - source: ./ethgen - target: /root/ethgen - networks: - localnet: - ipv4_address: 192.168.10.16 - - # enode://fef1c19f87dd4c1221538c380715d88f3de6809a86738546a7738bb36094365e9fed49fe30e0411217b3eacca120afa2bb0d5cd6e29643abd61b261585bb68b2@192.168.10.17:60303 - reth3: - container_name: beacond-reth3 - # image: ethereum/client-go:stab - # environment: - # - GETH_GRAPHQL_VHOSTS=* - # command: > - # --authrpc.vhosts * - # --http.api eth,net,txpool,rpc,web3 - # --http - # --http.port 11545 - # --http.addr 192.168.10.17 - # --http.corsdomain * - # - # /root/ethgen/jwt.hex - # --authrpc.addr 192.168.10.17 - # --authrpc.port 11551 - # --datadir /root/ethgen/gethdatadir - # --bootnodes enode://c58ccefeae4d769d0212d0e9d44aa0a5bc49765d472e758ce16fe9518acb74e576a522a783677ad370f3c3a4991f831a89e0dc02ac18667dd824eb5931d3fca5@192.168.10.11:30303 - image: ghcr.io/paradigmxyz/reth - command: > - node --http.api eth,net,txpool,rpc,web3 - --chain /root/ethgen/genesis.json - --http - --authrpc.jwtsecret /root/ethgen/jwt.hex - --http.corsdomain "*" - --http.port 11545 - --http.addr 192.168.10.17 - --authrpc.port 11551 - --authrpc.addr 192.168.10.17 - --discovery.addr 192.168.10.17 - --discovery.port 60303 - --addr 192.168.10.17 - --port 60303 - --p2p-secret-key /root/ethgen/p2p-secret-3.key - --bootnodes enode://c58ccefeae4d769d0212d0e9d44aa0a5bc49765d472e758ce16fe9518acb74e576a522a783677ad370f3c3a4991f831a89e0dc02ac18667dd824eb5931d3fca5@192.168.10.11:30303 - --builder.deadline 3 - --builder.max-tasks 24 - volumes: - - type: bind - source: ./ethgen - target: /root/ethgen - networks: - localnet: - ipv4_address: 192.168.10.17 - ports: - - "11545:11545" - - "11551:11551" - - "60303:60303" - -networks: - localnet: - driver: bridge - ipam: - config: - - subnet: 192.168.10.0/24 - diff --git a/examples/beacond/docker/ethgen/genesis.json b/examples/beacond/docker/ethgen/genesis.json deleted file mode 100644 index 4b1a245d4f..0000000000 --- a/examples/beacond/docker/ethgen/genesis.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "config": { - "chainId": 7, - "homesteadBlock": 0, - "daoForkBlock": 0, - "daoForkSupport": true, - "eip150Block": 0, - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "muirGlacierBlock": 0, - "berlinBlock": 0, - "londonBlock": 0, - "arrowGlacierBlock": 0, - "grayGlacierBlock": 0, - "mergeNetsplitBlock": 0, - "shanghaiTime": 0, - "terminalTotalDifficulty": 0, - "terminalTotalDifficultyPassed": true - }, - "coinbase": "0x0000000000000000000000000000000000000000", - "difficulty": "0x20000", - "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000658bdf435d810c91414ec09147daa6db624063790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "gasLimit": "0x1c9c380", - "nonce": "0x0000000000000000", - "timestamp": "0x1234", - "alloc": { - "0x20f33ce90a13a4b5e7697e3544c3083b8f8a51d4": { - "balance": "0x123450000000000000000" - }, - "0161e041aad467a890839d5b08b138c1e6373072": { - "balance": "0x123450000000000000000" - }, - "87da6a8c6e9eff15d703fc2773e32f6af8dbe301": { - "balance": "0x123450000000000000000" - }, - "b97de4b8c857e4f6bc354f226dc3249aaee49209": { - "balance": "0x123450000000000000000" - }, - "c5065c9eeebe6df2c2284d046bfc906501846c51": { - "balance": "0x123450000000000000000" - }, - "0000000000000000000000000000000000000314": { - "balance": "0x0", - "code": "0x60606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a223e05d1461006a578063abd1a0cf1461008d578063abfced1d146100d4578063e05c914a14610110578063e6768b451461014c575b610000565b346100005761007761019d565b6040518082815260200191505060405180910390f35b34610000576100be600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506101a3565b6040518082815260200191505060405180910390f35b346100005761010e600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506101ed565b005b346100005761014a600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610236565b005b346100005761017960048080359060200190919080359060200190919080359060200190919050506103c4565b60405180848152602001838152602001828152602001935050505060405180910390f35b60005481565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5050565b7f6031a8d62d7c95988fa262657cd92107d90ed96e08d8f867d32f26edfe85502260405180905060405180910390a17f47e2689743f14e97f7dcfa5eec10ba1dff02f83b3d1d4b9c07b206cbbda66450826040518082815260200191505060405180910390a1817fa48a6b249a5084126c3da369fbc9b16827ead8cb5cdc094b717d3f1dcd995e2960405180905060405180910390a27f7890603b316f3509577afd111710f9ebeefa15e12f72347d9dffd0d65ae3bade81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a18073ffffffffffffffffffffffffffffffffffffffff167f7efef9ea3f60ddc038e50cccec621f86a0195894dc0520482abf8b5c6b659e4160405180905060405180910390a28181604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a05b5050565b6000600060008585859250925092505b935093509390505600a165627a7a72305820aaf842d0d0c35c45622c5263cbb54813d2974d3999c8c38551d7c613ea2bc1170029", - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000000": "0x1234", - "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9": "0x01" - }, - "nonce": "0x1" - }, - "0000000000000000000000000000000000000315": { - "balance": "0x9999999999999999999999999999999", - "code": "0x60606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063ef2769ca1461003e575b610000565b3461000057610078600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061007a565b005b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051809050600060405180830381858888f1935050505015610106578173ffffffffffffffffffffffffffffffffffffffff167f30a3c50752f2552dcc2b93f5b96866280816a986c0c0408cb6778b9fa198288f826040518082815260200191505060405180910390a25b5b50505600a165627a7a72305820637991fabcc8abad4294bf2bb615db78fbec4edff1635a2647d3894e2daf6a610029", - "nonce": "0x1" - } - } -} \ No newline at end of file diff --git a/examples/beacond/docker/ethgen/jwt.hex b/examples/beacond/docker/ethgen/jwt.hex deleted file mode 100644 index 48bf7c6d7a..0000000000 --- a/examples/beacond/docker/ethgen/jwt.hex +++ /dev/null @@ -1 +0,0 @@ -1b8d34037ac04570b76cb1a13d1db17729a5b6a90f10497b2bc4422fbd39615a \ No newline at end of file diff --git a/examples/beacond/docker/ethgen/p2p-secret-0.key b/examples/beacond/docker/ethgen/p2p-secret-0.key deleted file mode 100644 index a64df28f8f..0000000000 --- a/examples/beacond/docker/ethgen/p2p-secret-0.key +++ /dev/null @@ -1 +0,0 @@ -dc8c4867fccce0c2d69cfcd445c8c7d01414a6cdf781bbb94a86f1cd746592ce \ No newline at end of file diff --git a/examples/beacond/docker/ethgen/p2p-secret-1.key b/examples/beacond/docker/ethgen/p2p-secret-1.key deleted file mode 100644 index 45d1dce2e4..0000000000 --- a/examples/beacond/docker/ethgen/p2p-secret-1.key +++ /dev/null @@ -1 +0,0 @@ -903317eafc665378980495b00ae8e2b5d1564e2dfea797e32db92103f06bd543 \ No newline at end of file diff --git a/examples/beacond/docker/ethgen/p2p-secret-2.key b/examples/beacond/docker/ethgen/p2p-secret-2.key deleted file mode 100644 index 1cecfaebd0..0000000000 --- a/examples/beacond/docker/ethgen/p2p-secret-2.key +++ /dev/null @@ -1 +0,0 @@ -510efad84512a2eb325c3d53b71c64a4bb3e2cb7228641c4f32f8996ae3eef0e \ No newline at end of file diff --git a/examples/beacond/docker/ethgen/p2p-secret-3.key b/examples/beacond/docker/ethgen/p2p-secret-3.key deleted file mode 100644 index 48205dbf9e..0000000000 --- a/examples/beacond/docker/ethgen/p2p-secret-3.key +++ /dev/null @@ -1 +0,0 @@ -b1033e5ea430df6454ffecdf62db963041eef3a90521b8c79f898a0b802f56a3 \ No newline at end of file diff --git a/examples/beacond/docker/network-init-3.sh b/examples/beacond/docker/network-init-3.sh deleted file mode 100755 index ea5f82889f..0000000000 --- a/examples/beacond/docker/network-init-3.sh +++ /dev/null @@ -1,81 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -CONTAINER0="beacond-node0" -CONTAINER1="beacond-node1" -CONTAINER2="beacond-node2" - -HOMEDIR="/root/.beacond" -SCRIPTS="/scripts" - -rm -rf ./temp -mkdir ./temp -mkdir ./temp/seed0 -mkdir ./temp/seed1 -mkdir ./temp/seed2 -touch ./temp/genesis.json - -# init step 1 -docker exec $CONTAINER0 bash -c "$SCRIPTS/seed0-init-step1.sh" -docker exec $CONTAINER1 bash -c "$SCRIPTS/seed1-init-step1.sh seed-1" -docker exec $CONTAINER2 bash -c "$SCRIPTS/seed1-init-step1.sh seed-2" - -# copy genesis.json from seed-0 to seed-1 -docker cp $CONTAINER0:$HOMEDIR/config/genesis.json ./temp/genesis.json -docker cp ./temp/genesis.json $CONTAINER1:$HOMEDIR/config/genesis.jso - -# init step 2 -docker exec $CONTAINER1 bash -c "$SCRIPTS/seed1-init-step2.sh seed-1" - -# copy genesis.json from seed-1 to seed-2 -docker cp $CONTAINER1:$HOMEDIR/config/genesis.json ./temp/genesis.json -docker cp ./temp/genesis.json $CONTAINER2:$HOMEDIR/config/genesis.json -ls - -# copy genesis.json from seed-2 to seed-0 -docker cp $CONTAINER2:$HOMEDIR/config/genesis.json ./temp/genesis.json -docker cp ./temp/genesis.json $CONTAINER0:$HOMEDIR/config/genesis.jsongene -# copy gentx -docker cp $CONTAINER1:$HOMEDIR/config/gentx ./temp -docker cp ./temp/gentx $CONTAINER0:$HOMEDIR/config - -# init step 2 -docker exec $CONTAINER0 bash -c "$SCRIPTS/seed0-init-step2.sh" - -# copy genesis.json from seed-0 to seed-1,2,3 -docker cp $CONTAINER0:$HOMEDIR/config/genesis.json ./temp/genesis.json -docker cp ./temp/genesis.json $CONTAINER1:$HOMEDIR/config/genesis.json -docker cp ./temp/genesis.json $CONTAINER2:$HOMEDIR/config/genesis.json - -# start -# docker exec -it $CONTAINER0 bash -c "$SCRIPTS/seed-start.sh" -# docker exec -it $CONTAINER1 bash -c "$SCRIPTS/seed-start.sh" -# docker exec -it $CONTAINER2 bash -c "$SCRIPTS/seed-start.sh" -# docker exec -it $CONTAINER2 bash -c "$SCRIPTS/seed-start.sh" - -# docker exec -it beacond-node0 bash -c "/scripts/seed-start.sh" -# docker exec -it beacond-node1 bash -c "/scripts/seed-start.sh" -# docker exec -it beacond-node2 bash -c "/scripts/seed-start.sh" -# docker exec -it beacond-node3 bash -c "/scripts/seed-start.sh" diff --git a/examples/beacond/docker/network-init-4.sh b/examples/beacond/docker/network-init-4.sh deleted file mode 100755 index bb102414a3..0000000000 --- a/examples/beacond/docker/network-init-4.sh +++ /dev/null @@ -1,98 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -CONTAINER0="beacond-node0" -CONTAINER1="beacond-node1" -CONTAINER2="beacond-node2" -CONTAINER3="beacond-node3" - -HOMEDIR="/root/.beacond" -SCRIPTS="/scripts" - -rm -rf ./temp -mkdir ./temp -mkdir ./temp/seed0 -mkdir ./temp/seed1 -mkdir ./temp/seed2 -mkdir ./temp/seed3 -touch ./temp/genesis.json - -# init step 1 -docker exec $CONTAINER0 bash -c "$SCRIPTS/seed0-init-step1.sh" -docker exec $CONTAINER1 bash -c "$SCRIPTS/seed1-init-step1.sh seed-1" -docker exec $CONTAINER2 bash -c "$SCRIPTS/seed1-init-step1.sh seed-2" -docker exec $CONTAINER3 bash -c "$SCRIPTS/seed1-init-step1.sh seed-3" - -# copy genesis.json from seed-0 to seed-1 -docker cp $CONTAINER0:$HOMEDIR/config/genesis.json ./temp/genesis.json -docker cp ./temp/genesis.json $CONTAINER1:$HOMEDIR/config/genesis.json - -# init step 2 -docker exec $CONTAINER1 bash -c "$SCRIPTS/seed1-init-step2.sh seed-1" - -# copy genesis.json from seed-1 to seed-2 -docker cp $CONTAINER1:$HOMEDIR/config/genesis.json ./temp/genesis.json -docker cp ./temp/genesis.json $CONTAINER2:$HOMEDIR/config/genesis.json - -# init step 2 -docker exec $CONTAINER2 bash -c "$SCRIPTS/seed2-init-step2.sh seed-2" - -# copy genesis.json from seed-2 to seed-3 -docker cp $CONTAINER2:$HOMEDIR/config/genesis.json ./temp/genesis.json -docker cp ./temp/genesis.json $CONTAINER3:$HOMEDIR/config/genesis.json - -# init step 2 -docker exec $CONTAINER3 bash -c "$SCRIPTS/seed1-init-step2.sh seed-3" - - -# copy genesis.json from seed-3 to seed-0 -docker cp $CONTAINER3:$HOMEDIR/config/genesis.json ./temp/genesis.json -docker cp ./temp/genesis.json $CONTAINER0:$HOMEDIR/config/genesis.json - -# copy gentx -docker cp $CONTAINER1:$HOMEDIR/config/gentx ./temp -docker cp $CONTAINER2:$HOMEDIR/config/gentx ./temp -docker cp $CONTAINER3:$HOMEDIR/config/gentx ./temp -docker cp ./temp/gentx $CONTAINER0:$HOMEDIR/config - -# init step 2 -docker exec $CONTAINER0 bash -c "$SCRIPTS/seed0-init-step2.sh" - -# copy genesis.json from seed-0 to seed-1,2,3 -docker cp $CONTAINER0:$HOMEDIR/config/genesis.json ./temp/genesis.json -docker cp ./temp/genesis.json $CONTAINER1:$HOMEDIR/config/genesis.json -docker cp ./temp/genesis.json $CONTAINER2:$HOMEDIR/config/genesis.json -docker cp ./temp/genesis.json $CONTAINER3:$HOMEDIR/config/genesis.json - -# start -# docker exec -it $CONTAINER0 bash -c "$SCRIPTS/seed-start.sh" -# docker exec -it $CONTAINER1 bash -c "$SCRIPTS/seed-start.sh" -# docker exec -it $CONTAINER2 bash -c "$SCRIPTS/seed-start.sh" -# docker exec -it $CONTAINER3 bash -c "$SCRIPTS/seed-start.sh" - -# docker exec -it beacond-node0 bash -c "/scripts/seed-start.sh" -# docker exec -it beacond-node1 bash -c "/scripts/seed-start.sh" -# docker exec -it beacond-node2 bash -c "/scripts/seed-start.sh" -# docker exec -it beacond-node3 bash -c "/scripts/seed-start.sh" diff --git a/examples/beacond/docker/nginx.conf b/examples/beacond/docker/nginx.conf deleted file mode 100644 index ac34d95f6d..0000000000 --- a/examples/beacond/docker/nginx.conf +++ /dev/null @@ -1,19 +0,0 @@ -events {} - -http { - upstream nodes { - server beacond-node0:8545; - server beacond-node1:8545; - server beacond-node2:8545; - server beacond-node3:8545; - } - - server { - listen 80; - location / { - proxy_pass http://nodes; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - } - } -} \ No newline at end of file diff --git a/examples/beacond/docker/reset-temp.sh b/examples/beacond/docker/reset-temp.sh deleted file mode 100755 index b1ed7d127d..0000000000 --- a/examples/beacond/docker/reset-temp.sh +++ /dev/null @@ -1,32 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -rm -rf ./temp -mkdir ./temp -mkdir ./temp/seed0 -mkdir ./temp/seed1 -mkdir ./temp/seed2 -mkdir ./temp/seed3 -touch ./temp/genesis.json diff --git a/examples/beacond/docker/seed/scripts/get-seed-address.sh b/examples/beacond/docker/seed/scripts/get-seed-address.sh deleted file mode 100644 index a7d5a75dcf..0000000000 --- a/examples/beacond/docker/seed/scripts/get-seed-address.sh +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -if [ -z "$HOMEDIR" ]; then - HOMEDIR="/root/.beacond" -fi - -ip=$1 -node_id=$(beacond comet show-node-id --home "$HOMEDIR") - -echo "$node_id@$ip:26656" \ No newline at end of file diff --git a/examples/beacond/docker/seed/scripts/liveness-probe.sh b/examples/beacond/docker/seed/scripts/liveness-probe.sh deleted file mode 100644 index d788677177..0000000000 --- a/examples/beacond/docker/seed/scripts/liveness-probe.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Execute the cURL command and capture the response -response=$(curl -s -X POST -H "Content-Type: application/json" -d '{ - "jsonrpc":"2.0", - "method": "eth_blockNumber", - "params": [], - "id": 1 -}' http://localhost:8545) - -height=$(echo "$response" | jq -r '.result') - -file="last_height.txt" - -# Check if the file exists -if [ -e "$file" ]; then - # Read the contents of the file into the result variable - last_height=$(cat "$file") -else - # File does not exist, set result to an empty string - last_height="" -fi - -rm $file -echo "$height" >> $file - -# Check if the two input strings are equal -if [ "$height" == "$last_height" ]; then - # Strings are equal, return 1 - exit 1 -else - # Strings are not equal, return 0 - exit 0 -fi diff --git a/examples/beacond/docker/seed/scripts/readiness-probe.sh b/examples/beacond/docker/seed/scripts/readiness-probe.sh deleted file mode 100644 index 95ab8f647b..0000000000 --- a/examples/beacond/docker/seed/scripts/readiness-probe.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -# Execute the cURL command and capture the response -response=$(curl -s -X POST -H "Content-Type: application/json" -d '{ - "jsonrpc":"2.0", - "method": "eth_syncing", - "params": [], - "id": 1 -}' http://localhost:8545) - -# Check if the response contains the "result" field -if echo "$response" | grep -q '"result":.*false'; then - echo "Syncing is not in progress" - exit 0 # Exit with success code -else - echo "Syncing is in progress or port is not up" - exit 1 # Exit with failed code -fi diff --git a/examples/beacond/docker/seed/scripts/reset.sh b/examples/beacond/docker/seed/scripts/reset.sh deleted file mode 100644 index e73648522e..0000000000 --- a/examples/beacond/docker/seed/scripts/reset.sh +++ /dev/null @@ -1,30 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -if [ -z "$HOMEDIR" ]; then - HOMEDIR="/root/.beacond" -fi - -rm -rf $HOMEDIR \ No newline at end of file diff --git a/examples/beacond/docker/seed/scripts/seed-start.sh b/examples/beacond/docker/seed/scripts/seed-start.sh deleted file mode 100644 index de7c47eebd..0000000000 --- a/examples/beacond/docker/seed/scripts/seed-start.sh +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -if [ -z "$HOMEDIR" ]; then - HOMEDIR="/root/.beacond" -fi -if [ -z "$LOGLEVEL" ]; then - LOGLEVEL="info" -fi - -./bin/beacond start --pruning=nothing "$TRACE" --log_level $LOGLEVEL --api.enabled-unsafe-cors --api.enable --api.swagger --minimum-gas-prices=0.0001abera --home "$HOMEDIR" --beacon-kit.execution-client.jwt-secret-path "$JWTSECRETPATH" --beacon-kit.execution-client.rpc-dial-url "$DIALURL" diff --git a/examples/beacond/docker/seed/scripts/seed0-init-step1.sh b/examples/beacond/docker/seed/scripts/seed0-init-step1.sh deleted file mode 100755 index d37d93500a..0000000000 --- a/examples/beacond/docker/seed/scripts/seed0-init-step1.sh +++ /dev/null @@ -1,78 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -if [ -z "$CHAINID" ]; then - CHAINID="brickchain-666" -fi -if [ -z "$KEYRING" ]; then - KEYRING="test" -fi -if [ -z "$KEYALGO" ]; then - KEYALGO="secp256k1" -fi -if [ -z "$LOGLEVEL" ]; then - LOGLEVEL="info" -fi -if [ -z "$HOMEDIR" ]; then - HOMEDIR="/root/.beacond" -fi - -KEY1="seed-0" -MONIKER1="seed-0" -TRACE="" -GENESIS=$HOMEDIR/config/genesis.json -TMP_GENESIS=$HOMEDIR/config/tmp_genesis.json - - -beacond init $MONIKER1 -o --chain-id $CHAINID --home "$HOMEDIR" - -jq '.app_state["staking"]["params"]["bond_denom"]="abera"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"; -jq '.app_state["crisis"]["constant_fee"]["denom"]="abera"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"; -jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="abera"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"; -jq '.app_state["gov"]["params"]["min_deposit"][0]["denom"]="abera"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"; -jq '.app_state["gov"]["params"]["min_deposit"][0]["amount"]="10000000000000000000"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"; -jq '.app_state["gov"]["params"]["expedited_min_deposit"][0]["denom"]="abera"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"; -jq '.app_state["gov"]["params"]["expedited_min_deposit"][0]["amount"]="20000000000000000000"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"; -jq '.app_state["gov"]["params"]["max_deposit_period"]="300s"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"; -jq '.app_state["gov"]["params"]["voting_period"]="300s"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"; -jq '.app_state["gov"]["params"]["expedited_voting_period"]="240s"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"; -jq '.app_state["gov"]["constitution"]="Honey is money."' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"; -jq '.consensus["params"]["block"]["max_gas"]="30000000"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"; -jq '.app_state["mint"]["params"]["mint_denom"]="abera"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"; -jq '.consensus["params"]["abci"]["vote_extensions_enable_height"] = "2"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS"; - -beacond config set client chain-id $CHAINID --home "$HOMEDIR" -beacond config set client keyring-backend $KEYRING --home "$HOMEDIR" - -beacond keys add $KEY1 --keyring-backend $KEYRING --algo $KEYALGO --home "$HOMEDIR" - -beacond genesis add-genesis-account $KEY1 100000000000000000000000000abera,100000000000000000000000000stgusdc --keyring-backend $KEYRING --home "$HOMEDIR" - -beacond genesis gentx $KEY1 1000000000000000000000abera --keyring-backend $KEYRING --chain-id $CHAINID --home "$HOMEDIR" \ - --moniker="seed-0" \ - --identity="identity of seed-0" \ - --details="This is seed-0" \ - --security-contact="brick@berachain.com" \ - --website="https://quantumwn.org/" diff --git a/examples/beacond/docker/seed/scripts/seed0-init-step2.sh b/examples/beacond/docker/seed/scripts/seed0-init-step2.sh deleted file mode 100644 index 6b7a23863d..0000000000 --- a/examples/beacond/docker/seed/scripts/seed0-init-step2.sh +++ /dev/null @@ -1,47 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -if [ -z "$HOMEDIR" ]; then - HOMEDIR="/root/.beacond" -fi -if [ -z "$KEYRING" ]; then - KEYRING="test" -fi -if [ -z "$KEYALGO" ]; then - KEYALGO="secp256k1" -fi - -beacond genesis collect-gentxs --home "$HOMEDIR" - -beacond genesis validate-genesis --home "$HOMEDIR" - -# # faucet -# beacond keys add faucet --keyring-backend $KEYRING --algo $KEYALGO --home "$HOMEDIR" -# beacond genesis add-genesis-account faucet 1000000000000000000000000000abera,1000000000000000000000000000stgusdc --keyring-backend $KEYRING --home "$HOMEDIR" - -# # # Test Account -# # absurd surge gather author blanket acquire proof struggle runway attract cereal quiz tattoo shed almost sudden survey boring film memory picnic favorite verb tank -# # 0xfffdbb37105441e14b0ee6330d855d8504ff39e705c3afa8f859ac9865f99306 -# beacond genesis add-genesis-account cosmos1yrene6g2zwjttemf0c65fscg8w8c55w58yh8rl 1000000000000000000000000000abera,1000000000000000000000000000stgusdc --keyring-backend $KEYRING --home "$HOMEDIR" diff --git a/examples/beacond/docker/seed/scripts/seed1-init-step1.sh b/examples/beacond/docker/seed/scripts/seed1-init-step1.sh deleted file mode 100644 index 34caf5d2f0..0000000000 --- a/examples/beacond/docker/seed/scripts/seed1-init-step1.sh +++ /dev/null @@ -1,53 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -if [ -z "$CHAINID" ]; then - CHAINID="brickchain-666" -fi -if [ -z "$KEYRING" ]; then - KEYRING="test" -fi -if [ -z "$KEYALGO" ]; then - KEYALGO="secp256k1" -fi -if [ -z "$LOGLEVEL" ]; then - LOGLEVEL="info" -fi -if [ -z "$HOMEDIR" ]; then - HOMEDIR="/root/.beacond" -fi - -KEY="$1" -MONIKER="$1" -TRACE="" -GENESIS=$HOMEDIR/config/genesis.json -TMP_GENESIS=$HOMEDIR/config/tmp_genesis.json - - -beacond init $MONIKER -o --chain-id $CHAINID --home "$HOMEDIR" - -beacond config set client keyring-backend $KEYRING --home "$HOMEDIR" - -beacond keys add $KEY --keyring-backend $KEYRING --algo $KEYALGO --home "$HOMEDIR" diff --git a/examples/beacond/docker/seed/scripts/seed1-init-step2.sh b/examples/beacond/docker/seed/scripts/seed1-init-step2.sh deleted file mode 100644 index 05294956be..0000000000 --- a/examples/beacond/docker/seed/scripts/seed1-init-step2.sh +++ /dev/null @@ -1,45 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -if [ -z "$CHAINID" ]; then - CHAINID="brickchain-666" -fi -if [ -z "$KEYRING" ]; then - KEYRING="test" -fi -if [ -z "$HOMEDIR" ]; then - HOMEDIR="/root/.beacond" -fi - -KEY="$1" - -beacond genesis add-genesis-account $KEY 100000000000000000000000000abera,100000000000000000000000000stgusdc --keyring-backend $KEYRING --home "$HOMEDIR" - -beacond genesis gentx $KEY 1000000000000000000000abera --keyring-backend $KEYRING --chain-id $CHAINID --home "$HOMEDIR" \ - --moniker="$KEY" \ - --identity="identity of $KEY" \ - --details="This is $KEY" \ - --security-contact="brick@berachain.com" \ - --website="https://quantumwn.org/" diff --git a/examples/beacond/docker/seed/scripts/seed2-init-step2.sh b/examples/beacond/docker/seed/scripts/seed2-init-step2.sh deleted file mode 100644 index 849b2ee2d1..0000000000 --- a/examples/beacond/docker/seed/scripts/seed2-init-step2.sh +++ /dev/null @@ -1,45 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -if [ -z "$CHAINID" ]; then - CHAINID="brickchain-666" -fi -if [ -z "$KEYRING" ]; then - KEYRING="test" -fi -if [ -z "$HOMEDIR" ]; then - HOMEDIR="/root/.beacond" -fi - -KEY="$1" - -beacond genesis add-genesis-account $KEY 10000000000000000000000abera,100000000000000000000000000stgusdc --keyring-backend $KEYRING --home "$HOMEDIR" - -beacond genesis gentx $KEY 100000000000000000abera --keyring-backend $KEYRING --chain-id $CHAINID --home "$HOMEDIR" \ - --moniker="$KEY" \ - --identity="identity of $KEY" \ - --details="This is $KEY" \ - --security-contact="brick@berachain.com" \ - --website="https://quantumwn.org/" diff --git a/examples/beacond/docker/seed/scripts/set-moniker.sh b/examples/beacond/docker/seed/scripts/set-moniker.sh deleted file mode 100644 index 76684763b6..0000000000 --- a/examples/beacond/docker/seed/scripts/set-moniker.sh +++ /dev/null @@ -1,32 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -if [ -z "$HOMEDIR" ]; then - HOMEDIR="/root/.beacond" -fi -CONFIG_TOML=$HOMEDIR/config/config.toml - -MONIKER=$1 -sed -i "s/^moniker = .*/moniker = \"$MONIKER\"/" "$CONFIG_TOML" diff --git a/examples/beacond/docker/seed/scripts/set-persistent-peers.sh b/examples/beacond/docker/seed/scripts/set-persistent-peers.sh deleted file mode 100644 index 09fe58b515..0000000000 --- a/examples/beacond/docker/seed/scripts/set-persistent-peers.sh +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -if [ -z "$HOMEDIR" ]; then - HOMEDIR="/root/.beacond" -fi - -CONFIG_TOML=$HOMEDIR/config/config.toml - -seed_address=$1 -sed -i "s/^persistent_peers = .*/persistent_peers = \"$seed_address\"/" "$CONFIG_TOML" diff --git a/examples/beacond/docker/seed/scripts/set-seed-address.sh b/examples/beacond/docker/seed/scripts/set-seed-address.sh deleted file mode 100644 index f3a19114a3..0000000000 --- a/examples/beacond/docker/seed/scripts/set-seed-address.sh +++ /dev/null @@ -1,33 +0,0 @@ -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2023 Berachain Foundation -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, -# copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following -# conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. - -if [ -z "$HOMEDIR" ]; then - HOMEDIR="/root/.beacond" -fi - -CONFIG_TOML=$HOMEDIR/config/config.toml - -seed_address=$1 -sed -i "s/^seeds = .*/seeds = \"$seed_address\"/" "$CONFIG_TOML \ No newline at end of file