Skip to content

Commit

Permalink
Merge branch 'master' into rc-v2
Browse files Browse the repository at this point in the history
* master: (43 commits)
  Fix `GetAndChange` warnings (#3702)
  `Murmur3` should not be cryptographic hash algorithm (#3668)
  Test: add tests for native contract id (#3697)
  Update nugets (#3692)
  [Core P2P] fix the bug (#3695)
  Add hardfork HF_Echidna (#3454)
  Fix: add lock for RocksDbStore.Snapshot to keep same behavior as MemoryStore and LevelDbStore (#3689)
  Nullable rocks db (#3686)
  Nullable leveldb (#3685)
  Enforcement Compiler Warnings (#3687)
  [`Update`] Dotnet & Compiler Version (#3684)
  [`Add`]: LevelDB Benchmarks (#3667)
  [`Fix`]: Behavior when `keyPrefix` is null in different `IStore.Seek` impls. (#3682)
  Improve calculatenetworkfee (#3674)
  more 2025 (#3678)
  Nullable in Storage classes (#3670)
  readonly (#3676)
  [Fix] Set max entries for `VerifyProof` in `statePlugin` (#3675)
  Neo.json.benchmarks (#3673)
  Happy new year 2025 (#3677)
  ...

# Conflicts:
#	src/Neo/Neo.csproj
#	src/Neo/ProtocolSettings.cs
#	src/Neo/SmartContract/ApplicationEngine.cs
#	src/Neo/SmartContract/Native/NeoToken.cs
#	src/Neo/SmartContract/Native/RoleManagement.cs
#	tests/Neo.UnitTests/SmartContract/Native/UT_NativeContract.cs
  • Loading branch information
Jim8y committed Jan 31, 2025
2 parents 95f6535 + 805678d commit 0281ad1
Show file tree
Hide file tree
Showing 947 changed files with 8,552 additions and 2,148 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://github.com/dotnet/dotnet-docker/blob/main/README.sdk.md
# https://mcr.microsoft.com/en-us/artifact/mar/dotnet/sdk/tags <-- this shows all images
FROM mcr.microsoft.com/dotnet/sdk:9.0.101-noble
FROM mcr.microsoft.com/dotnet/sdk:9.0.102-noble

# Install the libleveldb-dev package
RUN apt-get update && apt-get install -y libleveldb-dev
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ dotnet_naming_symbols.all_members.applicable_kinds = *

dotnet_naming_style.pascal_case_style.capitalization = pascal_case

file_header_template = Copyright (C) 2015-2024 The Neo Project.\n\n{fileName} file belongs to the neo project and is free\nsoftware distributed under the MIT software license, see the\naccompanying file LICENSE in the main directory of the\nrepository or http://www.opensource.org/licenses/mit-license.php\nfor more details.\n\nRedistribution and use in source and binary forms with or without\nmodifications are permitted.
file_header_template = Copyright (C) 2015-2025 The Neo Project.\n\n{fileName} file belongs to the neo project and is free\nsoftware distributed under the MIT software license, see the\naccompanying file LICENSE in the main directory of the\nrepository or http://www.opensource.org/licenses/mit-license.php\nfor more details.\n\nRedistribution and use in source and binary forms with or without\nmodifications are permitted.

# Require file header
dotnet_diagnostic.IDE0073.severity = error
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ jobs:
run: |
brew install leveldb
dotnet build
cp -vp /opt/homebrew/Cellar/leveldb/1.23_1/lib/libleveldb.dylib ./tests/Neo.Plugins.Storage.Tests/bin/Debug/net9.0/
dotnet test --blame-hang --blame-crash --no-build
cp -vp /opt/homebrew/Cellar/leveldb/1.23_2/lib/libleveldb.dylib ./tests/Neo.Plugins.Storage.Tests/bin/Debug/net9.0/
dotnet test --no-build
- name: Test (windows)
if: matrix.os == 'windows-latest'
run: |
dotnet sln neo.sln remove ./tests/Neo.Plugins.Storage.Tests/Neo.Plugins.Storage.Tests.csproj
dotnet build
dotnet test --blame-hang --blame-crash --no-build
dotnet test --no-build
- name: Test for coverall
if: matrix.os == 'ubuntu-latest'
Expand Down
32 changes: 15 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,23 +114,21 @@ An overview of the project folders can be seen below.

|Folder|Content|
|---|---|
|/src/neo/Consensus/| Classes used in the dBFT consensus algorithm, including the `ConsensusService` actor.|
|/src/neo/Cryptography/|General cryptography classes including ECC implementation.|
|/src/neo/IO/|Data structures used for caching and collection interaction.|
|/src/neo/Ledger/|Classes responsible for the state control, including the `MemoryPool` and `Blockchain` classes.|
|/src/neo/Network/|Peer-to-peer protocol implementation classes.|
|/src/neo/Persistence/|Classes used to allow other classes to access application state.|
|/src/neo/Plugins/|Interfaces used to extend Neo, including the storage interface.|
|/src/neo/SmartContract/|Native contracts, `ApplicationEngine`, `InteropService` and other smart-contract related classes.|
|/src/neo/VM/|Helper methods used to interact with the VM.|
|/src/neo/Wallet/|Wallet and account implementation.|
|/src/Neo.CLI/| `neo-cli` console application for the running a _FULL_ node.|
|/src/Neo.Extensions/| Extensions class to expand the existing functionality.|
|/src/Neo.Json/| Neo's JSON Specification classes.|
|/src/Neo.VM/|Neo base class virtual machine.|
|/src/plugins/| Include `ApplicationLogs`, `LevelDBStore`, `RpcServer`, `OracleService`, `DBFTPlugin` and more.|
|/tests/|All unit tests.|

|[/src/neo/Cryptography/](https://github.com/neo-project/neo/tree/master/src/Neo/Cryptography)|General cryptography implementation, including ECC.|
|[/src/neo/IO/](https://github.com/neo-project/neo/tree/master/src/Neo/IO)|Data structures used for caching and collection interaction.|
|[/src/neo/Ledger/](https://github.com/neo-project/neo/tree/master/src/Neo/Ledger)|Classes responsible for the state control, including the `MemoryPool` and `Blockchain`.|
|[/src/neo/Network/](https://github.com/neo-project/neo/tree/master/src/Neo/Network)|Peer-to-peer protocol implementation.|
|[/src/neo/Persistence/](https://github.com/neo-project/neo/tree/master/src/Neo/Persistence)|Classes used to allow other classes to access application state.|
|[/src/neo/Plugins/](https://github.com/neo-project/neo/tree/master/src/Neo/Plugins)|Interfaces used to extend Neo, including the storage interface.|
|[/src/neo/SmartContract/](https://github.com/neo-project/neo/tree/master/src/Neo/SmartContract)|Native contracts, `ApplicationEngine`, `InteropService` and other smart-contract related classes.|
|[/src/neo/VM/](https://github.com/neo-project/neo/tree/master/src/Neo/VM)|Helper methods used to interact with the VM.|
|[/src/neo/Wallets/](https://github.com/neo-project/neo/tree/master/src/Neo/Wallets)|Wallet and account implementation.|
|[/src/Neo.CLI/](https://github.com/neo-project/neo/tree/master/src/Neo.CLI)| `neo-cli` console application for running a _FULL_ node.|
|[/src/Neo.Extensions/](https://github.com/neo-project/neo/tree/master/src/Neo.Extensions)| Extensions to expand the existing functionality.|
|[/src/Neo.Json/](https://github.com/neo-project/neo/tree/master/src/Neo.Json)| Neo's JSON specification.|
|[/src/Neo.VM/](https://github.com/neo-project/neo/tree/master/src/Neo.VM)|Neo virtual machine.|
|[/src/plugins/](https://github.com/neo-project/neo/tree/master/src/Plugins)| Include `ApplicationLogs`, `LevelDBStore`, `RpcServer`, `OracleService`, `DBFTPlugin` and more.|
|[/tests/](https://github.com/neo-project/neo/tree/master/tests)|All unit tests.|

## Related projects
Code references are provided for all platform building blocks. That includes the base library, the VM, a command line application and the compiler.
Expand Down
4 changes: 4 additions & 0 deletions benchmarks/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<AnalysisLevel>latest</AnalysisLevel>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion benchmarks/Neo.Benchmarks/Benchmarks.Hash.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2015-2024 The Neo Project.
// Copyright (C) 2015-2025 The Neo Project.
//
// Benchmarks.Hash.cs file belongs to the neo project and is free
// software distributed under the MIT software license, see the
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/Neo.Benchmarks/Benchmarks.POC.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2015-2024 The Neo Project.
// Copyright (C) 2015-2025 The Neo Project.
//
// Benchmarks.POC.cs file belongs to the neo project and is free
// software distributed under the MIT software license, see the
Expand Down
71 changes: 1 addition & 70 deletions benchmarks/Neo.Benchmarks/Benchmarks.UInt160.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2015-2024 The Neo Project.
// Copyright (C) 2015-2025 The Neo Project.
//
// Benchmarks.UInt160.cs file belongs to the neo project and is free
// software distributed under the MIT software license, see the
Expand All @@ -15,77 +15,8 @@ namespace Neo.Benchmark
{
public class Benchmarks_UInt160
{
static readonly OldUInt160 s_oldUInt160 = new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]);
static readonly UInt160 s_newUInt160 = new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]);

[Benchmark]
public void TestOldUInt160Gernerator1()
{
_ = new OldUInt160();
}

[Benchmark]
public void TestOldUInt160Gernerator2()
{
_ = new OldUInt160(new byte[20]);
}

[Benchmark]
public void TestOldUInt160CompareTo()
{
OldUInt160.Zero.CompareTo(OldUInt160.Zero);
OldUInt160.Zero.CompareTo(s_oldUInt160);
s_oldUInt160.CompareTo(OldUInt160.Zero);
}

[Benchmark]
public void TestOldUInt160Equals()
{
OldUInt160.Zero.Equals(OldUInt160.Zero);
OldUInt160.Zero.Equals(s_oldUInt160);
s_oldUInt160.Equals(null);
}

[Benchmark]
public void TestOldUInt160Parse()
{
_ = OldUInt160.Parse("0x0000000000000000000000000000000000000000");
_ = OldUInt160.Parse("0000000000000000000000000000000000000000");
}

[Benchmark]
public void TestOldUInt160TryParse()
{
OldUInt160.TryParse(null, out _);
OldUInt160.TryParse("0x0000000000000000000000000000000000000000", out var temp);
OldUInt160.TryParse("0x1230000000000000000000000000000000000000", out temp);
OldUInt160.TryParse("000000000000000000000000000000000000000", out _);
}

[Benchmark]
public void TestOldUInt160OperatorLarger()
{
_ = s_oldUInt160 > OldUInt160.Zero;
}

[Benchmark]
public void TestOldUInt160OperatorLargerAndEqual()
{
_ = s_oldUInt160 >= OldUInt160.Zero;
}

[Benchmark]
public void TestOldUInt160OperatorSmaller()
{
_ = s_oldUInt160 < OldUInt160.Zero;
}

[Benchmark]
public void TestOldUInt160OperatorSmallerAndEqual()
{
_ = s_oldUInt160 <= OldUInt160.Zero;
}

[Benchmark]
public void TestGernerator1()
{
Expand Down
3 changes: 2 additions & 1 deletion benchmarks/Neo.Benchmarks/Neo.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.IO.Hashing" Version="9.0.0" />
<PackageReference Include="System.IO.Hashing" Version="9.0.1" />
<ProjectReference Include="..\..\src\Neo\Neo.csproj" />
<ProjectReference Include="..\..\src\Plugins\LevelDBStore\LevelDBStore.csproj" />
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
</ItemGroup>

Expand Down
184 changes: 0 additions & 184 deletions benchmarks/Neo.Benchmarks/OldUInt160.cs

This file was deleted.

Loading

0 comments on commit 0281ad1

Please sign in to comment.