Skip to content

Commit

Permalink
Merge pull request #59 from Bidon15/tc-001-large-txs-comps
Browse files Browse the repository at this point in the history
feat: implementation of test-case #1: Validators submit large transactions
  • Loading branch information
Bidon15 authored Sep 15, 2022
2 parents 19a87ce + 84e5a1f commit 0d46532
Show file tree
Hide file tree
Showing 20 changed files with 436 additions and 74 deletions.
55 changes: 48 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,58 @@
# test-infra
Testing infrastructure for the Celestia Network
# Testing & Infrastructure :microscope: :globe_with_meridians:

Please install testground before executing the test-plan
Testing scenarios and network infrastructure for the Celestia Network

After installing, follow these commands
## Pre-Requisites

Please install `docker` and [testground](https://docs.testground.ai/v/master/getting-started) to execute network tests.

## Go requirements

| Requirement | Notes |
| ----------- | -------------- |
| Go version | 1.18 or higher |

## System Requirements

We have compositions that are separated into 2 environments:

1. `local:docker`
2. `cluster:k8s`

| Environment | CPU (cores) | RAM (Gib) |
| ------------ | :---------: | :-------: |
| local:docker | 8~16 | 16~32 |
| cluster:k8s | 3000~4000 | 4000~5000 |

At the moment, we are only using `docker:generic` as a builder.
Please, check our `Dockerfile` for more information.

## Repo Navigation

The repository is divided into 4 main directories:

1. `docs`
2. `compositions`
3. `tests`
4. `testkit`

The order of directories above :point_up: is how the repo should be read
if you want to get acquinted with test plans/cases design and their further implementations.
Each of the directories contains its own `README.md`.

## Test Execution

```bash
cd test-infra
testground plan --import . --name celestia

# This command should be executed in the 1st terminal
# This command should be executed in the 1st terminal
testground daemon

# This command should be executed in the 2nd terminal
testground run composition -f local-compositions/gen-validators.toml --wait
```
testground run composition -f compositions/local-docker/001-val-large-txs-3.toml --wait
```

## Code of Conduct

See our Code of Conduct [here](https://docs.celestia.org/community/coc).
13 changes: 13 additions & 0 deletions compositions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Compositions

Please navigate to the `manifest.toml` if you want to know more about which test cases/params are defined for the compositions to set during test runs

## local-docker

This directory contains sanity compositions that can be easily run on a local PC or any small VM(e.g. DO droplet). The motivation is to do quick regression check-ups if any PR arises from the stack(core/app/node etc).

## cluster-k8s

This directory contains compositions that are described in `docs/test-plans`. The sorting of inner directories are following the same pattern as the test-plan to test-case placement. Namings of directories and files follow this style:

`test-case-id` -> `participants-amount` -> `bandwidth-latency-per-participant`
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[metadata]
name = "001-val-large-txs-100-set"
author = "Bidon15"

[global]
plan = "celestia"
case = "001-val-large-txs"
total_instances = 100
builder = "docker:generic"
runner = "cluster:k8s"
disable_metrics = false

[global.run.test_params]
latency = "0"
bandwidth = "320Mib"
validator = "100"
persistent-peers = "10"
submit-times = "10"
msg-size = "40000"

[[groups]]
id = "validators"
builder = "docker:generic"
[groups.resources]
memory = "4Gi"
cpu = "3"
[groups.instances]
count = 80
percentage = 0.0
[groups.build_config]
build_base_image = "golang:1.18.3"
enable_go_build_cache = true
enabled = true
go_version = "1.18"
[groups.build]
[groups.run]
artifact = ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[metadata]
name = "001-val-large-txs-100-set"
author = "Bidon15"

[global]
plan = "celestia"
case = "001-val-large-txs"
total_instances = 100
builder = "docker:generic"
runner = "cluster:k8s"
disable_metrics = false

[global.run.test_params]
latency = "0"
bandwidth = "320Mib"
validator = "100"
persistent-peers = "10"
submit-times = "10"
msg-size = "40000"

[[groups]]
id = "validators"
builder = "docker:generic"
[groups.resources]
memory = "4Gi"
cpu = "3"
[groups.instances]
count = 80
percentage = 0.0
[groups.build_config]
build_base_image = "golang:1.18.3"
enable_go_build_cache = true
enabled = true
go_version = "1.18"
[groups.build]
[groups.run]
artifact = ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[metadata]
name = "001-val-large-txs-100-set"
author = "Bidon15"

[global]
plan = "celestia"
case = "001-val-large-txs"
total_instances = 100
builder = "docker:generic"
runner = "cluster:k8s"
disable_metrics = false

[global.run.test_params]
latency = "200"
bandwidth = "320Mib"
validator = "100"
persistent-peers = "10"
submit-times = "10"
msg-size = "40000"

[[groups]]
id = "validators"
builder = "docker:generic"
[groups.resources]
memory = "4Gi"
cpu = "3"
[groups.instances]
count = 80
percentage = 0.0
[groups.build_config]
build_base_image = "golang:1.18.3"
enable_go_build_cache = true
enabled = true
go_version = "1.18"
[groups.build]
[groups.run]
artifact = ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[metadata]
name = "001-val-large-txs-40-set"
author = "Bidon15"

[global]
plan = "celestia"
case = "001-val-large-txs"
total_instances = 40
builder = "docker:generic"
runner = "cluster:k8s"
disable_metrics = false

[global.run.test_params]
latency = "0"
bandwidth = "256Mib"
validator = "40"
persistent-peers = "10"
submit-times = "10"
msg-size = "100000"

[[groups]]
id = "validators"
builder = "docker:generic"
[groups.resources]
memory = "4Gi"
cpu = "3"
[groups.instances]
count = 40
percentage = 0.0
[groups.build_config]
build_base_image = "golang:1.18.3"
enable_go_build_cache = true
enabled = true
go_version = "1.18"
[groups.build]
[groups.run]
artifact = ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[metadata]
name = "001-val-large-txs-40-set"
author = "Bidon15"

[global]
plan = "celestia"
case = "001-val-large-txs"
total_instances = 40
builder = "docker:generic"
runner = "cluster:k8s"
disable_metrics = false

[global.run.test_params]
latency = "100"
bandwidth = "320Mib"
validator = "40"
persistent-peers = "10"
submit-times = "10"
msg-size = "100000"

[[groups]]
id = "validators"
builder = "docker:generic"
[groups.resources]
memory = "4Gi"
cpu = "3"
[groups.instances]
count = 40
percentage = 0.0
[groups.build_config]
build_base_image = "golang:1.18.3"
enable_go_build_cache = true
enabled = true
go_version = "1.18"
[groups.build]
[groups.run]
artifact = ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[metadata]
name = "001-val-large-txs-40-set"
author = "Bidon15"

[global]
plan = "celestia"
case = "001-val-large-txs"
total_instances = 40
builder = "docker:generic"
runner = "cluster:k8s"
disable_metrics = false

[global.run.test_params]
latency = "200"
bandwidth = "320Mib"
validator = "40"
persistent-peers = "10"
submit-times = "10"
msg-size = "100000"

[[groups]]
id = "validators"
builder = "docker:generic"
[groups.resources]
memory = "4Gi"
cpu = "3"
[groups.instances]
count = 40
percentage = 0.0
[groups.build_config]
build_base_image = "golang:1.18.3"
enable_go_build_cache = true
enabled = true
go_version = "1.18"
[groups.build]
[groups.run]
artifact = ""
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[metadata]
name = "app-validator"
name = "001-val-large-txs-80-set"
author = "Bidon15"

[global]
plan = "celestia"
case = "init-val"
case = "001-val-large-txs"
total_instances = 80
builder = "docker:generic"
runner = "cluster:k8s"
Expand All @@ -15,13 +15,15 @@
bandwidth = "320Mib"
validator = "80"
persistent-peers = "10"
submit-times = "10"
msg-size = "48000"

[[groups]]
id = "validators"
builder = "docker:generic"
[groups.resources]
memory = "4Gi"
cpu = "3"
cpu = "4"
[groups.instances]
count = 80
percentage = 0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[metadata]
name = "001-val-large-txs-80-set"
author = "Bidon15"

[global]
plan = "celestia"
case = "001-val-large-txs"
total_instances = 80
builder = "docker:generic"
runner = "cluster:k8s"
disable_metrics = false

[global.run.test_params]
latency = "100"
bandwidth = "320Mib"
validator = "80"
persistent-peers = "10"
submit-times = "10"
msg-size = "50000"

[[groups]]
id = "validators"
builder = "docker:generic"
[groups.resources]
memory = "4Gi"
cpu = "3"
[groups.instances]
count = 80
percentage = 0.0
[groups.build_config]
build_base_image = "golang:1.18.3"
enable_go_build_cache = true
enabled = true
go_version = "1.18"
[groups.build]
[groups.run]
artifact = ""
Loading

0 comments on commit 0d46532

Please sign in to comment.