-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge dev branch, then resolve conflicts.
- Loading branch information
Showing
143 changed files
with
3,631 additions
and
533 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: '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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: '7.0' | ||
- name: Create temporary global.json | ||
run: echo '{"sdk":{"version":"8.0.7"}}' > ./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 }}" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:s="clr-namespace:System;assembly=mscorlib" | ||
xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" | ||
xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:Boolean x:Key="/Default/CodeEditing/SuppressNullableWarningFix/Enabled/@EntryValue">False</s:Boolean> | ||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=JS/@EntryIndexedValue">JS</s:String> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=aelf/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=appsettings/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=blockchain/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Blockchains/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=DPOS/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=grpc/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=hangfire/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Merkle/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=pubkey/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ssdb/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Xunit/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> | ||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=JS/@EntryIndexedValue">JS</s:String> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=aelf/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=appsettings/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=blockchain/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Blockchains/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=DPOS/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=grpc/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=hangfire/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Merkle/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=pubkey/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ssdb/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Xunit/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# appveyor configuration file | ||
version: 1.0.0.{build} | ||
skip_tags: true | ||
os: Windows Server 2012 R2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<string> 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("<html>"); | ||
writer.WriteLine("<head>"); | ||
writer.WriteLine("<title>Benchmark Summary</title>"); | ||
|
||
writer.WriteLine("<style>"); | ||
foreach (var file in htmlFiles) | ||
{ | ||
string content = File.ReadAllText(file); | ||
string styleContent = GetStyleContent(content); | ||
writer.WriteLine(styleContent); | ||
} | ||
writer.WriteLine("</style>"); | ||
|
||
writer.WriteLine("</head>"); | ||
writer.WriteLine("<body>"); | ||
|
||
foreach (var file in htmlFiles) | ||
{ | ||
string fileName = Path.GetFileName(file); | ||
writer.WriteLine($"<h2>{fileName}</h2>"); | ||
string content = File.ReadAllText(file); | ||
string bodyContent = GetBodyContent(content); | ||
writer.WriteLine(bodyContent); | ||
} | ||
|
||
writer.WriteLine("</body>"); | ||
writer.WriteLine("</html>"); | ||
} | ||
|
||
consoleLogger.WriteLine($"Summary HTML file created successfully at {outputPath}."); | ||
|
||
return new[] { outputPath }; | ||
} | ||
|
||
private string GetBodyContent(string html) | ||
{ | ||
int bodyStartIndex = html.IndexOf("<body>") + "<body>".Length; | ||
int bodyEndIndex = html.IndexOf("</body>"); | ||
if (bodyStartIndex >= 0 && bodyEndIndex >= 0) | ||
{ | ||
return html.Substring(bodyStartIndex, bodyEndIndex - bodyStartIndex); | ||
} | ||
return string.Empty; | ||
} | ||
|
||
private string GetStyleContent(string html) | ||
{ | ||
int styleStartIndex = html.IndexOf("<style>") + "<style>".Length; | ||
int styleEndIndex = html.IndexOf("</style>"); | ||
if (styleStartIndex >= 0 && styleEndIndex >= 0) | ||
{ | ||
return html.Substring(styleStartIndex, styleEndIndex - styleStartIndex); | ||
} | ||
return string.Empty; | ||
} | ||
} |
Oops, something went wrong.