Skip to content

Commit

Permalink
rename & rebase of goomy-blob code
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed May 6, 2024
1 parent 03c04ab commit 1020fb3
Show file tree
Hide file tree
Showing 19 changed files with 97 additions and 219 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.vscode
.note*
tmp-*

spamoor
blob-sender
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ RUN <<EOR
VERSION=$(git rev-parse --short HEAD)
BUILDTIME=$(date -u '+%Y-%m-%dT%H:%M:%SZ')
RELEASE=$release
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /app/blob-sender -ldflags="-s -w -X 'github.com/ethpandaops/goomy-blob/utils.BuildVersion=${VERSION}' -X 'github.com/ethpandaops/goomy-blob/utils.BuildRelease=${RELEASE}' -X 'github.com/ethpandaops/goomy-blob/utils.Buildtime=${BUILDTIME}'" ./cmd/blob-sender
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /app/blob-spammer -ldflags="-s -w -X 'github.com/ethpandaops/goomy-blob/utils.BuildVersion=${VERSION}' -X 'github.com/ethpandaops/goomy-blob/utils.BuildRelease=${RELEASE}' -X 'github.com/ethpandaops/goomy-blob/utils.Buildtime=${BUILDTIME}'" ./cmd/blob-spammer
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /app/blob-sender -ldflags="-s -w -X 'github.com/ethpandaops/spamoor/utils.BuildVersion=${VERSION}' -X 'github.com/ethpandaops/spamoor/utils.BuildRelease=${RELEASE}' -X 'github.com/ethpandaops/spamoor/utils.Buildtime=${BUILDTIME}'" ./cmd/blob-sender
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /app/spamoor -ldflags="-s -w -X 'github.com/ethpandaops/spamoor/utils.BuildVersion=${VERSION}' -X 'github.com/ethpandaops/spamoor/utils.BuildRelease=${RELEASE}' -X 'github.com/ethpandaops/spamoor/utils.Buildtime=${BUILDTIME}'" ./cmd/spamoor
EOR

