From 349189612bcb488dd7e7300fd87f433cda7a4037 Mon Sep 17 00:00:00 2001 From: "chopin.fan" Date: Fri, 14 Jun 2024 14:29:41 +0800 Subject: [PATCH 01/22] Add Groth16 to the whitelist. --- src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj | 1 + .../Validators/Whitelist/IWhitelistProvider.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj b/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj index 89c51e7004..036f33f87a 100644 --- a/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj +++ b/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj @@ -10,6 +10,7 @@ + diff --git a/src/AElf.CSharp.CodeOps/Validators/Whitelist/IWhitelistProvider.cs b/src/AElf.CSharp.CodeOps/Validators/Whitelist/IWhitelistProvider.cs index c04a54184c..fc0212b85c 100644 --- a/src/AElf.CSharp.CodeOps/Validators/Whitelist/IWhitelistProvider.cs +++ b/src/AElf.CSharp.CodeOps/Validators/Whitelist/IWhitelistProvider.cs @@ -10,6 +10,7 @@ using AElf.Types; using Volo.Abp.DependencyInjection; + namespace AElf.CSharp.CodeOps.Validators.Whitelist; public interface IWhitelistProvider @@ -46,6 +47,7 @@ private void WhitelistAssemblies(Whitelist whitelist) .Assembly(typeof(IMethod).Assembly, Trust.Full) // AElf.CSharp.Core .Assembly(typeof(SecretSharingHelper).Assembly, Trust.Partial) // AElf.Cryptography .Assembly(typeof(ISmartContractBridgeContext).Assembly, Trust.Full) // AElf.Kernel.SmartContract.Shared + .Assembly(typeof(Groth16.Net.Verifier).Assembly, Trust.Full) // AElf.Cryptography.ECDSA ; } From bcdd1f1200e6337ca33e672d064999900ad6fdff Mon Sep 17 00:00:00 2001 From: "chopin.fan" Date: Tue, 18 Jun 2024 14:41:51 +0800 Subject: [PATCH 02/22] Add nuget.config to solve the problem of dependent testing of the Groth16 test package. --- src/AElf.CSharp.CodeOps/nuget.config | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/AElf.CSharp.CodeOps/nuget.config diff --git a/src/AElf.CSharp.CodeOps/nuget.config b/src/AElf.CSharp.CodeOps/nuget.config new file mode 100644 index 0000000000..8b19203c51 --- /dev/null +++ b/src/AElf.CSharp.CodeOps/nuget.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From baa517845141077fa5944f469ebac842a6cf7558 Mon Sep 17 00:00:00 2001 From: JimAelf <165892081+JimAelf@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:41:15 +0800 Subject: [PATCH 03/22] update issue template update issue template --- .github/ISSUE_TEMPLATE/bug_report.md | 42 ++++++++++++----------- .github/ISSUE_TEMPLATE/config.yml | 10 ++++++ .github/ISSUE_TEMPLATE/feature_request.md | 29 ++++++++++------ 3 files changed, 50 insertions(+), 31 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 6e4b2c3526..ea59817cf7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,31 +1,33 @@ --- -name: Bug report -about: Create a report to help us improve +name: 👾 Bug Report +about: Report a bug or issue with the project. title: '' -labels: '' +labels: 'bug' assignees: '' --- -**Describe the bug** +### Description A clear and concise description of what the bug is. -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error +### Steps To Reproduce +1. Log in... +2. Ensure that... +3. Allow a long period of inactivity to pass... +4. Observe that... +5. Attempt to log in... -**Expected behavior** -A clear and concise description of what you expected to happen. +### Current Behavior +- After the period of inactivity... +- When the user tries to log in using another method... +- This causes a bug due to... -**Screenshots** -If applicable, add screenshots to help explain your problem. +### Expected Behavior +- After a long period of inactivity... +- When a user logs in successfully... +- This ensures that only... -**Environment (please complete the following information):** - - OS and version: [e.g. Ubuntu 18.04] - - Dotnet core version [e.g. 2.2.106] - -**Additional context** -Add any other context about the problem here. +### Environment +- Platform: PC +- Node: v18.18.0 +- Browser: Chrome 126.0.6478.56 \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..163c1c437c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,10 @@ +blank_issues_enabled: false +issue_template: + - name: 👾 Bug Report + description: Report a bug or issue with the project. + labels: ["bug"] + template: bug_report.md + - name: 💡 Feature Request + description: Create a new ticket for a new feature request. + labels: ["enhancement"] + template: feature_request.md \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7d61..a4b817533a 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,20 +1,27 @@ --- -name: Feature request -about: Suggest an idea for this project +name: 💡 Feature Request +about: Create a new ticket for a new feature request title: '' -labels: '' +labels: 'enhancement' assignees: '' --- -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] +### Expected Behavior +Describe the expected behavior here. -**Describe the solution you'd like** -A clear and concise description of what you want to happen. +### Specifications +As a `user`, I would like to `action` so that `reason`. -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. +**Features:** +- describe feature details here. -**Additional context** -Add any other context or screenshots about the feature request here. +**Development Tasks:** +- [ ] Task 1 +- [ ] Task 2 + +### Dependencies +List any dependencies that are required for this feature by providing links to the issues or repositories. + +### References +List any references that are related to this feature request. \ No newline at end of file From 612468d739cd80eac0250b0a7d451d684809ba55 Mon Sep 17 00:00:00 2001 From: "chopin.fan" Date: Thu, 27 Jun 2024 09:42:59 +0800 Subject: [PATCH 04/22] Add a SonarQube configuration file to implement static code analysis. --- .github/workflows/sonarqube.yaml | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/sonarqube.yaml diff --git a/.github/workflows/sonarqube.yaml b/.github/workflows/sonarqube.yaml new file mode 100644 index 0000000000..0209b437e1 --- /dev/null +++ b/.github/workflows/sonarqube.yaml @@ -0,0 +1,42 @@ +on: + pull_request: + types: [opened, synchronize, reopened] + +name: PR Static Code Analysis +jobs: + static-code-analysis: + runs-on: ubuntu-latest + steps: + - name: Code Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '7.0' + - name: Set up JDK 17 + uses: actions/setup-java@v1 + with: + java-version: 17 + - name: Cache SonarQube packages + uses: actions/cache@v1 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache SonarQube scanner + id: cache-sonar-scanner + uses: actions/cache@v1 + with: + path: ./.sonar/scanner + key: ${{ runner.os }}-sonar-scanner + restore-keys: ${{ runner.os }}-sonar-scanner + - name: Install SonarScanner for .NET + run: dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner + - name: Add .NET global tools to PATH + run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH + - name: Begin SonarQube analysis + run: | + ./.sonar/scanner/dotnet-sonarscanner begin /k:"AElf" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" + dotnet build + ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" \ No newline at end of file From 8010f68613d900029d12286927de3ccf010cef9b Mon Sep 17 00:00:00 2001 From: "chopin.fan" Date: Thu, 27 Jun 2024 14:35:00 +0800 Subject: [PATCH 05/22] To clarify the specific project to be built. --- .github/workflows/sonarqube.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarqube.yaml b/.github/workflows/sonarqube.yaml index 0209b437e1..4f021c18b0 100644 --- a/.github/workflows/sonarqube.yaml +++ b/.github/workflows/sonarqube.yaml @@ -38,5 +38,5 @@ jobs: - name: Begin SonarQube analysis run: | ./.sonar/scanner/dotnet-sonarscanner begin /k:"AElf" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" - dotnet build - ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" \ No newline at end of file + dotnet build AElf.All.sln + ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" From 98846f27a59c747a1a24ade0be29a6938405c369 Mon Sep 17 00:00:00 2001 From: "chopin.fan" Date: Thu, 27 Jun 2024 14:50:24 +0800 Subject: [PATCH 06/22] Add protobuf in sonarqube.yaml --- .github/workflows/sonarqube.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sonarqube.yaml b/.github/workflows/sonarqube.yaml index 4f021c18b0..19c1f8357b 100644 --- a/.github/workflows/sonarqube.yaml +++ b/.github/workflows/sonarqube.yaml @@ -35,8 +35,10 @@ jobs: run: dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner - name: Add .NET global tools to PATH run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH + - name: Install protobuf + run: sudo apt-get update && sudo apt-get install -y protobuf-compiler - name: Begin SonarQube analysis run: | ./.sonar/scanner/dotnet-sonarscanner begin /k:"AElf" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" dotnet build AElf.All.sln - ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" + ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" \ No newline at end of file From 784bcb5a0d02ff65eebf80edf4525662aa8c4669 Mon Sep 17 00:00:00 2001 From: "chopin.fan" Date: Thu, 27 Jun 2024 15:01:24 +0800 Subject: [PATCH 07/22] Change the version of Protobuf to 3.19.4 --- .github/workflows/sonarqube.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarqube.yaml b/.github/workflows/sonarqube.yaml index 19c1f8357b..d4066c57ad 100644 --- a/.github/workflows/sonarqube.yaml +++ b/.github/workflows/sonarqube.yaml @@ -35,8 +35,10 @@ jobs: run: dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner - name: Add .NET global tools to PATH run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH - - name: Install protobuf - run: sudo apt-get update && sudo apt-get install -y protobuf-compiler + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + version: "19.4" - name: Begin SonarQube analysis run: | ./.sonar/scanner/dotnet-sonarscanner begin /k:"AElf" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" From 66de35c0b59b8a017198007eb101f7521d364769 Mon Sep 17 00:00:00 2001 From: "chopin.fan" Date: Thu, 27 Jun 2024 15:03:40 +0800 Subject: [PATCH 08/22] Change the version of Protobuf to 3.19.4 --- .github/workflows/sonarqube.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonarqube.yaml b/.github/workflows/sonarqube.yaml index d4066c57ad..abc7545e76 100644 --- a/.github/workflows/sonarqube.yaml +++ b/.github/workflows/sonarqube.yaml @@ -38,7 +38,7 @@ jobs: - name: Install Protoc uses: arduino/setup-protoc@v3 with: - version: "19.4" + version: "3.19.4" - name: Begin SonarQube analysis run: | ./.sonar/scanner/dotnet-sonarscanner begin /k:"AElf" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" From 6b701bff8a99afbd7703fda35d8d03a535288653 Mon Sep 17 00:00:00 2001 From: "chopin.fan" Date: Thu, 27 Jun 2024 15:11:33 +0800 Subject: [PATCH 09/22] Change the version of Protobuf to 3.19.4 --- .github/workflows/sonarqube.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sonarqube.yaml b/.github/workflows/sonarqube.yaml index abc7545e76..29ec611228 100644 --- a/.github/workflows/sonarqube.yaml +++ b/.github/workflows/sonarqube.yaml @@ -35,10 +35,10 @@ jobs: run: dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner - name: Add .NET global tools to PATH run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH - - name: Install Protoc - uses: arduino/setup-protoc@v3 - with: - version: "3.19.4" + - name: Install Protobuf 3.19.4 + run: | + sudo apt-get update + sudo apt-get install -y protobuf-compiler=3.19.4 - name: Begin SonarQube analysis run: | ./.sonar/scanner/dotnet-sonarscanner begin /k:"AElf" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" From 54d980ee2c0cab70df6ee42d0442c8a689baaefe Mon Sep 17 00:00:00 2001 From: "chopin.fan" Date: Thu, 27 Jun 2024 15:13:26 +0800 Subject: [PATCH 10/22] Change the version of Protobuf to 3.19.4 --- .github/workflows/sonarqube.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonarqube.yaml b/.github/workflows/sonarqube.yaml index 29ec611228..1f70cc8d32 100644 --- a/.github/workflows/sonarqube.yaml +++ b/.github/workflows/sonarqube.yaml @@ -38,7 +38,7 @@ jobs: - name: Install Protobuf 3.19.4 run: | sudo apt-get update - sudo apt-get install -y protobuf-compiler=3.19.4 + sudo apt-get install -y protobuf-compiler=3.19.4-1 - name: Begin SonarQube analysis run: | ./.sonar/scanner/dotnet-sonarscanner begin /k:"AElf" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" From 9f3b2766b6d9825dc545b27985af4f4431fc997a Mon Sep 17 00:00:00 2001 From: "chopin.fan" Date: Thu, 27 Jun 2024 15:35:22 +0800 Subject: [PATCH 11/22] Change the version of Protobuf to 3.19.4 --- .github/workflows/sonarqube.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sonarqube.yaml b/.github/workflows/sonarqube.yaml index 1f70cc8d32..32bcb0fbd2 100644 --- a/.github/workflows/sonarqube.yaml +++ b/.github/workflows/sonarqube.yaml @@ -35,10 +35,11 @@ jobs: run: dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner - name: Add .NET global tools to PATH run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH - - name: Install Protobuf 3.19.4 + - name: Install Protobuf for C# run: | - sudo apt-get update - sudo apt-get install -y protobuf-compiler=3.19.4-1 + dotnet tool install --global Grpc.Tools --version 2.51.0 + dotnet tool install --global Google.Protobuf.Tools --version 3.19.4 + echo "$HOME/.dotnet/tools" >> $GITHUB_PATH - name: Begin SonarQube analysis run: | ./.sonar/scanner/dotnet-sonarscanner begin /k:"AElf" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" From 4006f5b2239442372183175aa918e90cdbe24c5c Mon Sep 17 00:00:00 2001 From: "chopin.fan" Date: Thu, 27 Jun 2024 15:38:45 +0800 Subject: [PATCH 12/22] Change the version of Protobuf to 3.19.4 --- .github/workflows/sonarqube.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sonarqube.yaml b/.github/workflows/sonarqube.yaml index 32bcb0fbd2..19c1f8357b 100644 --- a/.github/workflows/sonarqube.yaml +++ b/.github/workflows/sonarqube.yaml @@ -35,11 +35,8 @@ jobs: run: dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner - name: Add .NET global tools to PATH run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH - - name: Install Protobuf for C# - run: | - dotnet tool install --global Grpc.Tools --version 2.51.0 - dotnet tool install --global Google.Protobuf.Tools --version 3.19.4 - echo "$HOME/.dotnet/tools" >> $GITHUB_PATH + - name: Install protobuf + run: sudo apt-get update && sudo apt-get install -y protobuf-compiler - name: Begin SonarQube analysis run: | ./.sonar/scanner/dotnet-sonarscanner begin /k:"AElf" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" From 6540d8fba5d1be51d345d638e00b4fef6247018d Mon Sep 17 00:00:00 2001 From: "chopin.fan" Date: Thu, 27 Jun 2024 15:44:16 +0800 Subject: [PATCH 13/22] Change dotnet-version to 6. --- .github/workflows/sonarqube.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonarqube.yaml b/.github/workflows/sonarqube.yaml index 19c1f8357b..cf33b0dd86 100644 --- a/.github/workflows/sonarqube.yaml +++ b/.github/workflows/sonarqube.yaml @@ -13,7 +13,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-dotnet@v4 with: - dotnet-version: '7.0' + dotnet-version: '6.0' - name: Set up JDK 17 uses: actions/setup-java@v1 with: From b41e056de354f631fc0deec35d3df639f29e50bd Mon Sep 17 00:00:00 2001 From: "chopin.fan" Date: Thu, 27 Jun 2024 16:04:54 +0800 Subject: [PATCH 14/22] dotnet-version: '6.0' -> dotnet-version: '7.0' --- .github/workflows/sonarqube.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonarqube.yaml b/.github/workflows/sonarqube.yaml index cf33b0dd86..19c1f8357b 100644 --- a/.github/workflows/sonarqube.yaml +++ b/.github/workflows/sonarqube.yaml @@ -13,7 +13,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-dotnet@v4 with: - dotnet-version: '6.0' + dotnet-version: '7.0' - name: Set up JDK 17 uses: actions/setup-java@v1 with: From 39d6aa122c268803ba7b8a348270bda1e374f444 Mon Sep 17 00:00:00 2001 From: "chopin.fan" Date: Thu, 27 Jun 2024 16:16:40 +0800 Subject: [PATCH 15/22] Change the version of Protobuf to 3.19.4 --- .github/workflows/sonarqube.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sonarqube.yaml b/.github/workflows/sonarqube.yaml index 19c1f8357b..01e315a740 100644 --- a/.github/workflows/sonarqube.yaml +++ b/.github/workflows/sonarqube.yaml @@ -14,6 +14,8 @@ jobs: - uses: actions/setup-dotnet@v4 with: dotnet-version: '7.0' + - name: Create temporary global.json + run: echo '{"sdk":{"version":"7.0.410"}}' > ./global.json - name: Set up JDK 17 uses: actions/setup-java@v1 with: @@ -41,4 +43,7 @@ jobs: run: | ./.sonar/scanner/dotnet-sonarscanner begin /k:"AElf" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" dotnet build AElf.All.sln - ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" \ No newline at end of file + ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" + + + \ No newline at end of file From 1b650b1d1d0728014972b1a39cc821a996ffc3bc Mon Sep 17 00:00:00 2001 From: jason20240511 Date: Thu, 27 Jun 2024 16:49:38 +0800 Subject: [PATCH 16/22] feat:add a benchmark github action. --- .github/workflows/benchmark_action.yml | 48 ++++++++++++ bench/AElf.Benchmark/HtmlSummaryExporter.cs | 82 +++++++++++++++++++++ bench/AElf.Benchmark/Program.cs | 13 +++- 3 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/benchmark_action.yml create mode 100644 bench/AElf.Benchmark/HtmlSummaryExporter.cs diff --git a/.github/workflows/benchmark_action.yml b/.github/workflows/benchmark_action.yml new file mode 100644 index 0000000000..1717d86906 --- /dev/null +++ b/.github/workflows/benchmark_action.yml @@ -0,0 +1,48 @@ +name: benchmark_action +on: + push: + tags: + - '**' + branches: + - '**' + + + +env: + DOTNET_INSTALL_DIR: "./.dotnet" + Solution_Name: AElf.All.sln + Service_Name: AELF + +jobs: + test: + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '6.0' + + - name: 'Download AElf build tools' + run: bash scripts/download_binary.sh + + - name: 'Install protobuf' + run: bash scripts/install_protobuf.sh + + - name: Install dependencies + run: dotnet restore bench/AElf.Benchmark/AElf.Benchmark.csproj --verbosity quiet + + - name: BenchMark + run: | + cd bench/AElf.Benchmark + dotnet run --filter '*MinerTests*' + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ env.Service_Name }} + path: bench/AElf.Benchmark/BenchmarkDotNet.Artifacts/results + retention-days: 30 \ No newline at end of file diff --git a/bench/AElf.Benchmark/HtmlSummaryExporter.cs b/bench/AElf.Benchmark/HtmlSummaryExporter.cs new file mode 100644 index 0000000000..1b9f7756c1 --- /dev/null +++ b/bench/AElf.Benchmark/HtmlSummaryExporter.cs @@ -0,0 +1,82 @@ +using BenchmarkDotNet.Exporters; +using BenchmarkDotNet.Loggers; +using BenchmarkDotNet.Reports; + +using System.Collections.Generic; +using System.IO; + + +public class HtmlSummaryExporter : IExporter +{ + public string Name => nameof(HtmlSummaryExporter); + + public void ExportToLog(Summary summary, ILogger logger) + { + + } + + public IEnumerable ExportToFiles(Summary summary, ILogger consoleLogger) + { + string directoryPath = summary.ResultsDirectoryPath; + string outputPath = Path.Combine(directoryPath, "Summary.html"); + + var htmlFiles = Directory.GetFiles(directoryPath, "*.html"); + + using (StreamWriter writer = new StreamWriter(outputPath)) + { + writer.WriteLine(""); + writer.WriteLine(""); + writer.WriteLine("Benchmark Summary"); + + writer.WriteLine(""); + + writer.WriteLine(""); + writer.WriteLine(""); + + foreach (var file in htmlFiles) + { + string fileName = Path.GetFileName(file); + writer.WriteLine($"

