Skip to content

Commit

Permalink
Merge pull request #8 from gldeng/experiment/crypto-funcs-in-sdk
Browse files Browse the repository at this point in the history
Experiment crypto funcs in sdk
  • Loading branch information
gldeng authored Sep 11, 2024
2 parents 60ac9c3 + c2181e9 commit 5e54518
Show file tree
Hide file tree
Showing 423 changed files with 7,028 additions and 1,870 deletions.
2 changes: 2 additions & 0 deletions .bettercodehub.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Depth of components to analyze (2 levels deep)
component_depth: 2

# Programming languages to analyze
languages:
- csharp
42 changes: 22 additions & 20 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -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
29 changes: 18 additions & 11 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -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.
48 changes: 48 additions & 0 deletions .github/workflows/benchmark_action.yml
Original file line number Diff line number Diff line change
@@ -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: '8.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
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build
on:
push:
branches:
- dev
- master
- feature/use-github-actions

env:
DOTNET_INSTALL_DIR: "./.dotnet"

jobs:
build:

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: '8.0'

- name: Download AElf build tools
run: bash scripts/download_binary.sh

- name: Install Protobuf
run: bash scripts/install_protobuf.sh

- name: Build Solution
run: bash scripts/build.sh

49 changes: 49 additions & 0 deletions .github/workflows/sonarqube.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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: '8.0'
- name: Create temporary global.json
run: echo '{"sdk":{"version":"8.0.303"}}' > ./global.json
- 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: 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 }}"
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test
on:
push:
branches:
- dev
- master
- feature/use-github-actions

jobs:
build-and-test:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- name: Run dotnet ci action
uses: AElfProject/[email protected]
with:
commit-token: ${{ secrets.COMMIT_TOKEN }}
codecov-token: ${{ secrets.CODECOV_TOKEN }}
branch-name: "feature/badge-json"
solution-name: "AElf.All.sln"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*.userprefs

