Compare commits

..

32 Commits

Author SHA1 Message Date
David Boreham dc19d68aa4 Merge branch 'main' into ci-test 2023-06-05 20:50:43 -06:00
David Boreham d57e8d0efd Merge branch 'dboreham/build-local-lcli' into ci-test 2023-06-05 16:46:50 -06:00
Thomas E Lackey 91d3613247 Include --eth1-block-hash 2023-06-05 15:45:07 -05:00
David Boreham 76ab4a7717 Merge branch 'dboreham/build-local-lcli' into ci-test 2023-06-04 23:04:40 -06:00
David Boreham fd40aedadd Add lcli container to fixturenet-eth stack 2023-06-04 23:03:48 -06:00
David Boreham 3748fa38b1 Update ldcli options 2023-06-04 23:01:43 -06:00
David Boreham aa4c52c174 Fix typo 2023-06-04 16:43:38 -06:00
David Boreham 609128d004 Blind fix for lcli error 2023-06-04 16:42:44 -06:00
David Boreham 47164cb5f5 Test updated lcli command 2023-06-04 16:12:16 -06:00
David Boreham 93c47ec5cc Merge branch 'dboreham/build-local-lcli' into ci-test 2023-06-04 15:41:24 -06:00
David Boreham 700ce586a6 Merge main 2023-06-04 15:41:01 -06:00
David Boreham 223aacb16f Enable portable lcli build 2023-06-04 14:30:01 -06:00
David Boreham c120ee2086 Pull lighthouse repo 2023-06-04 14:29:07 -06:00
David Boreham 685e11ed6f Build lcli locally 2023-06-04 14:27:07 -06:00
David Boreham 6cf9869a57 Merge branch 'dboreham/add-foundry-to-plugeth-stack' into ci-test 2023-05-30 23:22:03 -06:00
David Boreham 00d34944a2
Add foundry to fixturenet-plugeth-tx 2023-05-30 23:20:26 -06:00
David Boreham 40424cc3b6 Merge branch 'main' into ci-test 2023-05-30 22:33:37 -06:00
David Boreham b594d15e91
Trigger CI 2023-05-30 12:23:48 -06:00
David Boreham 500e60c480
Trigger CI 2023-05-30 08:49:36 -06:00
David Boreham 8c3a8eb33d Add fixturenet-plugeth test 2023-05-25 16:56:59 -06:00
David Boreham 27067e061c Merge branch 'main' into ci-test 2023-05-25 16:46:36 -06:00
David Boreham eab5a6ccf1
Trigger CI 2023-05-24 21:49:35 -06:00
David Boreham 7ed2448f03 Merge current main
Former-commit-id: d82ba6ed5035203d1ce3846744309210caadda62
2023-05-18 13:57:35 -06:00
David Boreham e9e1d8bcd4 Merge branch 'main' into ci-test
Former-commit-id: 966539faa46bf33a3b6471a3289a4fb7c4685cc7
2023-05-18 13:55:29 -06:00
David Boreham 0563764ca4 Trigger CI
Former-commit-id: bb1d81a906000d5acf22269eaca53c6ab32c5605
2023-05-02 14:22:40 -06:00
David Boreham 069dd50fd3 Merge branch 'main' into ci-test
Former-commit-id: 4eb970350bbfca04ea98b21a6aaf0acfa3daa8cd
2023-04-28 09:44:05 -06:00
David Boreham 595fbe4eca Force CI again
Former-commit-id: 401ab334f00273307f64397f06f2b295c1151085
2023-04-20 20:17:19 -06:00
David Boreham 3e949b403f Force CI again
Former-commit-id: fa822a71297ad39d5f8301321e7230f55bb0cb27
2023-04-20 19:06:20 -06:00
David Boreham 5524e95434 Force CI to run
Former-commit-id: 99ecc01e52eda6bf162679bc0dda79c0438b14cb
2023-04-20 18:24:45 -06:00
David Boreham 616982d9ba Merge branch 'main' into ci-test
Former-commit-id: b3b24e3f1870763025d9ac9b07685b1a85567874
2023-04-20 17:40:41 -06:00
David Boreham 2cbb6e1f1d Add debug output
Former-commit-id: 27d23144e4003fa131a7fc95b7f527848b6181ad
2023-04-20 15:00:20 -06:00
David Boreham 0712012cf4 Start docker inside the executor
Former-commit-id: 2948691fc712898c4ad04bbf11296f8ecbbd5b0b
2023-04-20 13:58:20 -06:00
17 changed files with 171 additions and 99 deletions