{fileName}

"); + string content = File.ReadAllText(file); + string bodyContent = GetBodyContent(content); + writer.WriteLine(bodyContent); + } + + writer.WriteLine(""); + writer.WriteLine(""); + } + + consoleLogger.WriteLine($"Summary HTML file created successfully at {outputPath}."); + + return new[] { outputPath }; + } + + private string GetBodyContent(string html) + { + int bodyStartIndex = html.IndexOf("") + "".Length; + int bodyEndIndex = html.IndexOf(""); + if (bodyStartIndex >= 0 && bodyEndIndex >= 0) + { + return html.Substring(bodyStartIndex, bodyEndIndex - bodyStartIndex); + } + return string.Empty; + } + + private string GetStyleContent(string html) + { + int styleStartIndex = html.IndexOf(""); + if (styleStartIndex >= 0 && styleEndIndex >= 0) + { + return html.Substring(styleStartIndex, styleEndIndex - styleStartIndex); + } + return string.Empty; + } +} \ No newline at end of file diff --git a/bench/AElf.Benchmark/Program.cs b/bench/AElf.Benchmark/Program.cs index bc0d10d859..9d71a23611 100644 --- a/bench/AElf.Benchmark/Program.cs +++ b/bench/AElf.Benchmark/Program.cs @@ -2,6 +2,10 @@ using System.IO; using System.Reflection; using BenchmarkDotNet.Configs; +using BenchmarkDotNet.Exporters; +using BenchmarkDotNet.Exporters.Csv; +using BenchmarkDotNet.Exporters.Xml; +using BenchmarkDotNet.Reports; using BenchmarkDotNet.Running; using Volo.Abp; @@ -18,8 +22,13 @@ private static void Main(string[] args) })) { application.Initialize(); - BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, new DebugInProcessConfig()); - } + var config = new DebugInProcessConfig() + .WithSummaryStyle(SummaryStyle.Default.WithMaxParameterColumnWidth(50)) + .AddExporter(XmlExporter.Default) + .AddExporter(HtmlExporter.Default) + .AddExporter(new HtmlSummaryExporter()) + .AddExporter(CsvExporter.Default); + BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, config); } } private static void RegisterAssemblyResolveEvent() From 9ab3a99564c67c9c625657970c58df7f19230ce5 Mon Sep 17 00:00:00 2001 From: jason20240511 Date: Thu, 27 Jun 2024 16:58:40 +0800 Subject: [PATCH 17/22] feat:add comments to enhance code readability --- .bettercodehub.yml | 2 ++ .gitignore | 2 +- .readthedocs.yml | 2 +- AElf.ContractTools.targets | 3 ++- AElf.Contracts.sln | 3 +-- AElf.sln.DotSettings | 29 ++++++++++++++----------- CodeCoverage.runsettings | 1 + appveyor.yml | 1 + azure-myget-publish.yml | 1 + azure-pipelines.yml | 2 +- build.cake | 1 - build.config | 2 +- build.ps1 | 1 + build.sh | 2 +- common.props | 2 +- docker/docker-compose.yml | 1 - docker/start-cli.sh | 1 - docker/start-node.sh | 2 +- docs-sphinx/index.rst | 2 +- docs/main-structure.md | 2 +- scripts/build.sh | 2 +- scripts/deploy_docker.sh | 2 +- scripts/deploy_myget.sh | 2 +- scripts/deploy_myget_daily.sh | 2 +- scripts/deploy_nuget.sh | 2 +- scripts/download_binary.bat | 2 +- scripts/download_binary.sh | 2 +- scripts/generate_contract_base.bat | 2 +- scripts/generate_contract_base.sh | 2 +- scripts/generate_contract_code.bat | 2 +- scripts/generate_contract_code.sh | 2 +- scripts/generate_contract_reference.bat | 2 +- scripts/generate_contract_reference.sh | 2 +- scripts/generate_contract_stub.bat | 2 +- scripts/generate_contract_stub.sh | 2 +- scripts/generate_event_only.bat | 2 +- scripts/generate_event_only.sh | 2 +- scripts/install_protobuf.sh | 2 +- scripts/test.sh | 2 +- scripts/upload_coverage.sh | 2 +- 40 files changed, 54 insertions(+), 48 deletions(-) diff --git a/.bettercodehub.yml b/.bettercodehub.yml index 4ace3ad3ba..d1a64f481a 100644 --- a/.bettercodehub.yml +++ b/.bettercodehub.yml @@ -1,4 +1,6 @@ +# Depth of components to analyze (2 levels deep) component_depth: 2 +# Programming languages to analyze languages: - csharp diff --git a/.gitignore b/.gitignore index 04d0c6ea86..49a6e74115 100644 --- a/.gitignore +++ b/.gitignore @@ -312,4 +312,4 @@ tools .idea/.idea.AElf/.idea/projectSettingsUpdater.xml .idea/.idea.AElf/.idea/vcs.xml .idea/.idea.AElf/.idea/workspace.xml -.idea/.idea.AElf/riderModule.iml +.idea/.idea.AElf/riderModule.iml \ No newline at end of file diff --git a/.readthedocs.yml b/.readthedocs.yml index 56b2002e45..c717656544 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -14,7 +14,7 @@ sphinx: # Optionally build your docs in additional formats such as PDF and ePub formats: all -# Optionally set the version of Python and requirements required to build your docs +# Optionally set the version of python and requirements required to build your docs python: version: 3.7 install: diff --git a/AElf.ContractTools.targets b/AElf.ContractTools.targets index 3c3608d258..86de821de0 100644 --- a/AElf.ContractTools.targets +++ b/AElf.ContractTools.targets @@ -32,7 +32,8 @@ - + + $(ProjectDir)/Protobuf diff --git a/AElf.Contracts.sln b/AElf.Contracts.sln index ac50a9f51e..486a48541b 100644 --- a/AElf.Contracts.sln +++ b/AElf.Contracts.sln @@ -1,5 +1,4 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "contract", "contract", "{651F0F6E-86CF-42D2-9110-5F3EAE5704F0}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{26990847-E0A2-4FCC-8C71-267CA77557CD}" diff --git a/AElf.sln.DotSettings b/AElf.sln.DotSettings index 04a90e14d0..f728bd7795 100644 --- a/AElf.sln.DotSettings +++ b/AElf.sln.DotSettings @@ -1,14 +1,17 @@ - + False - JS - True - True - True - True - True - True - True - True - True - True - True + JS + True + True + True + True + True + True + True + True + True + True + True diff --git a/CodeCoverage.runsettings b/CodeCoverage.runsettings index 609fa6a0a2..bf1e25abec 100644 --- a/CodeCoverage.runsettings +++ b/CodeCoverage.runsettings @@ -1,4 +1,5 @@ + diff --git a/appveyor.yml b/appveyor.yml index 7be64af079..8239ba530d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,3 +1,4 @@ +# appveyor configuration file version: 1.0.0.{build} skip_tags: true os: Windows Server 2012 R2 diff --git a/azure-myget-publish.yml b/azure-myget-publish.yml index d271eb5595..9a404026cb 100644 --- a/azure-myget-publish.yml +++ b/azure-myget-publish.yml @@ -1,3 +1,4 @@ + # Azure DevOps pipeline configuration for publishing NuGet packages to MyGet pool: vmImage: ubuntu-latest pr: none diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c7761f5875..ab968a5312 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,4 +1,4 @@ -# File: azure-pipelines.yml +# Azure Pipelines configuration file jobs: - template: templates/build-template-window.yml parameters: diff --git a/build.cake b/build.cake index 11219ab033..e32a698f15 100755 --- a/build.cake +++ b/build.cake @@ -112,7 +112,6 @@ Task("Test-with-Codecov") actions.Add(action); } - var options = new ParallelOptions { MaxDegreeOfParallelism = 1, //CancellationToken = cancellationToken diff --git a/build.config b/build.config index 015ef8eca4..d956e69e20 100644 --- a/build.config +++ b/build.config @@ -1,3 +1,3 @@ #!/usr/bin/env bash CAKE_VERSION=0.37.0 -DOTNET_VERSION=6.0.300 +DOTNET_VERSION=6.0.300 \ No newline at end of file diff --git a/build.ps1 b/build.ps1 index e48d09a09c..cb56d5562f 100644 --- a/build.ps1 +++ b/build.ps1 @@ -6,6 +6,7 @@ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent [string] $CakeVersion = '' [string] $DotNetVersion= '' + foreach($line in Get-Content (Join-Path $PSScriptRoot 'build.config')) { if ($line -like 'CAKE_VERSION=*') { diff --git a/build.sh b/build.sh index 06bcee8070..4f00fd2e4e 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Define varibles +# Define variables SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) source $SCRIPT_DIR/build.config TOOLS_DIR=$SCRIPT_DIR/tools diff --git a/common.props b/common.props index bae225b0b3..95bad4d697 100644 --- a/common.props +++ b/common.props @@ -11,4 +11,4 @@
- + \ No newline at end of file diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 14baea36ad..1d1b2aca06 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -9,4 +9,3 @@ services: - 8001:8000 volumes: - /opt:/opt - diff --git a/docker/start-cli.sh b/docker/start-cli.sh index e5bcf63182..daaf665766 100755 --- a/docker/start-cli.sh +++ b/docker/start-cli.sh @@ -2,4 +2,3 @@ BIND_VOLUME='-v /opt:/opt' CONFIGURE_PATH='-w /opt/aelf-node' docker run -it --rm $BIND_VOLUME $CONFIGURE_PATH aelf/node - diff --git a/docker/start-node.sh b/docker/start-node.sh index a63b5c9798..b258ddaee4 100755 --- a/docker/start-node.sh +++ b/docker/start-node.sh @@ -2,4 +2,4 @@ PUBLISH_PORT='-p 6800:6800 -p 8000:8000' BIND_VOLUME='-v /opt:/opt' CONfIGURE_PATH='/opt/aelf-node' -docker run -itd $PUBLISH_PORT $BIND_VOLUME -w $CONfIGURE_PATH aelf/node dotnet /app/AElf.Launcher.dll --config.path $CONfIGURE_PATH +docker run -itd $PUBLISH_PORT $BIND_VOLUME -w $CONfIGURE_PATH aelf/node dotnet /app/AElf.Launcher.dll --config.path $CONfIGURE_PATH \ No newline at end of file diff --git a/docs-sphinx/index.rst b/docs-sphinx/index.rst index 83e9ac6929..3cff784021 100644 --- a/docs-sphinx/index.rst +++ b/docs-sphinx/index.rst @@ -78,4 +78,4 @@ Welcome to AElf's official documentation! tutorials/cross-chain/running-side-chain tutorials/__run-node - getting-started/smart-contract-development/developing-smart-contracts/index + getting-started/smart-contract-development/developing-smart-contracts/index \ No newline at end of file diff --git a/docs/main-structure.md b/docs/main-structure.md index ba12f8e728..a079e012fe 100644 --- a/docs/main-structure.md +++ b/docs/main-structure.md @@ -88,4 +88,4 @@ * [Google cloud](resources/cloud/gcp/GCP.md) * [Browser Extension](resources/browser-extension.md) * [Joining AElf's testnet](resources/testnet.md) - * [Running a side chain](tutorials/cross-chain/running-side-chain.md) + * [Running a side chain](tutorials/cross-chain/running-side-chain.md) \ No newline at end of file diff --git a/scripts/build.sh b/scripts/build.sh index 83356576d6..f614ac0aaa 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -6,4 +6,4 @@ dotnet build /clp:ErrorsOnly /p:GeneratePackageOnBuild=false -v quiet "AElf.All. if [[ $? -ne 0 ]] ; then echo "Build failed." exit 1 -fi +fi \ No newline at end of file diff --git a/scripts/deploy_docker.sh b/scripts/deploy_docker.sh index 3224bfb7ad..e7a768efdb 100644 --- a/scripts/deploy_docker.sh +++ b/scripts/deploy_docker.sh @@ -13,4 +13,4 @@ docker build -t aelf/node:${TAG} ~/aelf/. docker tag aelf/node:${TAG} aelf/node:latest docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" docker push aelf/node:${TAG} -docker push aelf/node:latest +docker push aelf/node:latest \ No newline at end of file diff --git a/scripts/deploy_myget.sh b/scripts/deploy_myget.sh index 0931a825cf..09b26015ca 100644 --- a/scripts/deploy_myget.sh +++ b/scripts/deploy_myget.sh @@ -31,4 +31,4 @@ do fi done cd ../ -done +done \ No newline at end of file diff --git a/scripts/deploy_myget_daily.sh b/scripts/deploy_myget_daily.sh index 4843b3f7ab..b6916f79b2 100644 --- a/scripts/deploy_myget_daily.sh +++ b/scripts/deploy_myget_daily.sh @@ -34,4 +34,4 @@ do fi done cd ../ -done +done \ No newline at end of file diff --git a/scripts/deploy_nuget.sh b/scripts/deploy_nuget.sh index 0fdc981c3e..ef9f49c37d 100644 --- a/scripts/deploy_nuget.sh +++ b/scripts/deploy_nuget.sh @@ -31,4 +31,4 @@ do fi done cd ../ -done +done \ No newline at end of file diff --git a/scripts/download_binary.bat b/scripts/download_binary.bat index 02382a3bb9..7ec3dc18ca 100644 --- a/scripts/download_binary.bat +++ b/scripts/download_binary.bat @@ -13,4 +13,4 @@ if not exist "%scriptdir%contract_csharp_plugin.exe" ( ) echo "unzip file: %file%" unzip %scriptdir%%filename% -d %scriptdir% -) +) \ No newline at end of file diff --git a/scripts/download_binary.sh b/scripts/download_binary.sh index 49b8fdbe77..0234693718 100644 --- a/scripts/download_binary.sh +++ b/scripts/download_binary.sh @@ -30,4 +30,4 @@ if [[ ! -f ${plugin} ]]; then # Unzip unzip -o ${filename} -d "${scriptdir}" -fi +fi \ No newline at end of file diff --git a/scripts/generate_contract_base.bat b/scripts/generate_contract_base.bat index 57ca166469..ed022fa2c9 100644 --- a/scripts/generate_contract_base.bat +++ b/scripts/generate_contract_base.bat @@ -8,4 +8,4 @@ protoc --proto_path=../../protobuf ^ --contract_opt=%2,nocontract ^ --contract_out=./Protobuf/Generated ^ --plugin=protoc-gen-contract="%scriptdir%contract_csharp_plugin.exe" ^ -%1 +%1 \ No newline at end of file diff --git a/scripts/generate_contract_base.sh b/scripts/generate_contract_base.sh index 28a1550d3e..6d35a165aa 100755 --- a/scripts/generate_contract_base.sh +++ b/scripts/generate_contract_base.sh @@ -13,4 +13,4 @@ protoc --proto_path=${solutiondir}/protobuf \ --contract_opt="$2",nocontract \ --contract_out=./Protobuf/Generated \ --plugin=protoc-gen-contract=${plugin} \ -$1 +$1 \ No newline at end of file diff --git a/scripts/generate_contract_code.bat b/scripts/generate_contract_code.bat index 3b95aad75b..ccd91e4ede 100644 --- a/scripts/generate_contract_code.bat +++ b/scripts/generate_contract_code.bat @@ -7,4 +7,4 @@ protoc --proto_path=../../protobuf ^ --csharp_opt=file_extension=.g.cs ^ --contract_out=./Protobuf/Generated ^ --plugin=protoc-gen-contract="%scriptdir%contract_csharp_plugin.exe" ^ -%* +%* \ No newline at end of file diff --git a/scripts/generate_contract_code.sh b/scripts/generate_contract_code.sh index 60093c9a13..7dec613fc8 100755 --- a/scripts/generate_contract_code.sh +++ b/scripts/generate_contract_code.sh @@ -12,4 +12,4 @@ protoc --proto_path=${solutiondir}/protobuf \ --csharp_opt=file_extension=.g.cs \ --contract_out=./Protobuf/Generated \ --plugin=protoc-gen-contract=${plugin} \ -$@ +$@ \ No newline at end of file diff --git a/scripts/generate_contract_reference.bat b/scripts/generate_contract_reference.bat index 97fee83d02..6c69a31a54 100644 --- a/scripts/generate_contract_reference.bat +++ b/scripts/generate_contract_reference.bat @@ -8,4 +8,4 @@ protoc --proto_path=../../protobuf ^ --contract_opt=reference ^ --contract_out=internal_access:./Protobuf/Generated ^ --plugin=protoc-gen-contract="%scriptdir%contract_csharp_plugin.exe" ^ -%* +%* \ No newline at end of file diff --git a/scripts/generate_contract_reference.sh b/scripts/generate_contract_reference.sh index 47f8027ed1..4fe24547ed 100755 --- a/scripts/generate_contract_reference.sh +++ b/scripts/generate_contract_reference.sh @@ -13,4 +13,4 @@ protoc --proto_path=${solutiondir}/protobuf \ --contract_opt=reference \ --contract_out=internal_access:./Protobuf/Generated \ --plugin=protoc-gen-contract="${plugin}" \ -$@ +$@ \ No newline at end of file diff --git a/scripts/generate_contract_stub.bat b/scripts/generate_contract_stub.bat index 9e1120e8cd..67f8d11149 100644 --- a/scripts/generate_contract_stub.bat +++ b/scripts/generate_contract_stub.bat @@ -9,4 +9,4 @@ protoc --proto_path=../../protobuf ^ --contract_opt=internal_access ^ --contract_out=./Protobuf/Generated ^ --plugin=protoc-gen-contract="%scriptdir%contract_csharp_plugin.exe" ^ -%* +%* \ No newline at end of file diff --git a/scripts/generate_contract_stub.sh b/scripts/generate_contract_stub.sh index ac303fabb7..1e8faa7db1 100755 --- a/scripts/generate_contract_stub.sh +++ b/scripts/generate_contract_stub.sh @@ -18,4 +18,4 @@ protoc --proto_path=${solutiondir}/protobuf \ --contract_opt=internal_access \ --contract_out=${destdir} \ --plugin=protoc-gen-contract="${plugin}" \ -$@ +$@ \ No newline at end of file diff --git a/scripts/generate_event_only.bat b/scripts/generate_event_only.bat index 31dd3e1d16..c4e8fb587d 100644 --- a/scripts/generate_event_only.bat +++ b/scripts/generate_event_only.bat @@ -8,4 +8,4 @@ protoc --proto_path=../../protobuf ^ --contract_opt=nocontract ^ --contract_out=internal_access:./Protobuf/Generated ^ --plugin=protoc-gen-contract="%scriptdir%contract_csharp_plugin.exe" ^ -%* +%* \ No newline at end of file diff --git a/scripts/generate_event_only.sh b/scripts/generate_event_only.sh index db7d22d03f..8bc466768a 100755 --- a/scripts/generate_event_only.sh +++ b/scripts/generate_event_only.sh @@ -13,4 +13,4 @@ protoc --proto_path=${solutiondir}/protobuf \ --contract_opt=nocontract \ --contract_out=internal_access:./Protobuf/Generated \ --plugin=protoc-gen-contract=${plugin} \ -$@ +$@ \ No newline at end of file diff --git a/scripts/install_protobuf.sh b/scripts/install_protobuf.sh index 0d6400db02..941fd8e0dd 100644 --- a/scripts/install_protobuf.sh +++ b/scripts/install_protobuf.sh @@ -35,4 +35,4 @@ elif [[ ${osn} == "linux" ]]; then # Optional: change owner sudo chown ${USER} /usr/local/bin/protoc sudo chown -R ${USER} /usr/local/include/google -fi +fi \ No newline at end of file diff --git a/scripts/test.sh b/scripts/test.sh index 7922415954..47b7b1de60 100644 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -20,4 +20,4 @@ for i in *Tests ; do echo "Test Run Successful." -done +done \ No newline at end of file diff --git a/scripts/upload_coverage.sh b/scripts/upload_coverage.sh index 082982d9a3..70326d9daf 100644 --- a/scripts/upload_coverage.sh +++ b/scripts/upload_coverage.sh @@ -2,4 +2,4 @@ curl -s https://codecov.io/bash > codecov chmod +x codecov -./codecov -f "../test/results/coverage.opencover.xml" -t $1 +./codecov -f "../test/results/coverage.opencover.xml" -t $1 \ No newline at end of file From a4659fe9926155eba84de9df6c04e926fc7a499a Mon Sep 17 00:00:00 2001 From: chopin-fan Date: Fri, 5 Jul 2024 11:52:34 +0800 Subject: [PATCH 18/22] Change version of the groth16 to 1.0.3 --- src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj b/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj index 036f33f87a..54641c0f5b 100644 --- a/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj +++ b/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj @@ -10,7 +10,7 @@ - + From 3af57b7c3a3973e40b5200eae3583508c1299dbd Mon Sep 17 00:00:00 2001 From: chopin-fan Date: Mon, 15 Jul 2024 09:26:00 +0800 Subject: [PATCH 19/22] Add a package of Peseidon. --- src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj b/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj index 54641c0f5b..523b52cd23 100644 --- a/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj +++ b/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj @@ -11,6 +11,7 @@ + From 76cc05bdd0642a10741faa71bdb601812fd16a71 Mon Sep 17 00:00:00 2001 From: chopin-fan Date: Mon, 15 Jul 2024 17:38:50 +0800 Subject: [PATCH 20/22] Add Poseidon to a whitelist. --- src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj | 2 +- .../Validators/Whitelist/IWhitelistProvider.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj b/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj index 523b52cd23..0889f887a5 100644 --- a/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj +++ b/src/AElf.CSharp.CodeOps/AElf.CSharp.CodeOps.csproj @@ -9,8 +9,8 @@ - + diff --git a/src/AElf.CSharp.CodeOps/Validators/Whitelist/IWhitelistProvider.cs b/src/AElf.CSharp.CodeOps/Validators/Whitelist/IWhitelistProvider.cs index 61e888d5c9..d488b1057e 100644 --- a/src/AElf.CSharp.CodeOps/Validators/Whitelist/IWhitelistProvider.cs +++ b/src/AElf.CSharp.CodeOps/Validators/Whitelist/IWhitelistProvider.cs @@ -50,6 +50,7 @@ private void WhitelistAssemblies(Whitelist whitelist) .Assembly(typeof(SecretSharingHelper).Assembly, Trust.Partial) // AElf.Cryptography .Assembly(typeof(ISmartContractBridgeContext).Assembly, Trust.Full) // AElf.Kernel.SmartContract.Shared .Assembly(typeof(Groth16.Net.Verifier).Assembly, Trust.Full) // AElf.Cryptography.ECDSA + .Assembly(typeof(Poseidon.Net.Poseidon).Assembly, Trust.Full) ; } From 3ad98629d9a73f3a49591c1867811090b29d3995 Mon Sep 17 00:00:00 2001 From: chopin-fan Date: Wed, 17 Jul 2024 12:53:12 +0800 Subject: [PATCH 21/22] Add a nuget.config file. --- nuget.config | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 nuget.config diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000000..8b19203c51 --- /dev/null +++ b/nuget.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 80798172f2f52f7cebb8aee7200c7990e623be85 Mon Sep 17 00:00:00 2001 From: chopin-fan Date: Wed, 17 Jul 2024 13:31:31 +0800 Subject: [PATCH 22/22] Delete the nuget.conf file in the codeops project. --- src/AElf.CSharp.CodeOps/nuget.config | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 src/AElf.CSharp.CodeOps/nuget.config diff --git a/src/AElf.CSharp.CodeOps/nuget.config b/src/AElf.CSharp.CodeOps/nuget.config deleted file mode 100644 index 8b19203c51..0000000000 --- a/src/AElf.CSharp.CodeOps/nuget.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file