Skip to content

Commit

Permalink
Revise native library loading in Nethermind.Gmp package (#4739)
Browse files Browse the repository at this point in the history
* Revert "Fix Dockerfile after bringing Math submodule (#4708)"

This reverts commit 2c31eb6.

* Revert "Fix invalid block on mainnet (#4695)"

This reverts commit 4d69422.

* Update Nethermind.Gmp package
  • Loading branch information
rubo committed Oct 13, 2022
1 parent 37de599 commit ef26381
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 32 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@
[submodule "gitbook/docs"]
path = gitbook/docs
url = https://github.com/NethermindEth/docs.git
[submodule "src/Math.Gmp.Native"]
path = src/Math.Gmp.Native
url = https://github.com/NethermindEth/Math.Gmp.Native.git
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ ARG BUILDPLATFORM
COPY . .

RUN if [ "$TARGETARCH" = "amd64" ] ; \
then git submodule update --init src/Math.Gmp.Native && \
dotnet publish src/Nethermind/Nethermind.Runner -r $TARGETOS-x64 -c release -o out ; \
else git submodule update --init src/Math.Gmp.Native && \
dotnet publish src/Nethermind/Nethermind.Runner -r $TARGETOS-$TARGETARCH -c release -o out ; \
then dotnet publish src/Nethermind/Nethermind.Runner -r $TARGETOS-x64 -c release -o out ; \
else dotnet publish src/Nethermind/Nethermind.Runner -r $TARGETOS-$TARGETARCH -c release -o out ; \
fi

FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:6.0-jammy
Expand Down
6 changes: 2 additions & 4 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ ARG BUILDPLATFORM
COPY . .

RUN if [ "$TARGETARCH" = "amd64" ] ; \
then git submodule update --init src/Math.Gmp.Native && \
dotnet tool install JetBrains.dotTrace.GlobalTools --version 2021.3.2 --tool-path /tmp/ && \
then dotnet tool install JetBrains.dotTrace.GlobalTools --version 2021.3.2 --tool-path /tmp/ && \
dotnet add src/Nethermind/Nethermind.Runner package JetBrains.dotMemory.Console.$TARGETOS-x64 --version 2021.3.2 --package-directory /tmp/ && \
dotnet publish src/Nethermind/Nethermind.Runner -r $TARGETOS-x64 -c release -o out ; \
else git submodule update --init src/Math.Gmp.Native && \
dotnet tool install JetBrains.dotTrace.GlobalTools --version 2021.3.2 --tool-path /tmp/ && \
else dotnet tool install JetBrains.dotTrace.GlobalTools --version 2021.3.2 --tool-path /tmp/ && \
dotnet add src/Nethermind/Nethermind.Runner package JetBrains.dotMemory.Console.$TARGETOS-$TARGETARCH --version 2021.3.2 --package-directory /tmp/ && \
dotnet publish src/Nethermind/Nethermind.Runner -r $TARGETOS-$TARGETARCH -c release -o out ; \
fi
Expand Down
17 changes: 0 additions & 17 deletions Dockerfile.gmp

This file was deleted.

3 changes: 1 addition & 2 deletions Dockerfile.stateRunner
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build
COPY . .

RUN apk add git && \
git submodule update --init src/Math.Gmp.Native && \
dotnet publish src/Nethermind/Nethermind.State.Test.Runner -c release -o out

FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine

COPY --from=build /out .

ENTRYPOINT [ "./nethtest" ]
ENTRYPOINT [ "./nethtest" ]
1 change: 0 additions & 1 deletion src/Math.Gmp.Native
Submodule Math.Gmp.Native deleted from 2d0250
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.Evm/Nethermind.Evm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\Math.Gmp.Native\MathGmp.Native\MathGmp.Native.csproj" />
<ProjectReference Include="..\Nethermind.Core\Nethermind.Core.csproj" />
<ProjectReference Include="..\Nethermind.Serialization.Rlp\Nethermind.Serialization.Rlp.csproj" />
<ProjectReference Include="..\Nethermind.State\Nethermind.State.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FastEnum" Version="1.7.0" />
<PackageReference Include="Nethermind.Gmp" Version="1.0.1" />
</ItemGroup>
</Project>

0 comments on commit ef26381

Please sign in to comment.