View File

@ -0,0 +1,36 @@
name: Fixturenet-Eth-Plugeth-Test
on:
push:
branches: 'ci-test'
# Needed until we can incorporate docker startup into the executor container
env:
DOCKER_HOST: unix:///var/run/dind.sock
jobs:
test:
name: "Run an Ethereum plugeth fixturenet test"
runs-on: ubuntu-latest
steps:
- name: "Clone project repository"
uses: actions/checkout@v3
- name: "Install Python"
uses: cerc-io/setup-python@v4
with:
python-version: '3.8'
- name: "Print Python version"
run: python3 --version
- name: "Install shiv"
run: pip install shiv
- name: "Generate build version file"
run: ./scripts/create_build_tag_file.sh
- name: "Build local shiv package"
run: ./scripts/build_shiv_package.sh
- name: Start dockerd # Also needed until we can incorporate into the executor
run: |
dockerd -H $DOCKER_HOST --userland-proxy=false &
sleep 5
- name: "Run fixturenet-eth tests"
run: ./tests/fixturenet-eth-plugeth/run-test.sh

View File

@ -4,6 +4,11 @@ on:
push: push:
branches: 'ci-test' branches: 'ci-test'
# Needed until we can incorporate docker startup into the executor container
env:
DOCKER_HOST: unix:///var/run/dind.sock
jobs: jobs:
test: test:
name: "Run an Ethereum fixturenet test" name: "Run an Ethereum fixturenet test"
@ -23,5 +28,10 @@ jobs:
run: ./scripts/create_build_tag_file.sh run: ./scripts/create_build_tag_file.sh
- name: "Build local shiv package" - name: "Build local shiv package"
run: ./scripts/build_shiv_package.sh run: ./scripts/build_shiv_package.sh
- name: Start dockerd # Also needed until we can incorporate into the executor
run: |
dockerd -H $DOCKER_HOST --userland-proxy=false &
sleep 5
- name: "Run fixturenet-eth tests" - name: "Run fixturenet-eth tests"
run: ./tests/fixturenet-eth/run-test.sh run: ./tests/fixturenet-eth/run-test.sh

View File

@ -37,3 +37,4 @@ jobs:
sleep 5 sleep 5
- name: "Run smoke tests" - name: "Run smoke tests"
run: ./tests/smoke-test/run-smoke-test.sh run: ./tests/smoke-test/run-smoke-test.sh

View File

@ -1,7 +1,5 @@
# Stack Orchestrator # Stack Orchestrator
Stack Orchestrator allows building and deployment of a Laconic Stack on a single machine with minimial prerequisites. It is a Python3 CLI tool that runs on any OS with Python3 and Docker. The following diagram summarizes the relevant repositories in the Laconic Stack - and the relationship to Stack Orchestrator. Stack Orchestrator allows building and deployment of a Laconic Stack on a single machine with minimial prerequisites. It is a Python3 CLI tool that runs on any OS with Python3 and Docker. The following diagram summarizes the relevant repositories in the Laconic Stack - and the relationship to Stack Orchestrator.
![The Stack](/docs/images/laconic-stack.png) ![The Stack](/docs/images/laconic-stack.png)

View File

@ -1,9 +1,8 @@
version: '3.2' version: '3.2'
services: services:
# Builds and serves the peer-test react-app
peer-test-app: peer-test-app:
restart: unless-stopped # Builds and serves the peer-test react-app
image: cerc/react-peer:local image: cerc/react-peer:local
working_dir: /scripts working_dir: /scripts
env_file: env_file:

View File

@ -14,6 +14,14 @@ laconic-so --stack fixturenet-optimism setup-repositories
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command # If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
``` ```
Checkout to the required versions and branches in repos:
```bash
# Optimism
cd ~/cerc/optimism
git checkout v1.0.4
```
Build the container images: Build the container images:
```bash ```bash

View File

@ -14,6 +14,14 @@ laconic-so --stack fixturenet-optimism setup-repositories --exclude github.com/c
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command # If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
``` ```
Checkout to the required versions and branches in repos:
```bash
# Optimism
cd ~/cerc/optimism
git checkout v1.0.4
```
Build the container images: Build the container images:
```bash ```bash

View File

@ -3,14 +3,12 @@ name: fixturenet-optimism
decription: "Optimism Fixturenet" decription: "Optimism Fixturenet"
repos: repos:
- github.com/cerc-io/go-ethereum - github.com/cerc-io/go-ethereum
- github.com/cerc-io/lighthouse
- github.com/dboreham/foundry - github.com/dboreham/foundry
- github.com/ethereum-optimism/optimism@v1.0.4 - github.com/ethereum-optimism/optimism
- github.com/ethereum-optimism/op-geth@v1.101105.2 - github.com/ethereum-optimism/op-geth
containers: containers:
- cerc/go-ethereum - cerc/go-ethereum
- cerc/lighthouse - cerc/lighthouse
- cerc/lighthouse-cli
- cerc/fixturenet-eth-geth - cerc/fixturenet-eth-geth
- cerc/fixturenet-eth-lighthouse - cerc/fixturenet-eth-lighthouse
- cerc/foundry - cerc/foundry

View File

@ -3,13 +3,11 @@ name: fixturenet-pocket
description: "A single node pocket chain that can serve relays from the geth-1 node in eth-fixturenet" description: "A single node pocket chain that can serve relays from the geth-1 node in eth-fixturenet"
repos: repos:
- github.com/cerc-io/go-ethereum - github.com/cerc-io/go-ethereum
- github.com/cerc-io/lighthouse
- github.com/pokt-network/pocket-core - github.com/pokt-network/pocket-core
- github.com/pokt-network/pocket-core-deployments # contains the dockerfile - github.com/pokt-network/pocket-core-deployments # contains the dockerfile
containers: containers:
- cerc/go-ethereum - cerc/go-ethereum
- cerc/lighthouse - cerc/lighthouse
- cerc/lighthouse-cli
- cerc/fixturenet-eth-geth - cerc/fixturenet-eth-geth
- cerc/fixturenet-eth-lighthouse - cerc/fixturenet-eth-lighthouse
- cerc/pocket - cerc/pocket

View File

@ -18,6 +18,26 @@ laconic-so --stack mobymask-v2 setup-repositories
NOTE: If repositories already exist and are checked out to different versions, `setup-repositories` command will throw an error. NOTE: If repositories already exist and are checked out to different versions, `setup-repositories` command will throw an error.
For getting around this, the repositories mentioned below can be removed and then run the command. For getting around this, the repositories mentioned below can be removed and then run the command.
Checkout to the required versions and branches in repos
```bash
# watcher-ts
cd ~/cerc/watcher-ts
git checkout v0.2.41
# mobymask-v2-watcher-ts
cd ~/cerc/mobymask-v2-watcher-ts
git checkout v0.1.1
# MobyMask
cd ~/cerc/MobyMask
git checkout v0.1.2
# Optimism
cd ~/cerc/optimism
git checkout v1.0.4
```
Build the container images: Build the container images:
```bash ```bash

View File

