Rename the debug docker files + add a simpler/faster one for Linux (#2731)

Also update related documentation
This commit is contained in:
Kim De Mey 2024-10-13 18:07:17 +02:00 committed by GitHub
parent eec41bc0e8
commit 3e36f52fd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 25 additions and 9 deletions

View File

@ -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
@ -30,12 +33,12 @@ 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:
@ -43,15 +46,18 @@ To do that follow next steps:
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.

View File

@ -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