Skip to content

Commit

Permalink
Rename the debug docker files + add a simpler/faster one for Linux (#…
Browse files Browse the repository at this point in the history
…2731)

Also update related documentation
  • Loading branch information
kdeme authored Oct 13, 2024
1 parent eec41bc commit 3e36f52
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
24 changes: 15 additions & 9 deletions fluffy/docs/the_fluffy_book/docs/fluffy-with-portal-hive.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ go build .
Example commands for running test suites:

```sh
# Run the portal tests with only the fluffy client
# Run the portal hive tests with only the fluffy client
./hive --sim portal --client fluffy

# Run the portal tests with the 3 different clients
./hive --sim portal --client fluffy,trin,ultralight
# Run the portal hive tests with different clients
./hive --sim portal --client fluffy,trin,ultralight,shisui

# Run portal hive tests from a specific portal hive simulator
./hive --sim portal --client fluffy --sim.limit history-interop

# Access results through web-ui:
```sh
Expand All @@ -30,28 +33,31 @@ go build ./cmd/hiveview
```

!!! note
You can see all the implemented simulators in [https://github.com/ethereum/hive/tree/master/simulators](https://github.com/ethereum/hive/tree/master/simulators)
You can see all the implemented Portal simulators in [https://github.com/ethereum/hive/blob/master/simulators/portal/](https://github.com/ethereum/hive/blob/master/simulators/portal/)

## Build a local development Docker image for portal-hive

To debug & develop Fluffy code against portal-hive tests you might want to
create a local development docker image for Fluffy.
To debug & develop Fluffy code against hive tests you might want to
create a local development Docker image for Fluffy.

To do that follow next steps:

1) Clone and build hive, see above.

2) Build the local development Docker image using the following command:
```
docker build --tag fluffy-dev --file ./fluffy/tools/docker/Dockerfile.portalhive .
docker build --tag fluffy-dev --file ./fluffy/tools/docker/Dockerfile.debug .
```
3) Modify the `FROM` tag in the portal-hive `Dockerfile` of fluffy at
`portal-hive/clients/fluffy/Dockerfile` to use the image that was buid in step 2.
`./hive/clients/fluffy/Dockerfile` to use the image that was build in step 2.
4) Run the tests as [usual](fluffy-with-portal-hive.md/#run-the-hive-tests-locally).
!!! warning
The `./vendors` dir is dockerignored and cached. If you have to make local
changes to one of the dependencies in that directory you will have to remove
`vendors/` from `./fluffy/tools/docker/Dockerfile.portalhive.dockerignore`.
`vendors/` from `./fluffy/tools/docker/Dockerfile.debug.dockerignore`.
!!! note
When developing on Linux the `./fluffy/tools/docker/Dockerfile.debug.linux` Dockerfile can also be used instead. It does require to manually build fluffy first as it copies over this binary.
File renamed without changes.
10 changes: 10 additions & 0 deletions fluffy/tools/docker/Dockerfile.debug.linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Fluffy
# Copyright (c) 2024 Status Research & Development GmbH
# Licensed and distributed under either of
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.

FROM debian:stable-slim

COPY ./build/fluffy /usr/local/bin/fluffy

0 comments on commit 3e36f52

Please sign in to comment.