diff --git a/.github/workflows/build-nethermind-packages.yml b/.github/workflows/build-nethermind-packages.yml index 8d5cdcf4047..9dbb8004186 100644 --- a/.github/workflows/build-nethermind-packages.yml +++ b/.github/workflows/build-nethermind-packages.yml @@ -10,10 +10,12 @@ jobs: RELEASE_DIRECTORY: /home/runner/work/nethermind/nethermind LIN_RELEASE: nethermind-lin-x64 OSX_RELEASE: nethermind-osx-x64 + OSX_ARM64_RELEASE: nethermind-osx-arm64 WIN_RELEASE: nethermind-win-x64 LIN_ARM64_RELEASE: nethermind-lin-arm64 LINUX: linux-x64 OSX: osx-x64 + OSX_ARM64: osx-arm64 WIN10: win10-x64 LINUX_ARM64: linux-arm64 steps: @@ -35,6 +37,10 @@ jobs: - name: Setting up Build Environment run: | npm i pkg @vercel/ncc -g + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Setting up QEMU uses: docker/setup-qemu-action@v1 - name: Setting up Docker Buildx @@ -61,6 +67,11 @@ jobs: with: name: nethermind-darwin-package path: ${{ env.RELEASE_DIRECTORY }}/${{ env.OSX_RELEASE }}/nethermind-darwin-amd64-* + - uses: actions/upload-artifact@master + name: Uploading Nethermind darwin arm64 package + with: + name: nethermind-darwin-arm64-package + path: ${{ env.RELEASE_DIRECTORY }}/${{ env.OSX_ARM64_RELEASE }}/nethermind-darwin-arm64-* - uses: actions/upload-artifact@master name: Uploading Nethermind linux package with: diff --git a/.github/workflows/release-nethermind.yml b/.github/workflows/release-nethermind.yml index 4c52485d3ba..d92258a7f4c 100644 --- a/.github/workflows/release-nethermind.yml +++ b/.github/workflows/release-nethermind.yml @@ -18,10 +18,12 @@ jobs: OSX_RELEASE: nethermind-osx-x64 WIN_RELEASE: nethermind-win-x64 LIN_ARM64_RELEASE: nethermind-lin-arm64 + OSX_ARM64_RELEASE: nethermind-osx-arm64 LINUX: linux-x64 OSX: osx-x64 WIN10: win10-x64 LINUX_ARM64: linux-arm64 + OSX_ARM64: osx-arm64 steps: - name: Checking out Nethermind repository uses: actions/checkout@master @@ -42,6 +44,10 @@ jobs: - name: Setting up Build Environment run: | npm i pkg @vercel/ncc -g + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Setting up QEMU uses: docker/setup-qemu-action@v1 - name: Setting up Docker Buildx @@ -84,10 +90,10 @@ jobs: name: nethermind-linux-arm64-package path: ${{ env.RELEASE_DIRECTORY }}/${{ env.LIN_ARM64_RELEASE }}/nethermind-linux-arm64-* - uses: actions/upload-artifact@master - name: Uploading plugins package + name: Uploading Nethermind darwin arm64 package with: - name: plugins - path: ${{ env.RELEASE_DIRECTORY }}/plugins/plugins-* + name: nethermind-darwin-arm64-package + path: ${{ env.RELEASE_DIRECTORY }}/${{ env.OSX_ARM64_RELEASE }}/nethermind-darwin-arm64-* trigger-publish: name: Triggering publish event to different sources @@ -110,6 +116,7 @@ jobs: OSX_RELEASE: nethermind-osx-x64 WIN_RELEASE: nethermind-win-x64 LIN_ARM64_RELEASE: nethermind-lin-arm64 + OSX_ARM64_RELEASE: nethermind-osx-arm64 steps: - name: Checking out Nethermind repository uses: actions/checkout@master @@ -138,10 +145,10 @@ jobs: name: nethermind-linux-arm64-package path: ${{ env.RELEASE_DIRECTORY }}/${{ env.LIN_ARM64_RELEASE }}/ - uses: actions/download-artifact@master - name: Downloading plugins package + name: Downloading Nethermind darwin arm64 package with: - name: plugins - path: ${{ env.RELEASE_DIRECTORY }}/plugins/ + name: nethermind-darwin-arm64-package + path: ${{ env.RELEASE_DIRECTORY }}/${{ env.OSX_ARM64_RELEASE }}/ - name: Creating Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -158,6 +165,7 @@ jobs: OSX_RELEASE: nethermind-osx-x64 WIN_RELEASE: nethermind-win-x64 LIN_ARM64_RELEASE: nethermind-lin-arm64 + OSX_ARM64_RELEASE: nethermind-darwin-arm64 steps: - name: Checking out Nethermind repository uses: actions/checkout@master @@ -184,6 +192,11 @@ jobs: with: name: nethermind-linux-arm64-package path: ${{ env.RELEASE_DIRECTORY }}/${{ env.LIN_ARM64_RELEASE }}/ + - uses: actions/download-artifact@master + name: Downloading Nethermind darwin arm64 package + with: + name: nethermind-darwin-arm64-package + path: ${{ env.RELEASE_DIRECTORY }}/${{ env.OSX_ARM64_RELEASE }}/ - name: Configuring GPG Key run: | mkdir -p ~/.gnupg/ diff --git a/.github/workflows/run-codeql-code-analysis.yml b/.github/workflows/run-codeql-code-analysis.yml index e43f99d0fc5..5eacfc0c561 100644 --- a/.github/workflows/run-codeql-code-analysis.yml +++ b/.github/workflows/run-codeql-code-analysis.yml @@ -24,6 +24,10 @@ jobs: uses: github/codeql-action/init@v1 with: languages: ${{ matrix.language }} + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Building Nethermind solution run: | cd src/Nethermind diff --git a/.github/workflows/run-consesus-legacy-tests.yml b/.github/workflows/run-consesus-legacy-tests.yml index 02158145bec..b2c76c8face 100644 --- a/.github/workflows/run-consesus-legacy-tests.yml +++ b/.github/workflows/run-consesus-legacy-tests.yml @@ -13,6 +13,10 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Installing Linux packages if: matrix.os == 'ubuntu-latest' run: | @@ -29,6 +33,10 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Updating submodules run: git submodule update --init - name: Ethereum.Blockchain.Legacy diff --git a/.github/workflows/run-nethermind-tests-with-code-coverage.yml b/.github/workflows/run-nethermind-tests-with-code-coverage.yml index b0937c101ec..9f304692136 100644 --- a/.github/workflows/run-nethermind-tests-with-code-coverage.yml +++ b/.github/workflows/run-nethermind-tests-with-code-coverage.yml @@ -19,6 +19,10 @@ jobs: with: submodules: true fetch-depth: 0 + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Installing Linux packages if: matrix.os == 'ubuntu-latest' run: | @@ -141,24 +145,6 @@ jobs: - name: Nethermind.Sockets.Test run: | dotnet test -c Release $EXCLUDE_TEST_PROJECTS src/Nethermind/Nethermind.Sockets.Test - - name: Nethermind.DataMarketplace.Test - run: | - dotnet test -c Release $EXCLUDE_TEST_PROJECTS src/Nethermind/Nethermind.DataMarketplace.Test - - name: Nethermind.DataMarketplace.Channels.Test - run: | - dotnet test -c Release $EXCLUDE_TEST_PROJECTS src/Nethermind/Nethermind.DataMarketplace.Channels.Test - - name: Nethermind.DataMarketplace.Consumers.Test - run: | - dotnet test -c Release $EXCLUDE_TEST_PROJECTS src/Nethermind/Nethermind.DataMarketplace.Consumers.Test - - name: Nethermind.DataMarketplace.Infrastructure.Test - run: | - dotnet test -c Release $EXCLUDE_TEST_PROJECTS src/Nethermind/Nethermind.DataMarketplace.Infrastructure.Test - - name: Nethermind.DataMarketplace.Subprotocols.Test - run: | - dotnet test -c Release $EXCLUDE_TEST_PROJECTS src/Nethermind/Nethermind.DataMarketplace.Subprotocols.Test - - name: Nethermind.DataMarketplace.WebSockets.Test - run: | - dotnet test -c Release $EXCLUDE_TEST_PROJECTS src/Nethermind/Nethermind.DataMarketplace.WebSockets.Test - name: MathGmp.Native run: | dotnet test -c Release $EXCLUDE_TEST_PROJECTS src/Math.Gmp.Native/MathGmp.Native.UnitTests @@ -183,7 +169,7 @@ jobs: run: git -c submodule."src/eth2.0-spec-tests".update=none submodule update --init - name: Set environment variable to exclude specific test projects if: matrix.os == 'ubuntu-latest' - run: echo 'EXCLUDE_TEST_PROJECTS=/p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Nethermind.HashLib]*%2c[Nethermind.Core.Test]*%2c[Nethermind.Blockchain.Test]*%2c[Nethermind.DataMarketplace.Test]*%2c[Ethereum.Test.Base]*"' >> "$GITHUB_ENV" + run: echo 'EXCLUDE_TEST_PROJECTS=/p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Nethermind.HashLib]*%2c[Nethermind.Core.Test]*%2c[Nethermind.Blockchain.Test]*%2c[Ethereum.Test.Base]*"' >> "$GITHUB_ENV" - name: Ethereum.Abi.Test run: | dotnet test -c Release $EXCLUDE_TEST_PROJECTS src/Nethermind/Ethereum.Abi.Test diff --git a/.github/workflows/run-nethermind-tests.yml b/.github/workflows/run-nethermind-tests.yml index bec7352b336..e13167bc9e7 100644 --- a/.github/workflows/run-nethermind-tests.yml +++ b/.github/workflows/run-nethermind-tests.yml @@ -16,6 +16,10 @@ jobs: - uses: actions/checkout@v2 with: submodules: true + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Installing Linux packages run: | sudo apt-get update @@ -54,6 +58,10 @@ jobs: - uses: actions/checkout@v2 with: submodules: true + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Installing Linux packages run: | sudo apt-get update @@ -98,6 +106,10 @@ jobs: - uses: actions/checkout@v2 with: submodules: true + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Installing Linux packages run: | sudo apt-get update @@ -139,6 +151,10 @@ jobs: - uses: actions/checkout@v2 with: submodules: true + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Installing Linux packages run: | sudo apt-get update @@ -168,6 +184,10 @@ jobs: - uses: actions/checkout@v2 with: submodules: true + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Installing Linux packages run: | sudo apt-get update @@ -181,30 +201,6 @@ jobs: - name: Nethermind.Sockets.Test run: | dotnet test -c Release src/Nethermind/Nethermind.Sockets.Test - - name: Nethermind.DataMarketplace.Test - run: | - dotnet test -c Release src/Nethermind/Nethermind.DataMarketplace.Test - - name: Nethermind.DataMarketplace.Channels.Test - run: | - dotnet test -c Release src/Nethermind/Nethermind.DataMarketplace.Channels.Test - - name: Nethermind.DataMarketplace.Consumers.Test - run: | - dotnet test -c Release src/Nethermind/Nethermind.DataMarketplace.Consumers.Test - - name: Nethermind.DataMarketplace.Providers.Infrastructure.Tests - run: | - dotnet test -c Release src/Nethermind/Nethermind.DataMarketplace.Providers.Infrastructure.Tests - - name: Nethermind.DataMarketplace.Providers.Test - run: | - dotnet test -c Release src/Nethermind/Nethermind.DataMarketplace.Providers.Test - - name: Nethermind.DataMarketplace.Infrastructure.Test - run: | - dotnet test -c Release src/Nethermind/Nethermind.DataMarketplace.Infrastructure.Test - - name: Nethermind.DataMarketplace.Subprotocols.Test - run: | - dotnet test -c Release src/Nethermind/Nethermind.DataMarketplace.Subprotocols.Test - - name: Nethermind.DataMarketplace.WebSockets.Test - run: | - dotnet test -c Release src/Nethermind/Nethermind.DataMarketplace.WebSockets.Test neth-runner: name: Nethermind Runner Tests runs-on: ubuntu-latest @@ -212,6 +208,10 @@ jobs: - uses: actions/checkout@v2 with: submodules: true + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Installing Linux packages run: | sudo apt-get update @@ -227,6 +227,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Unshallow fetching run: git fetch --unshallow - name: Updating submodules diff --git a/.github/workflows/run-posdao-tests.yml b/.github/workflows/run-posdao-tests.yml index eb5da205245..9e3faa55b2b 100644 --- a/.github/workflows/run-posdao-tests.yml +++ b/.github/workflows/run-posdao-tests.yml @@ -25,6 +25,10 @@ jobs: run: | sudo apt-get update sudo apt-get install libsnappy-dev libc6-dev libc6 + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' - name: Cloning Nethermind repo uses: actions/checkout@v2 with: diff --git a/.github/workflows/run-vault-integration-tests.yml b/.github/workflows/run-vault-integration-tests.yml index fe77fd15bc7..a33ece436c3 100644 --- a/.github/workflows/run-vault-integration-tests.yml +++ b/.github/workflows/run-vault-integration-tests.yml @@ -11,7 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Updating submodules + - name: Setting up dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' + - name: Updating submodules run: git submodule update --init src/Dirichlet src/int256 src/rocksdb-sharp src/Math.Gmp.Native - name: Installing Linux packages run: | diff --git a/Dockerfile b/Dockerfile index 3ba548e1226..4ef9f46deb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk@sha256:fa19559201c43bc8191c1a095670e242de80a23697d24f5a3460019958637c63 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:6.0 AS build ARG TARGETPLATFORM ARG TARGETOS @@ -14,7 +14,7 @@ RUN if [ "$TARGETARCH" = "amd64" ] ; \ dotnet publish src/Nethermind/Nethermind.Runner -r $TARGETOS-$TARGETARCH -c release -o out ; \ fi -FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet@sha256:1d75db770c7ce82b128744770271bd87dc9d119f0ef15b94cab0f84477abfaec +FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:6.0 RUN apt-get update && apt-get -y install libsnappy-dev libc6-dev libc6 WORKDIR /nethermind diff --git a/Dockerfile.e2e b/Dockerfile.e2e deleted file mode 100644 index 96c0e31bb12..00000000000 --- a/Dockerfile.e2e +++ /dev/null @@ -1,16 +0,0 @@ - -FROM mcr.microsoft.com/dotnet/sdk@sha256:e8dce81012457ec0d87929aff8d60277c01b88fdd80bd128f1d4fc1c1bbdeb74 AS build -COPY . . -RUN git submodule update --init src/Dirichlet src/int256 src/rocksdb-sharp src/Math.Gmp.Native -RUN dotnet publish src/Nethermind/Nethermind.DataMarketplace.Consumers.Test.EndToEnd -c release -o out - -FROM mcr.microsoft.com/dotnet/aspnet@sha256:df9df076ae5c0a6b88ff5a5faa4bba123b6e64fecfd5ecd19005b527309a5785 -RUN apt-get update && apt-get -y install libsnappy-dev libc6-dev libc6 unzip -WORKDIR /e2e -COPY --from=build /out . - -ENV ASPNETCORE_ENVIRONMENT docker -ENV ASPNETCORE_URLS http://*:5000 -ENV INPUT_DISABLED true - -ENTRYPOINT dotnet Nethermind.DataMarketplace.Consumers.Test.EndToEnd.dll diff --git a/Dockerfile.stateRunner b/Dockerfile.stateRunner index 762f3f0fc34..765553c1dcb 100644 --- a/Dockerfile.stateRunner +++ b/Dockerfile.stateRunner @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk@sha256:6edc3ea5eb689712b9ec6ad5777e32c5bfa51db94a3e5fb069278ccf3b74b7c1 AS build +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build COPY . . @@ -6,7 +6,7 @@ RUN apk add git && \ git submodule update --init src/Dirichlet src/int256 src/Math.Gmp.Native && \ dotnet publish src/Nethermind/Nethermind.State.Test.Runner -c release -o out -FROM mcr.microsoft.com/dotnet/sdk@sha256:6edc3ea5eb689712b9ec6ad5777e32c5bfa51db94a3e5fb069278ccf3b74b7c1 +FROM mcr.microsoft.com/dotnet/sdk:6.0 COPY --from=build /out . diff --git a/README.md b/README.md index 1bea8764007..30e74291472 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ It syncs fully on: ## Prerequisites :construction: -**.NET 5.0** SDK +**.NET 6.0** SDK ### Windows diff --git a/scripts/build_ndm_plugin.zsh b/scripts/build_ndm_plugin.zsh deleted file mode 100755 index 6d11459ca3a..00000000000 --- a/scripts/build_ndm_plugin.zsh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash - -#exit when any command fails -set -e - -BIN_PATH="bin/Debug/net5.0/" -NETHERMIND_PATH="${HOME}/work/nethermind/src/Nethermind/" -NDM_PATH="${HOME}/work/ndm/src/" -NETHERMIND_RUNNER_BIN_PATH="${NETHERMIND_PATH}Nethermind.Runner/bin/Debug/net5.0/plugins/" -NDM_INFRASTRUCTURE_PATH="${NETHERMIND_PATH}Nethermind.DataMarketplace.Infrastructure/" -NDM_CHANNELS_PATH="${NETHERMIND_PATH}Nethermind.DataMarketplace.Channels/" -NDM_CHANNELS_GRPC_PATH="${NETHERMIND_PATH}Nethermind.DataMarketplace.Channels.Grpc/" -NDM_INITIALIZERS_PATH="${NETHERMIND_PATH}Nethermind.DataMarketplace.Initializers/" -NDM_PROVIDERS_PATH="${NDM_PATH}Nethermind.DataMarketplace.Providers/" -NDM_PROVIDERS_INFRASTRUCTURE_PATH="${NDM_PATH}Nethermind.DataMarketplace.Providers.Infrastructure/" -NDM_CONSUMERS_PATH="${NETHERMIND_PATH}Nethermind.DataMarketplace.Consumers/" -NDM_CONSUMERS_INFRASTRUCTURE_PATH="${NETHERMIND_PATH}Nethermind.DataMarketplace.Consumers.Infrastructure/" -NDM_REFUNDER_PATH="${NETHERMIND_PATH}Nethermind.DataMarketplace.Tools.Refunder/" -NDM_CONSUMERS_TESTS_PATH="${NETHERMIND_PATH}Nethermind.DataMarketplace.Consumers.Test/" -NDM_PROVIDERS_TESTS_PATH="${NDM_PATH}Nethermind.DataMarketplace.Providers.Test/" -NDM_TESTS_PATH="${NETHERMIND_PATH}Nethermind.DataMarketplace.Test/" - -cd $NETHERMIND_PATH -dotnet build Nethermind.sln -dotnet build DataMarketplace.sln - -cd $NDM_PATH -cd .. -dotnet build - -cd $NDM_PROVIDERS_PATH -cd $BIN_PATH -cp -v ./Nethermind.DataMarketplace.Providers.{dll,pdb} $NETHERMIND_RUNNER_BIN_PATH - -cd $NDM_PROVIDERS_INFRASTRUCTURE_PATH -cd $BIN_PATH -cp -v ./Nethermind.DataMarketplace.Providers.Infrastructure.{dll,pdb} $NETHERMIND_RUNNER_BIN_PATH -cp -v ./Nethermind.DataMarketplace.Providers.Plugins.{dll,pdb} $NETHERMIND_RUNNER_BIN_PATH - -cd $NDM_CONSUMERS_PATH -cd $BIN_PATH -cp -v ./Nethermind.DataMarketplace.Consumers.{dll,pdb} $NETHERMIND_RUNNER_BIN_PATH - -cd $NDM_CONSUMERS_INFRASTRUCTURE_PATH -cd $BIN_PATH -cp -v ./Nethermind.DataMarketplace.Consumers.Infrastructure.{dll,pdb} $NETHERMIND_RUNNER_BIN_PATH - - -cd $NDM_INFRASTRUCTURE_PATH -cd $BIN_PATH -cp -v ./Nethermind.DataMarketplace.Core.{dll,pdb} $NETHERMIND_RUNNER_BIN_PATH -cp -v ./Nethermind.DataMarketplace.Infrastructure.{dll,pdb} $NETHERMIND_RUNNER_BIN_PATH - -cd $NDM_CHANNELS_PATH -cd $BIN_PATH -cp -v ./Nethermind.DataMarketplace.Channels.{dll,pdb} $NETHERMIND_RUNNER_BIN_PATH - -cd $NDM_CHANNELS_GRPC_PATH -cd $BIN_PATH -cp -v ./Nethermind.DataMarketplace.Channels.Grpc.{dll,pdb} $NETHERMIND_RUNNER_BIN_PATH - -cd $NDM_INITIALIZERS_PATH -cd $BIN_PATH -cp -v ./Nethermind.DataMarketplace.Initializers.{dll,pdb} $NETHERMIND_RUNNER_BIN_PATH -cp -v ./Nethermind.DataMarketplace.Subprotocols.{dll,pdb} $NETHERMIND_RUNNER_BIN_PATH -cp -v ./Nethermind.DataMarketplace.WebSockets.{dll,pdb} $NETHERMIND_RUNNER_BIN_PATH - -cd $NDM_REFUNDER_PATH -cd $BIN_PATH -cp -v ./DnsClient.dll $NETHERMIND_RUNNER_BIN_PATH -cp -v ./MongoDB.Bson.dll $NETHERMIND_RUNNER_BIN_PATH -cp -v ./MongoDB.Driver.Core.dll $NETHERMIND_RUNNER_BIN_PATH -cp -v ./MongoDB.Driver.dll $NETHERMIND_RUNNER_BIN_PATH -cp -v ./MongoDB.Libmongocrypt.dll $NETHERMIND_RUNNER_BIN_PATH - -cd $NDM_CONSUMERS_TESTS_PATH -cd $BIN_PATH -cp -v ./SharpCompress.dll $NETHERMIND_RUNNER_BIN_PATH - -cd $NDM_PROVIDERS_TESTS_PATH -cd $BIN_PATH -cp -v ./YamlDotNet.dll $NETHERMIND_RUNNER_BIN_PATH - -cd $NDM_TESTS_PATH -cd $BIN_PATH -cp -v ./Polly.dll $NETHERMIND_RUNNER_BIN_PATH \ No newline at end of file diff --git a/scripts/deployment/archive-packages.sh b/scripts/deployment/archive-packages.sh index 85971c0fb6e..adbd06b81a2 100755 --- a/scripts/deployment/archive-packages.sh +++ b/scripts/deployment/archive-packages.sh @@ -3,8 +3,10 @@ set -e LIN=nethermind-linux-amd64 OSX=nethermind-darwin-amd64 +OSX_ARM64=nethermind-darwin-arm64 WIN=nethermind-windows-amd64 LIN_ARM64=nethermind-linux-arm64 +RELEASE_PATH=nethermind/src/Nethermind/Nethermind.Runner/bin/Release/net6.0 echo ======================================================= echo Archiving Nethermind packages @@ -18,68 +20,28 @@ echo ======================================================= echo Copying and packing plugins echo ======================================================= -mkdir -p plugins mkdir -p $LIN_RELEASE/plugins -rm -rf $LIN_RELEASE/ndm-plugins mkdir -p $OSX_RELEASE/plugins -rm -rf $OSX_RELEASE/ndm-plugins +mkdir -p $OSX_ARM64_RELEASE/plugins mkdir -p $WIN_RELEASE/plugins -rm -rf $WIN_RELEASE/ndm-plugins mkdir -p $LIN_ARM64_RELEASE/plugins -rm -rf $LIN_ARM64_RELEASE/ndm-plugins cd nethermind/src/Nethermind/ dotnet build -c Release Nethermind.sln -cd Nethermind.Baseline -dotnet build -c Release -cd $RELEASE_DIRECTORY/plugins - -cp $RELEASE_DIRECTORY/nethermind/src/Nethermind/Nethermind.Analytics/bin/Release/net5.0/Nethermind.Analytics.dll . -cp $RELEASE_DIRECTORY/nethermind/src/Nethermind/Nethermind.Baseline/bin/Release/net5.0/Nethermind.Baseline.dll . -cp $RELEASE_DIRECTORY/nethermind/src/Nethermind/Nethermind.Api/bin/Release/net5.0/Nethermind.Api.dll . -cp $RELEASE_DIRECTORY/nethermind/src/Nethermind/Nethermind.HealthChecks/bin/Release/net5.0/Nethermind.HealthChecks.dll . -cp $RELEASE_DIRECTORY/nethermind/src/Nethermind/Nethermind.Runner/bin/Release/net5.0/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll . -cp $RELEASE_DIRECTORY/nethermind/src/Nethermind/Nethermind.Runner/bin/Release/net5.0/Microsoft.Extensions.Diagnostics.HealthChecks.dll . -cp $RELEASE_DIRECTORY/nethermind/src/Nethermind/Nethermind.Merge.Plugin/bin/Release/net5.0/Nethermind.Merge.Plugin.dll . -cp $RELEASE_DIRECTORY/nethermind/src/Nethermind/Nethermind.Mev/bin/Release/net5.0/Nethermind.Mev.dll . - -zip -r plugins-$GIT_SHORT_TAG-$GIT_HASH.zip . && cd .. - -cp $RELEASE_DIRECTORY/plugins/Nethermind.HealthChecks.dll $LIN_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Nethermind.HealthChecks.dll $OSX_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Nethermind.HealthChecks.dll $WIN_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Nethermind.HealthChecks.dll $LIN_ARM64_RELEASE/plugins/ - -cp $RELEASE_DIRECTORY/plugins/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll $LIN_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll $OSX_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll $WIN_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions.dll $LIN_ARM64_RELEASE/plugins/ - -cp $RELEASE_DIRECTORY/plugins/Microsoft.Extensions.Diagnostics.HealthChecks.dll $LIN_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Microsoft.Extensions.Diagnostics.HealthChecks.dll $OSX_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Microsoft.Extensions.Diagnostics.HealthChecks.dll $WIN_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Microsoft.Extensions.Diagnostics.HealthChecks.dll $LIN_ARM64_RELEASE/plugins/ - -cp $RELEASE_DIRECTORY/plugins/Nethermind.Api.dll $LIN_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Nethermind.Api.dll $OSX_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Nethermind.Api.dll $WIN_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Nethermind.Api.dll $LIN_ARM64_RELEASE/plugins/ - -cp $RELEASE_DIRECTORY/plugins/Nethermind.Merge.Plugin.dll $LIN_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Nethermind.Merge.Plugin.dll $OSX_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Nethermind.Merge.Plugin.dll $WIN_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Nethermind.Merge.Plugin.dll $LIN_ARM64_RELEASE/plugins/ +cd $RELEASE_DIRECTORY -cp $RELEASE_DIRECTORY/plugins/Nethermind.Mev.dll $LIN_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Nethermind.Mev.dll $OSX_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Nethermind.Mev.dll $WIN_RELEASE/plugins/ -cp $RELEASE_DIRECTORY/plugins/Nethermind.Mev.dll $LIN_ARM64_RELEASE/plugins/ +cp $RELEASE_DIRECTORY/$RELEASE_PATH/Nethermind.{HealthChecks,Merge.Plugin,Mev,Consensus}.dll $LIN_RELEASE/plugins +cp $RELEASE_DIRECTORY/$RELEASE_PATH/Nethermind.{HealthChecks,Merge.Plugin,Mev,Consensus}.dll $OSX_RELEASE/plugins +cp $RELEASE_DIRECTORY/$RELEASE_PATH/Nethermind.{HealthChecks,Merge.Plugin,Mev,Consensus}.dll $WIN_RELEASE/plugins +cp $RELEASE_DIRECTORY/$RELEASE_PATH/Nethermind.{HealthChecks,Merge.Plugin,Mev,Consensus}.dll $LIN_ARM64_RELEASE/plugins +cp $RELEASE_DIRECTORY/$RELEASE_PATH/Nethermind.{HealthChecks,Merge.Plugin,Mev,Consensus}.dll $OSX_ARM64_RELEASE/plugins cd $LIN_RELEASE && zip -r $LIN-$GIT_SHORT_TAG-$GIT_HASH.zip . && cd .. cd $OSX_RELEASE && zip -r $OSX-$GIT_SHORT_TAG-$GIT_HASH.zip . && cd .. cd $WIN_RELEASE && zip -r $WIN-$GIT_SHORT_TAG-$GIT_HASH.zip . && cd .. cd $LIN_ARM64_RELEASE && zip -r $LIN_ARM64-$GIT_SHORT_TAG-$GIT_HASH.zip . && cd .. +cd $OSX_ARM64_RELEASE && zip -r $OSX_ARM64-$GIT_SHORT_TAG-$GIT_HASH.zip . && cd .. echo ======================================================= echo Archiving Nethermind packages completed diff --git a/scripts/deployment/build-cli.sh b/scripts/deployment/build-cli.sh index 81da5d307e0..6d6f0bf8bd6 100755 --- a/scripts/deployment/build-cli.sh +++ b/scripts/deployment/build-cli.sh @@ -2,7 +2,7 @@ #exit when any command fails set -e CLI_PATH=$RELEASE_DIRECTORY/nethermind/src/Nethermind/Nethermind.Cli -PUBLISH_PATH=bin/release/net5.0 +PUBLISH_PATH=bin/release/net6.0 OUT=out cd $CLI_PATH @@ -12,10 +12,11 @@ echo Publishing Nethermind Cli for different platforms... echo ======================================================= echo Nethermind Cli path: $CLI_PATH -dotnet publish -c release -r $LINUX -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$LIN_RELEASE -dotnet publish -c release -r $OSX -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$OSX_RELEASE -dotnet publish -c release -r $WIN10 -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$WIN_RELEASE -dotnet publish -c release -r $LINUX_ARM64 -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$LIN_ARM64_RELEASE +dotnet publish -c release -r $LINUX --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$LIN_RELEASE +dotnet publish -c release -r $OSX --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$OSX_RELEASE +dotnet publish -c release -r $WIN10 --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$WIN_RELEASE +dotnet publish -c release -r $LINUX_ARM64 --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$LIN_ARM64_RELEASE +dotnet publish -c release -r $OSX_ARM64 --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$OSX_ARM64_RELEASE echo ======================================================= echo Packing Nethermind Cli for different platforms... @@ -25,11 +26,13 @@ rm $OUT/$LIN_RELEASE/*.pdb rm $OUT/$OSX_RELEASE/*.pdb rm $OUT/$WIN_RELEASE/*.pdb rm $OUT/$LIN_ARM64_RELEASE/*.pdb +rm $OUT/$OSX_ARM64_RELEASE/*.pdb cp -r $OUT/$LIN_RELEASE $RELEASE_DIRECTORY cp -r $OUT/$OSX_RELEASE $RELEASE_DIRECTORY cp -r $OUT/$WIN_RELEASE $RELEASE_DIRECTORY cp -r $OUT/$LIN_ARM64_RELEASE $RELEASE_DIRECTORY +cp -r $OUT/$OSX_ARM64_RELEASE $RELEASE_DIRECTORY rm -rf $OUT diff --git a/scripts/deployment/build-launcher.sh b/scripts/deployment/build-launcher.sh index 461b7a13683..e67ba0b1a54 100755 --- a/scripts/deployment/build-launcher.sh +++ b/scripts/deployment/build-launcher.sh @@ -11,7 +11,7 @@ echo ======================================================= cd $LAUNCHER_PATH npm i pkg index.js -t latest-linux-x64 -o $APP_NAME && mv $APP_NAME $RELEASE_DIRECTORY/$LIN_RELEASE -pkg index.js -t latest-osx-x64 -o $APP_NAME && mv $APP_NAME $RELEASE_DIRECTORY/$OSX_RELEASE +pkg index.js -t latest-macos-x64 -o $APP_NAME && mv $APP_NAME $RELEASE_DIRECTORY/$OSX_RELEASE && cp $RELEASE_DIRECTORY/$OSX_RELEASE/$APP_NAME $RELEASE_DIRECTORY/$OSX_ARM64_RELEASE/$APP_NAME pkg index.js -t latest-win-x64 -o $APP_NAME.exe && mv $APP_NAME.exe $RELEASE_DIRECTORY/$WIN_RELEASE echo ======================================================= diff --git a/scripts/deployment/build-runner.sh b/scripts/deployment/build-runner.sh index d17f069bd82..deca9eea781 100755 --- a/scripts/deployment/build-runner.sh +++ b/scripts/deployment/build-runner.sh @@ -3,7 +3,7 @@ set -e RUNNER_PATH=$RELEASE_DIRECTORY/nethermind/src/Nethermind/Nethermind.Runner ARM_ROCKSDB_PATH=$RELEASE_DIRECTORY/nethermind/scripts/deployment/arm64/runtimes -PUBLISH_PATH=bin/release/net5.0 +PUBLISH_PATH=bin/release/net6.0 OUT=out cd $RUNNER_PATH @@ -13,9 +13,11 @@ echo Publishing Nethermind Runner for different platforms... echo ======================================================= echo Nethermind Runner path: $RUNNER_PATH -dotnet publish -c release -r $LINUX -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$LIN_RELEASE -dotnet publish -c release -r $OSX -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$OSX_RELEASE -dotnet publish -c release -r $WIN10 -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$WIN_RELEASE +dotnet publish -c release -r $LINUX --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$LIN_RELEASE +dotnet publish -c release -r $OSX --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$OSX_RELEASE +dotnet publish -c release -r $WIN10 --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$WIN_RELEASE +dotnet publish -c release -r $OSX_ARM64 --self-contained true -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$OSX_ARM64_RELEASE + cp $ARM_ROCKSDB_PATH/librocksdb.so ../../rocksdb-sharp/RocksDbNative/runtimes/linux-arm64/native/librocksdb.so dotnet publish -c release -r $LINUX_ARM64 -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o $OUT/$LIN_ARM64_RELEASE @@ -56,10 +58,20 @@ mkdir $OUT/$LIN_ARM64_RELEASE/Data mkdir $OUT/$LIN_ARM64_RELEASE/keystore cp Data/static-nodes.json $OUT/$LIN_ARM64_RELEASE/Data +rm -rf $OUT/$OSX_ARM64_RELEASE/Data +rm -rf $OUT/$OSX_ARM64_RELEASE/Hive +rm $OUT/$OSX_ARM64_RELEASE/*.pdb +cp -r configs $OUT/$OSX_ARM64_RELEASE +cp -r ../Chains $OUT/$OSX_ARM64_RELEASE/chainspec +mkdir $OUT/$OSX_ARM64_RELEASE/Data +mkdir $OUT/$OSX_ARM64_RELEASE/keystore +cp Data/static-nodes.json $OUT/$OSX_ARM64_RELEASE/Data + mv $OUT/$LIN_RELEASE $RELEASE_DIRECTORY mv $OUT/$OSX_RELEASE $RELEASE_DIRECTORY mv $OUT/$WIN_RELEASE $RELEASE_DIRECTORY mv $OUT/$LIN_ARM64_RELEASE $RELEASE_DIRECTORY +mv $OUT/$OSX_ARM64_RELEASE $RELEASE_DIRECTORY rm -rf $OUT diff --git a/scripts/deployment/publish-downloads.sh b/scripts/deployment/publish-downloads.sh index b6c64ca90ad..dd00d2cefb2 100755 --- a/scripts/deployment/publish-downloads.sh +++ b/scripts/deployment/publish-downloads.sh @@ -12,6 +12,7 @@ cd $LIN_RELEASE && LIN_FILE="$(basename nethermind-linux-amd64-*)" && cd .. cd $OSX_RELEASE && OSX_FILE="$(basename nethermind-darwin-amd64-*)" && cd .. cd $WIN_RELEASE && WIN_FILE="$(basename nethermind-windows-amd64-*)" && cd .. cd $LIN_ARM64_RELEASE && LIN_ARM64_FILE="$(basename nethermind-linux-arm64-*)" && cd .. +cd $OSX_ARM64_RELEASE && OSX_ARM64_FILE="$(basename nethermind-linux-arm64-*)" && cd .. echo ======================================================= echo Signing files with gpg @@ -29,6 +30,9 @@ cd .. cd $LIN_ARM64_RELEASE gpg --batch --detach-sign --passphrase=$PASS --pinentry-mode loopback --armor $LIN_ARM64_FILE cd .. +cd $OSX_ARM64_RELEASE +gpg --batch --detach-sign --passphrase=$PASS --pinentry-mode loopback --armor $OSX_ARM64_FILE +cd .. echo ======================================================= echo Files have been successfully signed @@ -69,6 +73,14 @@ mv $LIN_ARM64_FILE.asc $filename_lin_arm64.$extension.asc curl -# -F "files=@${PWD}/${filename_lin_arm64}.${extension}" -F "files=@${PWD}/${filename_lin_arm64}.${extension}.asc" https://downloads.nethermind.io/files?apikey=$DOWNLOADS_PAGE cd .. +cd $OSX_ARM64_RELEASE +filename_osx_arm64=${OSX_ARM64_FILE::-13} + +mv $OSX_ARM64_FILE $filename_osx_arm64.$extension +mv $OSX_ARM64_FILE.asc $filename_osx_arm64.$extension.asc +curl -# -F "files=@${PWD}/${filename_osx_arm64}.${extension}" -F "files=@${PWD}/${filename_osx_arm64}.${extension}.asc" https://downloads.nethermind.io/files?apikey=$DOWNLOADS_PAGE +cd .. + echo ======================================================= echo Files have been successfully uploaded to Downloads page echo ======================================================= \ No newline at end of file diff --git a/scripts/deployment/publish-github.sh b/scripts/deployment/publish-github.sh index ad0d7fb5709..52c2b74ac10 100755 --- a/scripts/deployment/publish-github.sh +++ b/scripts/deployment/publish-github.sh @@ -20,6 +20,7 @@ cd $LIN_RELEASE && PUB_LIN_FILE="$(basename nethermind-linux-amd64-*)" && cd .. cd $OSX_RELEASE && PUB_OSX_FILE="$(basename nethermind-darwin-amd64-*)" && cd .. cd $WIN_RELEASE && PUB_WIN_FILE="$(basename nethermind-windows-amd64-*)" && cd .. cd $LIN_ARM64_RELEASE && PUB_LIN_ARM64_FILE="$(basename nethermind-linux-arm64-*)" && cd .. +cd $OSX_ARM64_RELEASE && PUB_OSX_ARM64_FILE="$(basename nethermind-darwin-arm64-*)" && cd .. if [[ ! -z $GIT_SHORT_TAG ]] && [[ $GIT_SHORT_TAG =~ ^$GIT_SHORT_TAG_FIRST3\d* ]] && [[ $STATUS != 200 ]]; then @@ -54,21 +55,12 @@ echo Uploading Darwin release echo ====================================================== ./nethermind/scripts/deployment/upload-github-release-asset.sh github_api_token=$GITHUB_TOKEN owner=$GH_OWNER repo=$GH_REPO tag=$GIT_SHORT_TAG filename=$RELEASE_DIRECTORY/$OSX_RELEASE/$PUB_OSX_FILE +./nethermind/scripts/deployment/upload-github-release-asset.sh github_api_token=$GITHUB_TOKEN owner=$GH_OWNER repo=$GH_REPO tag=$GIT_SHORT_TAG filename=$RELEASE_DIRECTORY/$OSX_ARM64_RELEASE/$PUB_OSX_ARM64_FILE echo ======================================================= echo Finished uploading Darwin release echo ======================================================= -echo ======================================================= -echo Uploading plugins package -echo ======================================================= - -./nethermind/scripts/deployment/upload-github-release-asset.sh github_api_token=$GITHUB_TOKEN owner=$GH_OWNER repo=$GH_REPO tag=$GIT_SHORT_TAG filename=$RELEASE_DIRECTORY/plugins/$PUB_PLUGINS_FILE - -echo ======================================================= -echo Finished uploading plugins package -echo ======================================================= - echo ======================================================= echo Packages have been successfully published on $RELEASE_URL echo ======================================================= diff --git a/scripts/deployment/setup-packages.sh b/scripts/deployment/setup-packages.sh index 1665b577180..afecda4ff9f 100755 --- a/scripts/deployment/setup-packages.sh +++ b/scripts/deployment/setup-packages.sh @@ -12,7 +12,7 @@ mkdir $LIN_RELEASE mkdir $OSX_RELEASE mkdir $WIN_RELEASE mkdir $LIN_ARM64_RELEASE - +mkdir $OSX_ARM64_RELEASE echo ======================================================= echo Creating git-hash and git-tag files diff --git a/scripts/dev-setup.sh b/scripts/dev-setup.sh index 7c8188fdb5c..47aac3393a6 100644 --- a/scripts/dev-setup.sh +++ b/scripts/dev-setup.sh @@ -10,7 +10,7 @@ sudo dpkg -i packages-microsoft-prod.deb sudo apt-get update; \ sudo apt-get install -y apt-transport-https && \ sudo apt-get update && \ - sudo apt-get install -y dotnet-sdk-5.0 + sudo apt-get install -y dotnet-sdk-6.0 sudo apt-get install -y jq libsnappy-dev libc6-dev libc6 moreutils echo ======================================================= diff --git a/scripts/e2e-build-docker.sh b/scripts/e2e-build-docker.sh deleted file mode 100644 index 8135ac09b12..00000000000 --- a/scripts/e2e-build-docker.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -docker build -t nethermind . && docker build -t nethermind-e2e -f Dockerfile.e2e . \ No newline at end of file diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh deleted file mode 100644 index 6135a82f8e7..00000000000 --- a/scripts/entrypoint.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -set -e - -chown nethermind:nethermind /data -cp -npr /nethermind/configs /nethermind/Data/static-nodes.json /data - -exec gosu nethermind:nethermind /nethermind/Nethermind.Runner \ - --Init.BaseDbPath=/data/database \ - --configsDirectory=/data/configs \ - --KeyStore.KeyStoreDirectory=/data/keystore \ - --Init.LogDirectory=/data/logs \ - --Init.StaticNodesPath=/data/static-nodes.json \ - "$@" \ No newline at end of file diff --git a/scripts/execution.sh b/scripts/execution.sh deleted file mode 100644 index d0c3778c35c..00000000000 --- a/scripts/execution.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -sudo chown -R $(whoami) /usr/share/nethermind -opts=$@ -if [ ${#opts} -gt 0 ] -then - echo 'Executing Nethermind Runner' - sudo /usr/share/nethermind/Nethermind.Runner $@ -else - echo 'Executing Nethermind Launcher' - sudo /usr/share/nethermind/Nethermind.Launcher -fi diff --git a/scripts/nethermind.service b/scripts/nethermind.service index f2a017d0006..5671c0907dc 100644 --- a/scripts/nethermind.service +++ b/scripts/nethermind.service @@ -6,26 +6,7 @@ After=network.target [Service] User=nethermind Group=nethermind -LockPersonality=true -NoNewPrivileges=true -ProtectSystem=strict -ProtectClock=true -PrivateDevices=true -ProtectControlGroups=true -ProtectHostname=true -ProtectKernelModules=true -ProtectKernelLogs=true -ProtectKernelTunables=true -RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_PACKET AF_UNIX -RestrictNamespaces=true -RestrictSUIDSGID=true -RestrictRealtime=true -RemoveIPC=true -SystemCallArchitectures=native -PrivateTmp=true -CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SETUID CAP_SETGID CAP_SETPCAP CAP_NET_ADMIN CAP_CHOWN CAP_FSETID CAP_SETFCAP CAP_FOWNER CAP_IPC_OWNER CAP_DAC_OVERRIDE CAP_DAC_READ_SEARCH CAP_KILL CAP_SYS_BOOT -SystemCallFilter=~@clock @debug @module @mount @raw-io @reboot @privileged @obsolete -EnvironmentFile=/home/nethermind/data/.env +EnvironmentFile=/home/nethermind/.env WorkingDirectory=/home/nethermind ExecStart=/home/nethermind/build/Nethermind.Runner --datadir /home/nethermind/data Restart=on-failure diff --git a/scripts/releasing/dockers.sh b/scripts/releasing/dockers.sh deleted file mode 100644 index 7145d554343..00000000000 --- a/scripts/releasing/dockers.sh +++ /dev/null @@ -1,9 +0,0 @@ -cd ~/repo_pub/nethermind -TAG="$(git describe --tags --always | cut -d- -f1)" -PAT_GITHUB="{{ Place for GitHub Token }}" -echo $TAG - -# Sending dispatch event to GitHub Actions -curl -s -X POST -u $PAT_GITHUB -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" --data '{"event_type":"docker_amd64", "client_payload": { "tag":"'"$TAG"'"}}' https://api.github.com/repos/nethermindeth/nethermind/dispatches -curl -s -X POST -u $PAT_GITHUB -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" --data '{"event_type":"docker_arm64", "client_payload": { "tag":"'"$TAG"'"}}' https://api.github.com/repos/nethermindeth/nethermind/dispatches -curl -s -X POST -u $PAT_GITHUB -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" --data '{"event_type":"docker_arm32", "client_payload": { "tag":"'"$TAG"'"}}' https://api.github.com/repos/nethermindeth/nethermind/dispatches \ No newline at end of file diff --git a/scripts/releasing/release.sh b/scripts/releasing/release.sh deleted file mode 100644 index ae2882f312b..00000000000 --- a/scripts/releasing/release.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/bash -echo "=====================================" -echo "Launching Release Process" -echo "=====================================" -START=`date +%s` -DOCKER_IMAGE="nethermind/nethermind" -WEBHOOK_URL="{{ Place for Slack WebHook }}" - -function send_message_to_slack () { - END=`date +%s` - RUNTIME=`date -d@$((END-START)) -u +%H:%M:%S` - STAGE=$(printf '{"blocks": [{"type": "section","text": {"type": "mrkdwn", "text": ":heavy_check_mark: `Stage %s/8. %s.`"}},{"type": "context","elements": [{"type": "mrkdwn","text": "Total time: %s"}]}]}' $1 "$2" $RUNTIME) - curl --data "$STAGE" $WEBHOOK_URL -} - -if [ "$1" != "" ]; then - echo "Running build from $1 branch..." - cd ~/repo_pub/ - # STAGE 1 - ./build-packages.sh $1 - send_message_to_slack "1" "Nethermind packages have been built" - - # STAGE 2 - ./publish-packages.sh - send_message_to_slack "2" "Nethermind packages have been published to GitHub" - - # STAGE 3 - ./publish-downloads.sh - send_message_to_slack "3" "Nethermind packages have been published to Downloads" - - # STAGE 4 - # Building & pushing docker images - cd ~ - ./dockers.sh $1 - send_message_to_slack "4" "Docker builds have been initiated on GitHub Actions" - - # STAGE 5 - # Finishing Nethermind repo part - send_message_to_slack "5" "Nethermind build process has been finished. Moving to NDM part" - - cd ~/repo_ndm/ - # STAGE 6 - ./build-packages.sh $1 - send_message_to_slack "6" "NDM packages have been built" - - # STAGE 7 - ./publish-downloads.sh - send_message_to_slack "7" "NDM packages have been published to Downloads" - - # STAGE 8 - # Finishing NDM repo part - send_message_to_slack "8" "Release build process has been finished" - - cd ~/repo_pub/nethermind - GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa_nethermind' git checkout master - cd ~/repo_ndm/ndm/src/nethermind - GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa_nethermind_ndm' git checkout master -else - echo "Running build from master branch..." - cd ~/repo_pub/ - # STAGE 1 - ./build-packages.sh - send_message_to_slack "1" "Nethermind packages have been built" - - # STAGE 2 - ./publish-packages.sh - send_message_to_slack "2" "Nethermind packages have been published to GitHub" - - # STAGE 3 - ./publish-downloads.sh - send_message_to_slack "3" "Nethermind packages have been published to Downloads" - - # STAGE 4 - # Building & pushing docker images - cd ~ - ./dockers.sh - send_message_to_slack "4" "Docker builds have been initiated on GitHub Actions" - - # STAGE 5 - # Finishing Nethermind repo part - send_message_to_slack "5" "Nethermind build process has been finished. Moving to NDM part" - - cd ~/repo_ndm/ - # STAGE 6 - ./build-packages.sh - send_message_to_slack "6" "NDM packages have been built" - - # STAGE 7 - ./publish-downloads.sh - send_message_to_slack "7" "NDM packages have been published to Downloads" - - # STAGE 8 - # Finishing NDM repo part - send_message_to_slack "8" "Release build process has been finished" -fi - -echo "=====================================" -echo "Release Process has been finished" -echo "=====================================" \ No newline at end of file diff --git a/src/Math.Gmp.Native b/src/Math.Gmp.Native index 7589e1c933e..d3111c523c0 160000 --- a/src/Math.Gmp.Native +++ b/src/Math.Gmp.Native @@ -1 +1 @@ -Subproject commit 7589e1c933ebf8aadb25b668366f9552077240ce +Subproject commit d3111c523c065ae2c900dbc9e49db65b824fae1b diff --git a/src/Nethermind/Ethereum.Abi.Test/Ethereum.Abi.Test.csproj b/src/Nethermind/Ethereum.Abi.Test/Ethereum.Abi.Test.csproj index 2e1a2290183..0b58ae81f32 100644 --- a/src/Nethermind/Ethereum.Abi.Test/Ethereum.Abi.Test.csproj +++ b/src/Nethermind/Ethereum.Abi.Test/Ethereum.Abi.Test.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 false @@ -16,10 +16,10 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - - + + diff --git a/src/Nethermind/Ethereum.Basic.Test/Ethereum.Basic.Test.csproj b/src/Nethermind/Ethereum.Basic.Test/Ethereum.Basic.Test.csproj index 3c50f754f7a..14259266d4d 100644 --- a/src/Nethermind/Ethereum.Basic.Test/Ethereum.Basic.Test.csproj +++ b/src/Nethermind/Ethereum.Basic.Test/Ethereum.Basic.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -25,9 +25,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Ethereum.Blockchain.Block.Legacy.Test/Ethereum.Blockchain.Block.Legacy.Test.csproj b/src/Nethermind/Ethereum.Blockchain.Block.Legacy.Test/Ethereum.Blockchain.Block.Legacy.Test.csproj index bd33e6ff7e0..54a9cb60753 100644 --- a/src/Nethermind/Ethereum.Blockchain.Block.Legacy.Test/Ethereum.Blockchain.Block.Legacy.Test.csproj +++ b/src/Nethermind/Ethereum.Blockchain.Block.Legacy.Test/Ethereum.Blockchain.Block.Legacy.Test.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 false @@ -12,14 +12,14 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + diff --git a/src/Nethermind/Ethereum.Blockchain.Block.Test/Ethereum.Blockchain.Block.Test.csproj b/src/Nethermind/Ethereum.Blockchain.Block.Test/Ethereum.Blockchain.Block.Test.csproj index 1e34f4ba1f0..322d71a8708 100644 --- a/src/Nethermind/Ethereum.Blockchain.Block.Test/Ethereum.Blockchain.Block.Test.csproj +++ b/src/Nethermind/Ethereum.Blockchain.Block.Test/Ethereum.Blockchain.Block.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -17,9 +17,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + %(RecursiveDir)%(FileName)%(Extension) PreserveNewest diff --git a/src/Nethermind/Ethereum.Blockchain.Legacy.Test/Ethereum.Blockchain.Legacy.Test.csproj b/src/Nethermind/Ethereum.Blockchain.Legacy.Test/Ethereum.Blockchain.Legacy.Test.csproj index 08eea6f4b66..078c568674b 100644 --- a/src/Nethermind/Ethereum.Blockchain.Legacy.Test/Ethereum.Blockchain.Legacy.Test.csproj +++ b/src/Nethermind/Ethereum.Blockchain.Legacy.Test/Ethereum.Blockchain.Legacy.Test.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 false @@ -12,14 +12,14 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/src/Nethermind/Ethereum.Blockchain.Test/Ethereum.Blockchain.Test.csproj b/src/Nethermind/Ethereum.Blockchain.Test/Ethereum.Blockchain.Test.csproj index 1c223a6f5ec..af23c54b18f 100644 --- a/src/Nethermind/Ethereum.Blockchain.Test/Ethereum.Blockchain.Test.csproj +++ b/src/Nethermind/Ethereum.Blockchain.Test/Ethereum.Blockchain.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -17,14 +17,14 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - + + + + - + - + diff --git a/src/Nethermind/Ethereum.Difficulty.Test/Ethereum.Difficulty.Test.csproj b/src/Nethermind/Ethereum.Difficulty.Test/Ethereum.Difficulty.Test.csproj index 7d2e34df583..991bb784810 100644 --- a/src/Nethermind/Ethereum.Difficulty.Test/Ethereum.Difficulty.Test.csproj +++ b/src/Nethermind/Ethereum.Difficulty.Test/Ethereum.Difficulty.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -17,9 +17,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Ethereum.HexPrefix.Test/Ethereum.HexPrefix.Test.csproj b/src/Nethermind/Ethereum.HexPrefix.Test/Ethereum.HexPrefix.Test.csproj index b7e66ee885b..d47876ea321 100644 --- a/src/Nethermind/Ethereum.HexPrefix.Test/Ethereum.HexPrefix.Test.csproj +++ b/src/Nethermind/Ethereum.HexPrefix.Test/Ethereum.HexPrefix.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -17,9 +17,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Ethereum.KeyAddress.Test/Ethereum.KeyAddress.Test.csproj b/src/Nethermind/Ethereum.KeyAddress.Test/Ethereum.KeyAddress.Test.csproj index c1e040dcedc..fa43a4d0f3b 100644 --- a/src/Nethermind/Ethereum.KeyAddress.Test/Ethereum.KeyAddress.Test.csproj +++ b/src/Nethermind/Ethereum.KeyAddress.Test/Ethereum.KeyAddress.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -17,9 +17,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Ethereum.PoW.Test/Ethereum.PoW.Test.csproj b/src/Nethermind/Ethereum.PoW.Test/Ethereum.PoW.Test.csproj index a12cada8937..9e414bda9da 100644 --- a/src/Nethermind/Ethereum.PoW.Test/Ethereum.PoW.Test.csproj +++ b/src/Nethermind/Ethereum.PoW.Test/Ethereum.PoW.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -17,9 +17,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + keyaddrtest.json diff --git a/src/Nethermind/Ethereum.Rlp.Test/Ethereum.Rlp.Test.csproj b/src/Nethermind/Ethereum.Rlp.Test/Ethereum.Rlp.Test.csproj index 10fe822820f..8bebdd44040 100644 --- a/src/Nethermind/Ethereum.Rlp.Test/Ethereum.Rlp.Test.csproj +++ b/src/Nethermind/Ethereum.Rlp.Test/Ethereum.Rlp.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -18,9 +18,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Ethereum.Test.Base/Ethereum.Test.Base.csproj b/src/Nethermind/Ethereum.Test.Base/Ethereum.Test.Base.csproj index 88d51c27ce0..7cd2b419caa 100644 --- a/src/Nethermind/Ethereum.Test.Base/Ethereum.Test.Base.csproj +++ b/src/Nethermind/Ethereum.Test.Base/Ethereum.Test.Base.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 9 annotations @@ -15,7 +15,7 @@ - + diff --git a/src/Nethermind/Ethereum.Transaction.Test/Ethereum.Transaction.Test.csproj b/src/Nethermind/Ethereum.Transaction.Test/Ethereum.Transaction.Test.csproj index ccd0d89e42b..99b320dbc84 100644 --- a/src/Nethermind/Ethereum.Transaction.Test/Ethereum.Transaction.Test.csproj +++ b/src/Nethermind/Ethereum.Transaction.Test/Ethereum.Transaction.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 9 @@ -13,9 +13,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Ethereum.Transition.Test/Ethereum.Transition.Test.csproj b/src/Nethermind/Ethereum.Transition.Test/Ethereum.Transition.Test.csproj index 8bcfaec01cd..6194a70aaf1 100644 --- a/src/Nethermind/Ethereum.Transition.Test/Ethereum.Transition.Test.csproj +++ b/src/Nethermind/Ethereum.Transition.Test/Ethereum.Transition.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -13,10 +13,10 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Ethereum.Trie.Test/Ethereum.Trie.Test.csproj b/src/Nethermind/Ethereum.Trie.Test/Ethereum.Trie.Test.csproj index 734222ce51f..7ba7c9cb1e4 100644 --- a/src/Nethermind/Ethereum.Trie.Test/Ethereum.Trie.Test.csproj +++ b/src/Nethermind/Ethereum.Trie.Test/Ethereum.Trie.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -13,9 +13,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Ethereum.VM.Test/Ethereum.VM.Test.csproj b/src/Nethermind/Ethereum.VM.Test/Ethereum.VM.Test.csproj index 6df10b4dda8..a19bc8b0130 100644 --- a/src/Nethermind/Ethereum.VM.Test/Ethereum.VM.Test.csproj +++ b/src/Nethermind/Ethereum.VM.Test/Ethereum.VM.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -13,9 +13,9 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Ethereum2.Bls.Test/Ethereum2.Bls.Test.csproj b/src/Nethermind/Ethereum2.Bls.Test/Ethereum2.Bls.Test.csproj index 16ac7fa8354..9e01477093a 100644 --- a/src/Nethermind/Ethereum2.Bls.Test/Ethereum2.Bls.Test.csproj +++ b/src/Nethermind/Ethereum2.Bls.Test/Ethereum2.Bls.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false true enable diff --git a/src/Nethermind/Ethereum2.Ssz.Test/Ethereum2.Ssz.Test.csproj b/src/Nethermind/Ethereum2.Ssz.Test/Ethereum2.Ssz.Test.csproj index 82346fb1565..e8440edf6fa 100644 --- a/src/Nethermind/Ethereum2.Ssz.Test/Ethereum2.Ssz.Test.csproj +++ b/src/Nethermind/Ethereum2.Ssz.Test/Ethereum2.Ssz.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -11,7 +11,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Nethermind/Nethermind.Abi.Contracts/Nethermind.Abi.Contracts.csproj b/src/Nethermind/Nethermind.Abi.Contracts/Nethermind.Abi.Contracts.csproj index cbfa58153a8..4f444d8c8b9 100644 --- a/src/Nethermind/Nethermind.Abi.Contracts/Nethermind.Abi.Contracts.csproj +++ b/src/Nethermind/Nethermind.Abi.Contracts/Nethermind.Abi.Contracts.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 diff --git a/src/Nethermind/Nethermind.Abi.Test/Nethermind.Abi.Test.csproj b/src/Nethermind/Nethermind.Abi.Test/Nethermind.Abi.Test.csproj index 44795dedc72..a2dc3c9b2b9 100644 --- a/src/Nethermind/Nethermind.Abi.Test/Nethermind.Abi.Test.csproj +++ b/src/Nethermind/Nethermind.Abi.Test/Nethermind.Abi.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -14,16 +14,16 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - + + + - + diff --git a/src/Nethermind/Nethermind.Abi/Nethermind.Abi.csproj b/src/Nethermind/Nethermind.Abi/Nethermind.Abi.csproj index 5cf6627552a..ce008e5ebd1 100644 --- a/src/Nethermind/Nethermind.Abi/Nethermind.Abi.csproj +++ b/src/Nethermind/Nethermind.Abi/Nethermind.Abi.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 9 enable true diff --git a/src/Nethermind/Nethermind.Analytics/Nethermind.Analytics.csproj b/src/Nethermind/Nethermind.Analytics/Nethermind.Analytics.csproj index 1a7cf3e9119..0c3895dd6e5 100644 --- a/src/Nethermind/Nethermind.Analytics/Nethermind.Analytics.csproj +++ b/src/Nethermind/Nethermind.Analytics/Nethermind.Analytics.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 diff --git a/src/Nethermind/Nethermind.Api.Test/Nethermind.Api.Test.csproj b/src/Nethermind/Nethermind.Api.Test/Nethermind.Api.Test.csproj index 4aa549cd74f..3a14c3d4768 100644 --- a/src/Nethermind/Nethermind.Api.Test/Nethermind.Api.Test.csproj +++ b/src/Nethermind/Nethermind.Api.Test/Nethermind.Api.Test.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 false @@ -12,10 +12,10 @@ - + - - + + diff --git a/src/Nethermind/Nethermind.Api/Nethermind.Api.csproj b/src/Nethermind/Nethermind.Api/Nethermind.Api.csproj index b41b5ca5046..7ed3f324f5c 100644 --- a/src/Nethermind/Nethermind.Api/Nethermind.Api.csproj +++ b/src/Nethermind/Nethermind.Api/Nethermind.Api.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 strong.snk annotations diff --git a/src/Nethermind/Nethermind.AuRa.Test/Contract/ContractDataStoreTests.cs b/src/Nethermind/Nethermind.AuRa.Test/Contract/ContractDataStoreTests.cs index 513e855b108..75f425f7ef6 100644 --- a/src/Nethermind/Nethermind.AuRa.Test/Contract/ContractDataStoreTests.cs +++ b/src/Nethermind/Nethermind.AuRa.Test/Contract/ContractDataStoreTests.cs @@ -28,6 +28,7 @@ using Nethermind.Consensus.AuRa.Contracts.DataStore; using Nethermind.Core; using Nethermind.Core.Crypto; +using Nethermind.Core.Test; using Nethermind.Core.Test.Builders; using Nethermind.Logging; using NSubstitute; diff --git a/src/Nethermind/Nethermind.AuRa.Test/Contract/ReportingValidatorContractTests.cs b/src/Nethermind/Nethermind.AuRa.Test/Contract/ReportingValidatorContractTests.cs index 3608da028bb..fb91e110bcd 100644 --- a/src/Nethermind/Nethermind.AuRa.Test/Contract/ReportingValidatorContractTests.cs +++ b/src/Nethermind/Nethermind.AuRa.Test/Contract/ReportingValidatorContractTests.cs @@ -29,12 +29,19 @@ namespace Nethermind.AuRa.Test.Contract public class ReportingValidatorContractTests { [Test] - public void Should_generate_proper_transaction() + public void Should_generate_malicious_transaction() { ReportingValidatorContract contract = new(AbiEncoder.Instance, new Address("0x1000000000000000000000000000000000000001"), Substitute.For()); Transaction transaction = contract.ReportMalicious(new Address("0x75df42383afe6bf5194aa8fa0e9b3d5f9e869441"), 10, new byte[0]); transaction.Data.ToHexString().Should().Be("c476dd4000000000000000000000000075df42383afe6bf5194aa8fa0e9b3d5f9e869441000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000"); - + } + + [Test] + public void Should_generate_benign_transaction() + { + ReportingValidatorContract contract = new(AbiEncoder.Instance, new Address("0x1000000000000000000000000000000000000001"), Substitute.For()); + Transaction transaction = contract.ReportBenign(new Address("0x75df42383afe6bf5194aa8fa0e9b3d5f9e869441"), 10); + transaction.Data.ToHexString().Should().Be("d69f13bb00000000000000000000000075df42383afe6bf5194aa8fa0e9b3d5f9e869441000000000000000000000000000000000000000000000000000000000000000a"); } } } diff --git a/src/Nethermind/Nethermind.AuRa.Test/Contract/TxPriorityContractTests.cs b/src/Nethermind/Nethermind.AuRa.Test/Contract/TxPriorityContractTests.cs index 88b4d899c83..b20361bcf45 100644 --- a/src/Nethermind/Nethermind.AuRa.Test/Contract/TxPriorityContractTests.cs +++ b/src/Nethermind/Nethermind.AuRa.Test/Contract/TxPriorityContractTests.cs @@ -102,15 +102,15 @@ public async Task using TxPermissionContractBlockchainWithBlocks chain = await TestContractBlockchain.ForTest(); IEnumerable priorities = chain.TxPriorityContract.Priorities.GetAllItemsFromBlock(chain.BlockTree.Head.Header); IEnumerable prioritiesInContract = chain.Priorities.GetItemsFromContractAtBlock(chain.BlockTree.Head.Header); - object[] expected = + TxPriorityContract.Destination[] expected = { - new TxPriorityContract.Destination(TestItem.AddressB, FnSignature, 3, TxPriorityContract.DestinationSource.Contract, 2), - new TxPriorityContract.Destination(TestItem.AddressA, FnSignature2, 1, TxPriorityContract.DestinationSource.Contract, 1), - new TxPriorityContract.Destination(TestItem.AddressB, FnSignature2, 4, TxPriorityContract.DestinationSource.Contract, 1), + new(TestItem.AddressB, FnSignature, 3, TxPriorityContract.DestinationSource.Contract, 2), + new(TestItem.AddressA, FnSignature2, 1, TxPriorityContract.DestinationSource.Contract, 1), + new(TestItem.AddressB, FnSignature2, 4, TxPriorityContract.DestinationSource.Contract, 1), }; priorities.Should().BeEquivalentTo(expected, o => o.ComparingByMembers() - .Excluding(su => su.SelectedMemberPath.EndsWith("BlockNumber"))); + .Excluding(su => su.BlockNumber)); prioritiesInContract.Should().BeEquivalentTo(expected, o => o.ComparingByMembers()); } @@ -121,14 +121,14 @@ public async Task mingas_should_return_correctly() using TxPermissionContractBlockchainWithBlocks chain = await TestContractBlockchain.ForTest(); IEnumerable minGasPrices = chain.TxPriorityContract.MinGasPrices.GetAllItemsFromBlock(chain.BlockTree.Head.Header); IEnumerable minGasPricesInContract = chain.MinGasPrices.GetItemsFromContractAtBlock(chain.BlockTree.Head.Header); - object[] expected = + TxPriorityContract.Destination[] expected = { - new TxPriorityContract.Destination(TestItem.AddressB, FnSignature2, 4, TxPriorityContract.DestinationSource.Contract, 1), - new TxPriorityContract.Destination(TestItem.AddressB, FnSignature, 2, TxPriorityContract.DestinationSource.Contract, 2), + new(TestItem.AddressB, FnSignature2, 4, TxPriorityContract.DestinationSource.Contract, 1), + new(TestItem.AddressB, FnSignature, 2, TxPriorityContract.DestinationSource.Contract, 2), }; minGasPrices.Should().BeEquivalentTo(expected, o => o.ComparingByMembers() - .Excluding(su => su.SelectedMemberPath.EndsWith("BlockNumber"))); + .Excluding(su => su.BlockNumber)); minGasPricesInContract.Should().BeEquivalentTo(expected, o => o.ComparingByMembers()); } diff --git a/src/Nethermind/Nethermind.AuRa.Test/Nethermind.AuRa.Test.csproj b/src/Nethermind/Nethermind.AuRa.Test/Nethermind.AuRa.Test.csproj index 7fd8d0c652a..9130363692f 100644 --- a/src/Nethermind/Nethermind.AuRa.Test/Nethermind.AuRa.Test.csproj +++ b/src/Nethermind/Nethermind.AuRa.Test/Nethermind.AuRa.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -14,15 +14,15 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + - - + + diff --git a/src/Nethermind/Nethermind.AuRa.Test/Reward/AuRaRewardCalculatorTests.cs b/src/Nethermind/Nethermind.AuRa.Test/Reward/AuRaRewardCalculatorTests.cs index e87e4229005..9b7115f03b3 100644 --- a/src/Nethermind/Nethermind.AuRa.Test/Reward/AuRaRewardCalculatorTests.cs +++ b/src/Nethermind/Nethermind.AuRa.Test/Reward/AuRaRewardCalculatorTests.cs @@ -23,6 +23,7 @@ using Nethermind.Blockchain.Rewards; using Nethermind.Consensus.AuRa.Rewards; using Nethermind.Core; +using Nethermind.Core.Test; using Nethermind.Specs.ChainSpecStyle; using Nethermind.Core.Test.Builders; using Nethermind.Evm; diff --git a/src/Nethermind/Nethermind.AuRa.Test/Reward/StaticRewardCalculatorTests.cs b/src/Nethermind/Nethermind.AuRa.Test/Reward/StaticRewardCalculatorTests.cs index 8a90f5f2db4..ea89461c69c 100644 --- a/src/Nethermind/Nethermind.AuRa.Test/Reward/StaticRewardCalculatorTests.cs +++ b/src/Nethermind/Nethermind.AuRa.Test/Reward/StaticRewardCalculatorTests.cs @@ -20,6 +20,7 @@ using Nethermind.Blockchain.Rewards; using Nethermind.Consensus.AuRa.Rewards; using Nethermind.Core; +using Nethermind.Core.Test; using Nethermind.Core.Test.Builders; using Nethermind.Int256; using NUnit.Framework; diff --git a/src/Nethermind/Nethermind.Baseline.Benchmark/Nethermind.Baseline.Benchmark.csproj b/src/Nethermind/Nethermind.Baseline.Benchmark/Nethermind.Baseline.Benchmark.csproj index fc6ab8b890b..01cd9aa4cb3 100644 --- a/src/Nethermind/Nethermind.Baseline.Benchmark/Nethermind.Baseline.Benchmark.csproj +++ b/src/Nethermind/Nethermind.Baseline.Benchmark/Nethermind.Baseline.Benchmark.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/src/Nethermind/Nethermind.Baseline.Plugin/Nethermind.Baseline.Plugin.csproj b/src/Nethermind/Nethermind.Baseline.Plugin/Nethermind.Baseline.Plugin.csproj index ff9f9d88226..46bb6a6fe74 100644 --- a/src/Nethermind/Nethermind.Baseline.Plugin/Nethermind.Baseline.Plugin.csproj +++ b/src/Nethermind/Nethermind.Baseline.Plugin/Nethermind.Baseline.Plugin.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Nethermind.Plugin.Baseline diff --git a/src/Nethermind/Nethermind.Baseline.Test/Nethermind.Baseline.Test.csproj b/src/Nethermind/Nethermind.Baseline.Test/Nethermind.Baseline.Test.csproj index 743a195f8e3..d5264e93e9a 100644 --- a/src/Nethermind/Nethermind.Baseline.Test/Nethermind.Baseline.Test.csproj +++ b/src/Nethermind/Nethermind.Baseline.Test/Nethermind.Baseline.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -15,11 +15,11 @@ - + - - + + diff --git a/src/Nethermind/Nethermind.Baseline/Nethermind.Baseline.csproj b/src/Nethermind/Nethermind.Baseline/Nethermind.Baseline.csproj index b3172bd81c9..df75a7a902b 100644 --- a/src/Nethermind/Nethermind.Baseline/Nethermind.Baseline.csproj +++ b/src/Nethermind/Nethermind.Baseline/Nethermind.Baseline.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0 latest enable diff --git a/src/Nethermind/Nethermind.BeaconNode.Eth1Bridge.Test/Nethermind.BeaconNode.Eth1Bridge.Test.csproj b/src/Nethermind/Nethermind.BeaconNode.Eth1Bridge.Test/Nethermind.BeaconNode.Eth1Bridge.Test.csproj index db3f26fc2f0..2f9cf1c484c 100644 --- a/src/Nethermind/Nethermind.BeaconNode.Eth1Bridge.Test/Nethermind.BeaconNode.Eth1Bridge.Test.csproj +++ b/src/Nethermind/Nethermind.BeaconNode.Eth1Bridge.Test/Nethermind.BeaconNode.Eth1Bridge.Test.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Nethermind Eth2.0 blockchain sgryphon Copyright © 2019 Demerzel Solutions Limited @@ -21,14 +21,14 @@ - - - - - + + + + + - + diff --git a/src/Nethermind/Nethermind.BeaconNode.Eth1Bridge/Nethermind.BeaconNode.Eth1Bridge.csproj b/src/Nethermind/Nethermind.BeaconNode.Eth1Bridge/Nethermind.BeaconNode.Eth1Bridge.csproj index 75335042db2..dfce1842d31 100644 --- a/src/Nethermind/Nethermind.BeaconNode.Eth1Bridge/Nethermind.BeaconNode.Eth1Bridge.csproj +++ b/src/Nethermind/Nethermind.BeaconNode.Eth1Bridge/Nethermind.BeaconNode.Eth1Bridge.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Nethermind Eth2.0 blockchain sgryphon Copyright © 2019 Demerzel Solutions Limited @@ -11,9 +11,9 @@ - - - + + + diff --git a/src/Nethermind/Nethermind.BeaconNode.Host/Nethermind.BeaconNode.Host.csproj b/src/Nethermind/Nethermind.BeaconNode.Host/Nethermind.BeaconNode.Host.csproj index 7df5ca69472..1709c06f0f6 100644 --- a/src/Nethermind/Nethermind.BeaconNode.Host/Nethermind.BeaconNode.Host.csproj +++ b/src/Nethermind/Nethermind.BeaconNode.Host/Nethermind.BeaconNode.Host.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Exe true dotnet-Nethermind.BeaconNode.Host-376091C2-AFFA-41D5-A229-A31991A2A89F @@ -14,8 +14,8 @@ - - + + diff --git a/src/Nethermind/Nethermind.BeaconNode.OApi/Nethermind.BeaconNode.OApi.csproj b/src/Nethermind/Nethermind.BeaconNode.OApi/Nethermind.BeaconNode.OApi.csproj index 0f95fbff674..c9a9cb4edeb 100644 --- a/src/Nethermind/Nethermind.BeaconNode.OApi/Nethermind.BeaconNode.OApi.csproj +++ b/src/Nethermind/Nethermind.BeaconNode.OApi/Nethermind.BeaconNode.OApi.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Nethermind Eth2.0 blockchain sgryphon Copyright © 2019 Demerzel Solutions Limited @@ -15,10 +15,10 @@ - - - - + + + + diff --git a/src/Nethermind/Nethermind.BeaconNode.OApiClient.Test/Nethermind.BeaconNode.OApiClient.Test.csproj b/src/Nethermind/Nethermind.BeaconNode.OApiClient.Test/Nethermind.BeaconNode.OApiClient.Test.csproj index eac8ea06420..08463b5221f 100644 --- a/src/Nethermind/Nethermind.BeaconNode.OApiClient.Test/Nethermind.BeaconNode.OApiClient.Test.csproj +++ b/src/Nethermind/Nethermind.BeaconNode.OApiClient.Test/Nethermind.BeaconNode.OApiClient.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Nethermind Eth2.0 blockchain sgryphon Copyright © 2019 Demerzel Solutions Limited @@ -21,9 +21,9 @@ - - - + + + diff --git a/src/Nethermind/Nethermind.BeaconNode.OApiClient/Nethermind.BeaconNode.OApiClient.csproj b/src/Nethermind/Nethermind.BeaconNode.OApiClient/Nethermind.BeaconNode.OApiClient.csproj index 9517c3f72f3..e714940db3d 100644 --- a/src/Nethermind/Nethermind.BeaconNode.OApiClient/Nethermind.BeaconNode.OApiClient.csproj +++ b/src/Nethermind/Nethermind.BeaconNode.OApiClient/Nethermind.BeaconNode.OApiClient.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 Nethermind Eth2.0 blockchain sgryphon Copyright © 2019 Demerzel Solutions Limited @@ -10,9 +10,9 @@ - - - + + + diff --git a/src/Nethermind/Nethermind.BeaconNode.Peering.Test/Nethermind.BeaconNode.Peering.Test.csproj b/src/Nethermind/Nethermind.BeaconNode.Peering.Test/Nethermind.BeaconNode.Peering.Test.csproj index 8fc4073158f..091968b390d 100644 --- a/src/Nethermind/Nethermind.BeaconNode.Peering.Test/Nethermind.BeaconNode.Peering.Test.csproj +++ b/src/Nethermind/Nethermind.BeaconNode.Peering.Test/Nethermind.BeaconNode.Peering.Test.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 false @@ -9,12 +9,12 @@ - - + + - + diff --git a/src/Nethermind/Nethermind.BeaconNode.Peering/Nethermind.BeaconNode.Peering.csproj b/src/Nethermind/Nethermind.BeaconNode.Peering/Nethermind.BeaconNode.Peering.csproj index 3f6b155895b..9c5600bbf9f 100644 --- a/src/Nethermind/Nethermind.BeaconNode.Peering/Nethermind.BeaconNode.Peering.csproj +++ b/src/Nethermind/Nethermind.BeaconNode.Peering/Nethermind.BeaconNode.Peering.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Nethermind Eth2.0 blockchain sgryphon Copyright © 2019 Demerzel Solutions Limited @@ -20,9 +20,9 @@ - - - + + + diff --git a/src/Nethermind/Nethermind.BeaconNode.Storage/Nethermind.BeaconNode.Storage.csproj b/src/Nethermind/Nethermind.BeaconNode.Storage/Nethermind.BeaconNode.Storage.csproj index 81129d13e2d..dd37d5514fa 100644 --- a/src/Nethermind/Nethermind.BeaconNode.Storage/Nethermind.BeaconNode.Storage.csproj +++ b/src/Nethermind/Nethermind.BeaconNode.Storage/Nethermind.BeaconNode.Storage.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Nethermind Eth2.0 blockchain sgryphon Copyright © 2019 Demerzel Solutions Limited @@ -19,8 +19,8 @@ - - + + diff --git a/src/Nethermind/Nethermind.BeaconNode.Test/Nethermind.BeaconNode.Test.csproj b/src/Nethermind/Nethermind.BeaconNode.Test/Nethermind.BeaconNode.Test.csproj index c373dd764ca..98d5a3821df 100644 --- a/src/Nethermind/Nethermind.BeaconNode.Test/Nethermind.BeaconNode.Test.csproj +++ b/src/Nethermind/Nethermind.BeaconNode.Test/Nethermind.BeaconNode.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Nethermind Eth2.0 blockchain sgryphon Copyright © 2019 Demerzel Solutions Limited @@ -12,9 +12,9 @@ - - - + + + diff --git a/src/Nethermind/Nethermind.BeaconNode/Nethermind.BeaconNode.csproj b/src/Nethermind/Nethermind.BeaconNode/Nethermind.BeaconNode.csproj index 2bc2ae7f656..9d3b459500e 100644 --- a/src/Nethermind/Nethermind.BeaconNode/Nethermind.BeaconNode.csproj +++ b/src/Nethermind/Nethermind.BeaconNode/Nethermind.BeaconNode.csproj @@ -9,17 +9,17 @@ - - - - - - + + + + + + - net5.0 + net6.0 Nethermind Eth2.0 blockchain sgryphon Copyright © 2019 Demerzel Solutions Limited diff --git a/src/Nethermind/Nethermind.Benchmark.Helpers/Nethermind.Benchmark.Helpers.csproj b/src/Nethermind/Nethermind.Benchmark.Helpers/Nethermind.Benchmark.Helpers.csproj index dc8d576d718..70fd3d09530 100644 --- a/src/Nethermind/Nethermind.Benchmark.Helpers/Nethermind.Benchmark.Helpers.csproj +++ b/src/Nethermind/Nethermind.Benchmark.Helpers/Nethermind.Benchmark.Helpers.csproj @@ -1,12 +1,12 @@ - net5.0 + net6.0 - - + + diff --git a/src/Nethermind/Nethermind.Benchmark.Runner/Nethermind.Benchmark.Runner.csproj b/src/Nethermind/Nethermind.Benchmark.Runner/Nethermind.Benchmark.Runner.csproj index 4dba537da01..06b8ef96324 100644 --- a/src/Nethermind/Nethermind.Benchmark.Runner/Nethermind.Benchmark.Runner.csproj +++ b/src/Nethermind/Nethermind.Benchmark.Runner/Nethermind.Benchmark.Runner.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/src/Nethermind/Nethermind.Benchmark/Nethermind.Benchmark.csproj b/src/Nethermind/Nethermind.Benchmark/Nethermind.Benchmark.csproj index 51c2a9c9b64..8af0d9547e3 100644 --- a/src/Nethermind/Nethermind.Benchmark/Nethermind.Benchmark.csproj +++ b/src/Nethermind/Nethermind.Benchmark/Nethermind.Benchmark.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 8.0 true Nethermind.Benchmarks diff --git a/src/Nethermind/Nethermind.Blockchain.Test.Runner/Nethermind.Blockchain.Test.Runner.csproj b/src/Nethermind/Nethermind.Blockchain.Test.Runner/Nethermind.Blockchain.Test.Runner.csproj index a4334389907..5c52aa4b5ce 100644 --- a/src/Nethermind/Nethermind.Blockchain.Test.Runner/Nethermind.Blockchain.Test.Runner.csproj +++ b/src/Nethermind/Nethermind.Blockchain.Test.Runner/Nethermind.Blockchain.Test.Runner.csproj @@ -1,7 +1,7 @@  Exe - net5.0 + net6.0 8.0 diff --git a/src/Nethermind/Nethermind.Blockchain.Test/Nethermind.Blockchain.Test.csproj b/src/Nethermind/Nethermind.Blockchain.Test/Nethermind.Blockchain.Test.csproj index 7290d21f90f..bfd6533e5bf 100644 --- a/src/Nethermind/Nethermind.Blockchain.Test/Nethermind.Blockchain.Test.csproj +++ b/src/Nethermind/Nethermind.Blockchain.Test/Nethermind.Blockchain.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 9 @@ -9,15 +9,15 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Nethermind.Blockchain.Test/Producers/BuildBlocksOnlyWhenNotProcessingTests.cs b/src/Nethermind/Nethermind.Blockchain.Test/Producers/BuildBlocksOnlyWhenNotProcessingTests.cs index aadb6c942c7..08799dfe288 100644 --- a/src/Nethermind/Nethermind.Blockchain.Test/Producers/BuildBlocksOnlyWhenNotProcessingTests.cs +++ b/src/Nethermind/Nethermind.Blockchain.Test/Producers/BuildBlocksOnlyWhenNotProcessingTests.cs @@ -47,7 +47,7 @@ public async Task should_trigger_block_production_when_queue_empties() { Context context = new(); context.BlockProcessingQueue.IsEmpty.Returns(false); - Task buildTask = context.MainBlockProductionTrigger.BuildBlock(); + Task buildTask = context.MainBlockProductionTrigger.BuildBlock(); await Task.Delay(BuildBlocksOnlyWhenNotProcessing.ChainNotYetProcessedMillisecondsDelay * 2); buildTask.IsCanceled.Should().BeFalse(); @@ -64,7 +64,7 @@ public async Task should_cancel_triggering_block_production() Context context = new(); context.BlockProcessingQueue.IsEmpty.Returns(false); using CancellationTokenSource cancellationTokenSource = new(); - Task buildTask = context.MainBlockProductionTrigger.BuildBlock(cancellationToken: cancellationTokenSource.Token); + Task buildTask = context.MainBlockProductionTrigger.BuildBlock(cancellationToken: cancellationTokenSource.Token); await Task.Delay(BuildBlocksOnlyWhenNotProcessing.ChainNotYetProcessedMillisecondsDelay * 2); buildTask.IsCanceled.Should().BeFalse(); @@ -90,7 +90,7 @@ public Context() public Block DefaultBlock { get; } public int TriggeredCount { get; private set; } - private void OnTriggerBlockProduction(object? sender, BlockProductionEventArgs e) + private void OnTriggerBlockProduction(object sender, BlockProductionEventArgs e) { TriggeredCount++; e.BlockProductionTask = Task.FromResult(DefaultBlock); diff --git a/src/Nethermind/Nethermind.Blockchain.Test/TransactionSelectorTests.cs b/src/Nethermind/Nethermind.Blockchain.Test/TransactionSelectorTests.cs index 4e7fc2d0121..338236ca1ec 100644 --- a/src/Nethermind/Nethermind.Blockchain.Test/TransactionSelectorTests.cs +++ b/src/Nethermind/Nethermind.Blockchain.Test/TransactionSelectorTests.cs @@ -203,7 +203,7 @@ void SetAccountStates(IEnumerable
missingAddresses) new(specProvider, blockTree); IComparer defaultComparer = transactionComparerProvider.GetDefaultComparer(); IComparer comparer = CompareTxByNonce.Instance.ThenBy(defaultComparer); - Dictionary transactions = testCase.Transactions + Dictionary transactions = testCase.Transactions .Where(t => t?.SenderAddress != null) .GroupBy(t => t.SenderAddress) .ToDictionary( diff --git a/src/Nethermind/Nethermind.Blockchain/Nethermind.Blockchain.csproj b/src/Nethermind/Nethermind.Blockchain/Nethermind.Blockchain.csproj index f9b18d95ad9..9339b799f52 100644 --- a/src/Nethermind/Nethermind.Blockchain/Nethermind.Blockchain.csproj +++ b/src/Nethermind/Nethermind.Blockchain/Nethermind.Blockchain.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 true 9 true @@ -23,7 +23,7 @@ - - + + \ No newline at end of file diff --git a/src/Nethermind/Nethermind.Cli.Test/Nethermind.Cli.Test.csproj b/src/Nethermind/Nethermind.Cli.Test/Nethermind.Cli.Test.csproj index 568833eb77b..b57ad205b15 100644 --- a/src/Nethermind/Nethermind.Cli.Test/Nethermind.Cli.Test.csproj +++ b/src/Nethermind/Nethermind.Cli.Test/Nethermind.Cli.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -12,13 +12,13 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/src/Nethermind/Nethermind.Cli/Converters/BigIntegerTypeConverter.cs b/src/Nethermind/Nethermind.Cli/Converters/BigIntegerTypeConverter.cs index aa9db46770e..5ff59c78f08 100644 --- a/src/Nethermind/Nethermind.Cli/Converters/BigIntegerTypeConverter.cs +++ b/src/Nethermind/Nethermind.Cli/Converters/BigIntegerTypeConverter.cs @@ -23,15 +23,15 @@ namespace Nethermind.Cli.Converters { public class BigIntegerTypeConverter : TypeConverter { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) => + public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType) => sourceType == typeof(double) || sourceType == typeof(decimal) || sourceType == typeof(float) || base.CanConvertFrom(context, sourceType); - public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) => destinationType == typeof(BigInteger); + public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destinationType) => destinationType == typeof(BigInteger); - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + public override object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value) { return value switch { diff --git a/src/Nethermind/Nethermind.Cli/Modules/EthCliModule.cs b/src/Nethermind/Nethermind.Cli/Modules/EthCliModule.cs index fd631c5a3f9..2b8ad14cf9c 100644 --- a/src/Nethermind/Nethermind.Cli/Modules/EthCliModule.cs +++ b/src/Nethermind/Nethermind.Cli/Modules/EthCliModule.cs @@ -235,7 +235,7 @@ public long NewPendingTransactionFilter() [CliFunction("eth", "feeHistory")] public JsValue FeeHistory(int blockCount, string newestBlock, double[]? rewardPercentiles = null) { - return NodeManager.PostJint("eth_feeHistory", blockCount, newestBlock, rewardPercentiles).Result; + return NodeManager.PostJint("eth_feeHistory", blockCount, newestBlock, rewardPercentiles!).Result; } [CliFunction("eth", "gasPrice")] diff --git a/src/Nethermind/Nethermind.Cli/Modules/NodeCliModule.cs b/src/Nethermind/Nethermind.Cli/Modules/NodeCliModule.cs index 68f0bf2e5ea..85abc89193d 100644 --- a/src/Nethermind/Nethermind.Cli/Modules/NodeCliModule.cs +++ b/src/Nethermind/Nethermind.Cli/Modules/NodeCliModule.cs @@ -68,7 +68,7 @@ public string SwitchLocal(string uri) [CliProperty("node", "address")] public string Address() { - return new Enode(Enode()).Address.ToString(); + return new Enode(Enode() ?? string.Empty).Address.ToString(); } [CliProperty("node", "enode")] diff --git a/src/Nethermind/Nethermind.Cli/Nethermind.Cli.csproj b/src/Nethermind/Nethermind.Cli/Nethermind.Cli.csproj index dccbe7fcd9c..250554f98ca 100644 --- a/src/Nethermind/Nethermind.Cli/Nethermind.Cli.csproj +++ b/src/Nethermind/Nethermind.Cli/Nethermind.Cli.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 true Exe Nethermind CLI diff --git a/src/Nethermind/Nethermind.Clique.Test/Nethermind.Clique.Test.csproj b/src/Nethermind/Nethermind.Clique.Test/Nethermind.Clique.Test.csproj index a5e6788f7c6..36d0e9d59eb 100644 --- a/src/Nethermind/Nethermind.Clique.Test/Nethermind.Clique.Test.csproj +++ b/src/Nethermind/Nethermind.Clique.Test/Nethermind.Clique.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -14,13 +14,13 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Nethermind.Config.Test/Nethermind.Config.Test.csproj b/src/Nethermind/Nethermind.Config.Test/Nethermind.Config.Test.csproj index f134d00864b..e48fa966846 100644 --- a/src/Nethermind/Nethermind.Config.Test/Nethermind.Config.Test.csproj +++ b/src/Nethermind/Nethermind.Config.Test/Nethermind.Config.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -11,16 +11,16 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - + + + - + diff --git a/src/Nethermind/Nethermind.Config/Nethermind.Config.csproj b/src/Nethermind/Nethermind.Config/Nethermind.Config.csproj index 57c48a173ad..bac5530bb60 100644 --- a/src/Nethermind/Nethermind.Config/Nethermind.Config.csproj +++ b/src/Nethermind/Nethermind.Config/Nethermind.Config.csproj @@ -1,13 +1,13 @@  - net5.0 + net6.0 9 true true - - + + diff --git a/src/Nethermind/Nethermind.Consensus.AuRa/InitializationSteps/StartBlockProducerAuRa.cs b/src/Nethermind/Nethermind.Consensus.AuRa/InitializationSteps/StartBlockProducerAuRa.cs index aad47673540..6e95c9c6164 100644 --- a/src/Nethermind/Nethermind.Consensus.AuRa/InitializationSteps/StartBlockProducerAuRa.cs +++ b/src/Nethermind/Nethermind.Consensus.AuRa/InitializationSteps/StartBlockProducerAuRa.cs @@ -45,7 +45,7 @@ namespace Nethermind.Consensus.AuRa.InitializationSteps { public class StartBlockProducerAuRa { - private new readonly AuRaNethermindApi _api; + private readonly AuRaNethermindApi _api; private BlockProducerEnv? _blockProducerContext; private INethermindApi NethermindApi => _api; diff --git a/src/Nethermind/Nethermind.Consensus.AuRa/Nethermind.Consensus.AuRa.csproj b/src/Nethermind/Nethermind.Consensus.AuRa/Nethermind.Consensus.AuRa.csproj index f5a35198594..1eb34cebe7e 100644 --- a/src/Nethermind/Nethermind.Consensus.AuRa/Nethermind.Consensus.AuRa.csproj +++ b/src/Nethermind/Nethermind.Consensus.AuRa/Nethermind.Consensus.AuRa.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 annotations @@ -16,7 +16,7 @@ - + diff --git a/src/Nethermind/Nethermind.Consensus.Clique/Nethermind.Consensus.Clique.csproj b/src/Nethermind/Nethermind.Consensus.Clique/Nethermind.Consensus.Clique.csproj index 15306ccf1a0..227343bacbb 100644 --- a/src/Nethermind/Nethermind.Consensus.Clique/Nethermind.Consensus.Clique.csproj +++ b/src/Nethermind/Nethermind.Consensus.Clique/Nethermind.Consensus.Clique.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 9 annotations diff --git a/src/Nethermind/Nethermind.Consensus.Ethash/Nethermind.Consensus.Ethash.csproj b/src/Nethermind/Nethermind.Consensus.Ethash/Nethermind.Consensus.Ethash.csproj index ad95547c4cd..6bbcefa64f0 100644 --- a/src/Nethermind/Nethermind.Consensus.Ethash/Nethermind.Consensus.Ethash.csproj +++ b/src/Nethermind/Nethermind.Consensus.Ethash/Nethermind.Consensus.Ethash.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 9 Library diff --git a/src/Nethermind/Nethermind.Consensus.Test/Nethermind.Consensus.Test.csproj b/src/Nethermind/Nethermind.Consensus.Test/Nethermind.Consensus.Test.csproj index 9948a510570..9f43a4501c3 100644 --- a/src/Nethermind/Nethermind.Consensus.Test/Nethermind.Consensus.Test.csproj +++ b/src/Nethermind/Nethermind.Consensus.Test/Nethermind.Consensus.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 @@ -9,16 +9,16 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - + + + - + diff --git a/src/Nethermind/Nethermind.Consensus/Nethermind.Consensus.csproj b/src/Nethermind/Nethermind.Consensus/Nethermind.Consensus.csproj index bae1db26fbe..7737a3e3847 100644 --- a/src/Nethermind/Nethermind.Consensus/Nethermind.Consensus.csproj +++ b/src/Nethermind/Nethermind.Consensus/Nethermind.Consensus.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 true true annotations diff --git a/src/Nethermind/Nethermind.Core.Cryptography.Test/Nethermind.Core.Cryptography.Test.csproj b/src/Nethermind/Nethermind.Core.Cryptography.Test/Nethermind.Core.Cryptography.Test.csproj index 0a9081b35b1..b62c7899eea 100644 --- a/src/Nethermind/Nethermind.Core.Cryptography.Test/Nethermind.Core.Cryptography.Test.csproj +++ b/src/Nethermind/Nethermind.Core.Cryptography.Test/Nethermind.Core.Cryptography.Test.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 false @@ -10,7 +10,7 @@ - + diff --git a/src/Nethermind/Nethermind.Core.Test/AddressTests.cs b/src/Nethermind/Nethermind.Core.Test/AddressTests.cs index b9ee713ac2d..d8c931cd466 100644 --- a/src/Nethermind/Nethermind.Core.Test/AddressTests.cs +++ b/src/Nethermind/Nethermind.Core.Test/AddressTests.cs @@ -102,7 +102,7 @@ public void Equals_operator_works() Assert.False(addressA == addressB); Assert.False(addressA == null); Assert.False(null == addressA); - Assert.True((Address)null == null); + Assert.True((Address?)null == null); } [Test] @@ -119,7 +119,7 @@ public void Not_equals_operator_works() Assert.True(addressA != addressB); Assert.True(addressA != null); Assert.True(null != addressA); - Assert.False((Address)null != null); + Assert.False((Address?)null != null); } [Test] diff --git a/src/Nethermind/Nethermind.Core.Test/BlockHeaderTests.cs b/src/Nethermind/Nethermind.Core.Test/BlockHeaderTests.cs index a795d759668..e3f5c0bd2ca 100644 --- a/src/Nethermind/Nethermind.Core.Test/BlockHeaderTests.cs +++ b/src/Nethermind/Nethermind.Core.Test/BlockHeaderTests.cs @@ -160,7 +160,7 @@ public void Eip_1559_CalculateBaseFee_shared_test_cases((BaseFeeTestCases Info, public static IEnumerable<(BaseFeeTestCases, string)> TestCaseSource() { string testCases = File.ReadAllText("TestFiles/BaseFeeTestCases.json"); - BaseFeeTestCases[] deserializedTestCases = JsonConvert.DeserializeObject(testCases); + BaseFeeTestCases[] deserializedTestCases = JsonConvert.DeserializeObject(testCases) ?? Array.Empty(); for (int i = 0; i < deserializedTestCases.Length; ++i) { diff --git a/src/Nethermind/Nethermind.Core.Test/Blockchain/TestBlockchain.cs b/src/Nethermind/Nethermind.Core.Test/Blockchain/TestBlockchain.cs index ea2b477b543..181950a5f49 100644 --- a/src/Nethermind/Nethermind.Core.Test/Blockchain/TestBlockchain.cs +++ b/src/Nethermind/Nethermind.Core.Test/Blockchain/TestBlockchain.cs @@ -145,7 +145,7 @@ protected virtual async Task Build(ISpecProvider? specProvider = IDb blockInfoDb = new MemDb(); BlockTree = new BlockTree(blockDb, headerDb, blockInfoDb, new ChainLevelInfoRepository(blockInfoDb), SpecProvider, NullBloomStorage.Instance, LimboLogs.Instance); ReadOnlyState = new ChainHeadReadOnlyStateProvider(BlockTree, StateReader); - TransactionComparerProvider = new TransactionComparerProvider(specProvider, BlockTree); + TransactionComparerProvider = new TransactionComparerProvider(SpecProvider, BlockTree); TxPool = CreateTxPool(); ReceiptStorage = new InMemoryReceiptStorage(); diff --git a/src/Nethermind/Nethermind.Core.Test/Builders/BlockBuilder.cs b/src/Nethermind/Nethermind.Core.Test/Builders/BlockBuilder.cs index fc485333540..d3ef6addd0d 100644 --- a/src/Nethermind/Nethermind.Core.Test/Builders/BlockBuilder.cs +++ b/src/Nethermind/Nethermind.Core.Test/Builders/BlockBuilder.cs @@ -194,7 +194,7 @@ public BlockBuilder WithBloom(Bloom bloom) return this; } - public BlockBuilder WithAura(long step, byte[] signature = null) + public BlockBuilder WithAura(long step, byte[]? signature = null) { TestObjectInternal.Header.AuRaStep = step; TestObjectInternal.Header.AuRaSignature = signature; diff --git a/src/Nethermind/Nethermind.Core.Test/Builders/BlockHeaderBuilder.cs b/src/Nethermind/Nethermind.Core.Test/Builders/BlockHeaderBuilder.cs index bcb7b592a22..cd3541ef7e7 100644 --- a/src/Nethermind/Nethermind.Core.Test/Builders/BlockHeaderBuilder.cs +++ b/src/Nethermind/Nethermind.Core.Test/Builders/BlockHeaderBuilder.cs @@ -177,7 +177,7 @@ public BlockHeaderBuilder WithNonce(ulong nonce) return this; } - public BlockHeaderBuilder WithAura(long step, byte[] signature = null) + public BlockHeaderBuilder WithAura(long step, byte[]? signature = null) { TestObjectInternal.AuRaStep = step; TestObjectInternal.AuRaSignature = signature; diff --git a/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeBuilder.cs b/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeBuilder.cs index 45b1a0308d9..234a963ed28 100644 --- a/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeBuilder.cs +++ b/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeBuilder.cs @@ -40,7 +40,10 @@ namespace Nethermind.Core.Test.Builders public class BlockTreeBuilder : BuilderBase { private readonly Block _genesisBlock; - private IReceiptStorage _receiptStorage; + private IReceiptStorage? _receiptStorage; + private ISpecProvider? _specProvider; + private IEthereumEcdsa? _ecdsa; + private Func>? _logCreationFunction; private bool _onlyHeaders; @@ -85,10 +88,6 @@ public BlockTreeBuilder OfChainLength(int chainLength, int splitVariant = 0, int return this; } - private ISpecProvider _specProvider; - private IEthereumEcdsa _ecdsa; - private Func> _logCreationFunction; - public BlockTreeBuilder OfChainLength(out Block headBlock, int chainLength, int splitVariant = 0, int splitFrom = 0, params Address[] blockBeneficiaries) { Block current = _genesisBlock; @@ -252,7 +251,7 @@ public static void ExtendTree(IBlockTree blockTree, long newChainLength) } } - public BlockTreeBuilder WithTransactions(IReceiptStorage receiptStorage, ISpecProvider specProvider, Func> logsForBlockBuilder = null) + public BlockTreeBuilder WithTransactions(IReceiptStorage receiptStorage, ISpecProvider specProvider, Func>? logsForBlockBuilder = null) { _specProvider = specProvider; _ecdsa = new EthereumEcdsa(specProvider.ChainId, LimboLogs.Instance); diff --git a/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeExtensions.cs b/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeExtensions.cs index 4376b3d160f..96179571f3b 100644 --- a/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeExtensions.cs +++ b/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeExtensions.cs @@ -48,16 +48,16 @@ public static void AddBranch(this BlockTree blockTree, int branchLength, int spl public static void AddBranch(this BlockTree blockTree, int branchLength, int splitBlockNumber, int splitVariant) { - BlockTree alternative = Build.A.BlockTree(blockTree.FindBlock(0, BlockTreeLookupOptions.RequireCanonical)).OfChainLength(branchLength, splitVariant).TestObject; + BlockTree alternative = Build.A.BlockTree(blockTree.FindBlock(0, BlockTreeLookupOptions.RequireCanonical)!).OfChainLength(branchLength, splitVariant).TestObject; List blocks = new(); for (int i = splitBlockNumber + 1; i < branchLength; i++) { - Block block = alternative.FindBlock(i, BlockTreeLookupOptions.RequireCanonical); + Block block = alternative.FindBlock(i, BlockTreeLookupOptions.RequireCanonical)!; blockTree.SuggestBlock(block); blocks.Add(block); } - if (branchLength > blockTree.Head.Number) + if (branchLength > blockTree.Head!.Number) { blockTree.UpdateMainChain(blocks.ToArray(), true); } diff --git a/src/Nethermind/Nethermind.Core.Test/Builders/TestObject.cs b/src/Nethermind/Nethermind.Core.Test/Builders/TestObject.cs index 032126be3e3..a13463137a3 100644 --- a/src/Nethermind/Nethermind.Core.Test/Builders/TestObject.cs +++ b/src/Nethermind/Nethermind.Core.Test/Builders/TestObject.cs @@ -98,14 +98,14 @@ public static Keccak KeccakFromNumber(int i) public static Bloom NonZeroBloom; - public static Address GetRandomAddress(Random random = null) + public static Address GetRandomAddress(Random? random = null) { byte[] bytes = new byte[20]; (random ?? _random).NextBytes(bytes); return new Address(bytes); } - public static Keccak GetRandomKeccak(Random random = null) + public static Keccak GetRandomKeccak(Random? random = null) { byte[] bytes = new byte[32]; (random ?? _random).NextBytes(bytes); diff --git a/src/Nethermind/Nethermind.Core.Test/BytesTests.cs b/src/Nethermind/Nethermind.Core.Test/BytesTests.cs index 977bbd7c23b..53133de49da 100644 --- a/src/Nethermind/Nethermind.Core.Test/BytesTests.cs +++ b/src/Nethermind/Nethermind.Core.Test/BytesTests.cs @@ -36,11 +36,11 @@ public class BytesTests [TestCase("0x01", "0x01", 0)] [TestCase("0x01", "0x0102", 1)] [TestCase("0x0102", "0x01", -1)] - public void Compares_bytes_properly(string hexString1, string hexString2, int expectedResult) + public void Compares_bytes_properly(string? hexString1, string? hexString2, int expectedResult) { IComparer comparer = Bytes.Comparer; - byte[] x = hexString1 == null ? null : Bytes.FromHexString(hexString1); - byte[] y = hexString2 == null ? null : Bytes.FromHexString(hexString2); + byte[]? x = hexString1 == null ? null : Bytes.FromHexString(hexString1); + byte[]? y = hexString2 == null ? null : Bytes.FromHexString(hexString2); Assert.AreEqual(expectedResult, comparer.Compare(x, y)); } @@ -82,12 +82,12 @@ public void ToHexString(string input, string expectedResult, bool with0x, bool n [TestCase("0x01", "0x01", true)] [TestCase("0x01", "0x0102", false)] [TestCase("0x0102", "0x01", false)] - public void Compares_bytes_equality_properly(string hexString1, string hexString2, bool expectedResult) + public void Compares_bytes_equality_properly(string? hexString1, string? hexString2, bool expectedResult) { // interestingly, sequence equals that we have been using for some time returns 0x == null, null == 0x IEqualityComparer comparer = Bytes.EqualityComparer; - byte[] x = hexString1 == null ? null : Bytes.FromHexString(hexString1); - byte[] y = hexString2 == null ? null : Bytes.FromHexString(hexString2); + byte[]? x = hexString1 == null ? null : Bytes.FromHexString(hexString1); + byte[]? y = hexString2 == null ? null : Bytes.FromHexString(hexString2); Assert.AreEqual(expectedResult, comparer.Equals(x, y)); } @@ -95,8 +95,8 @@ public void Compares_bytes_equality_properly(string hexString1, string hexString public void Stream_hex_works() { byte[] bytes = new byte[] {15, 16, 255}; - StreamWriter sw = null; - StreamReader sr = null; + StreamWriter? sw = null; + StreamReader? sr = null; try { @@ -127,7 +127,7 @@ public void Reversal() if (System.Runtime.Intrinsics.X86.Avx2.IsSupported) { byte[] bytes = Bytes.FromHexString("0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"); - byte[] before = bytes.Clone() as byte[]; + byte[] before = (byte[])bytes.Clone(); Assert.AreEqual(32, bytes.Length); Bytes.Avx2Reverse256InPlace(bytes); diff --git a/src/Nethermind/Nethermind.Core.Test/Caching/LruCacheTests.cs b/src/Nethermind/Nethermind.Core.Test/Caching/LruCacheTests.cs index 8812599ca9b..accb3876f9f 100755 --- a/src/Nethermind/Nethermind.Core.Test/Caching/LruCacheTests.cs +++ b/src/Nethermind/Nethermind.Core.Test/Caching/LruCacheTests.cs @@ -29,7 +29,7 @@ public class LruCacheTests { private static ICache Create() { - return (ICache) Activator.CreateInstance(typeof(TCache), Capacity, "test"); + return (ICache) Activator.CreateInstance(typeof(TCache), Capacity, "test")!; } private const int Capacity = 16; @@ -56,7 +56,7 @@ public void At_capacity() cache.Set(_addresses[i], _accounts[i]); } - Account account = cache.Get(_addresses[Capacity - 1]); + Account? account = cache.Get(_addresses[Capacity - 1]); Assert.AreEqual(_accounts[Capacity - 1], account); } @@ -96,7 +96,7 @@ public void Beyond_capacity() cache.Set(_addresses[i], _accounts[i]); } - Account account = cache.Get(_addresses[Capacity]); + Account? account = cache.Get(_addresses[Capacity]); account.Should().Be(_accounts[Capacity]); } diff --git a/src/Nethermind/Nethermind.Core.Test/Crypto/EthereumEcdsaTests.cs b/src/Nethermind/Nethermind.Core.Test/Crypto/EthereumEcdsaTests.cs index 4eae4ef3172..82a3df16f65 100644 --- a/src/Nethermind/Nethermind.Core.Test/Crypto/EthereumEcdsaTests.cs +++ b/src/Nethermind/Nethermind.Core.Test/Crypto/EthereumEcdsaTests.cs @@ -51,7 +51,7 @@ public void Signature_test_ropsten(bool eip155) PrivateKey key = Build.A.PrivateKey.TestObject; Transaction tx = Build.A.Transaction.TestObject; ecdsa.Sign(key, tx, eip155); - Address address = ecdsa.RecoverAddress(tx); + Address? address = ecdsa.RecoverAddress(tx); Assert.AreEqual(key.Address, address); } @@ -62,7 +62,7 @@ public void Test_eip155_for_the_first_ropsten_transaction() Assert.AreEqual(new Keccak("0x5fd225549ed5c587c843e04578bdd4240fc0d7ab61f8e9faa37e84ec8dc8766d"), tx.Hash, "hash"); EthereumEcdsa ecdsa = new(ChainId.Ropsten, LimboLogs.Instance); - Address from = ecdsa.RecoverAddress(tx); + Address? from = ecdsa.RecoverAddress(tx); Assert.AreEqual(new Address("0x874b54a8bd152966d63f706bae1ffeb0411921e5"), from, "from"); } @@ -74,7 +74,7 @@ public void Signature_test_olympic(bool isEip155Enabled) PrivateKey key = Build.A.PrivateKey.TestObject; Transaction tx = Build.A.Transaction.TestObject; ecdsa.Sign(key, tx, isEip155Enabled); - Address address = ecdsa.RecoverAddress(tx); + Address? address = ecdsa.RecoverAddress(tx); Assert.AreEqual(key.Address, address); } @@ -85,7 +85,7 @@ public void Sign_goerli() PrivateKey key = Build.A.PrivateKey.TestObject; Transaction tx = Build.A.Transaction.TestObject; ecdsa.Sign(key, tx, true); - Address address = ecdsa.RecoverAddress(tx); + Address? address = ecdsa.RecoverAddress(tx); Assert.AreEqual(key.Address, address); } @@ -98,7 +98,7 @@ public void Recover_kovan([Values(false, true)] bool eip155) singEcdsa.Sign(key, tx, eip155); EthereumEcdsa recoverEcdsa = new(ChainId.Kovan, LimboLogs.Instance); - Address address = recoverEcdsa.RecoverAddress(tx, true); + Address? address = recoverEcdsa.RecoverAddress(tx, true); Assert.AreEqual(key.Address, address); } } diff --git a/src/Nethermind/Nethermind.Core.Test/Encoding/TxDecoderTests.cs b/src/Nethermind/Nethermind.Core.Test/Encoding/TxDecoderTests.cs index b99c99757d8..749605f30e1 100644 --- a/src/Nethermind/Nethermind.Core.Test/Encoding/TxDecoderTests.cs +++ b/src/Nethermind/Nethermind.Core.Test/Encoding/TxDecoderTests.cs @@ -82,7 +82,7 @@ public void Roundtrip((Transaction Tx, string Description) testCase) RlpStream rlpStream = new(10000); _txDecoder.Encode(rlpStream, testCase.Tx); rlpStream.Position = 0; - Transaction decoded = _txDecoder.Decode(rlpStream); + Transaction? decoded = _txDecoder.Decode(rlpStream); decoded!.SenderAddress = new EthereumEcdsa(ChainId.Mainnet, LimboLogs.Instance).RecoverAddress(decoded); decoded.Hash = decoded.CalculateHash(); decoded.Should().BeEquivalentTo(testCase.Tx, testCase.Description); @@ -97,7 +97,7 @@ public void Roundtrip_ValueDecoderContext((Transaction Tx, string Description) t Span spanIncomingTxRlp = rlpStream.Data.AsSpan(); Rlp.ValueDecoderContext decoderContext = new(spanIncomingTxRlp); rlpStream.Position = 0; - Transaction decoded = _txDecoder.Decode(ref decoderContext); + Transaction? decoded = _txDecoder.Decode(ref decoderContext); decoded!.SenderAddress = new EthereumEcdsa(ChainId.Mainnet, LimboLogs.Instance).RecoverAddress(decoded); decoded.Hash = decoded.CalculateHash(); decoded.Should().BeEquivalentTo(testCase.Tx, testCase.Description); diff --git a/src/Nethermind/Nethermind.Core.Test/FluentAssertionsExtensions.cs b/src/Nethermind/Nethermind.Core.Test/FluentAssertionsExtensions.cs new file mode 100644 index 00000000000..cde209225b0 --- /dev/null +++ b/src/Nethermind/Nethermind.Core.Test/FluentAssertionsExtensions.cs @@ -0,0 +1,73 @@ +// Copyright (c) 2021 Demerzel Solutions Limited +// This file is part of the Nethermind library. +// +// The Nethermind library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The Nethermind library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the Nethermind. If not, see . +// + +using System.Collections.Generic; +using FluentAssertions; +using FluentAssertions.Collections; + +namespace Nethermind.Core.Test +{ + public static class FluentAssertionsExtensions + { + /// + /// Asserts that a collection of objects is equivalent to another collection of objects. + /// + /// + /// Objects within the collections are equivalent when both object graphs have equally named properties with the same + /// value, irrespective of the type of those objects. Two properties are also equal if one type can be converted to another + /// and the result is equal. + /// The type of a collection property is ignored as long as the collection implements and all + /// items in the collection are structurally equal. + /// Notice that actual behavior is determined by the global defaults managed by . + /// + /// Assertion + /// An with the expected elements. + /// + /// A formatted phrase as is supported by explaining why the assertion + /// is needed. If the phrase does not start with the word because, it is prepended automatically. + /// + /// + /// Zero or more objects to format using the placeholders in . + /// + public static AndConstraint BeEquivalentTo( + this GenericCollectionAssertions assertions, + TExpectation expectation, + string because = "", + params object[] becauseArgs) + where TCollection : IEnumerable + where TAssertions : GenericCollectionAssertions => + assertions.BeEquivalentTo(new[] { expectation }, because, becauseArgs); + + /// + /// Asserts that a collection of objects is equivalent to another collection of objects. + /// + /// + /// Objects within the collections are equivalent when both object graphs have equally named properties with the same + /// value, irrespective of the type of those objects. Two properties are also equal if one type can be converted to another + /// and the result is equal. + /// The type of a collection property is ignored as long as the collection implements and all + /// items in the collection are structurally equal. + /// Notice that actual behavior is determined by the global defaults managed by . + /// + /// Assertion + /// An with the expected elements. + public static AndConstraint BeEquivalentTo(this GenericCollectionAssertions assertions, params TExpectation[] expectation) + where TCollection : IEnumerable + where TAssertions : GenericCollectionAssertions => + assertions.BeEquivalentTo(expectation); + } +} diff --git a/src/Nethermind/Nethermind.Core.Test/IO/TempPath.cs b/src/Nethermind/Nethermind.Core.Test/IO/TempPath.cs index e2bcff8dc3e..9e40d3d5059 100644 --- a/src/Nethermind/Nethermind.Core.Test/IO/TempPath.cs +++ b/src/Nethermind/Nethermind.Core.Test/IO/TempPath.cs @@ -35,7 +35,7 @@ public static TempPath GetTempFile(string subPath) => string.IsNullOrEmpty(subPa ? GetTempFile() : new TempPath(System.IO.Path.Combine(System.IO.Path.GetTempPath(), subPath)); - public static TempPath GetTempDirectory(string subPath = null) => + public static TempPath GetTempDirectory(string? subPath = null) => new(System.IO.Path.Combine(System.IO.Path.GetTempPath(), subPath ?? Guid.NewGuid().ToString())); public void Dispose() diff --git a/src/Nethermind/Nethermind.Core.Test/Keccak512Tests.cs b/src/Nethermind/Nethermind.Core.Test/Keccak512Tests.cs index 58d5c381fd5..ba1df06279d 100644 --- a/src/Nethermind/Nethermind.Core.Test/Keccak512Tests.cs +++ b/src/Nethermind/Nethermind.Core.Test/Keccak512Tests.cs @@ -32,14 +32,14 @@ public void Empty_string() [Test] public void Null_string() { - string result = Keccak512.Compute((string)null).ToString(); + string result = Keccak512.Compute((string?)null).ToString(); Assert.AreEqual(Keccak512.OfAnEmptyString.ToString(), result); } [Test] public void Null_bytes() { - string result = Keccak512.Compute((byte[])null).ToString(); + string result = Keccak512.Compute((byte[]?)null).ToString(); Assert.AreEqual(Keccak512.OfAnEmptyString.ToString(), result); } diff --git a/src/Nethermind/Nethermind.Core.Test/NUnitLogger.cs b/src/Nethermind/Nethermind.Core.Test/NUnitLogger.cs index 57e34dfda65..42df377fbe6 100644 --- a/src/Nethermind/Nethermind.Core.Test/NUnitLogger.cs +++ b/src/Nethermind/Nethermind.Core.Test/NUnitLogger.cs @@ -62,7 +62,7 @@ public void Trace(string text) } } - public void Error(string text, Exception ex = null) + public void Error(string text, Exception? ex = null) { if (IsError) { diff --git a/src/Nethermind/Nethermind.Core.Test/Nethermind.Core.Test.csproj b/src/Nethermind/Nethermind.Core.Test/Nethermind.Core.Test.csproj index 1ac61697044..07aa14b4cb2 100644 --- a/src/Nethermind/Nethermind.Core.Test/Nethermind.Core.Test.csproj +++ b/src/Nethermind/Nethermind.Core.Test/Nethermind.Core.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 9 true @@ -10,15 +10,15 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + - + @@ -38,7 +38,6 @@ - \ No newline at end of file diff --git a/src/Nethermind/Nethermind.Core.Test/TestLogger.cs b/src/Nethermind/Nethermind.Core.Test/TestLogger.cs index 0ff4df111d1..cee228da04f 100644 --- a/src/Nethermind/Nethermind.Core.Test/TestLogger.cs +++ b/src/Nethermind/Nethermind.Core.Test/TestLogger.cs @@ -44,7 +44,7 @@ public void Trace(string text) LogList.Add(text); } - public void Error(string text, Exception ex = null) + public void Error(string text, Exception? ex = null) { LogList.Add(text); } diff --git a/src/Nethermind/Nethermind.Core/Nethermind.Core.csproj b/src/Nethermind/Nethermind.Core/Nethermind.Core.csproj index 63869e17591..e2516237644 100644 --- a/src/Nethermind/Nethermind.Core/Nethermind.Core.csproj +++ b/src/Nethermind/Nethermind.Core/Nethermind.Core.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 true 9 enable diff --git a/src/Nethermind/Nethermind.Core2.Abstractions/Nethermind.Core2.Abstractions.csproj b/src/Nethermind/Nethermind.Core2.Abstractions/Nethermind.Core2.Abstractions.csproj index e90128d74e2..5ebcb107689 100644 --- a/src/Nethermind/Nethermind.Core2.Abstractions/Nethermind.Core2.Abstractions.csproj +++ b/src/Nethermind/Nethermind.Core2.Abstractions/Nethermind.Core2.Abstractions.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Nethermind Eth2.0 blockchain Copyright © 2019 Demerzel Solutions Limited 0.0.1 diff --git a/src/Nethermind/Nethermind.Core2.Configuration.Test/Nethermind.Core2.Configuration.Test.csproj b/src/Nethermind/Nethermind.Core2.Configuration.Test/Nethermind.Core2.Configuration.Test.csproj index c31c6bd9739..ab0d7d2255f 100644 --- a/src/Nethermind/Nethermind.Core2.Configuration.Test/Nethermind.Core2.Configuration.Test.csproj +++ b/src/Nethermind/Nethermind.Core2.Configuration.Test/Nethermind.Core2.Configuration.Test.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Nethermind Eth2.0 blockchain sgryphon Copyright © 2019 Demerzel Solutions Limited @@ -30,9 +30,9 @@ - - - + + + diff --git a/src/Nethermind/Nethermind.Core2.Configuration/Nethermind.Core2.Configuration.csproj b/src/Nethermind/Nethermind.Core2.Configuration/Nethermind.Core2.Configuration.csproj index 583a0afccfc..8e1dcbeb744 100644 --- a/src/Nethermind/Nethermind.Core2.Configuration/Nethermind.Core2.Configuration.csproj +++ b/src/Nethermind/Nethermind.Core2.Configuration/Nethermind.Core2.Configuration.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Nethermind sgryphon Copyright © 2019 Demerzel Solutions Limited @@ -11,11 +11,11 @@ - - - - - + + + + + diff --git a/src/Nethermind/Nethermind.Core2.Cryptography.Benchmark/Nethermind.Core2.Cryptography.Benchmark.csproj b/src/Nethermind/Nethermind.Core2.Cryptography.Benchmark/Nethermind.Core2.Cryptography.Benchmark.csproj index 9fc1eb8f937..1605a22d148 100644 --- a/src/Nethermind/Nethermind.Core2.Cryptography.Benchmark/Nethermind.Core2.Cryptography.Benchmark.csproj +++ b/src/Nethermind/Nethermind.Core2.Cryptography.Benchmark/Nethermind.Core2.Cryptography.Benchmark.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Exe diff --git a/src/Nethermind/Nethermind.Core2.Cryptography/Nethermind.Core2.Cryptography.csproj b/src/Nethermind/Nethermind.Core2.Cryptography/Nethermind.Core2.Cryptography.csproj index f9d3e59f6c8..eb2730ecc51 100644 --- a/src/Nethermind/Nethermind.Core2.Cryptography/Nethermind.Core2.Cryptography.csproj +++ b/src/Nethermind/Nethermind.Core2.Cryptography/Nethermind.Core2.Cryptography.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Nethermind Eth2.0 blockchain Copyright © 2019 Demerzel Solutions Limited 0.0.1 @@ -19,9 +19,9 @@ - - - + + + diff --git a/src/Nethermind/Nethermind.Core2.Json.Test/Nethermind.Core2.Json.Test.csproj b/src/Nethermind/Nethermind.Core2.Json.Test/Nethermind.Core2.Json.Test.csproj index 52b3a6a62f9..25adad35dce 100644 --- a/src/Nethermind/Nethermind.Core2.Json.Test/Nethermind.Core2.Json.Test.csproj +++ b/src/Nethermind/Nethermind.Core2.Json.Test/Nethermind.Core2.Json.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Nethermind Eth2.0 blockchain sgryphon Copyright © 2019 Demerzel Solutions Limited @@ -14,7 +14,7 @@ - + diff --git a/src/Nethermind/Nethermind.Core2.Json/Nethermind.Core2.Json.csproj b/src/Nethermind/Nethermind.Core2.Json/Nethermind.Core2.Json.csproj index e99bf184e8d..99608948447 100644 --- a/src/Nethermind/Nethermind.Core2.Json/Nethermind.Core2.Json.csproj +++ b/src/Nethermind/Nethermind.Core2.Json/Nethermind.Core2.Json.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Nethermind Eth2.0 blockchain sgryphon Copyright © 2019 Demerzel Solutions Limited diff --git a/src/Nethermind/Nethermind.Core2.Test/Nethermind.Core2.Test.csproj b/src/Nethermind/Nethermind.Core2.Test/Nethermind.Core2.Test.csproj index 83ecb85a93d..199d790c87c 100644 --- a/src/Nethermind/Nethermind.Core2.Test/Nethermind.Core2.Test.csproj +++ b/src/Nethermind/Nethermind.Core2.Test/Nethermind.Core2.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -11,7 +11,7 @@ - + diff --git a/src/Nethermind/Nethermind.Core2/Nethermind.Core2.csproj b/src/Nethermind/Nethermind.Core2/Nethermind.Core2.csproj index 7f1775bb784..fd3c3999beb 100644 --- a/src/Nethermind/Nethermind.Core2/Nethermind.Core2.csproj +++ b/src/Nethermind/Nethermind.Core2/Nethermind.Core2.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 true enable diff --git a/src/Nethermind/Nethermind.Crypto/CryptoRandom.cs b/src/Nethermind/Nethermind.Crypto/CryptoRandom.cs index ce734d08ba7..9a93a127975 100644 --- a/src/Nethermind/Nethermind.Crypto/CryptoRandom.cs +++ b/src/Nethermind/Nethermind.Crypto/CryptoRandom.cs @@ -23,7 +23,7 @@ namespace Nethermind.Crypto [RequiresSecurityReview("Analyze RNGCryptoServiceProvider quality and its behaviour on reuse")] public class CryptoRandom : ICryptoRandom { - private readonly RandomNumberGenerator _secureRandom = new RNGCryptoServiceProvider(); + private readonly RandomNumberGenerator _secureRandom = RandomNumberGenerator.Create(); private readonly Random _random = new(); public void GenerateRandomBytes(Span bytes) diff --git a/src/Nethermind/Nethermind.Crypto/Keccak512.cs b/src/Nethermind/Nethermind.Crypto/Keccak512.cs index 3cf75cf0257..a5244f87e8e 100644 --- a/src/Nethermind/Nethermind.Crypto/Keccak512.cs +++ b/src/Nethermind/Nethermind.Crypto/Keccak512.cs @@ -44,7 +44,7 @@ public Keccak512(byte[] bytes) /// public static Keccak512 Zero { get; } = new(new byte[Size]); - public byte[] Bytes { get; } + public byte[]? Bytes { get; } public override string ToString() { @@ -66,7 +66,7 @@ public static Keccak512 Compute(Rlp rlp) return InternalCompute(rlp.Bytes); } - public static Keccak512 Compute(byte[] input) + public static Keccak512 Compute(byte[]? input) { if (input is null || input.Length == 0) { @@ -76,7 +76,7 @@ public static Keccak512 Compute(byte[] input) return InternalCompute(input); } - [ThreadStatic] private static HashLib.Crypto.SHA3.Keccak512 _hash; + [ThreadStatic] private static HashLib.Crypto.SHA3.Keccak512? _hash; public static uint[] ComputeToUInts(byte[] input) { @@ -138,7 +138,7 @@ private static Keccak512 InternalCompute(byte[] input) return new Keccak512(_hash.ComputeBytes(input).GetBytes()); } - public static Keccak512 Compute(string input) + public static Keccak512 Compute(string? input) { if (string.IsNullOrWhiteSpace(input)) { diff --git a/src/Nethermind/Nethermind.Crypto/Nethermind.Crypto.csproj b/src/Nethermind/Nethermind.Crypto/Nethermind.Crypto.csproj index 23ee641604f..2503c4287d4 100644 --- a/src/Nethermind/Nethermind.Crypto/Nethermind.Crypto.csproj +++ b/src/Nethermind/Nethermind.Crypto/Nethermind.Crypto.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 true true true @@ -15,11 +15,11 @@ - - - - - + + + + + @@ -41,21 +41,6 @@ PreserveNewest - - - - - - - - ..\..\..\..\..\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\3.1.5\ref\netcoreapp3.1\Microsoft.AspNetCore.DataProtection.Abstractions.dll - - - ..\..\..\..\..\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\3.1.5\ref\netcoreapp3.1\Microsoft.AspNetCore.DataProtection.Extensions.dll - - - ..\Nethermind.Runner.Test\bin\Debug\netcoreapp3.1\System.Security.Cryptography.ProtectedData.dll - diff --git a/src/Nethermind/Nethermind.Cryptography.Bls.Test/Nethermind.Cryptography.Bls.Test.csproj b/src/Nethermind/Nethermind.Cryptography.Bls.Test/Nethermind.Cryptography.Bls.Test.csproj index de93f55efe9..ad0689a9444 100644 --- a/src/Nethermind/Nethermind.Cryptography.Bls.Test/Nethermind.Cryptography.Bls.Test.csproj +++ b/src/Nethermind/Nethermind.Cryptography.Bls.Test/Nethermind.Cryptography.Bls.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Nethermind Eth2.0 blockchain Copyright © 2019 Demerzel Solutions Limited sgryphon @@ -13,7 +13,7 @@ - + diff --git a/src/Nethermind/Nethermind.DataMarketplace.Channels.Grpc/Nethermind.DataMarketplace.Channels.Grpc.csproj b/src/Nethermind/Nethermind.DataMarketplace.Channels.Grpc/Nethermind.DataMarketplace.Channels.Grpc.csproj index e2351185acc..a16a87f5e27 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Channels.Grpc/Nethermind.DataMarketplace.Channels.Grpc.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Channels.Grpc/Nethermind.DataMarketplace.Channels.Grpc.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 8.0 enable diff --git a/src/Nethermind/Nethermind.DataMarketplace.Channels.Test/Nethermind.DataMarketplace.Channels.Test.csproj b/src/Nethermind/Nethermind.DataMarketplace.Channels.Test/Nethermind.DataMarketplace.Channels.Test.csproj index 1bb92d5fb20..20292b123cd 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Channels.Test/Nethermind.DataMarketplace.Channels.Test.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Channels.Test/Nethermind.DataMarketplace.Channels.Test.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 false @@ -13,11 +13,11 @@ - + - - + + diff --git a/src/Nethermind/Nethermind.DataMarketplace.Channels/Nethermind.DataMarketplace.Channels.csproj b/src/Nethermind/Nethermind.DataMarketplace.Channels/Nethermind.DataMarketplace.Channels.csproj index 7cec1f8656d..19889484011 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Channels/Nethermind.DataMarketplace.Channels.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Channels/Nethermind.DataMarketplace.Channels.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 8.0 enable diff --git a/src/Nethermind/Nethermind.DataMarketplace.Cli/Nethermind.DataMarketplace.Cli.csproj b/src/Nethermind/Nethermind.DataMarketplace.Cli/Nethermind.DataMarketplace.Cli.csproj index 46df46cb90d..f32cc2c479c 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Cli/Nethermind.DataMarketplace.Cli.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Cli/Nethermind.DataMarketplace.Cli.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Nethermind.DataMarketplace.CLi diff --git a/src/Nethermind/Nethermind.DataMarketplace.Consumers.Infrastructure/Nethermind.DataMarketplace.Consumers.Infrastructure.csproj b/src/Nethermind/Nethermind.DataMarketplace.Consumers.Infrastructure/Nethermind.DataMarketplace.Consumers.Infrastructure.csproj index 3a0b517aaa3..02b1c865b94 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Consumers.Infrastructure/Nethermind.DataMarketplace.Consumers.Infrastructure.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Consumers.Infrastructure/Nethermind.DataMarketplace.Consumers.Infrastructure.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 9 enable diff --git a/src/Nethermind/Nethermind.DataMarketplace.Consumers.Test.EndToEnd/Nethermind.DataMarketplace.Consumers.Test.EndToEnd.csproj b/src/Nethermind/Nethermind.DataMarketplace.Consumers.Test.EndToEnd/Nethermind.DataMarketplace.Consumers.Test.EndToEnd.csproj index d0fefd2f901..11047087cb7 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Consumers.Test.EndToEnd/Nethermind.DataMarketplace.Consumers.Test.EndToEnd.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Consumers.Test.EndToEnd/Nethermind.DataMarketplace.Consumers.Test.EndToEnd.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/src/Nethermind/Nethermind.DataMarketplace.Consumers.Test/Nethermind.DataMarketplace.Consumers.Test.csproj b/src/Nethermind/Nethermind.DataMarketplace.Consumers.Test/Nethermind.DataMarketplace.Consumers.Test.csproj index fb2ddcc744d..05c428d2fdb 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Consumers.Test/Nethermind.DataMarketplace.Consumers.Test.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Consumers.Test/Nethermind.DataMarketplace.Consumers.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -15,12 +15,12 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + - + diff --git a/src/Nethermind/Nethermind.DataMarketplace.Consumers/Nethermind.DataMarketplace.Consumers.csproj b/src/Nethermind/Nethermind.DataMarketplace.Consumers/Nethermind.DataMarketplace.Consumers.csproj index f6cf6e88092..9edb7e73d33 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Consumers/Nethermind.DataMarketplace.Consumers.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Consumers/Nethermind.DataMarketplace.Consumers.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 8.0 enable diff --git a/src/Nethermind/Nethermind.DataMarketplace.Core/Nethermind.DataMarketplace.Core.csproj b/src/Nethermind/Nethermind.DataMarketplace.Core/Nethermind.DataMarketplace.Core.csproj index 2bfe6b9402b..ad00ade5a2b 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Core/Nethermind.DataMarketplace.Core.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Core/Nethermind.DataMarketplace.Core.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 8.0 enable diff --git a/src/Nethermind/Nethermind.DataMarketplace.Infrastructure.Test/Nethermind.DataMarketplace.Infrastructure.Test.csproj b/src/Nethermind/Nethermind.DataMarketplace.Infrastructure.Test/Nethermind.DataMarketplace.Infrastructure.Test.csproj index 93169fe08da..de1e9a1510a 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Infrastructure.Test/Nethermind.DataMarketplace.Infrastructure.Test.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Infrastructure.Test/Nethermind.DataMarketplace.Infrastructure.Test.csproj @@ -1,17 +1,17 @@  - net5.0 + net6.0 false - + - + diff --git a/src/Nethermind/Nethermind.DataMarketplace.Infrastructure/Nethermind.DataMarketplace.Infrastructure.csproj b/src/Nethermind/Nethermind.DataMarketplace.Infrastructure/Nethermind.DataMarketplace.Infrastructure.csproj index 284e7bed5a6..8bdc1576421 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Infrastructure/Nethermind.DataMarketplace.Infrastructure.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Infrastructure/Nethermind.DataMarketplace.Infrastructure.csproj @@ -1,18 +1,18 @@  - net5.0 + net6.0 9 enable - - - - - - + + + + + + diff --git a/src/Nethermind/Nethermind.DataMarketplace.Initializers/Nethermind.DataMarketplace.Initializers.csproj b/src/Nethermind/Nethermind.DataMarketplace.Initializers/Nethermind.DataMarketplace.Initializers.csproj index fe89eab2b23..0eb2f16df09 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Initializers/Nethermind.DataMarketplace.Initializers.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Initializers/Nethermind.DataMarketplace.Initializers.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 latest enable diff --git a/src/Nethermind/Nethermind.DataMarketplace.Integration.Test/Nethermind.DataMarketplace.Integration.Test.csproj b/src/Nethermind/Nethermind.DataMarketplace.Integration.Test/Nethermind.DataMarketplace.Integration.Test.csproj index 6b254116936..5f20918d2b9 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Integration.Test/Nethermind.DataMarketplace.Integration.Test.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Integration.Test/Nethermind.DataMarketplace.Integration.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -19,8 +19,8 @@ all - - + + diff --git a/src/Nethermind/Nethermind.DataMarketplace.Providers.Infrastructure.Tests/Nethermind.DataMarketplace.Providers.Infrastructure.Tests.csproj b/src/Nethermind/Nethermind.DataMarketplace.Providers.Infrastructure.Tests/Nethermind.DataMarketplace.Providers.Infrastructure.Tests.csproj index 0bec21aa41d..3913ac8a6c3 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Providers.Infrastructure.Tests/Nethermind.DataMarketplace.Providers.Infrastructure.Tests.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Providers.Infrastructure.Tests/Nethermind.DataMarketplace.Providers.Infrastructure.Tests.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -15,8 +15,8 @@ - - + + diff --git a/src/Nethermind/Nethermind.DataMarketplace.Providers.Infrastructure/Nethermind.DataMarketplace.Providers.Infrastructure.csproj b/src/Nethermind/Nethermind.DataMarketplace.Providers.Infrastructure/Nethermind.DataMarketplace.Providers.Infrastructure.csproj index 87d134d4a42..e0a1210031f 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Providers.Infrastructure/Nethermind.DataMarketplace.Providers.Infrastructure.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Providers.Infrastructure/Nethermind.DataMarketplace.Providers.Infrastructure.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 enable diff --git a/src/Nethermind/Nethermind.DataMarketplace.Providers.Plugins/Nethermind.DataMarketplace.Providers.Plugins.csproj b/src/Nethermind/Nethermind.DataMarketplace.Providers.Plugins/Nethermind.DataMarketplace.Providers.Plugins.csproj index 74245edc773..d5dcc2efd76 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Providers.Plugins/Nethermind.DataMarketplace.Providers.Plugins.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Providers.Plugins/Nethermind.DataMarketplace.Providers.Plugins.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 enable diff --git a/src/Nethermind/Nethermind.DataMarketplace.Providers.Test.EndToEnd/Nethermind.DataMarketplace.Providers.Test.EndToEnd.csproj b/src/Nethermind/Nethermind.DataMarketplace.Providers.Test.EndToEnd/Nethermind.DataMarketplace.Providers.Test.EndToEnd.csproj index 0dff9e0860e..ce0906337a5 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Providers.Test.EndToEnd/Nethermind.DataMarketplace.Providers.Test.EndToEnd.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Providers.Test.EndToEnd/Nethermind.DataMarketplace.Providers.Test.EndToEnd.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/src/Nethermind/Nethermind.DataMarketplace.Providers.Test/Nethermind.DataMarketplace.Providers.Test.csproj b/src/Nethermind/Nethermind.DataMarketplace.Providers.Test/Nethermind.DataMarketplace.Providers.Test.csproj index 49e77ff3177..9678d107a67 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Providers.Test/Nethermind.DataMarketplace.Providers.Test.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Providers.Test/Nethermind.DataMarketplace.Providers.Test.csproj @@ -1,17 +1,17 @@  - net5.0 + net6.0 true false - - + + - + diff --git a/src/Nethermind/Nethermind.DataMarketplace.Providers/Nethermind.DataMarketplace.Providers.csproj b/src/Nethermind/Nethermind.DataMarketplace.Providers/Nethermind.DataMarketplace.Providers.csproj index 72c4284b197..5d090a33f1e 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Providers/Nethermind.DataMarketplace.Providers.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Providers/Nethermind.DataMarketplace.Providers.csproj @@ -6,7 +6,7 @@ - net5.0 + net6.0 enable diff --git a/src/Nethermind/Nethermind.DataMarketplace.Subprotocols.Test/Nethermind.DataMarketplace.Subprotocols.Test.csproj b/src/Nethermind/Nethermind.DataMarketplace.Subprotocols.Test/Nethermind.DataMarketplace.Subprotocols.Test.csproj index 6e1f48ce44b..93d407de4c3 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Subprotocols.Test/Nethermind.DataMarketplace.Subprotocols.Test.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Subprotocols.Test/Nethermind.DataMarketplace.Subprotocols.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -13,10 +13,10 @@ - + - - + + diff --git a/src/Nethermind/Nethermind.DataMarketplace.Subprotocols/Nethermind.DataMarketplace.Subprotocols.csproj b/src/Nethermind/Nethermind.DataMarketplace.Subprotocols/Nethermind.DataMarketplace.Subprotocols.csproj index 7a7d4a59ffc..2a6ceee21ab 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Subprotocols/Nethermind.DataMarketplace.Subprotocols.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Subprotocols/Nethermind.DataMarketplace.Subprotocols.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 8.0 enable diff --git a/src/Nethermind/Nethermind.DataMarketplace.Test/Nethermind.DataMarketplace.Test.csproj b/src/Nethermind/Nethermind.DataMarketplace.Test/Nethermind.DataMarketplace.Test.csproj index 829ceccc418..fa687c0888e 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Test/Nethermind.DataMarketplace.Test.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Test/Nethermind.DataMarketplace.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -15,14 +15,14 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - + + + + + - + diff --git a/src/Nethermind/Nethermind.DataMarketplace.Tools.Refunder/Nethermind.DataMarketplace.Tools.Refunder.csproj b/src/Nethermind/Nethermind.DataMarketplace.Tools.Refunder/Nethermind.DataMarketplace.Tools.Refunder.csproj index 08e7f5519e0..d7512ce64bf 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.Tools.Refunder/Nethermind.DataMarketplace.Tools.Refunder.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.Tools.Refunder/Nethermind.DataMarketplace.Tools.Refunder.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 refunder diff --git a/src/Nethermind/Nethermind.DataMarketplace.WebSockets.Test/Nethermind.DataMarketplace.WebSockets.Test.csproj b/src/Nethermind/Nethermind.DataMarketplace.WebSockets.Test/Nethermind.DataMarketplace.WebSockets.Test.csproj index 15efeb2f399..0a3aac0517c 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.WebSockets.Test/Nethermind.DataMarketplace.WebSockets.Test.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.WebSockets.Test/Nethermind.DataMarketplace.WebSockets.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -13,11 +13,11 @@ - + - - + + diff --git a/src/Nethermind/Nethermind.DataMarketplace.WebSockets/Nethermind.DataMarketplace.WebSockets.csproj b/src/Nethermind/Nethermind.DataMarketplace.WebSockets/Nethermind.DataMarketplace.WebSockets.csproj index 17896859356..b1c0bc0aac7 100644 --- a/src/Nethermind/Nethermind.DataMarketplace.WebSockets/Nethermind.DataMarketplace.WebSockets.csproj +++ b/src/Nethermind/Nethermind.DataMarketplace.WebSockets/Nethermind.DataMarketplace.WebSockets.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 8.0 enable diff --git a/src/Nethermind/Nethermind.Db.Rocks/Nethermind.Db.Rocks.csproj b/src/Nethermind/Nethermind.Db.Rocks/Nethermind.Db.Rocks.csproj index 90ad693d571..bdea7c6a2db 100644 --- a/src/Nethermind/Nethermind.Db.Rocks/Nethermind.Db.Rocks.csproj +++ b/src/Nethermind/Nethermind.Db.Rocks/Nethermind.Db.Rocks.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 enable diff --git a/src/Nethermind/Nethermind.Db.Rpc/Nethermind.Db.Rpc.csproj b/src/Nethermind/Nethermind.Db.Rpc/Nethermind.Db.Rpc.csproj index 5b9a19c3f03..07d3d28f15a 100644 --- a/src/Nethermind/Nethermind.Db.Rpc/Nethermind.Db.Rpc.csproj +++ b/src/Nethermind/Nethermind.Db.Rpc/Nethermind.Db.Rpc.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 9 diff --git a/src/Nethermind/Nethermind.Db.Test/Nethermind.Db.Test.csproj b/src/Nethermind/Nethermind.Db.Test/Nethermind.Db.Test.csproj index a06a055e231..bda7368d7eb 100644 --- a/src/Nethermind/Nethermind.Db.Test/Nethermind.Db.Test.csproj +++ b/src/Nethermind/Nethermind.Db.Test/Nethermind.Db.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 9 @@ -9,14 +9,14 @@ true - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + diff --git a/src/Nethermind/Nethermind.Db/Nethermind.Db.csproj b/src/Nethermind/Nethermind.Db/Nethermind.Db.csproj index 3d6ad445d21..236717505a9 100644 --- a/src/Nethermind/Nethermind.Db/Nethermind.Db.csproj +++ b/src/Nethermind/Nethermind.Db/Nethermind.Db.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 9 true true diff --git a/src/Nethermind/Nethermind.DepositContract.Test/Nethermind.DepositContract.Test.csproj b/src/Nethermind/Nethermind.DepositContract.Test/Nethermind.DepositContract.Test.csproj index 3b04dc5bb2c..562ffb01c5b 100644 --- a/src/Nethermind/Nethermind.DepositContract.Test/Nethermind.DepositContract.Test.csproj +++ b/src/Nethermind/Nethermind.DepositContract.Test/Nethermind.DepositContract.Test.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 false @@ -11,7 +11,7 @@ - + diff --git a/src/Nethermind/Nethermind.DepositContract/Nethermind.DepositContract.csproj b/src/Nethermind/Nethermind.DepositContract/Nethermind.DepositContract.csproj index 9f4901eb0cc..7098a5cd9ff 100644 --- a/src/Nethermind/Nethermind.DepositContract/Nethermind.DepositContract.csproj +++ b/src/Nethermind/Nethermind.DepositContract/Nethermind.DepositContract.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 enable diff --git a/src/Nethermind/Nethermind.EthStats.Test/Nethermind.EthStats.Test.csproj b/src/Nethermind/Nethermind.EthStats.Test/Nethermind.EthStats.Test.csproj index cc94f3eac68..c58c274e937 100644 --- a/src/Nethermind/Nethermind.EthStats.Test/Nethermind.EthStats.Test.csproj +++ b/src/Nethermind/Nethermind.EthStats.Test/Nethermind.EthStats.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -12,14 +12,14 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + diff --git a/src/Nethermind/Nethermind.EthStats/Integrations/EthStatsIntegration.cs b/src/Nethermind/Nethermind.EthStats/Integrations/EthStatsIntegration.cs index 7bb63c4e8ce..b5c61e1468f 100644 --- a/src/Nethermind/Nethermind.EthStats/Integrations/EthStatsIntegration.cs +++ b/src/Nethermind/Nethermind.EthStats/Integrations/EthStatsIntegration.cs @@ -144,7 +144,7 @@ private void Run(Timer timer) timer.Start(); } - private void TimerOnElapsed(object sender, ElapsedEventArgs e) + private void TimerOnElapsed(object? sender, ElapsedEventArgs e) { if (!_connected) { diff --git a/src/Nethermind/Nethermind.EthStats/Nethermind.EthStats.csproj b/src/Nethermind/Nethermind.EthStats/Nethermind.EthStats.csproj index eb81e568800..39ff8d9f191 100644 --- a/src/Nethermind/Nethermind.EthStats/Nethermind.EthStats.csproj +++ b/src/Nethermind/Nethermind.EthStats/Nethermind.EthStats.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 9 enable @@ -12,8 +12,8 @@ - - + + diff --git a/src/Nethermind/Nethermind.Ethash.Test/Nethermind.Ethash.Test.csproj b/src/Nethermind/Nethermind.Ethash.Test/Nethermind.Ethash.Test.csproj index 24f524fa81e..6da70bdf800 100644 --- a/src/Nethermind/Nethermind.Ethash.Test/Nethermind.Ethash.Test.csproj +++ b/src/Nethermind/Nethermind.Ethash.Test/Nethermind.Ethash.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -12,14 +12,14 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + diff --git a/src/Nethermind/Nethermind.EthereumTests.Benchmark/Nethermind.EthereumTests.Benchmark.csproj b/src/Nethermind/Nethermind.EthereumTests.Benchmark/Nethermind.EthereumTests.Benchmark.csproj index 0fa497e7730..92eaf707fd3 100644 --- a/src/Nethermind/Nethermind.EthereumTests.Benchmark/Nethermind.EthereumTests.Benchmark.csproj +++ b/src/Nethermind/Nethermind.EthereumTests.Benchmark/Nethermind.EthereumTests.Benchmark.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 9 diff --git a/src/Nethermind/Nethermind.Evm.Benchmark/Nethermind.Evm.Benchmark.csproj b/src/Nethermind/Nethermind.Evm.Benchmark/Nethermind.Evm.Benchmark.csproj index 188168f5a7c..ca5462a368c 100644 --- a/src/Nethermind/Nethermind.Evm.Benchmark/Nethermind.Evm.Benchmark.csproj +++ b/src/Nethermind/Nethermind.Evm.Benchmark/Nethermind.Evm.Benchmark.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 diff --git a/src/Nethermind/Nethermind.Evm.Test/Nethermind.Evm.Test.csproj b/src/Nethermind/Nethermind.Evm.Test/Nethermind.Evm.Test.csproj index c79dc6d89d4..028a7dc523a 100644 --- a/src/Nethermind/Nethermind.Evm.Test/Nethermind.Evm.Test.csproj +++ b/src/Nethermind/Nethermind.Evm.Test/Nethermind.Evm.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 9 @@ -14,15 +14,15 @@ true - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + - + diff --git a/src/Nethermind/Nethermind.Evm/Nethermind.Evm.csproj b/src/Nethermind/Nethermind.Evm/Nethermind.Evm.csproj index ba6f1fc98ad..173cd3dbe7f 100644 --- a/src/Nethermind/Nethermind.Evm/Nethermind.Evm.csproj +++ b/src/Nethermind/Nethermind.Evm/Nethermind.Evm.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 9 true true diff --git a/src/Nethermind/Nethermind.EvmPlayground/Nethermind.EvmPlayground.csproj b/src/Nethermind/Nethermind.EvmPlayground/Nethermind.EvmPlayground.csproj index 1c356d1dbec..ff906de82df 100644 --- a/src/Nethermind/Nethermind.EvmPlayground/Nethermind.EvmPlayground.csproj +++ b/src/Nethermind/Nethermind.EvmPlayground/Nethermind.EvmPlayground.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Exe 7.3 diff --git a/src/Nethermind/Nethermind.Facade.Test/Nethermind.Facade.Test.csproj b/src/Nethermind/Nethermind.Facade.Test/Nethermind.Facade.Test.csproj index c171c188b6a..e63c38dcb2d 100644 --- a/src/Nethermind/Nethermind.Facade.Test/Nethermind.Facade.Test.csproj +++ b/src/Nethermind/Nethermind.Facade.Test/Nethermind.Facade.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 @@ -10,15 +10,15 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + - + diff --git a/src/Nethermind/Nethermind.Facade/Nethermind.Facade.csproj b/src/Nethermind/Nethermind.Facade/Nethermind.Facade.csproj index 677969290ab..f31fbe4e950 100644 --- a/src/Nethermind/Nethermind.Facade/Nethermind.Facade.csproj +++ b/src/Nethermind/Nethermind.Facade/Nethermind.Facade.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 9 true true diff --git a/src/Nethermind/Nethermind.GitBook/Nethermind.GitBook.csproj b/src/Nethermind/Nethermind.GitBook/Nethermind.GitBook.csproj index 3e4197bf365..38f73b24d9e 100644 --- a/src/Nethermind/Nethermind.GitBook/Nethermind.GitBook.csproj +++ b/src/Nethermind/Nethermind.GitBook/Nethermind.GitBook.csproj @@ -10,7 +10,7 @@ Exe - net5.0 + net6.0 8.0 diff --git a/src/Nethermind/Nethermind.Grpc/Nethermind.Grpc.csproj b/src/Nethermind/Nethermind.Grpc/Nethermind.Grpc.csproj index 169acfadb26..bfc2b458063 100644 --- a/src/Nethermind/Nethermind.Grpc/Nethermind.Grpc.csproj +++ b/src/Nethermind/Nethermind.Grpc/Nethermind.Grpc.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 latest true true @@ -13,10 +13,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/MD5CryptoServiceProvider.cs b/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/MD5CryptoServiceProvider.cs index 8d725b92273..146d6dcb800 100644 --- a/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/MD5CryptoServiceProvider.cs +++ b/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/MD5CryptoServiceProvider.cs @@ -19,7 +19,7 @@ namespace Nethermind.HashLib.Crypto.BuildIn internal class MD5CryptoServiceProvider : HashCryptoBuildIn, IHasHMACBuildIn { public MD5CryptoServiceProvider() - : base(new System.Security.Cryptography.MD5CryptoServiceProvider(), 64) + : base(System.Security.Cryptography.MD5.Create(), 64) { } diff --git a/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/SHA256Cng.cs b/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/SHA256Cng.cs index 0966544f382..b6792068ef5 100644 --- a/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/SHA256Cng.cs +++ b/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/SHA256Cng.cs @@ -19,7 +19,7 @@ namespace Nethermind.HashLib.Crypto.BuildIn internal class SHA256Cng : HashCryptoBuildIn { public SHA256Cng() - : base(new System.Security.Cryptography.SHA256CryptoServiceProvider(), 64) + : base(System.Security.Cryptography.SHA256.Create(), 64) { } } diff --git a/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/SHA256CryptoServiceProvider.cs b/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/SHA256CryptoServiceProvider.cs index 67d864c9f8f..9015c4e2e91 100644 --- a/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/SHA256CryptoServiceProvider.cs +++ b/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/SHA256CryptoServiceProvider.cs @@ -19,7 +19,7 @@ namespace Nethermind.HashLib.Crypto.BuildIn internal class SHA256CryptoServiceProvider : HashCryptoBuildIn { public SHA256CryptoServiceProvider() - : base(new System.Security.Cryptography.SHA256CryptoServiceProvider(), 64) + : base(System.Security.Cryptography.SHA256.Create(), 64) { } } diff --git a/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/SHA256Managed.cs b/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/SHA256Managed.cs index 44c38169645..ced4bf60f2d 100644 --- a/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/SHA256Managed.cs +++ b/src/Nethermind/Nethermind.HashLib/Crypto/BuildIn/SHA256Managed.cs @@ -19,7 +19,7 @@ namespace Nethermind.HashLib.Crypto.BuildIn internal class SHA256Managed : HashCryptoBuildIn, IHasHMACBuildIn { public SHA256Managed() - : base(new System.Security.Cryptography.SHA256Managed(), 64) + : base(System.Security.Cryptography.SHA256.Create(), 64) { } diff --git a/src/Nethermind/Nethermind.HashLib/Nethermind.HashLib.csproj b/src/Nethermind/Nethermind.HashLib/Nethermind.HashLib.csproj index 5c7aed4f844..ddf0fe234be 100644 --- a/src/Nethermind/Nethermind.HashLib/Nethermind.HashLib.csproj +++ b/src/Nethermind/Nethermind.HashLib/Nethermind.HashLib.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 9 diff --git a/src/Nethermind/Nethermind.HealthChecks.Test/Nethermind.HealthChecks.Test.csproj b/src/Nethermind/Nethermind.HealthChecks.Test/Nethermind.HealthChecks.Test.csproj index 1fa873dbf9a..61cbc2f923d 100644 --- a/src/Nethermind/Nethermind.HealthChecks.Test/Nethermind.HealthChecks.Test.csproj +++ b/src/Nethermind/Nethermind.HealthChecks.Test/Nethermind.HealthChecks.Test.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 false @@ -14,14 +14,14 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + diff --git a/src/Nethermind/Nethermind.HealthChecks/Nethermind.HealthChecks.csproj b/src/Nethermind/Nethermind.HealthChecks/Nethermind.HealthChecks.csproj index 30f738e3b62..3c254eb88f9 100644 --- a/src/Nethermind/Nethermind.HealthChecks/Nethermind.HealthChecks.csproj +++ b/src/Nethermind/Nethermind.HealthChecks/Nethermind.HealthChecks.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 @@ -20,9 +20,6 @@ - - - diff --git a/src/Nethermind/Nethermind.HonestValidator.Host/Nethermind.HonestValidator.Host.csproj b/src/Nethermind/Nethermind.HonestValidator.Host/Nethermind.HonestValidator.Host.csproj index 781c0525380..b199dec7c3b 100644 --- a/src/Nethermind/Nethermind.HonestValidator.Host/Nethermind.HonestValidator.Host.csproj +++ b/src/Nethermind/Nethermind.HonestValidator.Host/Nethermind.HonestValidator.Host.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 true dotnet-Nethermind.BeaconNode.Host-376091C2-AFFA-41D5-A229-A31991A2A89F Nethermind Eth2.0 blockchain @@ -20,8 +20,8 @@ - - + + diff --git a/src/Nethermind/Nethermind.HonestValidator.Test/Nethermind.HonestValidator.Test.csproj b/src/Nethermind/Nethermind.HonestValidator.Test/Nethermind.HonestValidator.Test.csproj index 438f626fffb..7d76b999bcd 100644 --- a/src/Nethermind/Nethermind.HonestValidator.Test/Nethermind.HonestValidator.Test.csproj +++ b/src/Nethermind/Nethermind.HonestValidator.Test/Nethermind.HonestValidator.Test.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Nethermind Eth2.0 blockchain sgryphon Copyright © 2019 Demerzel Solutions Limited @@ -21,9 +21,9 @@ - - - + + + diff --git a/src/Nethermind/Nethermind.HonestValidator/Nethermind.HonestValidator.csproj b/src/Nethermind/Nethermind.HonestValidator/Nethermind.HonestValidator.csproj index e5af2df49ad..d272e28a056 100644 --- a/src/Nethermind/Nethermind.HonestValidator/Nethermind.HonestValidator.csproj +++ b/src/Nethermind/Nethermind.HonestValidator/Nethermind.HonestValidator.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Nethermind Eth2.0 blockchain sgryphon Copyright © 2019 Demerzel Solutions Limited @@ -11,14 +11,14 @@ - - - - - - - - + + + + + + + + diff --git a/src/Nethermind/Nethermind.Init/Nethermind.Init.csproj b/src/Nethermind/Nethermind.Init/Nethermind.Init.csproj index bd2dc9dd312..14bd0dd6231 100644 --- a/src/Nethermind/Nethermind.Init/Nethermind.Init.csproj +++ b/src/Nethermind/Nethermind.Init/Nethermind.Init.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 diff --git a/src/Nethermind/Nethermind.JsonRpc.Benchmark/Nethermind.JsonRpc.Benchmark.csproj b/src/Nethermind/Nethermind.JsonRpc.Benchmark/Nethermind.JsonRpc.Benchmark.csproj index 506eda8d625..4abc314a9c5 100644 --- a/src/Nethermind/Nethermind.JsonRpc.Benchmark/Nethermind.JsonRpc.Benchmark.csproj +++ b/src/Nethermind/Nethermind.JsonRpc.Benchmark/Nethermind.JsonRpc.Benchmark.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 diff --git a/src/Nethermind/Nethermind.JsonRpc.Test/Data/Eip2930Tests.cs b/src/Nethermind/Nethermind.JsonRpc.Test/Data/Eip2930Tests.cs index 0445aef5d74..45d3ff80df7 100644 --- a/src/Nethermind/Nethermind.JsonRpc.Test/Data/Eip2930Tests.cs +++ b/src/Nethermind/Nethermind.JsonRpc.Test/Data/Eip2930Tests.cs @@ -94,7 +94,7 @@ public void can_deserialize_null_accessList() { _transactionForRpc = _serializer.Deserialize("{\"nonce\":\"0x0\",\"blockHash\":null,\"blockNumber\":null,\"transactionIndex\":null,\"to\":null,\"value\":\"0x0\",\"gasPrice\":\"0x0\",\"gas\":\"0x0\",\"input\":null,\"type\":\"0x01\"}"); - _transactionForRpc.Type.Should().Be(1); + _transactionForRpc.Type.Should().Be(TxType.AccessList); _transactionForRpc.AccessList.Should().BeNull(); } @@ -117,7 +117,7 @@ public void can_deserialize_empty_accessList() { _transactionForRpc = _serializer.Deserialize("{\"nonce\":\"0x0\",\"blockHash\":null,\"blockNumber\":null,\"transactionIndex\":null,\"to\":null,\"value\":\"0x0\",\"gasPrice\":\"0x0\",\"gas\":\"0x0\",\"input\":null,\"type\":\"0x01\",\"accessList\":[]}"); - _transactionForRpc.Type.Should().Be(1); + _transactionForRpc.Type.Should().Be(TxType.AccessList); _transactionForRpc.AccessList.Length.Should().Be(0); } @@ -144,7 +144,7 @@ public void can_deserialize_accessList_with_empty_storageKeys() _transactionForRpc = _serializer.Deserialize("{\"nonce\":\"0x0\",\"blockHash\":null,\"blockNumber\":null,\"transactionIndex\":null,\"to\":null,\"value\":\"0x0\",\"gasPrice\":\"0x0\",\"gas\":\"0x0\",\"input\":null,\"type\":\"0x01\",\"accessList\":[{\"address\":\"0xb7705ae4c6f81b66cdb323c65f4e8133690fc099\",\"storageKeys\":[]}]}"); object[] accessList = {new AccessListItemForRpc(TestItem.AddressA, new HashSet{})}; - _transactionForRpc.Type.Should().Be(1); + _transactionForRpc.Type.Should().Be(TxType.AccessList); _transactionForRpc.AccessList.Should().BeEquivalentTo(accessList); } @@ -170,7 +170,7 @@ public void can_deserialize_accessList_with_null_storageKeys() _transactionForRpc = _serializer.Deserialize("{\"nonce\":\"0x0\",\"blockHash\":null,\"blockNumber\":null,\"transactionIndex\":null,\"to\":null,\"value\":\"0x0\",\"gasPrice\":\"0x0\",\"gas\":\"0x0\",\"input\":null,\"type\":\"0x01\",\"accessList\":[{\"address\":\"0xb7705ae4c6f81b66cdb323c65f4e8133690fc099\"}]}"); object[] accessList = {new AccessListItemForRpc(TestItem.AddressA, null)}; - _transactionForRpc.Type.Should().Be(1); + _transactionForRpc.Type.Should().Be(TxType.AccessList); _transactionForRpc.AccessList.Length.Should().Be(1); _transactionForRpc.AccessList.Should().BeEquivalentTo(accessList); } diff --git a/src/Nethermind/Nethermind.JsonRpc.Test/Nethermind.JsonRpc.Test.csproj b/src/Nethermind/Nethermind.JsonRpc.Test/Nethermind.JsonRpc.Test.csproj index 607e9c7f28c..ccdb674557c 100644 --- a/src/Nethermind/Nethermind.JsonRpc.Test/Nethermind.JsonRpc.Test.csproj +++ b/src/Nethermind/Nethermind.JsonRpc.Test/Nethermind.JsonRpc.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 9.0 enable @@ -9,15 +9,15 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + - + diff --git a/src/Nethermind/Nethermind.JsonRpc/JsonRpcProcessor.cs b/src/Nethermind/Nethermind.JsonRpc/JsonRpcProcessor.cs index 1b273377a46..8786972afe5 100644 --- a/src/Nethermind/Nethermind.JsonRpc/JsonRpcProcessor.cs +++ b/src/Nethermind/Nethermind.JsonRpc/JsonRpcProcessor.cs @@ -22,7 +22,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using Microsoft.AspNetCore.Server.Kestrel.Core; +using Microsoft.AspNetCore.Http; using Nethermind.Core; using Nethermind.Core.Extensions; using Nethermind.JsonRpc.Utils; diff --git a/src/Nethermind/Nethermind.JsonRpc/Nethermind.JsonRpc.csproj b/src/Nethermind/Nethermind.JsonRpc/Nethermind.JsonRpc.csproj index 2fc2fa83e49..ff57403f835 100644 --- a/src/Nethermind/Nethermind.JsonRpc/Nethermind.JsonRpc.csproj +++ b/src/Nethermind/Nethermind.JsonRpc/Nethermind.JsonRpc.csproj @@ -1,14 +1,14 @@  - net5.0 + net6.0 9 true true annotations - - + + diff --git a/src/Nethermind/Nethermind.KeyStore.Test/Nethermind.KeyStore.Test.csproj b/src/Nethermind/Nethermind.KeyStore.Test/Nethermind.KeyStore.Test.csproj index 6691f7e542b..4018cb10f55 100644 --- a/src/Nethermind/Nethermind.KeyStore.Test/Nethermind.KeyStore.Test.csproj +++ b/src/Nethermind/Nethermind.KeyStore.Test/Nethermind.KeyStore.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -14,13 +14,13 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + diff --git a/src/Nethermind/Nethermind.KeyStore/AesEncrypter.cs b/src/Nethermind/Nethermind.KeyStore/AesEncrypter.cs index b3d86ea357e..f4338e135a5 100644 --- a/src/Nethermind/Nethermind.KeyStore/AesEncrypter.cs +++ b/src/Nethermind/Nethermind.KeyStore/AesEncrypter.cs @@ -42,14 +42,13 @@ public byte[] Encrypt(byte[] content, byte[] key, byte[] iv, string cipherType) { case "aes-128-cbc": { - using var aes = new AesCryptoServiceProvider - { - BlockSize = _config.SymmetricEncrypterBlockSize, - KeySize = _config.SymmetricEncrypterKeySize, - Padding = PaddingMode.PKCS7, - Key = key, - IV = iv - }; + using var aes = Aes.Create(); + aes.BlockSize = _config.SymmetricEncrypterBlockSize; + aes.KeySize = _config.SymmetricEncrypterKeySize; + aes.Padding = PaddingMode.PKCS7; + aes.Key = key; + aes.IV = iv; + var encryptor = aes.CreateEncryptor(aes.Key, aes.IV); return Execute(encryptor, content); } @@ -80,14 +79,12 @@ public byte[] Decrypt(byte[] cipher, byte[] key, byte[] iv, string cipherType) { case "aes-128-cbc": { - using var aes = new AesCryptoServiceProvider - { - BlockSize = _config.SymmetricEncrypterBlockSize, - KeySize = _config.SymmetricEncrypterKeySize, - Padding = PaddingMode.PKCS7, - Key = key, - IV = iv - }; + using var aes = Aes.Create(); + aes.BlockSize = _config.SymmetricEncrypterBlockSize; + aes.KeySize = _config.SymmetricEncrypterKeySize; + aes.Padding = PaddingMode.PKCS7; + aes.Key = key; + aes.IV = iv; var decryptor = aes.CreateDecryptor(key, aes.IV); return Execute(decryptor, cipher); } @@ -125,7 +122,9 @@ private byte[] Execute(ICryptoTransform cryptoTransform, byte[] data) private static void AesCtr(byte[] key, byte[] salt, Stream inputStream, Stream outputStream) { - using var aes = new AesManaged {Mode = CipherMode.ECB, Padding = PaddingMode.None}; + using var aes = Aes.Create(); + aes.Mode = CipherMode.ECB; + aes.Padding = PaddingMode.None; var blockSize = aes.BlockSize / 8; if (salt.Length != blockSize) { diff --git a/src/Nethermind/Nethermind.KeyStore/Nethermind.KeyStore.csproj b/src/Nethermind/Nethermind.KeyStore/Nethermind.KeyStore.csproj index 86665090092..bc1754447a3 100644 --- a/src/Nethermind/Nethermind.KeyStore/Nethermind.KeyStore.csproj +++ b/src/Nethermind/Nethermind.KeyStore/Nethermind.KeyStore.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 9 true true diff --git a/src/Nethermind/Nethermind.Logging.Microsoft/Nethermind.Logging.Microsoft.csproj b/src/Nethermind/Nethermind.Logging.Microsoft/Nethermind.Logging.Microsoft.csproj index c0ff73cd210..5ac1c1e6b11 100644 --- a/src/Nethermind/Nethermind.Logging.Microsoft/Nethermind.Logging.Microsoft.csproj +++ b/src/Nethermind/Nethermind.Logging.Microsoft/Nethermind.Logging.Microsoft.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/Nethermind/Nethermind.Logging.NLog.Test/Nethermind.Logging.NLog.Test.csproj b/src/Nethermind/Nethermind.Logging.NLog.Test/Nethermind.Logging.NLog.Test.csproj index 7b6bb2a127d..5b8465b5289 100644 --- a/src/Nethermind/Nethermind.Logging.NLog.Test/Nethermind.Logging.NLog.Test.csproj +++ b/src/Nethermind/Nethermind.Logging.NLog.Test/Nethermind.Logging.NLog.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -12,14 +12,14 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - + + diff --git a/src/Nethermind/Nethermind.Logging.NLog/Nethermind.Logging.NLog.csproj b/src/Nethermind/Nethermind.Logging.NLog/Nethermind.Logging.NLog.csproj index 266ed0e764c..5bf0aa66b07 100644 --- a/src/Nethermind/Nethermind.Logging.NLog/Nethermind.Logging.NLog.csproj +++ b/src/Nethermind/Nethermind.Logging.NLog/Nethermind.Logging.NLog.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 @@ -14,7 +14,7 @@ - + diff --git a/src/Nethermind/Nethermind.Logging/Nethermind.Logging.csproj b/src/Nethermind/Nethermind.Logging/Nethermind.Logging.csproj index 32a481445dd..da9f46ffb5c 100644 --- a/src/Nethermind/Nethermind.Logging/Nethermind.Logging.csproj +++ b/src/Nethermind/Nethermind.Logging/Nethermind.Logging.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 8.0 true true @@ -13,7 +13,7 @@ - + diff --git a/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.Setup.cs b/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.Setup.cs index c393763206b..07a1010069e 100644 --- a/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.Setup.cs +++ b/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.Setup.cs @@ -17,7 +17,6 @@ using System.Threading.Tasks; using Nethermind.Api; -using Nethermind.Api; using Nethermind.Blockchain; using Nethermind.Blockchain.Comparers; using Nethermind.Blockchain.Processing; diff --git a/src/Nethermind/Nethermind.Merge.Plugin.Test/Nethermind.Merge.Plugin.Test.csproj b/src/Nethermind/Nethermind.Merge.Plugin.Test/Nethermind.Merge.Plugin.Test.csproj index bfda2317467..4b14fa2637c 100644 --- a/src/Nethermind/Nethermind.Merge.Plugin.Test/Nethermind.Merge.Plugin.Test.csproj +++ b/src/Nethermind/Nethermind.Merge.Plugin.Test/Nethermind.Merge.Plugin.Test.csproj @@ -1,19 +1,19 @@ - net5.0 + net6.0 enable - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + diff --git a/src/Nethermind/Nethermind.Merge.Plugin/Nethermind.Merge.Plugin.csproj b/src/Nethermind/Nethermind.Merge.Plugin/Nethermind.Merge.Plugin.csproj index f6ae49d36b3..bdbd98d9f60 100644 --- a/src/Nethermind/Nethermind.Merge.Plugin/Nethermind.Merge.Plugin.csproj +++ b/src/Nethermind/Nethermind.Merge.Plugin/Nethermind.Merge.Plugin.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Nethermind.Merge.Plugin enable diff --git a/src/Nethermind/Nethermind.Merkleization/Nethermind.Merkleization.csproj b/src/Nethermind/Nethermind.Merkleization/Nethermind.Merkleization.csproj index 65efdb7bdb2..14fb37b645c 100644 --- a/src/Nethermind/Nethermind.Merkleization/Nethermind.Merkleization.csproj +++ b/src/Nethermind/Nethermind.Merkleization/Nethermind.Merkleization.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false true Library diff --git a/src/Nethermind/Nethermind.Mev.Test/BundlePoolTests.cs b/src/Nethermind/Nethermind.Mev.Test/BundlePoolTests.cs index 6f0249f52dc..a18128802b9 100644 --- a/src/Nethermind/Nethermind.Mev.Test/BundlePoolTests.cs +++ b/src/Nethermind/Nethermind.Mev.Test/BundlePoolTests.cs @@ -27,6 +27,7 @@ using Nethermind.Core; using Nethermind.Core.Crypto; using Nethermind.Core.Extensions; +using Nethermind.Core.Test; using Nethermind.Core.Test.Blockchain; using Nethermind.Core.Test.Builders; using Nethermind.Crypto; @@ -425,7 +426,7 @@ public async Task should_remove_bundle_when_simulation_fails() } [Test] - public async Task should_evict_megabundle_when_relay_sends_new_bundle() + public void should_evict_megabundle_when_relay_sends_new_bundle() { var ecdsa = Substitute.For(); ecdsa.RecoverAddress(Arg.Any(), Arg.Any()).Returns( diff --git a/src/Nethermind/Nethermind.Mev.Test/MetricsTests.cs b/src/Nethermind/Nethermind.Mev.Test/MetricsTests.cs index 29decbdc78b..93da9fdd2b7 100644 --- a/src/Nethermind/Nethermind.Mev.Test/MetricsTests.cs +++ b/src/Nethermind/Nethermind.Mev.Test/MetricsTests.cs @@ -215,7 +215,7 @@ private static TestBundlePool CreateTestBundlePool(IEthereumEcdsa? ecdsa = null, 0, 1, 1, - null); + Bytes.Empty); Block head = new Block(header); ChainLevelInfo info = new(true, new[] {new BlockInfo(Keccak.Zero, 1)}); diff --git a/src/Nethermind/Nethermind.Mev.Test/MevRpcModuleTests.TestMevRpcBlockchain.cs b/src/Nethermind/Nethermind.Mev.Test/MevRpcModuleTests.TestMevRpcBlockchain.cs index 582abe72dae..bf5b37671e3 100644 --- a/src/Nethermind/Nethermind.Mev.Test/MevRpcModuleTests.TestMevRpcBlockchain.cs +++ b/src/Nethermind/Nethermind.Mev.Test/MevRpcModuleTests.TestMevRpcBlockchain.cs @@ -206,7 +206,7 @@ protected override BlockProcessor CreateBlockProcessor() return blockProcessor; } - protected override async Task Build(ISpecProvider specProvider = null, UInt256? initialValues = null) + protected override async Task Build(ISpecProvider? specProvider = null, UInt256? initialValues = null) { TestBlockchain chain = await base.Build(specProvider, initialValues); MevRpcModule = new MevRpcModule(new JsonRpcConfig(), diff --git a/src/Nethermind/Nethermind.Mev.Test/Nethermind.Mev.Test.csproj b/src/Nethermind/Nethermind.Mev.Test/Nethermind.Mev.Test.csproj index 7b080f3c5fa..1fc6dfd74de 100644 --- a/src/Nethermind/Nethermind.Mev.Test/Nethermind.Mev.Test.csproj +++ b/src/Nethermind/Nethermind.Mev.Test/Nethermind.Mev.Test.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 false @@ -9,12 +9,12 @@ - - + + - - + + diff --git a/src/Nethermind/Nethermind.Mev/Nethermind.Mev.csproj b/src/Nethermind/Nethermind.Mev/Nethermind.Mev.csproj index 0f21221f440..fbc51df1ba5 100644 --- a/src/Nethermind/Nethermind.Mev/Nethermind.Mev.csproj +++ b/src/Nethermind/Nethermind.Mev/Nethermind.Mev.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 enable diff --git a/src/Nethermind/Nethermind.Mining.Test/Nethermind.Mining.Test.csproj b/src/Nethermind/Nethermind.Mining.Test/Nethermind.Mining.Test.csproj index 0e2eafcd5b7..3e114106b71 100644 --- a/src/Nethermind/Nethermind.Mining.Test/Nethermind.Mining.Test.csproj +++ b/src/Nethermind/Nethermind.Mining.Test/Nethermind.Mining.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -9,14 +9,14 @@ true - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Nethermind.Monitoring.Test/Nethermind.Monitoring.Test.csproj b/src/Nethermind/Nethermind.Monitoring.Test/Nethermind.Monitoring.Test.csproj index 2ad1c888573..e109a4c9755 100644 --- a/src/Nethermind/Nethermind.Monitoring.Test/Nethermind.Monitoring.Test.csproj +++ b/src/Nethermind/Nethermind.Monitoring.Test/Nethermind.Monitoring.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -12,10 +12,10 @@ - + - - + + diff --git a/src/Nethermind/Nethermind.Monitoring/Nethermind.Monitoring.csproj b/src/Nethermind/Nethermind.Monitoring/Nethermind.Monitoring.csproj index a95d1fa8874..70bd5a67fda 100644 --- a/src/Nethermind/Nethermind.Monitoring/Nethermind.Monitoring.csproj +++ b/src/Nethermind/Nethermind.Monitoring/Nethermind.Monitoring.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 9 true true @@ -14,9 +14,9 @@ - - - + + + diff --git a/src/Nethermind/Nethermind.Native/Nethermind.Native.csproj b/src/Nethermind/Nethermind.Native/Nethermind.Native.csproj index 8a4725e2fda..494f02f5365 100644 --- a/src/Nethermind/Nethermind.Native/Nethermind.Native.csproj +++ b/src/Nethermind/Nethermind.Native/Nethermind.Native.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 diff --git a/src/Nethermind/Nethermind.Network.Benchmark/Nethermind.Network.Benchmark.csproj b/src/Nethermind/Nethermind.Network.Benchmark/Nethermind.Network.Benchmark.csproj index 990a1274e69..040db4e4b65 100644 --- a/src/Nethermind/Nethermind.Network.Benchmark/Nethermind.Network.Benchmark.csproj +++ b/src/Nethermind/Nethermind.Network.Benchmark/Nethermind.Network.Benchmark.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 8.0 Nethermind.Network.Benchmarks diff --git a/src/Nethermind/Nethermind.Network.Stats/Nethermind.Network.Stats.csproj b/src/Nethermind/Nethermind.Network.Stats/Nethermind.Network.Stats.csproj index fb8511d7f7f..bf8ae165a5a 100644 --- a/src/Nethermind/Nethermind.Network.Stats/Nethermind.Network.Stats.csproj +++ b/src/Nethermind/Nethermind.Network.Stats/Nethermind.Network.Stats.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 9 Nethermind.Stats true diff --git a/src/Nethermind/Nethermind.Network.Test/Nethermind.Network.Test.csproj b/src/Nethermind/Nethermind.Network.Test/Nethermind.Network.Test.csproj index 937060b400f..8d81df10fbc 100644 --- a/src/Nethermind/Nethermind.Network.Test/Nethermind.Network.Test.csproj +++ b/src/Nethermind/Nethermind.Network.Test/Nethermind.Network.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -32,17 +32,17 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - + + + - - + + diff --git a/src/Nethermind/Nethermind.Network.Test/PeerManagerTests.cs b/src/Nethermind/Nethermind.Network.Test/PeerManagerTests.cs index 2e2e82082bc..34c4832ada8 100644 --- a/src/Nethermind/Nethermind.Network.Test/PeerManagerTests.cs +++ b/src/Nethermind/Nethermind.Network.Test/PeerManagerTests.cs @@ -400,7 +400,7 @@ public async Task Will_connect_and_disconnect_on_peer_management() await Task.Delay(_travisDelayLong); void DisconnectHandler(object o, DisconnectEventArgs e) => disconnections++; - ctx.PeerManager.ActivePeers.Select(p => p.Node.Id).Should().BeEquivalentTo(node.NodeId); + ctx.PeerManager.ActivePeers.Select(p => p.Node.Id).Should().BeEquivalentTo(new[] { node.NodeId }); ctx.Sessions.ForEach(s => s.Disconnected += DisconnectHandler); diff --git a/src/Nethermind/Nethermind.Network/Nethermind.Network.csproj b/src/Nethermind/Nethermind.Network/Nethermind.Network.csproj index ee505b5b3e0..f1e77b45ca4 100644 --- a/src/Nethermind/Nethermind.Network/Nethermind.Network.csproj +++ b/src/Nethermind/Nethermind.Network/Nethermind.Network.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 9 true true @@ -28,8 +28,8 @@ - - + + diff --git a/src/Nethermind/Nethermind.Overseer.Test/Nethermind.Overseer.Test.csproj b/src/Nethermind/Nethermind.Overseer.Test/Nethermind.Overseer.Test.csproj index bc13dc98186..2ed767cb33d 100644 --- a/src/Nethermind/Nethermind.Overseer.Test/Nethermind.Overseer.Test.csproj +++ b/src/Nethermind/Nethermind.Overseer.Test/Nethermind.Overseer.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -14,10 +14,10 @@ - + - - + + diff --git a/src/Nethermind/Nethermind.Peering.Mothra/Nethermind.Peering.Mothra.csproj b/src/Nethermind/Nethermind.Peering.Mothra/Nethermind.Peering.Mothra.csproj index c17a64c1494..540349a5574 100644 --- a/src/Nethermind/Nethermind.Peering.Mothra/Nethermind.Peering.Mothra.csproj +++ b/src/Nethermind/Nethermind.Peering.Mothra/Nethermind.Peering.Mothra.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/Nethermind/Nethermind.PerfTest/Nethermind.PerfTest.csproj b/src/Nethermind/Nethermind.PerfTest/Nethermind.PerfTest.csproj index 6a45da1ac64..f058cd9dc10 100644 --- a/src/Nethermind/Nethermind.PerfTest/Nethermind.PerfTest.csproj +++ b/src/Nethermind/Nethermind.PerfTest/Nethermind.PerfTest.csproj @@ -1,7 +1,7 @@  Exe - net5.0 + net6.0 8.0 true true diff --git a/src/Nethermind/Nethermind.Precompiles.Benchmark/Nethermind.Precompiles.Benchmark.csproj b/src/Nethermind/Nethermind.Precompiles.Benchmark/Nethermind.Precompiles.Benchmark.csproj index e2a8ae37cf6..770713b1641 100644 --- a/src/Nethermind/Nethermind.Precompiles.Benchmark/Nethermind.Precompiles.Benchmark.csproj +++ b/src/Nethermind/Nethermind.Precompiles.Benchmark/Nethermind.Precompiles.Benchmark.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 enable diff --git a/src/Nethermind/Nethermind.Provide.Vault/Nethermind.Provide.Vault.csproj b/src/Nethermind/Nethermind.Provide.Vault/Nethermind.Provide.Vault.csproj index 41c6d1a8069..d7c2924260d 100644 --- a/src/Nethermind/Nethermind.Provide.Vault/Nethermind.Provide.Vault.csproj +++ b/src/Nethermind/Nethermind.Provide.Vault/Nethermind.Provide.Vault.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 8.0 Nethermind.Vault diff --git a/src/Nethermind/Nethermind.PubSub/Nethermind.PubSub.csproj b/src/Nethermind/Nethermind.PubSub/Nethermind.PubSub.csproj index 4d39fbfeae4..311d47403e0 100644 --- a/src/Nethermind/Nethermind.PubSub/Nethermind.PubSub.csproj +++ b/src/Nethermind/Nethermind.PubSub/Nethermind.PubSub.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 9 true true diff --git a/src/Nethermind/Nethermind.RocksDbExtractor/Nethermind.RocksDbExtractor.csproj b/src/Nethermind/Nethermind.RocksDbExtractor/Nethermind.RocksDbExtractor.csproj index 6e403fed29b..da6dc2e15f0 100644 --- a/src/Nethermind/Nethermind.RocksDbExtractor/Nethermind.RocksDbExtractor.csproj +++ b/src/Nethermind/Nethermind.RocksDbExtractor/Nethermind.RocksDbExtractor.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/src/Nethermind/Nethermind.Runner.Test/EthereumRunnerTests.cs b/src/Nethermind/Nethermind.Runner.Test/EthereumRunnerTests.cs index 0fc6570a993..145a2c78607 100644 --- a/src/Nethermind/Nethermind.Runner.Test/EthereumRunnerTests.cs +++ b/src/Nethermind/Nethermind.Runner.Test/EthereumRunnerTests.cs @@ -132,7 +132,7 @@ private static async Task SmokeTest(ConfigProvider configProvider, int testIndex var tempPath = TempPath.GetTempDirectory(); Directory.CreateDirectory(tempPath.Path); - Exception exception = null; + Exception? exception = null; try { IInitConfig initConfig = configProvider.GetConfig(); diff --git a/src/Nethermind/Nethermind.Runner.Test/Nethermind.Runner.Test.csproj b/src/Nethermind/Nethermind.Runner.Test/Nethermind.Runner.Test.csproj index 302bdc067b8..a8cf3015756 100644 --- a/src/Nethermind/Nethermind.Runner.Test/Nethermind.Runner.Test.csproj +++ b/src/Nethermind/Nethermind.Runner.Test/Nethermind.Runner.Test.csproj @@ -1,21 +1,21 @@  - net5.0 + net6.0 false - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + - - + + diff --git a/src/Nethermind/Nethermind.Runner/JsonRpc/Startup.cs b/src/Nethermind/Nethermind.Runner/JsonRpc/Startup.cs index 705322be4d3..237fc0a9f68 100644 --- a/src/Nethermind/Nethermind.Runner/JsonRpc/Startup.cs +++ b/src/Nethermind/Nethermind.Runner/JsonRpc/Startup.cs @@ -141,7 +141,7 @@ long SerializeTimeoutException(IJsonRpcService service, Stream resultStream) } }); - app.Use(async (ctx, next) => + app.Run(async (ctx) => { if (ctx.Request.Method == "GET") { diff --git a/src/Nethermind/Nethermind.Runner/Nethermind.Runner.csproj b/src/Nethermind/Nethermind.Runner/Nethermind.Runner.csproj index c0433df5692..318350d01dc 100644 --- a/src/Nethermind/Nethermind.Runner/Nethermind.Runner.csproj +++ b/src/Nethermind/Nethermind.Runner/Nethermind.Runner.csproj @@ -1,7 +1,7 @@  Exe - net5.0 + net6.0 9 true true @@ -13,19 +13,19 @@ - + - - + + - - - - - - + + + + + + @@ -50,7 +50,6 @@ - diff --git a/src/Nethermind/Nethermind.Secp256k1.Test/Nethermind.Secp256k1.Test.csproj b/src/Nethermind/Nethermind.Secp256k1.Test/Nethermind.Secp256k1.Test.csproj index 141d0a76092..51ffb385e68 100644 --- a/src/Nethermind/Nethermind.Secp256k1.Test/Nethermind.Secp256k1.Test.csproj +++ b/src/Nethermind/Nethermind.Secp256k1.Test/Nethermind.Secp256k1.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -13,14 +13,14 @@ true - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + - + @@ -31,6 +31,5 @@ {233F90B7-8850-4E62-93F2-32E4676E8D22} Nethermind.Secp256k1 - \ No newline at end of file diff --git a/src/Nethermind/Nethermind.Secp256k1/Nethermind.Secp256k1.csproj b/src/Nethermind/Nethermind.Secp256k1/Nethermind.Secp256k1.csproj index 4e2926cd1d9..a09657520ca 100644 --- a/src/Nethermind/Nethermind.Secp256k1/Nethermind.Secp256k1.csproj +++ b/src/Nethermind/Nethermind.Secp256k1/Nethermind.Secp256k1.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 9 true diff --git a/src/Nethermind/Nethermind.Seq/Nethermind.Seq.csproj b/src/Nethermind/Nethermind.Seq/Nethermind.Seq.csproj index 644a28e6501..31d311a2b87 100644 --- a/src/Nethermind/Nethermind.Seq/Nethermind.Seq.csproj +++ b/src/Nethermind/Nethermind.Seq/Nethermind.Seq.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 8.0 diff --git a/src/Nethermind/Nethermind.Serialization.Json/Nethermind.Serialization.Json.csproj b/src/Nethermind/Nethermind.Serialization.Json/Nethermind.Serialization.Json.csproj index cb85ec55d27..ba2ba11bd7d 100644 --- a/src/Nethermind/Nethermind.Serialization.Json/Nethermind.Serialization.Json.csproj +++ b/src/Nethermind/Nethermind.Serialization.Json/Nethermind.Serialization.Json.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 true true @@ -17,7 +17,7 @@ - + diff --git a/src/Nethermind/Nethermind.Serialization.Rlp/Nethermind.Serialization.Rlp.csproj b/src/Nethermind/Nethermind.Serialization.Rlp/Nethermind.Serialization.Rlp.csproj index bf112578309..350df997000 100644 --- a/src/Nethermind/Nethermind.Serialization.Rlp/Nethermind.Serialization.Rlp.csproj +++ b/src/Nethermind/Nethermind.Serialization.Rlp/Nethermind.Serialization.Rlp.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 annotations diff --git a/src/Nethermind/Nethermind.Sockets.Test/Nethermind.Sockets.Test.csproj b/src/Nethermind/Nethermind.Sockets.Test/Nethermind.Sockets.Test.csproj index 5dafc983629..c61fa69a53b 100644 --- a/src/Nethermind/Nethermind.Sockets.Test/Nethermind.Sockets.Test.csproj +++ b/src/Nethermind/Nethermind.Sockets.Test/Nethermind.Sockets.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -12,14 +12,14 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/src/Nethermind/Nethermind.Sockets/Nethermind.Sockets.csproj b/src/Nethermind/Nethermind.Sockets/Nethermind.Sockets.csproj index 2fdbb6e3018..71e7046a5c5 100644 --- a/src/Nethermind/Nethermind.Sockets/Nethermind.Sockets.csproj +++ b/src/Nethermind/Nethermind.Sockets/Nethermind.Sockets.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 9 true true diff --git a/src/Nethermind/Nethermind.Specs.Test/Nethermind.Specs.Test.csproj b/src/Nethermind/Nethermind.Specs.Test/Nethermind.Specs.Test.csproj index 753c13f0570..2142c2fc536 100644 --- a/src/Nethermind/Nethermind.Specs.Test/Nethermind.Specs.Test.csproj +++ b/src/Nethermind/Nethermind.Specs.Test/Nethermind.Specs.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -14,10 +14,10 @@ - + - - + + diff --git a/src/Nethermind/Nethermind.Specs/Nethermind.Specs.csproj b/src/Nethermind/Nethermind.Specs/Nethermind.Specs.csproj index 2fbe54dbec3..f7851e3fd8e 100644 --- a/src/Nethermind/Nethermind.Specs/Nethermind.Specs.csproj +++ b/src/Nethermind/Nethermind.Specs/Nethermind.Specs.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 true true diff --git a/src/Nethermind/Nethermind.Ssz.Benchmark/Nethermind.Ssz.Benchmark.csproj b/src/Nethermind/Nethermind.Ssz.Benchmark/Nethermind.Ssz.Benchmark.csproj index decf9e9e91b..118526bc2d9 100644 --- a/src/Nethermind/Nethermind.Ssz.Benchmark/Nethermind.Ssz.Benchmark.csproj +++ b/src/Nethermind/Nethermind.Ssz.Benchmark/Nethermind.Ssz.Benchmark.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 Nethermind.Ssz.Benchmarks enable diff --git a/src/Nethermind/Nethermind.Ssz.Test/Nethermind.Ssz.Test.csproj b/src/Nethermind/Nethermind.Ssz.Test/Nethermind.Ssz.Test.csproj index 5c1f98dfe2d..cb06b161017 100644 --- a/src/Nethermind/Nethermind.Ssz.Test/Nethermind.Ssz.Test.csproj +++ b/src/Nethermind/Nethermind.Ssz.Test/Nethermind.Ssz.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Nethermind Eth2.0 blockchain Copyright © 2019 Demerzel Solutions Limited @@ -16,10 +16,10 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Nethermind.Ssz/Nethermind.Ssz.csproj b/src/Nethermind/Nethermind.Ssz/Nethermind.Ssz.csproj index be68f29344b..1da4b09373a 100644 --- a/src/Nethermind/Nethermind.Ssz/Nethermind.Ssz.csproj +++ b/src/Nethermind/Nethermind.Ssz/Nethermind.Ssz.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 Nethermind Eth2.0 blockchain Copyright © 2019 Demerzel Solutions Limited 0.0.1 diff --git a/src/Nethermind/Nethermind.State.Test.Runner.Test/Nethermind.State.Test.Runner.Test.csproj b/src/Nethermind/Nethermind.State.Test.Runner.Test/Nethermind.State.Test.Runner.Test.csproj index c0134e984fc..9ae48e3d5f4 100644 --- a/src/Nethermind/Nethermind.State.Test.Runner.Test/Nethermind.State.Test.Runner.Test.csproj +++ b/src/Nethermind/Nethermind.State.Test.Runner.Test/Nethermind.State.Test.Runner.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -14,8 +14,8 @@ - - + + diff --git a/src/Nethermind/Nethermind.State.Test.Runner/Nethermind.State.Test.Runner.csproj b/src/Nethermind/Nethermind.State.Test.Runner/Nethermind.State.Test.Runner.csproj index 6f46dbb15d0..1a65efcd6f0 100644 --- a/src/Nethermind/Nethermind.State.Test.Runner/Nethermind.State.Test.Runner.csproj +++ b/src/Nethermind/Nethermind.State.Test.Runner/Nethermind.State.Test.Runner.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 nethtest annotations @@ -14,7 +14,7 @@ - + diff --git a/src/Nethermind/Nethermind.State.Test/Nethermind.State.Test.csproj b/src/Nethermind/Nethermind.State.Test/Nethermind.State.Test.csproj index 0d56c260159..1aac73cb568 100644 --- a/src/Nethermind/Nethermind.State.Test/Nethermind.State.Test.csproj +++ b/src/Nethermind/Nethermind.State.Test/Nethermind.State.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 Nethermind.Store.Test @@ -13,14 +13,14 @@ true - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Nethermind.State/Nethermind.State.csproj b/src/Nethermind/Nethermind.State/Nethermind.State.csproj index 3a297daf870..9460dadc298 100644 --- a/src/Nethermind/Nethermind.State/Nethermind.State.csproj +++ b/src/Nethermind/Nethermind.State/Nethermind.State.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 9 annotations true diff --git a/src/Nethermind/Nethermind.Synchronization.Test/BlockDownloaderTests.cs b/src/Nethermind/Nethermind.Synchronization.Test/BlockDownloaderTests.cs index 07746a66923..f283d285ff9 100644 --- a/src/Nethermind/Nethermind.Synchronization.Test/BlockDownloaderTests.cs +++ b/src/Nethermind/Nethermind.Synchronization.Test/BlockDownloaderTests.cs @@ -632,7 +632,7 @@ public async Task Throws_on_block_task_exception() syncPeer.HeadNumber.Returns(2); Func action = async () => await downloader.DownloadBlocks(peerInfo, new BlocksRequest(), CancellationToken.None); - action.Should().Throw().WithInnerException(); + await action.Should().ThrowAsync().WithInnerException(); } [TestCase(DownloaderOptions.WithReceipts, true)] @@ -669,11 +669,11 @@ public async Task Throws_on_receipt_task_exception_when_downloading_receipts(int Func action = async () => await downloader.DownloadBlocks(peerInfo, new BlocksRequest(downloaderOptions), CancellationToken.None); if (shouldThrow) { - action.Should().Throw().WithInnerException(); + await action.Should().ThrowAsync().WithInnerException(); } else { - action.Should().NotThrow(); + await action.Should().NotThrowAsync(); } } @@ -727,13 +727,14 @@ public async Task Throws_on_null_receipt_downloaded(int options, bool shouldThro syncPeerInternal.ExtendTree(chainLength * 2); Func action = async () => await downloader.DownloadBlocks(peerInfo, new BlocksRequest(downloaderOptions), CancellationToken.None); + if (shouldThrow) { - action.Should().Throw(); + await action.Should().ThrowAsync(); } else { - action.Should().NotThrow(); + await action.Should().NotThrowAsync(); } } @@ -767,7 +768,7 @@ public async Task Throws_on_block_bodies_count_higher_than_receipts_list_count(i syncPeer.HeadNumber.Returns(2); Func action = async () => await downloader.DownloadBlocks(peerInfo, new BlocksRequest(DownloaderOptions.WithBodies | DownloaderOptions.WithReceipts), CancellationToken.None); - action.Should().Throw(); + await action.Should().ThrowAsync(); } [TestCase(32)] @@ -799,7 +800,7 @@ public async Task Does_throw_on_transaction_count_different_than_receipts_count_ syncPeer.HeadNumber.Returns(2); Func action = async () => await downloader.DownloadBlocks(peerInfo, new BlocksRequest(DownloaderOptions.WithReceipts), CancellationToken.None); - action.Should().Throw(); + await action.Should().ThrowAsync(); } [TestCase(32)] @@ -831,7 +832,7 @@ public async Task Throws_on_incorrect_receipts_root(int threshold) syncPeer.HeadNumber.Returns(2); Func action = async () => await downloader.DownloadBlocks(peerInfo, new BlocksRequest(DownloaderOptions.WithReceipts), CancellationToken.None); - action.Should().Throw(); + await action.Should().ThrowAsync(); } [Flags] diff --git a/src/Nethermind/Nethermind.Synchronization.Test/Nethermind.Synchronization.Test.csproj b/src/Nethermind/Nethermind.Synchronization.Test/Nethermind.Synchronization.Test.csproj index cc16dadebde..cf4592ef010 100644 --- a/src/Nethermind/Nethermind.Synchronization.Test/Nethermind.Synchronization.Test.csproj +++ b/src/Nethermind/Nethermind.Synchronization.Test/Nethermind.Synchronization.Test.csproj @@ -1,19 +1,19 @@ - net5.0 + net6.0 false - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/src/Nethermind/Nethermind.Synchronization/Nethermind.Synchronization.csproj b/src/Nethermind/Nethermind.Synchronization/Nethermind.Synchronization.csproj index d979dc19203..5c78eb509f7 100644 --- a/src/Nethermind/Nethermind.Synchronization/Nethermind.Synchronization.csproj +++ b/src/Nethermind/Nethermind.Synchronization/Nethermind.Synchronization.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 annotations true true diff --git a/src/Nethermind/Nethermind.Tools.GasHistorian/Nethermind.Tools.GasHistorian.csproj b/src/Nethermind/Nethermind.Tools.GasHistorian/Nethermind.Tools.GasHistorian.csproj index c253bb5dd54..75b692751c7 100644 --- a/src/Nethermind/Nethermind.Tools.GasHistorian/Nethermind.Tools.GasHistorian.csproj +++ b/src/Nethermind/Nethermind.Tools.GasHistorian/Nethermind.Tools.GasHistorian.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 enable diff --git a/src/Nethermind/Nethermind.Trie.Benchmark/Nethermind.Trie.Benchmark.csproj b/src/Nethermind/Nethermind.Trie.Benchmark/Nethermind.Trie.Benchmark.csproj index 29771e0a80a..e26f81e9fcc 100644 --- a/src/Nethermind/Nethermind.Trie.Benchmark/Nethermind.Trie.Benchmark.csproj +++ b/src/Nethermind/Nethermind.Trie.Benchmark/Nethermind.Trie.Benchmark.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 Exe diff --git a/src/Nethermind/Nethermind.Trie.Test/Nethermind.Trie.Test.csproj b/src/Nethermind/Nethermind.Trie.Test/Nethermind.Trie.Test.csproj index 47fb0f12148..40c84b432e0 100644 --- a/src/Nethermind/Nethermind.Trie.Test/Nethermind.Trie.Test.csproj +++ b/src/Nethermind/Nethermind.Trie.Test/Nethermind.Trie.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -14,14 +14,14 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/src/Nethermind/Nethermind.Trie/Nethermind.Trie.csproj b/src/Nethermind/Nethermind.Trie/Nethermind.Trie.csproj index 30c47adfa57..806f3a7feba 100644 --- a/src/Nethermind/Nethermind.Trie/Nethermind.Trie.csproj +++ b/src/Nethermind/Nethermind.Trie/Nethermind.Trie.csproj @@ -1,7 +1,7 @@ - net5.0 + net6.0 annotations true true diff --git a/src/Nethermind/Nethermind.TxPool.Test/Nethermind.TxPool.Test.csproj b/src/Nethermind/Nethermind.TxPool.Test/Nethermind.TxPool.Test.csproj index af14eea94a3..dafe7fe7cb2 100644 --- a/src/Nethermind/Nethermind.TxPool.Test/Nethermind.TxPool.Test.csproj +++ b/src/Nethermind/Nethermind.TxPool.Test/Nethermind.TxPool.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -14,8 +14,8 @@ - - + + diff --git a/src/Nethermind/Nethermind.TxPool/Nethermind.TxPool.csproj b/src/Nethermind/Nethermind.TxPool/Nethermind.TxPool.csproj index fa396978d19..18bd41c3d95 100644 --- a/src/Nethermind/Nethermind.TxPool/Nethermind.TxPool.csproj +++ b/src/Nethermind/Nethermind.TxPool/Nethermind.TxPool.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 true true annotations @@ -20,7 +20,7 @@ - + diff --git a/src/Nethermind/Nethermind.Vault.Test/Nethermind.Vault.Test.csproj b/src/Nethermind/Nethermind.Vault.Test/Nethermind.Vault.Test.csproj index 3e8897c0a51..55224e05477 100644 --- a/src/Nethermind/Nethermind.Vault.Test/Nethermind.Vault.Test.csproj +++ b/src/Nethermind/Nethermind.Vault.Test/Nethermind.Vault.Test.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false @@ -11,11 +11,11 @@ - + - - + + diff --git a/src/Nethermind/Nethermind.Wallet.Test/Nethermind.Wallet.Test.csproj b/src/Nethermind/Nethermind.Wallet.Test/Nethermind.Wallet.Test.csproj index c2062cecdaf..0f462ea7bc0 100644 --- a/src/Nethermind/Nethermind.Wallet.Test/Nethermind.Wallet.Test.csproj +++ b/src/Nethermind/Nethermind.Wallet.Test/Nethermind.Wallet.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 false 8.0 @@ -10,13 +10,13 @@ true - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + - + diff --git a/src/Nethermind/Nethermind.Wallet/Nethermind.Wallet.csproj b/src/Nethermind/Nethermind.Wallet/Nethermind.Wallet.csproj index d709e6d38a6..1f8b6ec2b3c 100644 --- a/src/Nethermind/Nethermind.Wallet/Nethermind.Wallet.csproj +++ b/src/Nethermind/Nethermind.Wallet/Nethermind.Wallet.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 9 true true @@ -16,7 +16,7 @@ - - + + \ No newline at end of file diff --git a/src/Nethermind/Nethermind.WriteTheDocs/Nethermind.WriteTheDocs.csproj b/src/Nethermind/Nethermind.WriteTheDocs/Nethermind.WriteTheDocs.csproj index 4c7d92c9aee..fb54dfba4ae 100644 --- a/src/Nethermind/Nethermind.WriteTheDocs/Nethermind.WriteTheDocs.csproj +++ b/src/Nethermind/Nethermind.WriteTheDocs/Nethermind.WriteTheDocs.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 8.0 diff --git a/src/Nethermind/global.json b/src/Nethermind/global.json new file mode 100644 index 00000000000..97dd8739289 --- /dev/null +++ b/src/Nethermind/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "6.0", + "rollForward": "latestMajor", + "allowPrerelease": false + } +} \ No newline at end of file diff --git a/src/bench_precompiles b/src/bench_precompiles index 8a9b9902a32..9c9705ed4e7 160000 --- a/src/bench_precompiles +++ b/src/bench_precompiles @@ -1 +1 @@ -Subproject commit 8a9b9902a32456a14d2b2f818de870ee6b5d1a88 +Subproject commit 9c9705ed4e7f264abc8f343a848016e7bf6501b3 diff --git a/src/int256 b/src/int256 index 06f47e6f871..ab61bef664d 160000 --- a/src/int256 +++ b/src/int256 @@ -1 +1 @@ -Subproject commit 06f47e6f871eb933cfd2aefc5053668d9f914bcd +Subproject commit ab61bef664d3238cdb6f3aa189501b2684350db2 diff --git a/src/rocksdb-sharp b/src/rocksdb-sharp index 2331d64fea0..0d6715ddaeb 160000 --- a/src/rocksdb-sharp +++ b/src/rocksdb-sharp @@ -1 +1 @@ -Subproject commit 2331d64fea0760b15a76d06c71092395d070f371 +Subproject commit 0d6715ddaeb1adca540f31aee2e052957a1652e4