diff --git a/.gitattributes b/.gitattributes
index 0c37abbc2..5a15b4775 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2,6 +2,7 @@
# Set default behavior to automatically normalize line endings.
###############################################################################
* text eol=lf
+*.json text eol=lf
###############################################################################
# Set default behavior for command prompt diff.
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d70969642..82e49bf5a 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -6,7 +6,7 @@ on:
pull_request:
env:
- DOTNET_VERSION: 7.0.x
+ DOTNET_VERSION: 8.0.202
jobs:
@@ -26,20 +26,19 @@ jobs:
run: dotnet format --verify-no-changes --verbosity diagnostic
- name: Test
run: |
- sudo apt-get --assume-yes install libleveldb-dev libsnappy-dev libc6-dev
- find tests -name *.csproj | xargs -I % dotnet add % package coverlet.msbuild
+ sudo apt-get --assume-yes install libleveldb-dev
EXCLUDED_TESTS=\"[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM]*,[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\"
- dotnet test tests/Neo.Network.RPC.Tests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ -p:Exclude=${EXCLUDED_TESTS}
- dotnet test tests/Neo.Plugins.RpcServer.Tests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ /p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json -p:Exclude=${EXCLUDED_TESTS}
- dotnet test tests/Neo.Plugins.Storage.Tests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ /p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json -p:Exclude=${EXCLUDED_TESTS}
- dotnet test tests/Neo.Cryptography.MPTTrie.Tests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ /p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json -p:Exclude=${EXCLUDED_TESTS}
- dotnet test tests/Neo.Plugins.OracleService.Tests /p:CollectCoverage=true /p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/lcov /p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json /p:CoverletOutputFormat=lcov -p:Exclude=${EXCLUDED_TESTS}
+ dotnet test ./tests/Neo.Cryptography.MPTTrie.Tests /p:CollectCoverage=true /p:CoverletOutput='${{ github.workspace }}/TestResults/coverage/' /p:Exclude=${EXCLUDED_TESTS}
+ dotnet test ./tests/Neo.Network.RPC.Tests /p:CollectCoverage=true /p:CoverletOutput='${{ github.workspace }}/TestResults/coverage/' /p:MergeWith='${{ github.workspace }}/TestResults/coverage/coverage.net8.0.json' /p:Exclude=${EXCLUDED_TESTS}
+ dotnet test ./tests/Neo.Plugins.OracleService.Tests /p:CollectCoverage=true /p:CoverletOutput='${{ github.workspace }}/TestResults/coverage/' /p:MergeWith='${{ github.workspace }}/TestResults/coverage/coverage.net8.0.json' /p:Exclude=${EXCLUDED_TESTS}
+ dotnet test ./tests/Neo.Plugins.RpcServer.Tests /p:CollectCoverage=true /p:CoverletOutput='${{ github.workspace }}/TestResults/coverage/' /p:MergeWith='${{ github.workspace }}/TestResults/coverage/coverage.net8.0.json' /p:Exclude=${EXCLUDED_TESTS}
+ dotnet test ./tests/Neo.Plugins.Storage.Tests /p:CollectCoverage=true /p:CoverletOutput='${{ github.workspace }}/TestResults/coverage/' /p:MergeWith='${{ github.workspace }}/TestResults/coverage/coverage.net8.0.json' /p:CoverletOutputFormat='lcov' /p:Exclude=${EXCLUDED_TESTS}
- name: Coveralls
uses: coverallsapp/github-action@v2.2.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
format: lcov
- file: ${GITHUB_WORKSPACE}/coverage/lcov.info
+ file: ${{ github.workspace }}/TestResults/coverage/coverage.net8.0.info
Review:
needs: Test
@@ -81,7 +80,7 @@ jobs:
prerelease: ${{ contains(steps.get_version.outputs.version, '-') }}
- name: Setup .NET Core
if: steps.check_tag.outputs.statusCode == '404'
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Publish to NuGet
diff --git a/Directory.Build.props b/Directory.Build.props
index 83e0b030d..e940eeef7 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -2,7 +2,7 @@
3.6.3
- net7.0
+ net8.0
Neo.Plugins
The Neo Project
NEO;Blockchain
diff --git a/global.json b/global.json
index 423c2e226..beefe210a 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "7.0.404",
+ "version": "8.0.202",
"rollForward": "latestFeature",
"allowPrerelease": false
}
diff --git a/neo b/neo
index 66ef246be..c550fc210 160000
--- a/neo
+++ b/neo
@@ -1 +1 @@
-Subproject commit 66ef246beb6bdc4b259cf503e345ff695725ebbb
+Subproject commit c550fc210a20ffa4b324b41cdd4cde33a9e4da93
diff --git a/src/ApplicationLogs/LogReader.cs b/src/ApplicationLogs/LogReader.cs
index 062e451ee..56163ef4f 100644
--- a/src/ApplicationLogs/LogReader.cs
+++ b/src/ApplicationLogs/LogReader.cs
@@ -87,14 +87,14 @@ protected override void OnSystemLoaded(NeoSystem system)
public JToken GetApplicationLog(JArray _params)
{
if (_params == null || _params.Count == 0)
- throw new RpcException(-32602, "Invalid params");
+ throw new RpcException(RpcError.InvalidParams);
if (UInt256.TryParse(_params[0].AsString(), out var hash))
{
var raw = BlockToJObject(hash);
if (raw == null)
raw = TransactionToJObject(hash);
if (raw == null)
- throw new RpcException(-100, "Unknown transaction/blockhash");
+ throw new RpcException(RpcError.InvalidParams.WithData("Unknown transaction/blockhash"));
if (_params.Count >= 2 && Enum.TryParse(_params[1].AsString(), true, out TriggerType triggerType))
{
@@ -111,7 +111,7 @@ public JToken GetApplicationLog(JArray _params)
return raw ?? JToken.Null;
}
else
- throw new RpcException(-32602, "Invalid params");
+ throw new RpcException(RpcError.InvalidParams);
}
#endregion
diff --git a/src/ApplicationLogs/config.json b/src/ApplicationLogs/config.json
index 007b1d9fe..af601bc81 100644
--- a/src/ApplicationLogs/config.json
+++ b/src/ApplicationLogs/config.json
@@ -1,11 +1,11 @@
-{
- "PluginConfiguration": {
- "Path": "ApplicationLogs_{0}",
- "Network": 860833102,
- "MaxStackSize": 65535,
- "Debug": false
- },
- "Dependency": [
- "RpcServer"
- ]
-}
+{
+ "PluginConfiguration": {
+ "Path": "ApplicationLogs_{0}",
+ "Network": 860833102,
+ "MaxStackSize": 65535,
+ "Debug": false
+ },
+ "Dependency": [
+ "RpcServer"
+ ]
+}
diff --git a/src/OracleService/OracleService.cs b/src/OracleService/OracleService.cs
index 528485ccc..bdbbc5869 100644
--- a/src/OracleService/OracleService.cs
+++ b/src/OracleService/OracleService.cs
@@ -257,7 +257,7 @@ private static async Task SendContentAsync(Uri url, string content)
private async Task SendResponseSignatureAsync(ulong requestId, byte[] txSign, KeyPair keyPair)
{
var message = Neo.Helper.Concat(keyPair.PublicKey.ToArray(), BitConverter.GetBytes(requestId), txSign);
- var sign = Crypto.Sign(message, keyPair.PrivateKey, keyPair.PublicKey.EncodePoint(false)[1..]);
+ var sign = Crypto.Sign(message, keyPair.PrivateKey);
var param = "\"" + Convert.ToBase64String(keyPair.PublicKey.ToArray()) + "\", " + requestId + ", \"" + Convert.ToBase64String(txSign) + "\",\"" + Convert.ToBase64String(sign) + "\"";
var content = "{\"id\":" + Interlocked.Increment(ref counter) + ",\"jsonrpc\":\"2.0\",\"method\":\"submitoracleresponse\",\"params\":[" + param + "]}";
diff --git a/src/RocksDBStore/RocksDBStore.csproj b/src/RocksDBStore/RocksDBStore.csproj
index 718fbd5e2..cc7e1a844 100644
--- a/src/RocksDBStore/RocksDBStore.csproj
+++ b/src/RocksDBStore/RocksDBStore.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/src/SQLiteWallet/SQLiteWallet.csproj b/src/SQLiteWallet/SQLiteWallet.csproj
index 2cac0cbd7..02e9d56b8 100644
--- a/src/SQLiteWallet/SQLiteWallet.csproj
+++ b/src/SQLiteWallet/SQLiteWallet.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props
deleted file mode 100644
index 6ff47a7c2..000000000
--- a/tests/Directory.Build.props
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- false
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests/Neo.Cryptography.MPTTrie.Tests/Neo.Cryptography.MPTTrie.Tests.csproj b/tests/Neo.Cryptography.MPTTrie.Tests/Neo.Cryptography.MPTTrie.Tests.csproj
index 17392da61..224682f35 100644
--- a/tests/Neo.Cryptography.MPTTrie.Tests/Neo.Cryptography.MPTTrie.Tests.csproj
+++ b/tests/Neo.Cryptography.MPTTrie.Tests/Neo.Cryptography.MPTTrie.Tests.csproj
@@ -1,8 +1,20 @@
+ net8.0
Neo.Cryptography.MPT.Tests
+ false
+ true
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Neo.Network.RPC.Tests/Neo.Network.RPC.Tests.csproj b/tests/Neo.Network.RPC.Tests/Neo.Network.RPC.Tests.csproj
index 73e7a531a..6a4af5053 100644
--- a/tests/Neo.Network.RPC.Tests/Neo.Network.RPC.Tests.csproj
+++ b/tests/Neo.Network.RPC.Tests/Neo.Network.RPC.Tests.csproj
@@ -1,11 +1,18 @@
+ net8.0
Neo.Network.RPC.Tests
+ false
+ true
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -18,4 +25,9 @@
PreserveNewest
+
+
+
+
+
diff --git a/tests/Neo.Plugins.OracleService.Tests/Neo.Plugins.OracleService.Tests.csproj b/tests/Neo.Plugins.OracleService.Tests/Neo.Plugins.OracleService.Tests.csproj
index 82e65d521..84493c921 100644
--- a/tests/Neo.Plugins.OracleService.Tests/Neo.Plugins.OracleService.Tests.csproj
+++ b/tests/Neo.Plugins.OracleService.Tests/Neo.Plugins.OracleService.Tests.csproj
@@ -1,11 +1,18 @@
+ net8.0
OracleService.Tests
Neo.Plugins
+ false
+ true
-
-
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
@@ -21,4 +28,10 @@
PreserveNewest
+
+
+
+
+
+
diff --git a/tests/Neo.Plugins.RpcServer.Tests/Neo.Plugins.RpcServer.Tests.csproj b/tests/Neo.Plugins.RpcServer.Tests/Neo.Plugins.RpcServer.Tests.csproj
index 9b3fcaed4..8b377805b 100644
--- a/tests/Neo.Plugins.RpcServer.Tests/Neo.Plugins.RpcServer.Tests.csproj
+++ b/tests/Neo.Plugins.RpcServer.Tests/Neo.Plugins.RpcServer.Tests.csproj
@@ -1,12 +1,24 @@
+ net8.0
Neo.Plugins.RpcServer.Tests
Neo.Plugins.RpcServer.Tests
+ false
+ true
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Neo.Plugins.Storage.Tests/Neo.Plugins.Storage.Tests.csproj b/tests/Neo.Plugins.Storage.Tests/Neo.Plugins.Storage.Tests.csproj
index 10f373f5e..edc2f3891 100644
--- a/tests/Neo.Plugins.Storage.Tests/Neo.Plugins.Storage.Tests.csproj
+++ b/tests/Neo.Plugins.Storage.Tests/Neo.Plugins.Storage.Tests.csproj
@@ -1,9 +1,21 @@
+ net8.0
Neo.Plugins.Storage.Tests
+ false
+ true
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
\ No newline at end of file