# Build results
build/
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
Expand Down Expand Up @@ -312,4 +313,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
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
56 changes: 56 additions & 0 deletions AElf.All.sln
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,22 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZkWasmVerifier", "contract\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZkWasmVerifier.Tests", "test\ZkWasmVerifier.Tests\ZkWasmVerifier.Tests.csproj", "{8054502F-2594-4028-8109-A024DF7C82FA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZkWasmGame", "contract\ZkWasmGame\ZkWasmGame.csproj", "{B859C137-D581-47B8-A588-B37673FAF000}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AElf.Kernel.FeatureDisable", "src\AElf.Kernel.FeatureDisable\AElf.Kernel.FeatureDisable.csproj", "{A4ACE6D2-4CF8-4B52-93C9-BB8BEC0C098E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AElf.Kernel.FeatureDisable.Tests", "test\AElf.Kernel.FeatureDisable.Tests\AElf.Kernel.FeatureDisable.Tests.csproj", "{8C0D86A4-D1A7-4B61-AC44-755F5AC75D67}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AElf.Kernel.FeatureDisable.Core", "src\AElf.Kernel.FeatureDisable.Core\AElf.Kernel.FeatureDisable.Core.csproj", "{659A7C7A-44C9-424E-B4F6-D1D3656F7AD4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AElf.Sdk.CSharp.Spec", "src\AElf.Sdk.CSharp.Spec\AElf.Sdk.CSharp.Spec.csproj", "{45A77C41-142E-4296-A14A-D53067EC8B75}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AElf.Sdk.CSharp.Internal", "src\AElf.Sdk.CSharp.Internal\AElf.Sdk.CSharp.Internal.csproj", "{A77380A7-E425-45A3-BF3F-F865DA4F3F4E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZkTreeVerifier", "contract\ZkTreeVerifier\ZkTreeVerifier.csproj", "{F4BA0EFB-9D98-4AFE-BC4B-3B4CC527D4A6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZkTreeVerifier.Tests", "test\ZkTreeVerifier.Tests\ZkTreeVerifier.Tests.csproj", "{6BA638C7-CADB-4672-A2A4-765FAE2DF702}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -1101,6 +1117,38 @@ Global
{8054502F-2594-4028-8109-A024DF7C82FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8054502F-2594-4028-8109-A024DF7C82FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8054502F-2594-4028-8109-A024DF7C82FA}.Release|Any CPU.Build.0 = Release|Any CPU
{B859C137-D581-47B8-A588-B37673FAF000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B859C137-D581-47B8-A588-B37673FAF000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B859C137-D581-47B8-A588-B37673FAF000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B859C137-D581-47B8-A588-B37673FAF000}.Release|Any CPU.Build.0 = Release|Any CPU
{A4ACE6D2-4CF8-4B52-93C9-BB8BEC0C098E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A4ACE6D2-4CF8-4B52-93C9-BB8BEC0C098E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A4ACE6D2-4CF8-4B52-93C9-BB8BEC0C098E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A4ACE6D2-4CF8-4B52-93C9-BB8BEC0C098E}.Release|Any CPU.Build.0 = Release|Any CPU
{8C0D86A4-D1A7-4B61-AC44-755F5AC75D67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C0D86A4-D1A7-4B61-AC44-755F5AC75D67}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C0D86A4-D1A7-4B61-AC44-755F5AC75D67}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C0D86A4-D1A7-4B61-AC44-755F5AC75D67}.Release|Any CPU.Build.0 = Release|Any CPU
{659A7C7A-44C9-424E-B4F6-D1D3656F7AD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{659A7C7A-44C9-424E-B4F6-D1D3656F7AD4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{659A7C7A-44C9-424E-B4F6-D1D3656F7AD4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{659A7C7A-44C9-424E-B4F6-D1D3656F7AD4}.Release|Any CPU.Build.0 = Release|Any CPU
{45A77C41-142E-4296-A14A-D53067EC8B75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{45A77C41-142E-4296-A14A-D53067EC8B75}.Debug|Any CPU.Build.0 = Debug|Any CPU
{45A77C41-142E-4296-A14A-D53067EC8B75}.Release|Any CPU.ActiveCfg = Release|Any CPU
{45A77C41-142E-4296-A14A-D53067EC8B75}.Release|Any CPU.Build.0 = Release|Any CPU
{A77380A7-E425-45A3-BF3F-F865DA4F3F4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A77380A7-E425-45A3-BF3F-F865DA4F3F4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A77380A7-E425-45A3-BF3F-F865DA4F3F4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A77380A7-E425-45A3-BF3F-F865DA4F3F4E}.Release|Any CPU.Build.0 = Release|Any CPU
{F4BA0EFB-9D98-4AFE-BC4B-3B4CC527D4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F4BA0EFB-9D98-4AFE-BC4B-3B4CC527D4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F4BA0EFB-9D98-4AFE-BC4B-3B4CC527D4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F4BA0EFB-9D98-4AFE-BC4B-3B4CC527D4A6}.Release|Any CPU.Build.0 = Release|Any CPU
{6BA638C7-CADB-4672-A2A4-765FAE2DF702}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6BA638C7-CADB-4672-A2A4-765FAE2DF702}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6BA638C7-CADB-4672-A2A4-765FAE2DF702}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6BA638C7-CADB-4672-A2A4-765FAE2DF702}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1294,5 +1342,13 @@ Global
{6981684D-450C-412B-9082-0B0A67A679B9} = {D3950CC9-808F-4ED8-946A-79A992F3F8EF}
{DD4B2603-902F-41FE-A85F-F952957FAFA3} = {9AA521A5-80BF-4D20-9339-31D7E86D5868}
{8054502F-2594-4028-8109-A024DF7C82FA} = {D3950CC9-808F-4ED8-946A-79A992F3F8EF}
{B859C137-D581-47B8-A588-B37673FAF000} = {9AA521A5-80BF-4D20-9339-31D7E86D5868}
{A4ACE6D2-4CF8-4B52-93C9-BB8BEC0C098E} = {90B310B4-C2DB-419E-B5EE-97FA096B62CC}
{8C0D86A4-D1A7-4B61-AC44-755F5AC75D67} = {4E54480A-D155-43ED-9736-1A5BE7957211}
{659A7C7A-44C9-424E-B4F6-D1D3656F7AD4} = {90B310B4-C2DB-419E-B5EE-97FA096B62CC}
{45A77C41-142E-4296-A14A-D53067EC8B75} = {798BAA50-825B-4DD9-83E2-77A9EE6EBE09}
{A77380A7-E425-45A3-BF3F-F865DA4F3F4E} = {798BAA50-825B-4DD9-83E2-77A9EE6EBE09}
{F4BA0EFB-9D98-4AFE-BC4B-3B4CC527D4A6} = {9AA521A5-80BF-4D20-9339-31D7E86D5868}
{6BA638C7-CADB-4672-A2A4-765FAE2DF702} = {D3950CC9-808F-4ED8-946A-79A992F3F8EF}
EndGlobalSection
EndGlobal
3 changes: 2 additions & 1 deletion AElf.ContractTools.targets
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
</PropertyGroup>
</Otherwise>
</Choose>


<!-- Generate protobuf code before building and getting the target path -->
<Target Name="GenerateProtobufCode" BeforeTargets="BeforeBuild;GetTargetPath">
<PropertyGroup>
<LocalProtobufDir>$(ProjectDir)/Protobuf</LocalProtobufDir>
Expand Down
3 changes: 1 addition & 2 deletions AElf.Contracts.sln
Original file line number Diff line number Diff line change
@@ -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}"
Expand Down
Loading

0 comments on commit 5e54518

Please sign in to comment.