# final stage
Expand All @@ -22,4 +22,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates
RUN update-ca-certificates
ENV PATH="$PATH:/app"
COPY --from=build-env /app/* /app
CMD ["./blob-spammer"]
CMD ["./spamoor"]
61 changes: 31 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
<img align="left" src="./.github/resources/goomy.png" width="75">
<h1>Goomy the Blob Tool</h1>
<h1>Spamoor the Transaction Spammer</h1>

goomy-blob is a simple tool that can be used to generate random blob transactions for ethereum testnets.
spamoor is a simple tool that can be used to generate various types of random transactions for ethereum testnets.

Goomy can be used for stress testing (flooding the network with thousands of blobs) or to have a continuous amount of blobs (2-4 blobs per block) over long time for testing purposes.
Spamoor can be used for stress testing (flooding the network with thousands of transactions) or to have a continuous amount of transactions over long time for testing purposes.

Goomy provides two commands:
Spamoor provides two commands:
* `blob-sender`: Simple utility to send a single blob transaction with specified parameters.
* `blob-spammer`: Tool for mass blob spamming
* `spamoor`: Tool for mass transaction spamming

## Build

You can use this tool via pre-build docker images: [ethpandaops/goomy-blob](https://hub.docker.com/r/ethpandaops/goomy-blob)
You can use this tool via pre-build docker images: [ethpandaops/spamoor](https://hub.docker.com/r/ethpandaops/spamoor)

Or build it yourself:

```
git clone https://github.com/ethpandaops/goomy-blob.git
cd goomy-blob
go build ./cmd/blob-spammer
git clone https://github.com/ethpandaops/spamoor.git
cd spamoor
go build ./cmd/spamoor
go build ./cmd/blob-sender # if needed
```



## Usage

### `blob-spammer`
`blob-spammer` is a tool for sending mass blob transactions.
### `spamoor`
`spamoor` is a tool for sending mass blob transactions.

```
Usage of blob-spammer:
Usage of spamoor:
Required:
-p, --privkey string The private key of the wallet to send funds from.
Expand All @@ -44,12 +42,25 @@ Optional:

The tool provides multiple scenarios, that focus on different aspects of blob transactions. One of the scenarios must be selected to run the tool:

#### `blob-spammer combined`
#### `spamoor blobs`

The `blobs` scenario sends out normal blobs with random data only.\
No replacement or cancellation transactions are being send.

#### `spamoor blob-replacements`

The `blob-replacements` scenario sends out blobs and always tries to replace these blobs with replacement blob transactions a few seconds later, further replacement transactions are being sent until inclusion in a block.

#### `spamoor blob-conflicting`

The `blob-conflicting` scenario sends out blob transactions and conflicting normal transactions at the same time or with a small delay.

For general testing, there is a `combined` scenario, which combines parts of all other scenarios in a randomized way.
#### `spamoor blob-combined`

For general testing, there is a `blob-combined` scenario, which combines parts of all other blob scenarios in a randomized way.

```
Usage of blob-spammer combined:
Usage of spamoor blob-combined:
Required (at least one of):
-c, --count uint Total number of blob transactions to send
-t, --throughput uint Number of blob transactions to send per slot
Expand All @@ -70,25 +81,15 @@ Optional:

Continuous random blob spamming (~2-4 sidecars per block):
```
blob-spammer combined -p "<PRIVKEY>" -h http://rpc-host1:8545 -b 2 -t 3 --max-pending 3
spamoor blob-combined -p "<PRIVKEY>" -h http://rpc-host1:8545 -b 2 -t 3 --max-pending 3
```

flood the network with 1000 blobs (+some replacements) via 2 rpc hosts:
```
blob-spammer combined -p "<PRIVKEY>" -h http://rpc-host1:8545 -h http://rpc-host2:8545 -c 1000
spamoor blob-combined -p "<PRIVKEY>" -h http://rpc-host1:8545 -h http://rpc-host2:8545 -c 1000
```

#### `blob-spammer normal`

The `normal` scenario sends out normal blobs with random data only.\
No replacement or cancellation transactions are being send.

#### `blob-spammer replacements`

The `replacements` scenario sends out blobs and always tries to replace these blobs with replacement blob transactions a few seconds later, further replacement transactions are being sent until inclusion in a block.


#### `blob-spammer wallets`
#### `spamoor wallets`

The `wallets` scenario prepares & prints the list of child wallets that are used to send blob transactions from.\
It's more intended for debugging. The tool takes care of these wallets internally, so there is nothing to do with them ;)
Expand Down
2 changes: 1 addition & 1 deletion cmd/blob-sender/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
flag "github.com/spf13/pflag"

"github.com/ethereum/go-ethereum/common"
"github.com/ethpandaops/goomy-blob/txbuilder"
"github.com/ethpandaops/spamoor/txbuilder"
)

type CliArgs struct {
Expand Down
126 changes: 0 additions & 126 deletions cmd/blob-spammer/main.go

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/ethpandaops/goomy-blob
module github.com/ethpandaops/spamoor

go 1.21.1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package combined
package blobcombined

import (
"fmt"
Expand All @@ -12,10 +12,10 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/pflag"

"github.com/ethpandaops/goomy-blob/scenariotypes"
"github.com/ethpandaops/goomy-blob/tester"
"github.com/ethpandaops/goomy-blob/txbuilder"
"github.com/ethpandaops/goomy-blob/utils"
"github.com/ethpandaops/spamoor/scenariotypes"
"github.com/ethpandaops/spamoor/tester"
"github.com/ethpandaops/spamoor/txbuilder"
"github.com/ethpandaops/spamoor/utils"
)

type ScenarioOptions struct {
Expand Down Expand Up @@ -44,7 +44,7 @@ type Scenario struct {

func NewScenario() scenariotypes.Scenario {
return &Scenario{
logger: logrus.WithField("scenario", "combined"),
logger: logrus.WithField("scenario", "blob-combined"),
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package conflicting
package blobconflicting

import (
"fmt"
Expand All @@ -12,10 +12,10 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/pflag"

"github.com/ethpandaops/goomy-blob/scenariotypes"
"github.com/ethpandaops/goomy-blob/tester"
"github.com/ethpandaops/goomy-blob/txbuilder"
"github.com/ethpandaops/goomy-blob/utils"
"github.com/ethpandaops/spamoor/scenariotypes"
"github.com/ethpandaops/spamoor/tester"
"github.com/ethpandaops/spamoor/txbuilder"
"github.com/ethpandaops/spamoor/utils"
)

type ScenarioOptions struct {
Expand All @@ -42,7 +42,7 @@ type Scenario struct {

func NewScenario() scenariotypes.Scenario {
return &Scenario{
logger: logrus.WithField("scenario", "conflicting"),
logger: logrus.WithField("scenario", "blob-conflicting"),
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package replacements
package blobreplacements

import (
"fmt"
Expand All @@ -12,10 +12,10 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/pflag"

"github.com/ethpandaops/goomy-blob/scenariotypes"
"github.com/ethpandaops/goomy-blob/tester"
"github.com/ethpandaops/goomy-blob/txbuilder"
"github.com/ethpandaops/goomy-blob/utils"
"github.com/ethpandaops/spamoor/scenariotypes"
"github.com/ethpandaops/spamoor/tester"
"github.com/ethpandaops/spamoor/txbuilder"
"github.com/ethpandaops/spamoor/utils"
)

type ScenarioOptions struct {
Expand Down Expand Up @@ -44,7 +44,7 @@ type Scenario struct {

func NewScenario() scenariotypes.Scenario {
return &Scenario{
logger: logrus.WithField("scenario", "replacements"),
logger: logrus.WithField("scenario", "blob-replacements"),
}
}

Expand Down
12 changes: 6 additions & 6 deletions scenarios/normal/normal.go → scenarios/blobs/blobs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package normal
package blobs

import (
"fmt"
Expand All @@ -12,10 +12,10 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/pflag"

"github.com/ethpandaops/goomy-blob/scenariotypes"
"github.com/ethpandaops/goomy-blob/tester"
"github.com/ethpandaops/goomy-blob/txbuilder"
"github.com/ethpandaops/goomy-blob/utils"
"github.com/ethpandaops/spamoor/scenariotypes"
"github.com/ethpandaops/spamoor/tester"
"github.com/ethpandaops/spamoor/txbuilder"
"github.com/ethpandaops/spamoor/utils"
)

type ScenarioOptions struct {
Expand All @@ -42,7 +42,7 @@ type Scenario struct {

func NewScenario() scenariotypes.Scenario {
return &Scenario{
logger: logrus.WithField("scenario", "normal"),
logger: logrus.WithField("scenario", "blobs"),
}
}

Expand Down
Loading

0 comments on commit 1020fb3

Please sign in to comment.