@ -14,6 +14,22 @@ laconic-so --stack mobymask-v2 setup-repositories --include github.com/cerc-io/M
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command # If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
``` ```
Checkout to the required versions and branches in repos:
```bash
# watcher-ts
cd ~/cerc/watcher-ts
git checkout v0.2.41
# mobymask-v2-watcher-ts
cd ~/cerc/mobymask-v2-watcher-ts
git checkout v0.1.1
# MobyMask
cd ~/cerc/MobyMask
git checkout v0.1.2
```
Build the container images: Build the container images:
```bash ```bash

View File

@ -2,24 +2,21 @@ version: "1.0"
name: mobymask-v2 name: mobymask-v2
repos: repos:
- github.com/cerc-io/go-ethereum - github.com/cerc-io/go-ethereum
- github.com/cerc-io/lighthouse
- github.com/dboreham/foundry - github.com/dboreham/foundry
- github.com/ethereum-optimism/optimism@v1.0.4 - github.com/ethereum-optimism/optimism
- github.com/ethereum-optimism/op-geth@v1.101105.2 - github.com/ethereum-optimism/op-geth
- github.com/cerc-io/watcher-ts@v0.2.43 - github.com/cerc-io/watcher-ts
- github.com/cerc-io/mobymask-v2-watcher-ts@v0.1.1 - github.com/cerc-io/mobymask-v2-watcher-ts
- github.com/cerc-io/MobyMask@v0.1.2 - github.com/cerc-io/MobyMask
containers: containers:
- cerc/go-ethereum - cerc/go-ethereum
- cerc/lighthouse - cerc/lighthouse
- cerc/lighthouse-cli
- cerc/fixturenet-eth-geth - cerc/fixturenet-eth-geth
- cerc/fixturenet-eth-lighthouse - cerc/fixturenet-eth-lighthouse
- cerc/foundry - cerc/foundry
- cerc/optimism-contracts - cerc/optimism-contracts
- cerc/optimism-l2geth - cerc/optimism-l2geth
- cerc/optimism-op-batcher - cerc/optimism-op-batcher
- cerc/optimism-op-proposer
- cerc/optimism-op-node - cerc/optimism-op-node
- cerc/watcher-ts - cerc/watcher-ts
- cerc/watcher-mobymask-v2 - cerc/watcher-mobymask-v2

View File

@ -30,6 +30,22 @@ Clone required repositories:
# 100%|##############################################################################################################################################| 1.41k/1.41k [00:18<00:00, 76.4B/s] # 100%|##############################################################################################################################################| 1.41k/1.41k [00:18<00:00, 76.4B/s]
``` ```
Checkout to the required versions and branches in repos:
```bash
# watcher-ts
cd ~/cerc/watcher-ts
git checkout v0.2.41
# mobymask-v2-watcher-ts
cd ~/cerc/mobymask-v2-watcher-ts
git checkout v0.1.1
# MobyMask
cd ~/cerc/MobyMask
git checkout v0.1.2
```
Build the container images: Build the container images:
```bash ```bash

View File

@ -1,44 +0,0 @@
#cloud-config
# Used for easily testing stacks-in-development on cloud platforms
# Assumes Ubuntu, edit the last line if targeting a different OS
# Once SSH'd into the server, run:
# `$ cd stack-orchestrator`
# `$ git checkout <branch>
# `$ ./scripts/developer-mode-setup.sh`
# `$ source ./venv/bin/activate`
# Followed by the stack instructions.
package_update: true
package_upgrade: true
groups:
- docker
system_info:
default_user:
groups: [ docker ]
packages:
- apt-transport-https
- ca-certificates
- curl
- jq
- git
- gnupg
- lsb-release
- unattended-upgrades
- python3.10-venv
- pip
runcmd:
- mkdir -p /etc/apt/keyrings
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
- apt-get update
- apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- systemctl enable docker
- systemctl start docker
- git clone https://github.com/cerc-io/stack-orchestrator.git /home/ubuntu/stack-orchestrator

View File

@ -1,35 +0,0 @@
#cloud-config
# Used for installing Stack Orchestrator on platforms that support `cloud-init`
# Tested on Ubuntu
package_update: true
package_upgrade: true
groups:
- docker
system_info:
default_user:
groups: [ docker ]
packages:
- apt-transport-https
- ca-certificates
- curl
- jq
- git
- gnupg
- lsb-release
- unattended-upgrades
runcmd:
- mkdir -p /etc/apt/keyrings
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
- apt-get update
- apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- systemctl enable docker
- systemctl start docker
- curl -L -o /usr/local/bin/laconic-so https://github.com/cerc-io/stack-orchestrator/releases/latest/download/laconic-so
- chmod +x /usr/local/bin/laconic-so

View File

@ -0,0 +1,44 @@
#!/usr/bin/env bash
set -e
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
set -e
echo "Running stack-orchestrator Ethereum plugeth fixturenet test"
# Bit of a hack, test the most recent package
TEST_TARGET_SO=$( ls -t1 ./package/laconic-so* | head -1 )
CERC_STACK_NAME=fixturenet-plugeth-tx
# Set a new unique repo dir
export CERC_REPO_BASE_DIR=$(mktemp -d stack-orchestrator-fixturenet-eth-test.XXXXXXXXXX)
echo "Testing this package: $TEST_TARGET_SO"
echo "Test version command"
reported_version_string=$( $TEST_TARGET_SO version )
echo "Version reported is: ${reported_version_string}"
echo "Cloning repositories into: $CERC_REPO_BASE_DIR"
$TEST_TARGET_SO --stack $CERC_STACK_NAME setup-repositories
echo "Building containers"
$TEST_TARGET_SO --stack $CERC_STACK_NAME build-containers
echo "Images in registry:"
docker image ls
echo "Deploying the cluster"
$TEST_TARGET_SO --stack $CERC_STACK_NAME deploy up
# Verify that the fixturenet is up and running
$TEST_TARGET_SO --stack $CERC_STACK_NAME deploy ps
$TEST_TARGET_SO --stack $CERC_STACK_NAME deploy exec fixturenet-eth-bootnode-lighthouse /scripts/status-internal.sh
initial_block_number=$($TEST_TARGET_SO --stack fixturenet-plugeth-tx deploy exec foundry "cast block-number")
# Check that the block number increases some time later
sleep 12
subsequent_block_number=$($TEST_TARGET_SO --stack $CERC_STACK_NAME deploy exec foundry "cast block-number")
block_number_difference=$((subsequent_block_number - initial_block_number))
# Block height difference should be between 1 and some small number
if [[ $block_number_difference -gt 1 && $block_number_difference -lt 10 ]]; then
echo "Test passed"
test_result=0
else
echo "Test failed: block numbers were ${initial_block_number} and ${subsequent_block_number}"
test_result=1
fi
$TEST_TARGET_SO --stack $CERC_STACK_NAME deploy down
echo "Removing cloned repositories"
rm -rf $CERC_REPO_BASE_DIR
exit $test_result

View File

@ -15,7 +15,9 @@ reported_version_string=$( $TEST_TARGET_SO version )
echo "Version reported is: ${reported_version_string}" echo "Version reported is: ${reported_version_string}"
echo "Cloning repositories into: $CERC_REPO_BASE_DIR" echo "Cloning repositories into: $CERC_REPO_BASE_DIR"
$TEST_TARGET_SO --stack fixturenet-eth setup-repositories $TEST_TARGET_SO --stack fixturenet-eth setup-repositories
echo "Building containers"
$TEST_TARGET_SO --stack fixturenet-eth build-containers $TEST_TARGET_SO --stack fixturenet-eth build-containers
echo "Deploying the cluster"
$TEST_TARGET_SO --stack fixturenet-eth deploy up $TEST_TARGET_SO --stack fixturenet-eth deploy up
# Verify that the fixturenet is up and running # Verify that the fixturenet is up and running
$TEST_TARGET_SO --stack fixturenet-eth deploy ps $TEST_TARGET_SO --stack fixturenet-eth deploy ps