-
Couldn't load subscription status.
- Fork 1k
[ut] 100% Coverage Trie.Get
#3952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or 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
ajara87
approved these changes
May 19, 2025
vncoelho
approved these changes
May 19, 2025
Jim8y
approved these changes
May 21, 2025
Wi1l-B0t
approved these changes
May 21, 2025
shargon
added a commit
that referenced
this pull request
May 22, 2025
* 100% Coverage Trie.Get * fix ut Co-authored-by: Shargon <[email protected]>
NGDAdmin
added a commit
that referenced
this pull request
May 26, 2025
* Fix: make the signer sign specific data * Plugin: add SignClient * Remove x64 and x86 configurations from solution file * [`ut`] 100% Coverage Trie.Get (#3952) * 100% Coverage Trie.Get * fix ut --------- Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]>
NGDAdmin
added a commit
that referenced
this pull request
May 26, 2025
* style: make the code style of StatuePlugin more standard * Update src/Plugins/StateService/StatePlugin.cs Co-authored-by: Shargon <[email protected]> * [`ut`] 100% Coverage Trie.Get (#3952) * 100% Coverage Trie.Get * fix ut --------- Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Jimmy <[email protected]>
NGDAdmin
pushed a commit
that referenced
this pull request
May 28, 2025
* [`ut`] 100% Coverage Trie.Get (#3952) * 100% Coverage Trie.Get * fix ut * Update devcontainer.dockerfile version --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: Jimmy <[email protected]>
cschuchardt88
pushed a commit
to cschuchardt88/neo
that referenced
this pull request
Jun 8, 2025
* 100% Coverage Trie.Get * fix ut Co-authored-by: Shargon <[email protected]>
cschuchardt88
pushed a commit
to cschuchardt88/neo
that referenced
this pull request
Jun 8, 2025
* Fix: make the signer sign specific data * Plugin: add SignClient * Remove x64 and x86 configurations from solution file * [`ut`] 100% Coverage Trie.Get (neo-project#3952) * 100% Coverage Trie.Get * fix ut --------- Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]>
cschuchardt88
pushed a commit
to cschuchardt88/neo
that referenced
this pull request
Jun 8, 2025
…oject#3951) * style: make the code style of StatuePlugin more standard * Update src/Plugins/StateService/StatePlugin.cs Co-authored-by: Shargon <[email protected]> * [`ut`] 100% Coverage Trie.Get (neo-project#3952) * 100% Coverage Trie.Get * fix ut --------- Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Jimmy <[email protected]>
cschuchardt88
pushed a commit
to cschuchardt88/neo
that referenced
this pull request
Jun 8, 2025
* [`ut`] 100% Coverage Trie.Get (neo-project#3952) * 100% Coverage Trie.Get * fix ut * Update devcontainer.dockerfile version --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: Jimmy <[email protected]>
shargon
added a commit
that referenced
this pull request
Jun 20, 2025
#3473) * Initial comit * Fix paths * Added `Neo.Plugins.DBFTPlugin.Tests` to `Neo` internals * Added tests to github workflow * Akka deps * Advancing * TestWallet is mocked * Adding more steps * Fixed Test mocking * Timestamp testing * Header and TestProbe * format * Huge advance! Test probe is now working. Now we go * dotnet format * Header looks like to be correct now * Workaround for dbft settings * build the mock system for solenode * update to 7 nodes network mock system * Comment original tests of the PR * [`ut`] 100% Coverage Trie.Get (#3952) * 100% Coverage Trie.Get * fix ut * feat: Add comprehensive DBFT consensus unit tests - Add 34 comprehensive unit tests covering all DBFT scenarios - Test normal consensus flows, abnormal scenarios, and recovery mechanisms - Include Byzantine fault tolerance testing (f=1 and f=2 failures) - Add network partition and message loss simulation - Implement stress testing with multiple rounds and large transaction sets - Create professional test infrastructure with TestWallet and ConsensusTestHelper - Add comprehensive README documentation - Ensure 100% test pass rate with robust error handling - Cover complete DBFT protocol: PrepareRequest → PrepareResponse → Commit flow - Validate view changes, recovery requests, and state synchronization Test Coverage: - UT_ConsensusService.cs (7 tests): Service lifecycle and message handling - UT_DBFT.cs (6 tests): Basic consensus scenarios - UT_DBFT_Integration.cs (4 tests): Integration scenarios - UT_DBFT_NormalFlow.cs (3 tests): Complete normal consensus flows - UT_DBFT_AbnormalScenarios.cs (4 tests): Failure and attack scenarios - UT_DBFT_Recovery.cs (6 tests): Recovery mechanisms - UT_DBFT_Robustness.cs (4 tests): Stress and edge case testing All tests pass: 34/34 ✅ * chore: Update .NET SDK version to 9.0.203 - Update global.json to use .NET SDK 9.0.203 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and fixes * fix: Revert .NET SDK version to 9.0.102 - Revert global.json to use .NET SDK 9.0.102 (available on build system) - Ensures compatibility with current development environment - Previous version 9.0.203 was not available on the build system * style: Update copyright year to 2025 - Run dotnet format to apply code formatting standards - Update copyright year in RecoveryMessageExtensions.cs from 2024 to 2025 - Maintain consistent code formatting across the project * chore: Update .NET SDK version to 9.0.300 - Update global.json to use .NET SDK 9.0.300 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and improvements - Maintains project build consistency with updated SDK * fix: Resolve RpcServer test compilation errors - Add Neo.IO using statement for ToHexString extension method - Comment out problematic ToHexString calls in test setup - Ensure RpcServer tests can compile alongside DBFT tests - Maintain DBFT test functionality (34/34 tests passing) * fix: Complete RpcServer test compilation fix - Ensure all ToHexString extension method issues are resolved - Maintain compatibility with DBFT tests (34/34 passing) - Fix build errors in RpcServer test suite * Revert changes except DBFT plugin tests - Reverted all source files to match dev branch - Reverted test files in Neo.UnitTests and Neo.Plugins.RpcServer.Tests - Preserved all DBFT plugin test files and functionality - Removed RecoveryMessageExtensions.cs (not in dev branch) * Fix DBFT plugin tests API compatibility and accessibility - Made ConsensusService class internal for test accessibility - Added InternalsVisibleTo attributes for Neo core and DBFT plugin - Updated test constructors to use current dev branch API: - Fixed NeoSystem constructor (2-parameter instead of 6-parameter) - Fixed Settings constructor to use IConfigurationSection - Added Microsoft.Extensions.Configuration packages - Created TestBlockchain.CreateDefaultSettings() helper method - Updated all test files to use compatible API calls - All 1,401 tests passing including 34 DBFT plugin tests - Code formatted with dotnet format * Add comprehensive DBFT consensus message flow tests - Implement proper consensus message flow monitoring as requested in GitHub comment - Add UT_DBFT_ProperMessageFlow.cs with professional, working tests - Update ConsensusTestHelper with async methods for natural message flow - Clean up comments and code formatting with dotnet format - All 38 DBFT plugin tests passing Tests now properly: - Send PrepareRequest and wait for natural PrepareResponse - Monitor actual consensus message flow instead of forcing it - Handle message validation, service resilience, and lifecycle testing - Use simplified but effective message capture mechanism * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj * refactor: Enhance DBFT consensus unit tests to professional standards - Consistent UT_xxx naming convention for all test files - Mock* pattern for all helper/utility classes - Enhanced assertions (7→19, +171% improvement) - Removed duplicate test methods (~140 lines eliminated) - Professional documentation aligned with implementation - Fixed project file syntax (InternalsVisibleTo) - 100% test pass rate maintained (34/34 tests) - Ready for production deployment * Convert DBFT unit tests from xUnit to MSTest framework - Remove xUnit package references (xunit, xunit.runner.visualstudio, Akka.TestKit.Xunit2) - Add Akka.TestKit.MsTest package reference - Update all test files to use MSTest TestKit instead of xUnit - Fix test runner configuration to resolve "Zero tests ran" issue - All 34 tests now pass successfully with MSTest framework - Maintain existing test structure and TestKit inheritance * Update DBFT unit tests README for MSTest framework - Document MSTest framework usage instead of xUnit - Update prerequisites to include MSTest and Akka.NET TestKit (MSTest version) - Add note about Visual Studio Test Explorer integration - Update performance timing to reflect current test execution (~33s) - Emphasize production-ready testing capabilities * Fix copyright header filenames in DBFT tests - Correct UT_DBFT_Performance.cs header (was UT_DBFT_Robustness.cs) - Correct UT_DBFT_Failures.cs header (was UT_DBFT_AbnormalScenarios.cs) - Fix other copyright headers to match actual filenames - Applied via dotnet format to ensure consistency * Update tests/Neo.Plugins.DBFTPlugin.Tests/Neo.Plugins.DBFTPlugin.Tests.csproj * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_Core.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Add coverage --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jimmy <[email protected]>
shargon
added a commit
that referenced
this pull request
Jul 8, 2025
* Fix: P/Invokes should not be visible (#4003) * [Optimization] - Optimize key method (#4001) * [Optimization] - Optimize Key method * Update src/Neo.Cryptography.MPTTrie/Cache.cs --------- Co-authored-by: Shargon <[email protected]> * Fix Threading hanging with `NeoSystem` (#4005) * Fix threading hanging with `NeoSystem` * Fixed for deadlocks --------- Co-authored-by: Christopher R. Schuchardt <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Style: unify json init style (#4004) Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> * Update packages (#4006) * Update packages * more * clean --------- Co-authored-by: Jimmy <[email protected]> * Restore DBFTPlugin Unit Tests (ConsensusService and Consensus Context) (#3473) * Initial comit * Fix paths * Added `Neo.Plugins.DBFTPlugin.Tests` to `Neo` internals * Added tests to github workflow * Akka deps * Advancing * TestWallet is mocked * Adding more steps * Fixed Test mocking * Timestamp testing * Header and TestProbe * format * Huge advance! Test probe is now working. Now we go * dotnet format * Header looks like to be correct now * Workaround for dbft settings * build the mock system for solenode * update to 7 nodes network mock system * Comment original tests of the PR * [`ut`] 100% Coverage Trie.Get (#3952) * 100% Coverage Trie.Get * fix ut * feat: Add comprehensive DBFT consensus unit tests - Add 34 comprehensive unit tests covering all DBFT scenarios - Test normal consensus flows, abnormal scenarios, and recovery mechanisms - Include Byzantine fault tolerance testing (f=1 and f=2 failures) - Add network partition and message loss simulation - Implement stress testing with multiple rounds and large transaction sets - Create professional test infrastructure with TestWallet and ConsensusTestHelper - Add comprehensive README documentation - Ensure 100% test pass rate with robust error handling - Cover complete DBFT protocol: PrepareRequest → PrepareResponse → Commit flow - Validate view changes, recovery requests, and state synchronization Test Coverage: - UT_ConsensusService.cs (7 tests): Service lifecycle and message handling - UT_DBFT.cs (6 tests): Basic consensus scenarios - UT_DBFT_Integration.cs (4 tests): Integration scenarios - UT_DBFT_NormalFlow.cs (3 tests): Complete normal consensus flows - UT_DBFT_AbnormalScenarios.cs (4 tests): Failure and attack scenarios - UT_DBFT_Recovery.cs (6 tests): Recovery mechanisms - UT_DBFT_Robustness.cs (4 tests): Stress and edge case testing All tests pass: 34/34 ✅ * chore: Update .NET SDK version to 9.0.203 - Update global.json to use .NET SDK 9.0.203 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and fixes * fix: Revert .NET SDK version to 9.0.102 - Revert global.json to use .NET SDK 9.0.102 (available on build system) - Ensures compatibility with current development environment - Previous version 9.0.203 was not available on the build system * style: Update copyright year to 2025 - Run dotnet format to apply code formatting standards - Update copyright year in RecoveryMessageExtensions.cs from 2024 to 2025 - Maintain consistent code formatting across the project * chore: Update .NET SDK version to 9.0.300 - Update global.json to use .NET SDK 9.0.300 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and improvements - Maintains project build consistency with updated SDK * fix: Resolve RpcServer test compilation errors - Add Neo.IO using statement for ToHexString extension method - Comment out problematic ToHexString calls in test setup - Ensure RpcServer tests can compile alongside DBFT tests - Maintain DBFT test functionality (34/34 tests passing) * fix: Complete RpcServer test compilation fix - Ensure all ToHexString extension method issues are resolved - Maintain compatibility with DBFT tests (34/34 passing) - Fix build errors in RpcServer test suite * Revert changes except DBFT plugin tests - Reverted all source files to match dev branch - Reverted test files in Neo.UnitTests and Neo.Plugins.RpcServer.Tests - Preserved all DBFT plugin test files and functionality - Removed RecoveryMessageExtensions.cs (not in dev branch) * Fix DBFT plugin tests API compatibility and accessibility - Made ConsensusService class internal for test accessibility - Added InternalsVisibleTo attributes for Neo core and DBFT plugin - Updated test constructors to use current dev branch API: - Fixed NeoSystem constructor (2-parameter instead of 6-parameter) - Fixed Settings constructor to use IConfigurationSection - Added Microsoft.Extensions.Configuration packages - Created TestBlockchain.CreateDefaultSettings() helper method - Updated all test files to use compatible API calls - All 1,401 tests passing including 34 DBFT plugin tests - Code formatted with dotnet format * Add comprehensive DBFT consensus message flow tests - Implement proper consensus message flow monitoring as requested in GitHub comment - Add UT_DBFT_ProperMessageFlow.cs with professional, working tests - Update ConsensusTestHelper with async methods for natural message flow - Clean up comments and code formatting with dotnet format - All 38 DBFT plugin tests passing Tests now properly: - Send PrepareRequest and wait for natural PrepareResponse - Monitor actual consensus message flow instead of forcing it - Handle message validation, service resilience, and lifecycle testing - Use simplified but effective message capture mechanism * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj * refactor: Enhance DBFT consensus unit tests to professional standards - Consistent UT_xxx naming convention for all test files - Mock* pattern for all helper/utility classes - Enhanced assertions (7→19, +171% improvement) - Removed duplicate test methods (~140 lines eliminated) - Professional documentation aligned with implementation - Fixed project file syntax (InternalsVisibleTo) - 100% test pass rate maintained (34/34 tests) - Ready for production deployment * Convert DBFT unit tests from xUnit to MSTest framework - Remove xUnit package references (xunit, xunit.runner.visualstudio, Akka.TestKit.Xunit2) - Add Akka.TestKit.MsTest package reference - Update all test files to use MSTest TestKit instead of xUnit - Fix test runner configuration to resolve "Zero tests ran" issue - All 34 tests now pass successfully with MSTest framework - Maintain existing test structure and TestKit inheritance * Update DBFT unit tests README for MSTest framework - Document MSTest framework usage instead of xUnit - Update prerequisites to include MSTest and Akka.NET TestKit (MSTest version) - Add note about Visual Studio Test Explorer integration - Update performance timing to reflect current test execution (~33s) - Emphasize production-ready testing capabilities * Fix copyright header filenames in DBFT tests - Correct UT_DBFT_Performance.cs header (was UT_DBFT_Robustness.cs) - Correct UT_DBFT_Failures.cs header (was UT_DBFT_AbnormalScenarios.cs) - Fix other copyright headers to match actual filenames - Applied via dotnet format to ensure consistency * Update tests/Neo.Plugins.DBFTPlugin.Tests/Neo.Plugins.DBFTPlugin.Tests.csproj * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_Core.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Add coverage --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jimmy <[email protected]> * Style: move MPT Benchamrk Project to benchmarks/ (#4011) * [`improve`] nullable app logs (#4008) * nullable app logs * Update src/Plugins/ApplicationLogs/LogReader.cs Co-authored-by: Christopher Schuchardt <[email protected]> * Apply suggestions from code review Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/ApplicationLogs/Settings.cs Co-authored-by: Christopher Schuchardt <[email protected]> --------- Co-authored-by: Christopher Schuchardt <[email protected]> * Fix: remove FluentAssertions in notary tests (#4014) * Add: SignClient Vsock support (#4002) * Add: SignClient vsock support * optimize: add const string * optimize: use Uri parse endpoint --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> * Comments: add Exception info for numeric ops (#4021) --------- Co-authored-by: Will <[email protected]> Co-authored-by: Alvaro <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Christopher R. Schuchardt <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Jimmy <[email protected]>
shargon
added a commit
that referenced
this pull request
Jul 30, 2025
* Fix: P/Invokes should not be visible (#4003) * [Optimization] - Optimize key method (#4001) * [Optimization] - Optimize Key method * Update src/Neo.Cryptography.MPTTrie/Cache.cs --------- Co-authored-by: Shargon <[email protected]> * Fix Threading hanging with `NeoSystem` (#4005) * Fix threading hanging with `NeoSystem` * Fixed for deadlocks --------- Co-authored-by: Christopher R. Schuchardt <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Style: unify json init style (#4004) Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> * Update packages (#4006) * Update packages * more * clean --------- Co-authored-by: Jimmy <[email protected]> * Restore DBFTPlugin Unit Tests (ConsensusService and Consensus Context) (#3473) * Initial comit * Fix paths * Added `Neo.Plugins.DBFTPlugin.Tests` to `Neo` internals * Added tests to github workflow * Akka deps * Advancing * TestWallet is mocked * Adding more steps * Fixed Test mocking * Timestamp testing * Header and TestProbe * format * Huge advance! Test probe is now working. Now we go * dotnet format * Header looks like to be correct now * Workaround for dbft settings * build the mock system for solenode * update to 7 nodes network mock system * Comment original tests of the PR * [`ut`] 100% Coverage Trie.Get (#3952) * 100% Coverage Trie.Get * fix ut * feat: Add comprehensive DBFT consensus unit tests - Add 34 comprehensive unit tests covering all DBFT scenarios - Test normal consensus flows, abnormal scenarios, and recovery mechanisms - Include Byzantine fault tolerance testing (f=1 and f=2 failures) - Add network partition and message loss simulation - Implement stress testing with multiple rounds and large transaction sets - Create professional test infrastructure with TestWallet and ConsensusTestHelper - Add comprehensive README documentation - Ensure 100% test pass rate with robust error handling - Cover complete DBFT protocol: PrepareRequest → PrepareResponse → Commit flow - Validate view changes, recovery requests, and state synchronization Test Coverage: - UT_ConsensusService.cs (7 tests): Service lifecycle and message handling - UT_DBFT.cs (6 tests): Basic consensus scenarios - UT_DBFT_Integration.cs (4 tests): Integration scenarios - UT_DBFT_NormalFlow.cs (3 tests): Complete normal consensus flows - UT_DBFT_AbnormalScenarios.cs (4 tests): Failure and attack scenarios - UT_DBFT_Recovery.cs (6 tests): Recovery mechanisms - UT_DBFT_Robustness.cs (4 tests): Stress and edge case testing All tests pass: 34/34 ✅ * chore: Update .NET SDK version to 9.0.203 - Update global.json to use .NET SDK 9.0.203 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and fixes * fix: Revert .NET SDK version to 9.0.102 - Revert global.json to use .NET SDK 9.0.102 (available on build system) - Ensures compatibility with current development environment - Previous version 9.0.203 was not available on the build system * style: Update copyright year to 2025 - Run dotnet format to apply code formatting standards - Update copyright year in RecoveryMessageExtensions.cs from 2024 to 2025 - Maintain consistent code formatting across the project * chore: Update .NET SDK version to 9.0.300 - Update global.json to use .NET SDK 9.0.300 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and improvements - Maintains project build consistency with updated SDK * fix: Resolve RpcServer test compilation errors - Add Neo.IO using statement for ToHexString extension method - Comment out problematic ToHexString calls in test setup - Ensure RpcServer tests can compile alongside DBFT tests - Maintain DBFT test functionality (34/34 tests passing) * fix: Complete RpcServer test compilation fix - Ensure all ToHexString extension method issues are resolved - Maintain compatibility with DBFT tests (34/34 passing) - Fix build errors in RpcServer test suite * Revert changes except DBFT plugin tests - Reverted all source files to match dev branch - Reverted test files in Neo.UnitTests and Neo.Plugins.RpcServer.Tests - Preserved all DBFT plugin test files and functionality - Removed RecoveryMessageExtensions.cs (not in dev branch) * Fix DBFT plugin tests API compatibility and accessibility - Made ConsensusService class internal for test accessibility - Added InternalsVisibleTo attributes for Neo core and DBFT plugin - Updated test constructors to use current dev branch API: - Fixed NeoSystem constructor (2-parameter instead of 6-parameter) - Fixed Settings constructor to use IConfigurationSection - Added Microsoft.Extensions.Configuration packages - Created TestBlockchain.CreateDefaultSettings() helper method - Updated all test files to use compatible API calls - All 1,401 tests passing including 34 DBFT plugin tests - Code formatted with dotnet format * Add comprehensive DBFT consensus message flow tests - Implement proper consensus message flow monitoring as requested in GitHub comment - Add UT_DBFT_ProperMessageFlow.cs with professional, working tests - Update ConsensusTestHelper with async methods for natural message flow - Clean up comments and code formatting with dotnet format - All 38 DBFT plugin tests passing Tests now properly: - Send PrepareRequest and wait for natural PrepareResponse - Monitor actual consensus message flow instead of forcing it - Handle message validation, service resilience, and lifecycle testing - Use simplified but effective message capture mechanism * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj * refactor: Enhance DBFT consensus unit tests to professional standards - Consistent UT_xxx naming convention for all test files - Mock* pattern for all helper/utility classes - Enhanced assertions (7→19, +171% improvement) - Removed duplicate test methods (~140 lines eliminated) - Professional documentation aligned with implementation - Fixed project file syntax (InternalsVisibleTo) - 100% test pass rate maintained (34/34 tests) - Ready for production deployment * Convert DBFT unit tests from xUnit to MSTest framework - Remove xUnit package references (xunit, xunit.runner.visualstudio, Akka.TestKit.Xunit2) - Add Akka.TestKit.MsTest package reference - Update all test files to use MSTest TestKit instead of xUnit - Fix test runner configuration to resolve "Zero tests ran" issue - All 34 tests now pass successfully with MSTest framework - Maintain existing test structure and TestKit inheritance * Update DBFT unit tests README for MSTest framework - Document MSTest framework usage instead of xUnit - Update prerequisites to include MSTest and Akka.NET TestKit (MSTest version) - Add note about Visual Studio Test Explorer integration - Update performance timing to reflect current test execution (~33s) - Emphasize production-ready testing capabilities * Fix copyright header filenames in DBFT tests - Correct UT_DBFT_Performance.cs header (was UT_DBFT_Robustness.cs) - Correct UT_DBFT_Failures.cs header (was UT_DBFT_AbnormalScenarios.cs) - Fix other copyright headers to match actual filenames - Applied via dotnet format to ensure consistency * Update tests/Neo.Plugins.DBFTPlugin.Tests/Neo.Plugins.DBFTPlugin.Tests.csproj * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_Core.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Add coverage --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jimmy <[email protected]> * Style: move MPT Benchamrk Project to benchmarks/ (#4011) * [`improve`] nullable app logs (#4008) * nullable app logs * Update src/Plugins/ApplicationLogs/LogReader.cs Co-authored-by: Christopher Schuchardt <[email protected]> * Apply suggestions from code review Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/ApplicationLogs/Settings.cs Co-authored-by: Christopher Schuchardt <[email protected]> --------- Co-authored-by: Christopher Schuchardt <[email protected]> * Fix: remove FluentAssertions in notary tests (#4014) * Add: SignClient Vsock support (#4002) * Add: SignClient vsock support * optimize: add const string * optimize: use Uri parse endpoint --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> * Comments: add Exception info for numeric ops (#4021) * Isolate ApplicationEngine events (#4016) * Isolate Log Event * Isolate instance events * clean * Update src/Neo/SmartContract/ApplicationEngine.cs Co-authored-by: Christopher Schuchardt <[email protected]> * Apply suggestions from code review Co-authored-by: Christopher Schuchardt <[email protected]> * Fix compile * udate format * Unify names --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: jimmy <[email protected]> * Cache nuget packages (#4034) * Cache nuget packages * move * Update main.yml * Update main.yml * Style: more standard code style for Neo.VM (#4022) Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Shargon <[email protected]> * Optimize: more semantics description and better impl for 'TestBit(this BigInteger value, int index)' (#4031) Co-authored-by: Shargon <[email protected]> * Improve exception messages throughout Neo codebase (#4032) * Improve exception messages throughout Neo codebase - Standardize exception message format for consistency - Make messages more descriptive and professional - Remove oversimplified and verbose exception messages - Improve developer experience with clearer error context - Apply consistent patterns for similar validation types - Update messages across CLI, Smart Contracts, Cryptography, VM, and other modules This change improves the quality of error reporting while maintaining technical accuracy and providing better debugging information. * Remove PR description file * Improve exception messages in ECPoint.cs - only message content updated, no code logic changes * format * Fix UPnP unit test to expect InvalidOperationException - Updated UT_UPnP.cs test to expect InvalidOperationException instead of Exception - This aligns with the improved exception handling implemented in UPnP.cs - Fixes test failure caused by more specific exception types - All 1511 tests now pass successfully * Update src/Neo.VM/Types/Integer.cs --------- Co-authored-by: Shargon <[email protected]> * Optimize: impl `GetLowestSetBit` by `TrailingZeroCount` if available (#4030) * Optimize: impl GetLowestSetBit by TrailingZeroCount if available * Update src/Neo.Extensions/BigIntegerExtensions.cs --------- Co-authored-by: Shargon <[email protected]> * [`style`] Style neo system (#4040) * Style * Update .editorconfig Co-authored-by: Christopher Schuchardt <[email protected]> * renames --------- Co-authored-by: Christopher Schuchardt <[email protected]> * Refactor MainService.Vote class (#4036) * Refactor code and improve styles * Update src/Neo.CLI/CLI/MainService.Vote.cs Co-authored-by: Will <[email protected]> * Apply dotnet format to fix whitespace formatting - Remove trailing space after method signature - Ensure proper alignment of expression-bodied member - Comply with project .editorconfig standards * Update src/Neo.CLI/CLI/MainService.Vote.cs * Fix: add null arg to BuildNeoScript from UnVote. Rename BuildNativeScript to BuildNeoScript --------- Co-authored-by: Jimmy <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> * Doc: add document for plugin SignClient (#4049) * Doc: add document for plugin SignClient * Update docs/plugin-secure-sign-guide.md Co-authored-by: Shargon <[email protected]> * Update docs/plugin-secure-sign-guide.md Co-authored-by: Christopher Schuchardt <[email protected]> * Update docs/plugin-secure-sign-guide.md Co-authored-by: Christopher Schuchardt <[email protected]> * Update docs/plugin-secure-sign-guide.md Co-authored-by: Christopher Schuchardt <[email protected]> * Update docs/plugin-secure-sign-guide.md Co-authored-by: Christopher Schuchardt <[email protected]> * Fix typo * Remove unnecessary words --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> * [`Fix`] RcpClient Directories and Naming (#4046) Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Will <[email protected]> * Optimize: no secaped char for command line input (#4044) Co-authored-by: NGD Admin <[email protected]> * Fix: tx.ToJson no 'cosigners' field (#4051) * Fix: tx.ToJson no 'cosigners' field * Rename methods --------- Co-authored-by: Shargon <[email protected]> * Fix: not matched error code if argument is null with RpcMethodWithParams (#4052) Co-authored-by: Shargon <[email protected]> * Renamed and Fix Properties with plugins (#4062) * Renamed and Fix Properties with plugins * Update src/Plugins/SignClient/SignSettings.cs * Format * Rename @shargon `ServerSettings` to RpcServersSettings` * Added @shargon suggestion for `DbftSettings` --------- Co-authored-by: Shargon <[email protected]> * [`Add`] Indexer to EvaluationStack (#4050) * [`Add`] Indexer to EvaluationStack * Added indexer tests * Added more tests * Touch ups * Use indexer instead * use indexer instead * Increase checks * Update EvaluationStack.cs * fixed @shargon broken code * Added extra test for bigger value than length of `innerList` --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Comments: Add detail description for RPC Method (#4054) * [`Add`] `TryCatch` & `TryCatchThrow` Extensions (#4038) * [`Add`] `TryCatch` & `TryCatchThrow` Extensions * fixes * Add `TryCatch` to `Peers` --------- Co-authored-by: Will <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Add: input cli command line with `--argument-name argument-value` (#4047) * Add: input cli command line with --argument-name argument-value * update help output --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Optimize: more detail for help command (#4067) * Optimize: clearer parser for parameter Signers and Witnesses, and fix comments (#4066) * [`Fix`] Async Ask Method (#4071) Co-authored-by: Shargon <[email protected]> * Move `install sc` out of `ConsoleServiceBase.Run` (#4048) * Optimzie: install with sc.exe * Update src/Neo.ConsoleService/ConsoleServiceBase.cs Co-authored-by: Shargon <[email protected]> --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: NGD Admin <[email protected]> * [`Add`] `RandomNumberFactory` Class (#3987) * Updated `RandomExtensions.NextBigIneger` to use `RandomNumberGenerator` * Added `RandomNumberFactory` class to generate random numbers. * changed namespace * Fixed bugs * fixed more bugs * Fixed up tests and add more * Update src/Neo.Extensions/Factories/RandomNumberFactory.cs Co-authored-by: Shargon <[email protected]> * Fixed per @shargon feedback * Bug fix per @vncoelho * Added more tests * Bug Fix * Fixed bugs in `NextBigInteger` unit tests * Updated `RandomExtensions.NextBigIneger` to use `RandomNumberGenerator` * Added `RandomNumberFactory` class to generate random numbers. * changed namespace * Fixed bugs * fixed more bugs * Fixed up tests and add more * Fixed per @shargon feedback * Update src/Neo.Extensions/Factories/RandomNumberFactory.cs Co-authored-by: Shargon <[email protected]> * Bug fix per @vncoelho * Added more tests * Bug Fix * Fixed bugs in `NextBigInteger` unit tests * Added more tests and add `NexrBigInteger` minmax * Bug fixes * `BigInteger` now uses negative numbers. * Fixes to `NextBigInteger` * Fixed `BigNextInteger(MaxValue)` to calulate correctly. * Added @vncoelho suggestions * Fixed `NextInteger` for faster resolve. --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: NGD Admin <[email protected]> * [UT] - Add unit tests in NeoSystem (#3978) * [UT] - Add unit tests in NeoSystem * Fix: Isolate global state in UT_RoleManagement ResetStore in snapshot * Fix: Removing CloneCache to isolate state per role * Fix: Isolating state * Fix: Isolate global state and filter Designation notifications due to shared ApplicationEngine.Notify handler * Fix: Remove console.writeline --------- Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Fixed solutiuon file * Fixed `neo-build.dev` branch for the changes in `dev` --------- Co-authored-by: Will <[email protected]> Co-authored-by: Alvaro <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Christopher R. Schuchardt <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Jimmy <[email protected]>
shargon
added a commit
that referenced
this pull request
Aug 6, 2025
* Added `neo-build` new branch * Add debug sink * Add more debug logging and fixes * Added Provider * Fixes to ApplicationEngine Threading * Fix: P/Invokes should not be visible (#4003) * [Optimization] - Optimize key method (#4001) * [Optimization] - Optimize Key method * Update src/Neo.Cryptography.MPTTrie/Cache.cs --------- Co-authored-by: Shargon <[email protected]> * Fix Threading hanging with `NeoSystem` (#4005) * Fix threading hanging with `NeoSystem` * Fixed for deadlocks --------- Co-authored-by: Christopher R. Schuchardt <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Style: unify json init style (#4004) Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> * Update packages (#4006) * Update packages * more * clean --------- Co-authored-by: Jimmy <[email protected]> * Restore DBFTPlugin Unit Tests (ConsensusService and Consensus Context) (#3473) * Initial comit * Fix paths * Added `Neo.Plugins.DBFTPlugin.Tests` to `Neo` internals * Added tests to github workflow * Akka deps * Advancing * TestWallet is mocked * Adding more steps * Fixed Test mocking * Timestamp testing * Header and TestProbe * format * Huge advance! Test probe is now working. Now we go * dotnet format * Header looks like to be correct now * Workaround for dbft settings * build the mock system for solenode * update to 7 nodes network mock system * Comment original tests of the PR * [`ut`] 100% Coverage Trie.Get (#3952) * 100% Coverage Trie.Get * fix ut * feat: Add comprehensive DBFT consensus unit tests - Add 34 comprehensive unit tests covering all DBFT scenarios - Test normal consensus flows, abnormal scenarios, and recovery mechanisms - Include Byzantine fault tolerance testing (f=1 and f=2 failures) - Add network partition and message loss simulation - Implement stress testing with multiple rounds and large transaction sets - Create professional test infrastructure with TestWallet and ConsensusTestHelper - Add comprehensive README documentation - Ensure 100% test pass rate with robust error handling - Cover complete DBFT protocol: PrepareRequest → PrepareResponse → Commit flow - Validate view changes, recovery requests, and state synchronization Test Coverage: - UT_ConsensusService.cs (7 tests): Service lifecycle and message handling - UT_DBFT.cs (6 tests): Basic consensus scenarios - UT_DBFT_Integration.cs (4 tests): Integration scenarios - UT_DBFT_NormalFlow.cs (3 tests): Complete normal consensus flows - UT_DBFT_AbnormalScenarios.cs (4 tests): Failure and attack scenarios - UT_DBFT_Recovery.cs (6 tests): Recovery mechanisms - UT_DBFT_Robustness.cs (4 tests): Stress and edge case testing All tests pass: 34/34 ✅ * chore: Update .NET SDK version to 9.0.203 - Update global.json to use .NET SDK 9.0.203 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and fixes * fix: Revert .NET SDK version to 9.0.102 - Revert global.json to use .NET SDK 9.0.102 (available on build system) - Ensures compatibility with current development environment - Previous version 9.0.203 was not available on the build system * style: Update copyright year to 2025 - Run dotnet format to apply code formatting standards - Update copyright year in RecoveryMessageExtensions.cs from 2024 to 2025 - Maintain consistent code formatting across the project * chore: Update .NET SDK version to 9.0.300 - Update global.json to use .NET SDK 9.0.300 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and improvements - Maintains project build consistency with updated SDK * fix: Resolve RpcServer test compilation errors - Add Neo.IO using statement for ToHexString extension method - Comment out problematic ToHexString calls in test setup - Ensure RpcServer tests can compile alongside DBFT tests - Maintain DBFT test functionality (34/34 tests passing) * fix: Complete RpcServer test compilation fix - Ensure all ToHexString extension method issues are resolved - Maintain compatibility with DBFT tests (34/34 passing) - Fix build errors in RpcServer test suite * Revert changes except DBFT plugin tests - Reverted all source files to match dev branch - Reverted test files in Neo.UnitTests and Neo.Plugins.RpcServer.Tests - Preserved all DBFT plugin test files and functionality - Removed RecoveryMessageExtensions.cs (not in dev branch) * Fix DBFT plugin tests API compatibility and accessibility - Made ConsensusService class internal for test accessibility - Added InternalsVisibleTo attributes for Neo core and DBFT plugin - Updated test constructors to use current dev branch API: - Fixed NeoSystem constructor (2-parameter instead of 6-parameter) - Fixed Settings constructor to use IConfigurationSection - Added Microsoft.Extensions.Configuration packages - Created TestBlockchain.CreateDefaultSettings() helper method - Updated all test files to use compatible API calls - All 1,401 tests passing including 34 DBFT plugin tests - Code formatted with dotnet format * Add comprehensive DBFT consensus message flow tests - Implement proper consensus message flow monitoring as requested in GitHub comment - Add UT_DBFT_ProperMessageFlow.cs with professional, working tests - Update ConsensusTestHelper with async methods for natural message flow - Clean up comments and code formatting with dotnet format - All 38 DBFT plugin tests passing Tests now properly: - Send PrepareRequest and wait for natural PrepareResponse - Monitor actual consensus message flow instead of forcing it - Handle message validation, service resilience, and lifecycle testing - Use simplified but effective message capture mechanism * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj * refactor: Enhance DBFT consensus unit tests to professional standards - Consistent UT_xxx naming convention for all test files - Mock* pattern for all helper/utility classes - Enhanced assertions (7→19, +171% improvement) - Removed duplicate test methods (~140 lines eliminated) - Professional documentation aligned with implementation - Fixed project file syntax (InternalsVisibleTo) - 100% test pass rate maintained (34/34 tests) - Ready for production deployment * Convert DBFT unit tests from xUnit to MSTest framework - Remove xUnit package references (xunit, xunit.runner.visualstudio, Akka.TestKit.Xunit2) - Add Akka.TestKit.MsTest package reference - Update all test files to use MSTest TestKit instead of xUnit - Fix test runner configuration to resolve "Zero tests ran" issue - All 34 tests now pass successfully with MSTest framework - Maintain existing test structure and TestKit inheritance * Update DBFT unit tests README for MSTest framework - Document MSTest framework usage instead of xUnit - Update prerequisites to include MSTest and Akka.NET TestKit (MSTest version) - Add note about Visual Studio Test Explorer integration - Update performance timing to reflect current test execution (~33s) - Emphasize production-ready testing capabilities * Fix copyright header filenames in DBFT tests - Correct UT_DBFT_Performance.cs header (was UT_DBFT_Robustness.cs) - Correct UT_DBFT_Failures.cs header (was UT_DBFT_AbnormalScenarios.cs) - Fix other copyright headers to match actual filenames - Applied via dotnet format to ensure consistency * Update tests/Neo.Plugins.DBFTPlugin.Tests/Neo.Plugins.DBFTPlugin.Tests.csproj * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_Core.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Add coverage --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jimmy <[email protected]> * Style: move MPT Benchamrk Project to benchmarks/ (#4011) * [`improve`] nullable app logs (#4008) * nullable app logs * Update src/Plugins/ApplicationLogs/LogReader.cs Co-authored-by: Christopher Schuchardt <[email protected]> * Apply suggestions from code review Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/ApplicationLogs/Settings.cs Co-authored-by: Christopher Schuchardt <[email protected]> --------- Co-authored-by: Christopher Schuchardt <[email protected]> * Fix: remove FluentAssertions in notary tests (#4014) * Add: SignClient Vsock support (#4002) * Add: SignClient vsock support * optimize: add const string * optimize: use Uri parse endpoint --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> * Comments: add Exception info for numeric ops (#4021) * Fixes * Ran `dotnet format` * init project * Changed method to static for lamda * changed variable name * Fixed extensions and add helper classes * Switched to using Indexer * Add executescript * Added more tests * Fixes and removal of used code * Fix `using` statement * Fixed tests * Add snapshot storage events * added `RandomNumberFactory` * fixes * Fixed breakpoints * fixed bug with breakpoints * fixed tests * some name changes * Fixed `IEquatable` for `Breakpoint` * Added back `RandomNumberFactory` (core version) --------- Co-authored-by: Christopher R. Schuchardt <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Alvaro <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Jimmy <[email protected]>
cschuchardt88
added a commit
to cschuchardt88/neo
that referenced
this pull request
Aug 16, 2025
neo-project#3473) * Initial comit * Fix paths * Added `Neo.Plugins.DBFTPlugin.Tests` to `Neo` internals * Added tests to github workflow * Akka deps * Advancing * TestWallet is mocked * Adding more steps * Fixed Test mocking * Timestamp testing * Header and TestProbe * format * Huge advance! Test probe is now working. Now we go * dotnet format * Header looks like to be correct now * Workaround for dbft settings * build the mock system for solenode * update to 7 nodes network mock system * Comment original tests of the PR * [`ut`] 100% Coverage Trie.Get (neo-project#3952) * 100% Coverage Trie.Get * fix ut * feat: Add comprehensive DBFT consensus unit tests - Add 34 comprehensive unit tests covering all DBFT scenarios - Test normal consensus flows, abnormal scenarios, and recovery mechanisms - Include Byzantine fault tolerance testing (f=1 and f=2 failures) - Add network partition and message loss simulation - Implement stress testing with multiple rounds and large transaction sets - Create professional test infrastructure with TestWallet and ConsensusTestHelper - Add comprehensive README documentation - Ensure 100% test pass rate with robust error handling - Cover complete DBFT protocol: PrepareRequest → PrepareResponse → Commit flow - Validate view changes, recovery requests, and state synchronization Test Coverage: - UT_ConsensusService.cs (7 tests): Service lifecycle and message handling - UT_DBFT.cs (6 tests): Basic consensus scenarios - UT_DBFT_Integration.cs (4 tests): Integration scenarios - UT_DBFT_NormalFlow.cs (3 tests): Complete normal consensus flows - UT_DBFT_AbnormalScenarios.cs (4 tests): Failure and attack scenarios - UT_DBFT_Recovery.cs (6 tests): Recovery mechanisms - UT_DBFT_Robustness.cs (4 tests): Stress and edge case testing All tests pass: 34/34 ✅ * chore: Update .NET SDK version to 9.0.203 - Update global.json to use .NET SDK 9.0.203 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and fixes * fix: Revert .NET SDK version to 9.0.102 - Revert global.json to use .NET SDK 9.0.102 (available on build system) - Ensures compatibility with current development environment - Previous version 9.0.203 was not available on the build system * style: Update copyright year to 2025 - Run dotnet format to apply code formatting standards - Update copyright year in RecoveryMessageExtensions.cs from 2024 to 2025 - Maintain consistent code formatting across the project * chore: Update .NET SDK version to 9.0.300 - Update global.json to use .NET SDK 9.0.300 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and improvements - Maintains project build consistency with updated SDK * fix: Resolve RpcServer test compilation errors - Add Neo.IO using statement for ToHexString extension method - Comment out problematic ToHexString calls in test setup - Ensure RpcServer tests can compile alongside DBFT tests - Maintain DBFT test functionality (34/34 tests passing) * fix: Complete RpcServer test compilation fix - Ensure all ToHexString extension method issues are resolved - Maintain compatibility with DBFT tests (34/34 passing) - Fix build errors in RpcServer test suite * Revert changes except DBFT plugin tests - Reverted all source files to match dev branch - Reverted test files in Neo.UnitTests and Neo.Plugins.RpcServer.Tests - Preserved all DBFT plugin test files and functionality - Removed RecoveryMessageExtensions.cs (not in dev branch) * Fix DBFT plugin tests API compatibility and accessibility - Made ConsensusService class internal for test accessibility - Added InternalsVisibleTo attributes for Neo core and DBFT plugin - Updated test constructors to use current dev branch API: - Fixed NeoSystem constructor (2-parameter instead of 6-parameter) - Fixed Settings constructor to use IConfigurationSection - Added Microsoft.Extensions.Configuration packages - Created TestBlockchain.CreateDefaultSettings() helper method - Updated all test files to use compatible API calls - All 1,401 tests passing including 34 DBFT plugin tests - Code formatted with dotnet format * Add comprehensive DBFT consensus message flow tests - Implement proper consensus message flow monitoring as requested in GitHub comment - Add UT_DBFT_ProperMessageFlow.cs with professional, working tests - Update ConsensusTestHelper with async methods for natural message flow - Clean up comments and code formatting with dotnet format - All 38 DBFT plugin tests passing Tests now properly: - Send PrepareRequest and wait for natural PrepareResponse - Monitor actual consensus message flow instead of forcing it - Handle message validation, service resilience, and lifecycle testing - Use simplified but effective message capture mechanism * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj * refactor: Enhance DBFT consensus unit tests to professional standards - Consistent UT_xxx naming convention for all test files - Mock* pattern for all helper/utility classes - Enhanced assertions (7→19, +171% improvement) - Removed duplicate test methods (~140 lines eliminated) - Professional documentation aligned with implementation - Fixed project file syntax (InternalsVisibleTo) - 100% test pass rate maintained (34/34 tests) - Ready for production deployment * Convert DBFT unit tests from xUnit to MSTest framework - Remove xUnit package references (xunit, xunit.runner.visualstudio, Akka.TestKit.Xunit2) - Add Akka.TestKit.MsTest package reference - Update all test files to use MSTest TestKit instead of xUnit - Fix test runner configuration to resolve "Zero tests ran" issue - All 34 tests now pass successfully with MSTest framework - Maintain existing test structure and TestKit inheritance * Update DBFT unit tests README for MSTest framework - Document MSTest framework usage instead of xUnit - Update prerequisites to include MSTest and Akka.NET TestKit (MSTest version) - Add note about Visual Studio Test Explorer integration - Update performance timing to reflect current test execution (~33s) - Emphasize production-ready testing capabilities * Fix copyright header filenames in DBFT tests - Correct UT_DBFT_Performance.cs header (was UT_DBFT_Robustness.cs) - Correct UT_DBFT_Failures.cs header (was UT_DBFT_AbnormalScenarios.cs) - Fix other copyright headers to match actual filenames - Applied via dotnet format to ensure consistency * Update tests/Neo.Plugins.DBFTPlugin.Tests/Neo.Plugins.DBFTPlugin.Tests.csproj * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_Core.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Add coverage --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jimmy <[email protected]>
cschuchardt88
added a commit
to cschuchardt88/neo
that referenced
this pull request
Sep 16, 2025
* Fix: P/Invokes should not be visible (neo-project#4003) * [Optimization] - Optimize key method (neo-project#4001) * [Optimization] - Optimize Key method * Update src/Neo.Cryptography.MPTTrie/Cache.cs --------- Co-authored-by: Shargon <[email protected]> * Fix Threading hanging with `NeoSystem` (neo-project#4005) * Fix threading hanging with `NeoSystem` * Fixed for deadlocks --------- Co-authored-by: Christopher R. Schuchardt <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Style: unify json init style (neo-project#4004) Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> * Update packages (neo-project#4006) * Update packages * more * clean --------- Co-authored-by: Jimmy <[email protected]> * Restore DBFTPlugin Unit Tests (ConsensusService and Consensus Context) (neo-project#3473) * Initial comit * Fix paths * Added `Neo.Plugins.DBFTPlugin.Tests` to `Neo` internals * Added tests to github workflow * Akka deps * Advancing * TestWallet is mocked * Adding more steps * Fixed Test mocking * Timestamp testing * Header and TestProbe * format * Huge advance! Test probe is now working. Now we go * dotnet format * Header looks like to be correct now * Workaround for dbft settings * build the mock system for solenode * update to 7 nodes network mock system * Comment original tests of the PR * [`ut`] 100% Coverage Trie.Get (neo-project#3952) * 100% Coverage Trie.Get * fix ut * feat: Add comprehensive DBFT consensus unit tests - Add 34 comprehensive unit tests covering all DBFT scenarios - Test normal consensus flows, abnormal scenarios, and recovery mechanisms - Include Byzantine fault tolerance testing (f=1 and f=2 failures) - Add network partition and message loss simulation - Implement stress testing with multiple rounds and large transaction sets - Create professional test infrastructure with TestWallet and ConsensusTestHelper - Add comprehensive README documentation - Ensure 100% test pass rate with robust error handling - Cover complete DBFT protocol: PrepareRequest → PrepareResponse → Commit flow - Validate view changes, recovery requests, and state synchronization Test Coverage: - UT_ConsensusService.cs (7 tests): Service lifecycle and message handling - UT_DBFT.cs (6 tests): Basic consensus scenarios - UT_DBFT_Integration.cs (4 tests): Integration scenarios - UT_DBFT_NormalFlow.cs (3 tests): Complete normal consensus flows - UT_DBFT_AbnormalScenarios.cs (4 tests): Failure and attack scenarios - UT_DBFT_Recovery.cs (6 tests): Recovery mechanisms - UT_DBFT_Robustness.cs (4 tests): Stress and edge case testing All tests pass: 34/34 ✅ * chore: Update .NET SDK version to 9.0.203 - Update global.json to use .NET SDK 9.0.203 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and fixes * fix: Revert .NET SDK version to 9.0.102 - Revert global.json to use .NET SDK 9.0.102 (available on build system) - Ensures compatibility with current development environment - Previous version 9.0.203 was not available on the build system * style: Update copyright year to 2025 - Run dotnet format to apply code formatting standards - Update copyright year in RecoveryMessageExtensions.cs from 2024 to 2025 - Maintain consistent code formatting across the project * chore: Update .NET SDK version to 9.0.300 - Update global.json to use .NET SDK 9.0.300 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and improvements - Maintains project build consistency with updated SDK * fix: Resolve RpcServer test compilation errors - Add Neo.IO using statement for ToHexString extension method - Comment out problematic ToHexString calls in test setup - Ensure RpcServer tests can compile alongside DBFT tests - Maintain DBFT test functionality (34/34 tests passing) * fix: Complete RpcServer test compilation fix - Ensure all ToHexString extension method issues are resolved - Maintain compatibility with DBFT tests (34/34 passing) - Fix build errors in RpcServer test suite * Revert changes except DBFT plugin tests - Reverted all source files to match dev branch - Reverted test files in Neo.UnitTests and Neo.Plugins.RpcServer.Tests - Preserved all DBFT plugin test files and functionality - Removed RecoveryMessageExtensions.cs (not in dev branch) * Fix DBFT plugin tests API compatibility and accessibility - Made ConsensusService class internal for test accessibility - Added InternalsVisibleTo attributes for Neo core and DBFT plugin - Updated test constructors to use current dev branch API: - Fixed NeoSystem constructor (2-parameter instead of 6-parameter) - Fixed Settings constructor to use IConfigurationSection - Added Microsoft.Extensions.Configuration packages - Created TestBlockchain.CreateDefaultSettings() helper method - Updated all test files to use compatible API calls - All 1,401 tests passing including 34 DBFT plugin tests - Code formatted with dotnet format * Add comprehensive DBFT consensus message flow tests - Implement proper consensus message flow monitoring as requested in GitHub comment - Add UT_DBFT_ProperMessageFlow.cs with professional, working tests - Update ConsensusTestHelper with async methods for natural message flow - Clean up comments and code formatting with dotnet format - All 38 DBFT plugin tests passing Tests now properly: - Send PrepareRequest and wait for natural PrepareResponse - Monitor actual consensus message flow instead of forcing it - Handle message validation, service resilience, and lifecycle testing - Use simplified but effective message capture mechanism * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj * refactor: Enhance DBFT consensus unit tests to professional standards - Consistent UT_xxx naming convention for all test files - Mock* pattern for all helper/utility classes - Enhanced assertions (7→19, +171% improvement) - Removed duplicate test methods (~140 lines eliminated) - Professional documentation aligned with implementation - Fixed project file syntax (InternalsVisibleTo) - 100% test pass rate maintained (34/34 tests) - Ready for production deployment * Convert DBFT unit tests from xUnit to MSTest framework - Remove xUnit package references (xunit, xunit.runner.visualstudio, Akka.TestKit.Xunit2) - Add Akka.TestKit.MsTest package reference - Update all test files to use MSTest TestKit instead of xUnit - Fix test runner configuration to resolve "Zero tests ran" issue - All 34 tests now pass successfully with MSTest framework - Maintain existing test structure and TestKit inheritance * Update DBFT unit tests README for MSTest framework - Document MSTest framework usage instead of xUnit - Update prerequisites to include MSTest and Akka.NET TestKit (MSTest version) - Add note about Visual Studio Test Explorer integration - Update performance timing to reflect current test execution (~33s) - Emphasize production-ready testing capabilities * Fix copyright header filenames in DBFT tests - Correct UT_DBFT_Performance.cs header (was UT_DBFT_Robustness.cs) - Correct UT_DBFT_Failures.cs header (was UT_DBFT_AbnormalScenarios.cs) - Fix other copyright headers to match actual filenames - Applied via dotnet format to ensure consistency * Update tests/Neo.Plugins.DBFTPlugin.Tests/Neo.Plugins.DBFTPlugin.Tests.csproj * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_Core.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Add coverage --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jimmy <[email protected]> * Style: move MPT Benchamrk Project to benchmarks/ (neo-project#4011) * [`improve`] nullable app logs (neo-project#4008) * nullable app logs * Update src/Plugins/ApplicationLogs/LogReader.cs Co-authored-by: Christopher Schuchardt <[email protected]> * Apply suggestions from code review Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/ApplicationLogs/Settings.cs Co-authored-by: Christopher Schuchardt <[email protected]> --------- Co-authored-by: Christopher Schuchardt <[email protected]> * Fix: remove FluentAssertions in notary tests (neo-project#4014) * Add: SignClient Vsock support (neo-project#4002) * Add: SignClient vsock support * optimize: add const string * optimize: use Uri parse endpoint --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> * Comments: add Exception info for numeric ops (neo-project#4021) --------- Co-authored-by: Will <[email protected]> Co-authored-by: Alvaro <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Christopher R. Schuchardt <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Jimmy <[email protected]>
cschuchardt88
added a commit
to cschuchardt88/neo
that referenced
this pull request
Sep 16, 2025
* Fix: P/Invokes should not be visible (neo-project#4003) * [Optimization] - Optimize key method (neo-project#4001) * [Optimization] - Optimize Key method * Update src/Neo.Cryptography.MPTTrie/Cache.cs --------- Co-authored-by: Shargon <[email protected]> * Fix Threading hanging with `NeoSystem` (neo-project#4005) * Fix threading hanging with `NeoSystem` * Fixed for deadlocks --------- Co-authored-by: Christopher R. Schuchardt <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Style: unify json init style (neo-project#4004) Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> * Update packages (neo-project#4006) * Update packages * more * clean --------- Co-authored-by: Jimmy <[email protected]> * Restore DBFTPlugin Unit Tests (ConsensusService and Consensus Context) (neo-project#3473) * Initial comit * Fix paths * Added `Neo.Plugins.DBFTPlugin.Tests` to `Neo` internals * Added tests to github workflow * Akka deps * Advancing * TestWallet is mocked * Adding more steps * Fixed Test mocking * Timestamp testing * Header and TestProbe * format * Huge advance! Test probe is now working. Now we go * dotnet format * Header looks like to be correct now * Workaround for dbft settings * build the mock system for solenode * update to 7 nodes network mock system * Comment original tests of the PR * [`ut`] 100% Coverage Trie.Get (neo-project#3952) * 100% Coverage Trie.Get * fix ut * feat: Add comprehensive DBFT consensus unit tests - Add 34 comprehensive unit tests covering all DBFT scenarios - Test normal consensus flows, abnormal scenarios, and recovery mechanisms - Include Byzantine fault tolerance testing (f=1 and f=2 failures) - Add network partition and message loss simulation - Implement stress testing with multiple rounds and large transaction sets - Create professional test infrastructure with TestWallet and ConsensusTestHelper - Add comprehensive README documentation - Ensure 100% test pass rate with robust error handling - Cover complete DBFT protocol: PrepareRequest → PrepareResponse → Commit flow - Validate view changes, recovery requests, and state synchronization Test Coverage: - UT_ConsensusService.cs (7 tests): Service lifecycle and message handling - UT_DBFT.cs (6 tests): Basic consensus scenarios - UT_DBFT_Integration.cs (4 tests): Integration scenarios - UT_DBFT_NormalFlow.cs (3 tests): Complete normal consensus flows - UT_DBFT_AbnormalScenarios.cs (4 tests): Failure and attack scenarios - UT_DBFT_Recovery.cs (6 tests): Recovery mechanisms - UT_DBFT_Robustness.cs (4 tests): Stress and edge case testing All tests pass: 34/34 ✅ * chore: Update .NET SDK version to 9.0.203 - Update global.json to use .NET SDK 9.0.203 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and fixes * fix: Revert .NET SDK version to 9.0.102 - Revert global.json to use .NET SDK 9.0.102 (available on build system) - Ensures compatibility with current development environment - Previous version 9.0.203 was not available on the build system * style: Update copyright year to 2025 - Run dotnet format to apply code formatting standards - Update copyright year in RecoveryMessageExtensions.cs from 2024 to 2025 - Maintain consistent code formatting across the project * chore: Update .NET SDK version to 9.0.300 - Update global.json to use .NET SDK 9.0.300 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and improvements - Maintains project build consistency with updated SDK * fix: Resolve RpcServer test compilation errors - Add Neo.IO using statement for ToHexString extension method - Comment out problematic ToHexString calls in test setup - Ensure RpcServer tests can compile alongside DBFT tests - Maintain DBFT test functionality (34/34 tests passing) * fix: Complete RpcServer test compilation fix - Ensure all ToHexString extension method issues are resolved - Maintain compatibility with DBFT tests (34/34 passing) - Fix build errors in RpcServer test suite * Revert changes except DBFT plugin tests - Reverted all source files to match dev branch - Reverted test files in Neo.UnitTests and Neo.Plugins.RpcServer.Tests - Preserved all DBFT plugin test files and functionality - Removed RecoveryMessageExtensions.cs (not in dev branch) * Fix DBFT plugin tests API compatibility and accessibility - Made ConsensusService class internal for test accessibility - Added InternalsVisibleTo attributes for Neo core and DBFT plugin - Updated test constructors to use current dev branch API: - Fixed NeoSystem constructor (2-parameter instead of 6-parameter) - Fixed Settings constructor to use IConfigurationSection - Added Microsoft.Extensions.Configuration packages - Created TestBlockchain.CreateDefaultSettings() helper method - Updated all test files to use compatible API calls - All 1,401 tests passing including 34 DBFT plugin tests - Code formatted with dotnet format * Add comprehensive DBFT consensus message flow tests - Implement proper consensus message flow monitoring as requested in GitHub comment - Add UT_DBFT_ProperMessageFlow.cs with professional, working tests - Update ConsensusTestHelper with async methods for natural message flow - Clean up comments and code formatting with dotnet format - All 38 DBFT plugin tests passing Tests now properly: - Send PrepareRequest and wait for natural PrepareResponse - Monitor actual consensus message flow instead of forcing it - Handle message validation, service resilience, and lifecycle testing - Use simplified but effective message capture mechanism * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj * refactor: Enhance DBFT consensus unit tests to professional standards - Consistent UT_xxx naming convention for all test files - Mock* pattern for all helper/utility classes - Enhanced assertions (7→19, +171% improvement) - Removed duplicate test methods (~140 lines eliminated) - Professional documentation aligned with implementation - Fixed project file syntax (InternalsVisibleTo) - 100% test pass rate maintained (34/34 tests) - Ready for production deployment * Convert DBFT unit tests from xUnit to MSTest framework - Remove xUnit package references (xunit, xunit.runner.visualstudio, Akka.TestKit.Xunit2) - Add Akka.TestKit.MsTest package reference - Update all test files to use MSTest TestKit instead of xUnit - Fix test runner configuration to resolve "Zero tests ran" issue - All 34 tests now pass successfully with MSTest framework - Maintain existing test structure and TestKit inheritance * Update DBFT unit tests README for MSTest framework - Document MSTest framework usage instead of xUnit - Update prerequisites to include MSTest and Akka.NET TestKit (MSTest version) - Add note about Visual Studio Test Explorer integration - Update performance timing to reflect current test execution (~33s) - Emphasize production-ready testing capabilities * Fix copyright header filenames in DBFT tests - Correct UT_DBFT_Performance.cs header (was UT_DBFT_Robustness.cs) - Correct UT_DBFT_Failures.cs header (was UT_DBFT_AbnormalScenarios.cs) - Fix other copyright headers to match actual filenames - Applied via dotnet format to ensure consistency * Update tests/Neo.Plugins.DBFTPlugin.Tests/Neo.Plugins.DBFTPlugin.Tests.csproj * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_Core.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Add coverage --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jimmy <[email protected]> * Style: move MPT Benchamrk Project to benchmarks/ (neo-project#4011) * [`improve`] nullable app logs (neo-project#4008) * nullable app logs * Update src/Plugins/ApplicationLogs/LogReader.cs Co-authored-by: Christopher Schuchardt <[email protected]> * Apply suggestions from code review Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/ApplicationLogs/Settings.cs Co-authored-by: Christopher Schuchardt <[email protected]> --------- Co-authored-by: Christopher Schuchardt <[email protected]> * Fix: remove FluentAssertions in notary tests (neo-project#4014) * Add: SignClient Vsock support (neo-project#4002) * Add: SignClient vsock support * optimize: add const string * optimize: use Uri parse endpoint --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> * Comments: add Exception info for numeric ops (neo-project#4021) * Isolate ApplicationEngine events (neo-project#4016) * Isolate Log Event * Isolate instance events * clean * Update src/Neo/SmartContract/ApplicationEngine.cs Co-authored-by: Christopher Schuchardt <[email protected]> * Apply suggestions from code review Co-authored-by: Christopher Schuchardt <[email protected]> * Fix compile * udate format * Unify names --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: jimmy <[email protected]> * Cache nuget packages (neo-project#4034) * Cache nuget packages * move * Update main.yml * Update main.yml * Style: more standard code style for Neo.VM (neo-project#4022) Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Shargon <[email protected]> * Optimize: more semantics description and better impl for 'TestBit(this BigInteger value, int index)' (neo-project#4031) Co-authored-by: Shargon <[email protected]> * Improve exception messages throughout Neo codebase (neo-project#4032) * Improve exception messages throughout Neo codebase - Standardize exception message format for consistency - Make messages more descriptive and professional - Remove oversimplified and verbose exception messages - Improve developer experience with clearer error context - Apply consistent patterns for similar validation types - Update messages across CLI, Smart Contracts, Cryptography, VM, and other modules This change improves the quality of error reporting while maintaining technical accuracy and providing better debugging information. * Remove PR description file * Improve exception messages in ECPoint.cs - only message content updated, no code logic changes * format * Fix UPnP unit test to expect InvalidOperationException - Updated UT_UPnP.cs test to expect InvalidOperationException instead of Exception - This aligns with the improved exception handling implemented in UPnP.cs - Fixes test failure caused by more specific exception types - All 1511 tests now pass successfully * Update src/Neo.VM/Types/Integer.cs --------- Co-authored-by: Shargon <[email protected]> * Optimize: impl `GetLowestSetBit` by `TrailingZeroCount` if available (neo-project#4030) * Optimize: impl GetLowestSetBit by TrailingZeroCount if available * Update src/Neo.Extensions/BigIntegerExtensions.cs --------- Co-authored-by: Shargon <[email protected]> * [`style`] Style neo system (neo-project#4040) * Style * Update .editorconfig Co-authored-by: Christopher Schuchardt <[email protected]> * renames --------- Co-authored-by: Christopher Schuchardt <[email protected]> * Refactor MainService.Vote class (neo-project#4036) * Refactor code and improve styles * Update src/Neo.CLI/CLI/MainService.Vote.cs Co-authored-by: Will <[email protected]> * Apply dotnet format to fix whitespace formatting - Remove trailing space after method signature - Ensure proper alignment of expression-bodied member - Comply with project .editorconfig standards * Update src/Neo.CLI/CLI/MainService.Vote.cs * Fix: add null arg to BuildNeoScript from UnVote. Rename BuildNativeScript to BuildNeoScript --------- Co-authored-by: Jimmy <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> * Doc: add document for plugin SignClient (neo-project#4049) * Doc: add document for plugin SignClient * Update docs/plugin-secure-sign-guide.md Co-authored-by: Shargon <[email protected]> * Update docs/plugin-secure-sign-guide.md Co-authored-by: Christopher Schuchardt <[email protected]> * Update docs/plugin-secure-sign-guide.md Co-authored-by: Christopher Schuchardt <[email protected]> * Update docs/plugin-secure-sign-guide.md Co-authored-by: Christopher Schuchardt <[email protected]> * Update docs/plugin-secure-sign-guide.md Co-authored-by: Christopher Schuchardt <[email protected]> * Fix typo * Remove unnecessary words --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> * [`Fix`] RcpClient Directories and Naming (neo-project#4046) Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Will <[email protected]> * Optimize: no secaped char for command line input (neo-project#4044) Co-authored-by: NGD Admin <[email protected]> * Fix: tx.ToJson no 'cosigners' field (neo-project#4051) * Fix: tx.ToJson no 'cosigners' field * Rename methods --------- Co-authored-by: Shargon <[email protected]> * Fix: not matched error code if argument is null with RpcMethodWithParams (neo-project#4052) Co-authored-by: Shargon <[email protected]> * Renamed and Fix Properties with plugins (neo-project#4062) * Renamed and Fix Properties with plugins * Update src/Plugins/SignClient/SignSettings.cs * Format * Rename @shargon `ServerSettings` to RpcServersSettings` * Added @shargon suggestion for `DbftSettings` --------- Co-authored-by: Shargon <[email protected]> * [`Add`] Indexer to EvaluationStack (neo-project#4050) * [`Add`] Indexer to EvaluationStack * Added indexer tests * Added more tests * Touch ups * Use indexer instead * use indexer instead * Increase checks * Update EvaluationStack.cs * fixed @shargon broken code * Added extra test for bigger value than length of `innerList` --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Comments: Add detail description for RPC Method (neo-project#4054) * [`Add`] `TryCatch` & `TryCatchThrow` Extensions (neo-project#4038) * [`Add`] `TryCatch` & `TryCatchThrow` Extensions * fixes * Add `TryCatch` to `Peers` --------- Co-authored-by: Will <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Add: input cli command line with `--argument-name argument-value` (neo-project#4047) * Add: input cli command line with --argument-name argument-value * update help output --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Optimize: more detail for help command (neo-project#4067) * Optimize: clearer parser for parameter Signers and Witnesses, and fix comments (neo-project#4066) * [`Fix`] Async Ask Method (neo-project#4071) Co-authored-by: Shargon <[email protected]> * Move `install sc` out of `ConsoleServiceBase.Run` (neo-project#4048) * Optimzie: install with sc.exe * Update src/Neo.ConsoleService/ConsoleServiceBase.cs Co-authored-by: Shargon <[email protected]> --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: NGD Admin <[email protected]> * [`Add`] `RandomNumberFactory` Class (neo-project#3987) * Updated `RandomExtensions.NextBigIneger` to use `RandomNumberGenerator` * Added `RandomNumberFactory` class to generate random numbers. * changed namespace * Fixed bugs * fixed more bugs * Fixed up tests and add more * Update src/Neo.Extensions/Factories/RandomNumberFactory.cs Co-authored-by: Shargon <[email protected]> * Fixed per @shargon feedback * Bug fix per @vncoelho * Added more tests * Bug Fix * Fixed bugs in `NextBigInteger` unit tests * Updated `RandomExtensions.NextBigIneger` to use `RandomNumberGenerator` * Added `RandomNumberFactory` class to generate random numbers. * changed namespace * Fixed bugs * fixed more bugs * Fixed up tests and add more * Fixed per @shargon feedback * Update src/Neo.Extensions/Factories/RandomNumberFactory.cs Co-authored-by: Shargon <[email protected]> * Bug fix per @vncoelho * Added more tests * Bug Fix * Fixed bugs in `NextBigInteger` unit tests * Added more tests and add `NexrBigInteger` minmax * Bug fixes * `BigInteger` now uses negative numbers. * Fixes to `NextBigInteger` * Fixed `BigNextInteger(MaxValue)` to calulate correctly. * Added @vncoelho suggestions * Fixed `NextInteger` for faster resolve. --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: NGD Admin <[email protected]> * [UT] - Add unit tests in NeoSystem (neo-project#3978) * [UT] - Add unit tests in NeoSystem * Fix: Isolate global state in UT_RoleManagement ResetStore in snapshot * Fix: Removing CloneCache to isolate state per role * Fix: Isolating state * Fix: Isolate global state and filter Designation notifications due to shared ApplicationEngine.Notify handler * Fix: Remove console.writeline --------- Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Fixed solutiuon file * Fixed `neo-build.dev` branch for the changes in `dev` --------- Co-authored-by: Will <[email protected]> Co-authored-by: Alvaro <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Christopher R. Schuchardt <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Jimmy <[email protected]>
cschuchardt88
added a commit
to cschuchardt88/neo
that referenced
this pull request
Sep 16, 2025
* Added `neo-build` new branch * Add debug sink * Add more debug logging and fixes * Added Provider * Fixes to ApplicationEngine Threading * Fix: P/Invokes should not be visible (neo-project#4003) * [Optimization] - Optimize key method (neo-project#4001) * [Optimization] - Optimize Key method * Update src/Neo.Cryptography.MPTTrie/Cache.cs --------- Co-authored-by: Shargon <[email protected]> * Fix Threading hanging with `NeoSystem` (neo-project#4005) * Fix threading hanging with `NeoSystem` * Fixed for deadlocks --------- Co-authored-by: Christopher R. Schuchardt <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Style: unify json init style (neo-project#4004) Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> * Update packages (neo-project#4006) * Update packages * more * clean --------- Co-authored-by: Jimmy <[email protected]> * Restore DBFTPlugin Unit Tests (ConsensusService and Consensus Context) (neo-project#3473) * Initial comit * Fix paths * Added `Neo.Plugins.DBFTPlugin.Tests` to `Neo` internals * Added tests to github workflow * Akka deps * Advancing * TestWallet is mocked * Adding more steps * Fixed Test mocking * Timestamp testing * Header and TestProbe * format * Huge advance! Test probe is now working. Now we go * dotnet format * Header looks like to be correct now * Workaround for dbft settings * build the mock system for solenode * update to 7 nodes network mock system * Comment original tests of the PR * [`ut`] 100% Coverage Trie.Get (neo-project#3952) * 100% Coverage Trie.Get * fix ut * feat: Add comprehensive DBFT consensus unit tests - Add 34 comprehensive unit tests covering all DBFT scenarios - Test normal consensus flows, abnormal scenarios, and recovery mechanisms - Include Byzantine fault tolerance testing (f=1 and f=2 failures) - Add network partition and message loss simulation - Implement stress testing with multiple rounds and large transaction sets - Create professional test infrastructure with TestWallet and ConsensusTestHelper - Add comprehensive README documentation - Ensure 100% test pass rate with robust error handling - Cover complete DBFT protocol: PrepareRequest → PrepareResponse → Commit flow - Validate view changes, recovery requests, and state synchronization Test Coverage: - UT_ConsensusService.cs (7 tests): Service lifecycle and message handling - UT_DBFT.cs (6 tests): Basic consensus scenarios - UT_DBFT_Integration.cs (4 tests): Integration scenarios - UT_DBFT_NormalFlow.cs (3 tests): Complete normal consensus flows - UT_DBFT_AbnormalScenarios.cs (4 tests): Failure and attack scenarios - UT_DBFT_Recovery.cs (6 tests): Recovery mechanisms - UT_DBFT_Robustness.cs (4 tests): Stress and edge case testing All tests pass: 34/34 ✅ * chore: Update .NET SDK version to 9.0.203 - Update global.json to use .NET SDK 9.0.203 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and fixes * fix: Revert .NET SDK version to 9.0.102 - Revert global.json to use .NET SDK 9.0.102 (available on build system) - Ensures compatibility with current development environment - Previous version 9.0.203 was not available on the build system * style: Update copyright year to 2025 - Run dotnet format to apply code formatting standards - Update copyright year in RecoveryMessageExtensions.cs from 2024 to 2025 - Maintain consistent code formatting across the project * chore: Update .NET SDK version to 9.0.300 - Update global.json to use .NET SDK 9.0.300 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and improvements - Maintains project build consistency with updated SDK * fix: Resolve RpcServer test compilation errors - Add Neo.IO using statement for ToHexString extension method - Comment out problematic ToHexString calls in test setup - Ensure RpcServer tests can compile alongside DBFT tests - Maintain DBFT test functionality (34/34 tests passing) * fix: Complete RpcServer test compilation fix - Ensure all ToHexString extension method issues are resolved - Maintain compatibility with DBFT tests (34/34 passing) - Fix build errors in RpcServer test suite * Revert changes except DBFT plugin tests - Reverted all source files to match dev branch - Reverted test files in Neo.UnitTests and Neo.Plugins.RpcServer.Tests - Preserved all DBFT plugin test files and functionality - Removed RecoveryMessageExtensions.cs (not in dev branch) * Fix DBFT plugin tests API compatibility and accessibility - Made ConsensusService class internal for test accessibility - Added InternalsVisibleTo attributes for Neo core and DBFT plugin - Updated test constructors to use current dev branch API: - Fixed NeoSystem constructor (2-parameter instead of 6-parameter) - Fixed Settings constructor to use IConfigurationSection - Added Microsoft.Extensions.Configuration packages - Created TestBlockchain.CreateDefaultSettings() helper method - Updated all test files to use compatible API calls - All 1,401 tests passing including 34 DBFT plugin tests - Code formatted with dotnet format * Add comprehensive DBFT consensus message flow tests - Implement proper consensus message flow monitoring as requested in GitHub comment - Add UT_DBFT_ProperMessageFlow.cs with professional, working tests - Update ConsensusTestHelper with async methods for natural message flow - Clean up comments and code formatting with dotnet format - All 38 DBFT plugin tests passing Tests now properly: - Send PrepareRequest and wait for natural PrepareResponse - Monitor actual consensus message flow instead of forcing it - Handle message validation, service resilience, and lifecycle testing - Use simplified but effective message capture mechanism * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj * refactor: Enhance DBFT consensus unit tests to professional standards - Consistent UT_xxx naming convention for all test files - Mock* pattern for all helper/utility classes - Enhanced assertions (7→19, +171% improvement) - Removed duplicate test methods (~140 lines eliminated) - Professional documentation aligned with implementation - Fixed project file syntax (InternalsVisibleTo) - 100% test pass rate maintained (34/34 tests) - Ready for production deployment * Convert DBFT unit tests from xUnit to MSTest framework - Remove xUnit package references (xunit, xunit.runner.visualstudio, Akka.TestKit.Xunit2) - Add Akka.TestKit.MsTest package reference - Update all test files to use MSTest TestKit instead of xUnit - Fix test runner configuration to resolve "Zero tests ran" issue - All 34 tests now pass successfully with MSTest framework - Maintain existing test structure and TestKit inheritance * Update DBFT unit tests README for MSTest framework - Document MSTest framework usage instead of xUnit - Update prerequisites to include MSTest and Akka.NET TestKit (MSTest version) - Add note about Visual Studio Test Explorer integration - Update performance timing to reflect current test execution (~33s) - Emphasize production-ready testing capabilities * Fix copyright header filenames in DBFT tests - Correct UT_DBFT_Performance.cs header (was UT_DBFT_Robustness.cs) - Correct UT_DBFT_Failures.cs header (was UT_DBFT_AbnormalScenarios.cs) - Fix other copyright headers to match actual filenames - Applied via dotnet format to ensure consistency * Update tests/Neo.Plugins.DBFTPlugin.Tests/Neo.Plugins.DBFTPlugin.Tests.csproj * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_Core.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Add coverage --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jimmy <[email protected]> * Style: move MPT Benchamrk Project to benchmarks/ (neo-project#4011) * [`improve`] nullable app logs (neo-project#4008) * nullable app logs * Update src/Plugins/ApplicationLogs/LogReader.cs Co-authored-by: Christopher Schuchardt <[email protected]> * Apply suggestions from code review Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/ApplicationLogs/Settings.cs Co-authored-by: Christopher Schuchardt <[email protected]> --------- Co-authored-by: Christopher Schuchardt <[email protected]> * Fix: remove FluentAssertions in notary tests (neo-project#4014) * Add: SignClient Vsock support (neo-project#4002) * Add: SignClient vsock support * optimize: add const string * optimize: use Uri parse endpoint --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> * Comments: add Exception info for numeric ops (neo-project#4021) * Fixes * Ran `dotnet format` * init project * Changed method to static for lamda * changed variable name * Fixed extensions and add helper classes * Switched to using Indexer * Add executescript * Added more tests * Fixes and removal of used code * Fix `using` statement * Fixed tests * Add snapshot storage events * added `RandomNumberFactory` * fixes * Fixed breakpoints * fixed bug with breakpoints * fixed tests * some name changes * Fixed `IEquatable` for `Breakpoint` * Added back `RandomNumberFactory` (core version) --------- Co-authored-by: Christopher R. Schuchardt <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Alvaro <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Jimmy <[email protected]>
cschuchardt88
added a commit
to cschuchardt88/neo
that referenced
this pull request
Sep 16, 2025
neo-project#3473) * Initial comit * Fix paths * Added `Neo.Plugins.DBFTPlugin.Tests` to `Neo` internals * Added tests to github workflow * Akka deps * Advancing * TestWallet is mocked * Adding more steps * Fixed Test mocking * Timestamp testing * Header and TestProbe * format * Huge advance! Test probe is now working. Now we go * dotnet format * Header looks like to be correct now * Workaround for dbft settings * build the mock system for solenode * update to 7 nodes network mock system * Comment original tests of the PR * [`ut`] 100% Coverage Trie.Get (neo-project#3952) * 100% Coverage Trie.Get * fix ut * feat: Add comprehensive DBFT consensus unit tests - Add 34 comprehensive unit tests covering all DBFT scenarios - Test normal consensus flows, abnormal scenarios, and recovery mechanisms - Include Byzantine fault tolerance testing (f=1 and f=2 failures) - Add network partition and message loss simulation - Implement stress testing with multiple rounds and large transaction sets - Create professional test infrastructure with TestWallet and ConsensusTestHelper - Add comprehensive README documentation - Ensure 100% test pass rate with robust error handling - Cover complete DBFT protocol: PrepareRequest → PrepareResponse → Commit flow - Validate view changes, recovery requests, and state synchronization Test Coverage: - UT_ConsensusService.cs (7 tests): Service lifecycle and message handling - UT_DBFT.cs (6 tests): Basic consensus scenarios - UT_DBFT_Integration.cs (4 tests): Integration scenarios - UT_DBFT_NormalFlow.cs (3 tests): Complete normal consensus flows - UT_DBFT_AbnormalScenarios.cs (4 tests): Failure and attack scenarios - UT_DBFT_Recovery.cs (6 tests): Recovery mechanisms - UT_DBFT_Robustness.cs (4 tests): Stress and edge case testing All tests pass: 34/34 ✅ * chore: Update .NET SDK version to 9.0.203 - Update global.json to use .NET SDK 9.0.203 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and fixes * fix: Revert .NET SDK version to 9.0.102 - Revert global.json to use .NET SDK 9.0.102 (available on build system) - Ensures compatibility with current development environment - Previous version 9.0.203 was not available on the build system * style: Update copyright year to 2025 - Run dotnet format to apply code formatting standards - Update copyright year in RecoveryMessageExtensions.cs from 2024 to 2025 - Maintain consistent code formatting across the project * chore: Update .NET SDK version to 9.0.300 - Update global.json to use .NET SDK 9.0.300 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and improvements - Maintains project build consistency with updated SDK * fix: Resolve RpcServer test compilation errors - Add Neo.IO using statement for ToHexString extension method - Comment out problematic ToHexString calls in test setup - Ensure RpcServer tests can compile alongside DBFT tests - Maintain DBFT test functionality (34/34 tests passing) * fix: Complete RpcServer test compilation fix - Ensure all ToHexString extension method issues are resolved - Maintain compatibility with DBFT tests (34/34 passing) - Fix build errors in RpcServer test suite * Revert changes except DBFT plugin tests - Reverted all source files to match dev branch - Reverted test files in Neo.UnitTests and Neo.Plugins.RpcServer.Tests - Preserved all DBFT plugin test files and functionality - Removed RecoveryMessageExtensions.cs (not in dev branch) * Fix DBFT plugin tests API compatibility and accessibility - Made ConsensusService class internal for test accessibility - Added InternalsVisibleTo attributes for Neo core and DBFT plugin - Updated test constructors to use current dev branch API: - Fixed NeoSystem constructor (2-parameter instead of 6-parameter) - Fixed Settings constructor to use IConfigurationSection - Added Microsoft.Extensions.Configuration packages - Created TestBlockchain.CreateDefaultSettings() helper method - Updated all test files to use compatible API calls - All 1,401 tests passing including 34 DBFT plugin tests - Code formatted with dotnet format * Add comprehensive DBFT consensus message flow tests - Implement proper consensus message flow monitoring as requested in GitHub comment - Add UT_DBFT_ProperMessageFlow.cs with professional, working tests - Update ConsensusTestHelper with async methods for natural message flow - Clean up comments and code formatting with dotnet format - All 38 DBFT plugin tests passing Tests now properly: - Send PrepareRequest and wait for natural PrepareResponse - Monitor actual consensus message flow instead of forcing it - Handle message validation, service resilience, and lifecycle testing - Use simplified but effective message capture mechanism * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj * refactor: Enhance DBFT consensus unit tests to professional standards - Consistent UT_xxx naming convention for all test files - Mock* pattern for all helper/utility classes - Enhanced assertions (7→19, +171% improvement) - Removed duplicate test methods (~140 lines eliminated) - Professional documentation aligned with implementation - Fixed project file syntax (InternalsVisibleTo) - 100% test pass rate maintained (34/34 tests) - Ready for production deployment * Convert DBFT unit tests from xUnit to MSTest framework - Remove xUnit package references (xunit, xunit.runner.visualstudio, Akka.TestKit.Xunit2) - Add Akka.TestKit.MsTest package reference - Update all test files to use MSTest TestKit instead of xUnit - Fix test runner configuration to resolve "Zero tests ran" issue - All 34 tests now pass successfully with MSTest framework - Maintain existing test structure and TestKit inheritance * Update DBFT unit tests README for MSTest framework - Document MSTest framework usage instead of xUnit - Update prerequisites to include MSTest and Akka.NET TestKit (MSTest version) - Add note about Visual Studio Test Explorer integration - Update performance timing to reflect current test execution (~33s) - Emphasize production-ready testing capabilities * Fix copyright header filenames in DBFT tests - Correct UT_DBFT_Performance.cs header (was UT_DBFT_Robustness.cs) - Correct UT_DBFT_Failures.cs header (was UT_DBFT_AbnormalScenarios.cs) - Fix other copyright headers to match actual filenames - Applied via dotnet format to ensure consistency * Update tests/Neo.Plugins.DBFTPlugin.Tests/Neo.Plugins.DBFTPlugin.Tests.csproj * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_Core.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Add coverage --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jimmy <[email protected]>
shargon
added a commit
that referenced
this pull request
Sep 18, 2025
* [Optimization] - Optimize key method (#4001) * [Optimization] - Optimize Key method * Update src/Neo.Cryptography.MPTTrie/Cache.cs --------- Co-authored-by: Shargon <[email protected]> * Update packages (#4006) * Update packages * more * clean --------- Co-authored-by: Jimmy <[email protected]> * Restore DBFTPlugin Unit Tests (ConsensusService and Consensus Context) (#3473) * Initial comit * Fix paths * Added `Neo.Plugins.DBFTPlugin.Tests` to `Neo` internals * Added tests to github workflow * Akka deps * Advancing * TestWallet is mocked * Adding more steps * Fixed Test mocking * Timestamp testing * Header and TestProbe * format * Huge advance! Test probe is now working. Now we go * dotnet format * Header looks like to be correct now * Workaround for dbft settings * build the mock system for solenode * update to 7 nodes network mock system * Comment original tests of the PR * [`ut`] 100% Coverage Trie.Get (#3952) * 100% Coverage Trie.Get * fix ut * feat: Add comprehensive DBFT consensus unit tests - Add 34 comprehensive unit tests covering all DBFT scenarios - Test normal consensus flows, abnormal scenarios, and recovery mechanisms - Include Byzantine fault tolerance testing (f=1 and f=2 failures) - Add network partition and message loss simulation - Implement stress testing with multiple rounds and large transaction sets - Create professional test infrastructure with TestWallet and ConsensusTestHelper - Add comprehensive README documentation - Ensure 100% test pass rate with robust error handling - Cover complete DBFT protocol: PrepareRequest → PrepareResponse → Commit flow - Validate view changes, recovery requests, and state synchronization Test Coverage: - UT_ConsensusService.cs (7 tests): Service lifecycle and message handling - UT_DBFT.cs (6 tests): Basic consensus scenarios - UT_DBFT_Integration.cs (4 tests): Integration scenarios - UT_DBFT_NormalFlow.cs (3 tests): Complete normal consensus flows - UT_DBFT_AbnormalScenarios.cs (4 tests): Failure and attack scenarios - UT_DBFT_Recovery.cs (6 tests): Recovery mechanisms - UT_DBFT_Robustness.cs (4 tests): Stress and edge case testing All tests pass: 34/34 ✅ * chore: Update .NET SDK version to 9.0.203 - Update global.json to use .NET SDK 9.0.203 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and fixes * fix: Revert .NET SDK version to 9.0.102 - Revert global.json to use .NET SDK 9.0.102 (available on build system) - Ensures compatibility with current development environment - Previous version 9.0.203 was not available on the build system * style: Update copyright year to 2025 - Run dotnet format to apply code formatting standards - Update copyright year in RecoveryMessageExtensions.cs from 2024 to 2025 - Maintain consistent code formatting across the project * chore: Update .NET SDK version to 9.0.300 - Update global.json to use .NET SDK 9.0.300 (from 9.0.102) - Ensures compatibility with latest .NET 9 features and improvements - Maintains project build consistency with updated SDK * fix: Resolve RpcServer test compilation errors - Add Neo.IO using statement for ToHexString extension method - Comment out problematic ToHexString calls in test setup - Ensure RpcServer tests can compile alongside DBFT tests - Maintain DBFT test functionality (34/34 tests passing) * fix: Complete RpcServer test compilation fix - Ensure all ToHexString extension method issues are resolved - Maintain compatibility with DBFT tests (34/34 passing) - Fix build errors in RpcServer test suite * Revert changes except DBFT plugin tests - Reverted all source files to match dev branch - Reverted test files in Neo.UnitTests and Neo.Plugins.RpcServer.Tests - Preserved all DBFT plugin test files and functionality - Removed RecoveryMessageExtensions.cs (not in dev branch) * Fix DBFT plugin tests API compatibility and accessibility - Made ConsensusService class internal for test accessibility - Added InternalsVisibleTo attributes for Neo core and DBFT plugin - Updated test constructors to use current dev branch API: - Fixed NeoSystem constructor (2-parameter instead of 6-parameter) - Fixed Settings constructor to use IConfigurationSection - Added Microsoft.Extensions.Configuration packages - Created TestBlockchain.CreateDefaultSettings() helper method - Updated all test files to use compatible API calls - All 1,401 tests passing including 34 DBFT plugin tests - Code formatted with dotnet format * Add comprehensive DBFT consensus message flow tests - Implement proper consensus message flow monitoring as requested in GitHub comment - Add UT_DBFT_ProperMessageFlow.cs with professional, working tests - Update ConsensusTestHelper with async methods for natural message flow - Clean up comments and code formatting with dotnet format - All 38 DBFT plugin tests passing Tests now properly: - Send PrepareRequest and wait for natural PrepareResponse - Monitor actual consensus message flow instead of forcing it - Handle message validation, service resilience, and lifecycle testing - Use simplified but effective message capture mechanism * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/DBFTPlugin/DBFTPlugin.csproj * refactor: Enhance DBFT consensus unit tests to professional standards - Consistent UT_xxx naming convention for all test files - Mock* pattern for all helper/utility classes - Enhanced assertions (7→19, +171% improvement) - Removed duplicate test methods (~140 lines eliminated) - Professional documentation aligned with implementation - Fixed project file syntax (InternalsVisibleTo) - 100% test pass rate maintained (34/34 tests) - Ready for production deployment * Convert DBFT unit tests from xUnit to MSTest framework - Remove xUnit package references (xunit, xunit.runner.visualstudio, Akka.TestKit.Xunit2) - Add Akka.TestKit.MsTest package reference - Update all test files to use MSTest TestKit instead of xUnit - Fix test runner configuration to resolve "Zero tests ran" issue - All 34 tests now pass successfully with MSTest framework - Maintain existing test structure and TestKit inheritance * Update DBFT unit tests README for MSTest framework - Document MSTest framework usage instead of xUnit - Update prerequisites to include MSTest and Akka.NET TestKit (MSTest version) - Add note about Visual Studio Test Explorer integration - Update performance timing to reflect current test execution (~33s) - Emphasize production-ready testing capabilities * Fix copyright header filenames in DBFT tests - Correct UT_DBFT_Performance.cs header (was UT_DBFT_Robustness.cs) - Correct UT_DBFT_Failures.cs header (was UT_DBFT_AbnormalScenarios.cs) - Fix other copyright headers to match actual filenames - Applied via dotnet format to ensure consistency * Update tests/Neo.Plugins.DBFTPlugin.Tests/Neo.Plugins.DBFTPlugin.Tests.csproj * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_Core.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Update tests/Neo.Plugins.DBFTPlugin.Tests/UT_DBFT_MessageFlow.cs * Add coverage --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jimmy <[email protected]> * Style: move MPT Benchamrk Project to benchmarks/ (#4011) * [`improve`] nullable app logs (#4008) * nullable app logs * Update src/Plugins/ApplicationLogs/LogReader.cs Co-authored-by: Christopher Schuchardt <[email protected]> * Apply suggestions from code review Co-authored-by: Christopher Schuchardt <[email protected]> * Update src/Plugins/ApplicationLogs/Settings.cs Co-authored-by: Christopher Schuchardt <[email protected]> --------- Co-authored-by: Christopher Schuchardt <[email protected]> * Add: SignClient Vsock support (#4002) * Add: SignClient vsock support * optimize: add const string * optimize: use Uri parse endpoint --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> * Isolate ApplicationEngine events (#4016) * Isolate Log Event * Isolate instance events * clean * Update src/Neo/SmartContract/ApplicationEngine.cs Co-authored-by: Christopher Schuchardt <[email protected]> * Apply suggestions from code review Co-authored-by: Christopher Schuchardt <[email protected]> * Fix compile * udate format * Unify names --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: jimmy <[email protected]> * Style: more standard code style for Neo.VM (#4022) Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Shargon <[email protected]> * Optimize: more semantics description and better impl for 'TestBit(this BigInteger value, int index)' (#4031) Co-authored-by: Shargon <[email protected]> * Improve exception messages throughout Neo codebase (#4032) * Improve exception messages throughout Neo codebase - Standardize exception message format for consistency - Make messages more descriptive and professional - Remove oversimplified and verbose exception messages - Improve developer experience with clearer error context - Apply consistent patterns for similar validation types - Update messages across CLI, Smart Contracts, Cryptography, VM, and other modules This change improves the quality of error reporting while maintaining technical accuracy and providing better debugging information. * Remove PR description file * Improve exception messages in ECPoint.cs - only message content updated, no code logic changes * format * Fix UPnP unit test to expect InvalidOperationException - Updated UT_UPnP.cs test to expect InvalidOperationException instead of Exception - This aligns with the improved exception handling implemented in UPnP.cs - Fixes test failure caused by more specific exception types - All 1511 tests now pass successfully * Update src/Neo.VM/Types/Integer.cs --------- Co-authored-by: Shargon <[email protected]> * Optimize: impl `GetLowestSetBit` by `TrailingZeroCount` if available (#4030) * Optimize: impl GetLowestSetBit by TrailingZeroCount if available * Update src/Neo.Extensions/BigIntegerExtensions.cs --------- Co-authored-by: Shargon <[email protected]> * [`style`] Style neo system (#4040) * Style * Update .editorconfig Co-authored-by: Christopher Schuchardt <[email protected]> * renames --------- Co-authored-by: Christopher Schuchardt <[email protected]> * [`Fix`] RcpClient Directories and Naming (#4046) Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Will <[email protected]> * Optimize: no secaped char for command line input (#4044) Co-authored-by: NGD Admin <[email protected]> * Renamed and Fix Properties with plugins (#4062) * Renamed and Fix Properties with plugins * Update src/Plugins/SignClient/SignSettings.cs * Format * Rename @shargon `ServerSettings` to RpcServersSettings` * Added @shargon suggestion for `DbftSettings` --------- Co-authored-by: Shargon <[email protected]> * [`Add`] Indexer to EvaluationStack (#4050) * [`Add`] Indexer to EvaluationStack * Added indexer tests * Added more tests * Touch ups * Use indexer instead * use indexer instead * Increase checks * Update EvaluationStack.cs * fixed @shargon broken code * Added extra test for bigger value than length of `innerList` --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Comments: Add detail description for RPC Method (#4054) * Add: input cli command line with `--argument-name argument-value` (#4047) * Add: input cli command line with --argument-name argument-value * update help output --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Optimize: more detail for help command (#4067) * Optimize: clearer parser for parameter Signers and Witnesses, and fix comments (#4066) * [`Fix`] Async Ask Method (#4071) Co-authored-by: Shargon <[email protected]> * Move `install sc` out of `ConsoleServiceBase.Run` (#4048) * Optimzie: install with sc.exe * Update src/Neo.ConsoleService/ConsoleServiceBase.cs Co-authored-by: Shargon <[email protected]> --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: NGD Admin <[email protected]> * [`Add`] `RandomNumberFactory` Class (#3987) * Updated `RandomExtensions.NextBigIneger` to use `RandomNumberGenerator` * Added `RandomNumberFactory` class to generate random numbers. * changed namespace * Fixed bugs * fixed more bugs * Fixed up tests and add more * Update src/Neo.Extensions/Factories/RandomNumberFactory.cs Co-authored-by: Shargon <[email protected]> * Fixed per @shargon feedback * Bug fix per @vncoelho * Added more tests * Bug Fix * Fixed bugs in `NextBigInteger` unit tests * Updated `RandomExtensions.NextBigIneger` to use `RandomNumberGenerator` * Added `RandomNumberFactory` class to generate random numbers. * changed namespace * Fixed bugs * fixed more bugs * Fixed up tests and add more * Fixed per @shargon feedback * Update src/Neo.Extensions/Factories/RandomNumberFactory.cs Co-authored-by: Shargon <[email protected]> * Bug fix per @vncoelho * Added more tests * Bug Fix * Fixed bugs in `NextBigInteger` unit tests * Added more tests and add `NexrBigInteger` minmax * Bug fixes * `BigInteger` now uses negative numbers. * Fixes to `NextBigInteger` * Fixed `BigNextInteger(MaxValue)` to calulate correctly. * Added @vncoelho suggestions * Fixed `NextInteger` for faster resolve. --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: NGD Admin <[email protected]> * [UT] - Add unit tests in NeoSystem (#3978) * [UT] - Add unit tests in NeoSystem * Fix: Isolate global state in UT_RoleManagement ResetStore in snapshot * Fix: Removing CloneCache to isolate state per role * Fix: Isolating state * Fix: Isolate global state and filter Designation notifications due to shared ApplicationEngine.Notify handler * Fix: Remove console.writeline --------- Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Move: Neo.Network.Rpc.RpcClient.Tests to Neo.RpcClient.Tests (#4077) * Add Scan for Vulnerable Dependencies (#4082) * Add Scan for Vulnerable Dependencies * fix workflow * Add dependabot * Added @vncoelho suggestions * Added dotnet restore --------- Co-authored-by: Will <[email protected]> * Doc: Add doc for plugin RpcServer (#4068) * Add More Descriptions in PR Template (#4083) * Fix: no handling if `ContractNameOrHashOrId` is a native contract name (#4089) * Fix: When ContractNameOrHashOrId as a parameter, no handling for the case of name in GetStorage and FindStorage * Add summary --------- Co-authored-by: Shargon <[email protected]> * optimize: More parameter type support for RpcMethod (#4085) Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Shargon <[email protected]> * UT - Add test cases for OnCommand (#4095) * UT - Test for OnCommand and check string.IsNullOrWhiteSpace instead of IsNullOrEmpty * Update tests/Neo.ConsoleService.Tests/UT_CommandServiceBase.cs --------- Co-authored-by: Shargon <[email protected]> * Add Faun (#4097) Co-authored-by: NGD Admin <[email protected]> * fix(cli): improve macOS leveldb error messages with dependency details (#4098) - Add specific error handling for missing gperftools/libtcmalloc dependency - Provide clear step-by-step instructions for installing required dependencies - Include brew commands for gperftools and leveldb installation - Add reinstall option for cases where dependencies are corrupted - Improve general macOS leveldb error message with dependency information Fixes DllNotFoundException on macOS when libtcmalloc.4.dylib is missing * Optimize: merge RpcMethod and RpcMethodWithParams (#4074) Co-authored-by: Jimmy <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Add invokeabi command for simplified contract invocation (#4033) * Add invokeabi command for simplified contract invocation This commit introduces a new `invokeabi` command that simplifies contract method invocation by automatically parsing parameters based on the contract's ABI definition. Key features: - Accepts parameters as a simple array instead of complex type specifications - Automatically determines parameter types from the contract's ABI - Validates method existence and parameter count against the ABI - Supports all Neo contract parameter types including arrays and maps - Provides clear error messages for invalid parameters or methods Example usage: ``` # Old invoke command (requires explicit type specification) invoke 0x1234...abcd transfer [{"type":"Hash160","value":"0xabc..."},{"type":"Hash160","value":"0xdef..."},{"type":"Integer","value":"100"}] # New invokeabi command (types parsed from ABI) invokeabi 0x1234...abcd transfer ["0xabc...","0xdef...",100] ``` This enhancement improves developer experience by reducing the complexity of contract invocation while maintaining type safety through ABI validation. * Add unit tests for invokeabi command - Created comprehensive unit tests for ParseParameterFromAbi method - Tests cover all supported parameter types: Boolean, Integer, String, Hash160, ByteArray, Array, Map, and Any - Added tests for null value handling - Added tests for error cases (invalid integers, invalid hashes, unsupported types) - Set up Neo.CLI.Tests project infrastructure - All 55 tests passing successfully * Apply dotnet format * Make tests production ready with proper mocking and integration tests - Replaced incomplete mocking with proper contract state setup using AddContract extension - Added proper NefFile initialization with valid script and metadata - Commit snapshot changes to ensure contract is accessible in tests - Added comprehensive integration tests for OnInvokeAbiCommand covering: - Contract not found scenarios - Method not found scenarios - Wrong parameter count validation - Too many arguments validation - Invalid parameter format handling - Successful parameter parsing for single and multiple parameters - Complex type handling (arrays, maps) - Sender and signer parameter support - All 55 tests passing successfully * Apply reviewer feedback and fix test issues - Applied optimization suggestion from ajara87: moved argument count check outside the loop - Fixed test compilation errors by updating to Assert.ThrowsExactly - Simplified test setup using TestUtils.CreateDefaultManifest() and TestUtils.GetContract() - Fixed JArray initialization ambiguity in tests - All tests now passing successfully Changes address PR review comment: #4033 (comment) * Apply dotnet format - remove trailing whitespace and improve JArray initialization * Apply refactoring suggestion: extract type inference logic to separate method - Implemented suggestion from ajara87 to improve code organization - Extracted switch logic for ContractParameterType.Any into InferParameterFromToken method - Converted switch statement to modern switch expression syntax - Improved code readability and maintainability by following single responsibility principle - ParseParameterFromAbi method is now more focused and easier to understand Changes address PR review comment: #4033 (comment) * Remove unrelated benchmark files * Fix GitHub Actions CI compilation error Fixed compilation error in UT_MainService_Contracts.cs that was preventing CI from passing: - Updated test setup to use manual ContractState creation instead of internal TestUtils.GetContract method - Fixed NeoSystem field injection from static to instance field - Improved invokeabi command logic to find methods by name first, then validate argument count - Updated test assertions to match new error message format - All tests now pass (21/21) * Update src/Neo.CLI/CLI/MainService.Contracts.cs Co-authored-by: Will <[email protected]> * Update tests/Neo.CLI.Tests/UT_MainService_Contracts.cs Co-authored-by: Will <[email protected]> * Update tests/Neo.CLI.Tests/UT_MainService_Contracts.cs Co-authored-by: Will <[email protected]> * Improve invokeabi command implementation - Add validation for parameter count (both too many and too few arguments) - Fix method overloading to correctly match based on parameter count - Add defensive null checks for contract manifest and ABI - Improve error messages with helpful format examples - Optimize array parsing performance - Update tests to match new error messages and add coverage for edge cases * Format code with dotnet format * Fix array parsing of ContractParameter objects Addresses critical issue identified by superboyiii where arrays containing ContractParameter format objects (like {"type":"PublicKey","value":"..."}) were incorrectly parsed as Maps instead of the specified parameter type. - Add ParseContractParameterObject method to detect ContractParameter format - Update InferParameterFromToken to handle ContractParameter objects correctly - Maintain backward compatibility for regular JSON objects as Maps - Add comprehensive tests for both scenarios This ensures that complex nested arrays with typed parameters work correctly in the invokeabi command. * Fix array parameter parsing to preserve ContractParameter format Addresses the real issue identified by superboyiii where array parameters need to preserve the explicit type information since ABI doesn't specify element types for arrays. - For Array type parameters, check if elements are in ContractParameter format - Use ContractParameter.FromJson() for explicit type objects - Otherwise infer types for simple values - This ensures arrays like [{"type":"PublicKey","value":"..."}] work correctly This is the correct fix that maintains compatibility with the existing invoke command while providing the simplified syntax for simple cases. * Add Map parameter support for ContractParameter format Similar to Arrays, Map parameters in ABI don't specify key/value types, so we need to preserve explicit type information when provided. - Support complete ContractParameter format maps (from invoke command) - Support mixed maps with some values in ContractParameter format - Maintain type inference for simple values - Add comprehensive tests for both formats This ensures compatibility with complex map structures while keeping the simplified syntax for simple cases. * Address PR review comments for invokeabi command - Remove unnecessary x64 and x86 platform configurations from neo.sln - Remove Neo.CLI.Tests project that was added unnecessarily - Refactor ParseParameterFromAbi method to use switch expressions for better readability - Extract individual parameter parsing methods for better maintainability - Move argument count validation outside parsing loop for better performance - Simplify control flow and error handling throughout the parsing logic * fmt --------- Co-authored-by: Jimmy <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Shargon <[email protected]> * Fixed `release.yml` (#4106) * Fixed release.yml `leveldbstore` * Update .github/workflows/release.yml Co-authored-by: Will <[email protected]> --------- Co-authored-by: Will <[email protected]> * Doc: Add doc for plugin RpcServer, Part-2 (#4104) Co-authored-by: NGD Admin <[email protected]> * update packages (#4108) * update packages * Update tests/Neo.Plugins.RpcServer.Tests/UT_RpcServer.Node.cs Co-authored-by: Will <[email protected]> --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Remove GUI (#4110) Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Fixed docker.yml (#4109) * Optimize RPCClient code (#4103) * Optimize RpcClient * reorder variables --------- Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * unit-tests: Use proper 'Assert' methods (#4112) Co-authored-by: Shargon <[email protected]> * Optimize: use explicitly typed parameters instead of JArray in `RpcMethod` (#4107) * Optimize: use expilict type instead of JArray in RpcMethod * Fix ut --------- Co-authored-by: Jimmy <[email protected]> * Fix: unicode escape for cli input (#4105) * Fix: unicode escape * Add more exception info for escaped characters --------- Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> * Add RestServer Plugin (#4093) * RestServer on `dev` branch * Update src/Plugins/RestServer/RestWebServer.cs Co-authored-by: Owen <[email protected]> * Fix ContractMethodParametersJsonConverter * Clean ProtocolSettingsModel.cs * Update src/Plugins/RestServer/RestWebServer.cs Co-authored-by: Jimmy <[email protected]> * Apply suggestions from code review * Update src/Plugins/RestServer/Tokens/NEP17Token.cs Co-authored-by: Owen <[email protected]> * Added `using` statement * Fixed tests --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: Owen <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Add some check (#4114) Co-authored-by: Jimmy <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Fix. Replace RpcSendByHashOrIndexAsync comment (#4116) Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Clean JsonSerializer (#4113) * Remove unused method * Obsolete * Update src/Neo/SmartContract/JsonSerializer.cs Co-authored-by: Jimmy <[email protected]> --------- Co-authored-by: Jimmy <[email protected]> Co-authored-by: NGD Admin <[email protected]> * [`Add`] IComparable, Casting to UInt160 & UInt256 (#4117) * Added `IComparable`, cast from byte array and string for `UInt256` * removed un-need file --------- Co-authored-by: Jimmy <[email protected]> Co-authored-by: Shargon <[email protected]> * Allow HF in syscalls (#4119) * unit-tests: Use proper 'Assert' methods (#4122) * Fix: avoid NullReferenceException when account not found (#4120) Co-authored-by: Christopher Schuchardt <[email protected]> * use StringComparison IgnoreCase instead (#4124) Co-authored-by: NGD Admin <[email protected]> * [`Add`] Protected for ApplicationEngine properties (#4123) * [`Add`] Protected for ApplicationEngine properties * Add method as protected --------- Co-authored-by: Jimmy <[email protected]> * Hardfork: add Gorgon hardfork (#4128) Follow #2974 (comment). We need to know the next scheduled hardfork in advance for smooth dApps migration experience and to avoid problems like nspcc-dev/neo-go#3719. Also required for #4127. Signed-off-by: Anna Shaleva <[email protected]> * Optimize: use expilict type instead of JArray in RpcMethod (#4125) Co-authored-by: Shargon <[email protected]> * Fix: some default values not matched (#4134) * Fix: More jsonrpc parameter checks for `RpcServer` (#4129) * More parameter checks for RpcServer * Apply suggestions from code review * Update src/Plugins/RpcServer/ParameterConverter.cs * Update src/Plugins/RpcServer/ParameterConverter.cs * Update src/Plugins/RpcServer/ParameterConverter.cs Co-authored-by: Christopher Schuchardt <[email protected]> --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> * Optimize: nullable for plugin RpcServer (#4135) * Remove netstandard phase one (#4145) * Remove netstandard phase one * Fix reordeing using * Remove directives * fix: out of bound exception in TestAppend (#4149) * Unify extensions (#4131) Co-authored-by: Will <[email protected]> Co-authored-by: Jimmy <[email protected]> * Remove: unnecessary json rewrite for rpc interfaces (#4148) Co-authored-by: Shargon <[email protected]> Co-authored-by: Jimmy <[email protected]> * UnitTests: add unit tests project for plugin StateService (#4139) * Optimize: 1. explicitly param type for rpc method, 2. add unit tests for plugin state service * Update tests/Neo.Plugins.StateService.Tests/UT_StatePlugin.cs * Update tests/Neo.Plugins.StateService.Tests/UT_StatePlugin.cs --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Optimize: use explicit type instead of JArray for plugin RpcMethods (#4144) * Optimize: use explicit type instead of JArray in RpcMethod * Optimize: use expilict type instead of JArray in RpcMethod --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Improve StringExtensions exception messages (#4151) * Improve StringExtensions exception messages and add comprehensive unit tests - Enhanced exception messages with detailed input information and actionable guidance - Added proper parameter names for ArgumentException and ArgumentNullException - Included input data display with appropriate truncation for debugging - Improved error messages for UTF-8 encoding/decoding operations - Enhanced hex conversion error reporting with clear validation guidance - Added comprehensive unit tests covering all exception scenarios - Verified backward compatibility (null hex strings still return empty arrays) - All 78 tests in Neo.Extensions.Tests now pass successfully Exception messages now include: 1. Specific parameter names for better debugging 2. Input data information with smart truncation 3. Actionable guidance for resolution 4. Consistent formatting across the codebase Fixes improve developer experience and debugging efficiency. * Update src/Neo.Extensions/StringExtensions.cs Co-authored-by: Christopher Schuchardt <[email protected]> --------- Co-authored-by: Will <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> * Optimize #4144 (#4152) * Update `coverallsapp` (#4154) * [`Add`] Hex Encode/Decode to `StdLib` (#4150) * Added Hex encode/decode * Updated unit tests setup * Added unit tests for hex encode/decode * Update src/Neo/SmartContract/Native/StdLib.cs Co-authored-by: Owen <[email protected]> * Update src/Neo/SmartContract/Native/StdLib.cs Co-authored-by: Owen <[email protected]> * Update StdLib.cs fix --------- Co-authored-by: Jimmy <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Owen <[email protected]> Co-authored-by: NGD Admin <[email protected]> * [`Add`] GetBlockedAccounts to Policy Contract (#4147) * Added `ListBlockedAccounts` * Fixes of type * Updated contract * Updated policy * Fixed test * Update src/Neo/SmartContract/Native/PolicyContract.cs Co-authored-by: Shargon <[email protected]> * Updated per @Wi1l-B0t * Fixed `TestGenesisNativeState` * Changed Name of ListBlockedAccounts to GetBlockedAccounts * fixed unit test * removed applicationengine and added Datacache instead --------- Co-authored-by: Shargon <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: NGD Admin <[email protected]> * Style: use ThrowIfNull to check argument is null or not (#4156) Co-authored-by: Christopher Schuchardt <[email protected]> * Remove: unnecessary benchmarks in unit test (#4158) * Remove AllowUnsafeBlocks if no unsafe blocks (#4159) * Add: parameter nullable checking for `RpcMethod` (#4157) * Add: parameter nullable checking for RpcMethod * Remove unnecessary line * Add Attribute checking --------- Co-authored-by: Shargon <[email protected]> * Remove: unnecessary warning disable (#4162) Co-authored-by: Shargon <[email protected]> * Add: unit tests for SQLiteWallet (#4160) * Add: unit tests for SQLite Wallet * Remove two blank lines --------- Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Shargon <[email protected]> * Optimize: enable nullable for SQLiteWallet (#4163) * [`Add`] Debugger Display for Storage Items, Values & Trackables (#4155) * Add `DebuggerDisplay` for Storage * Fixed Prefix * Update src/Neo.Extensions/ByteExtensions.cs * Update src/Neo.Extensions/ByteExtensions.cs * Apply suggestions from code review --------- Co-authored-by: Will <[email protected]> Co-authored-by: Shargon <[email protected]> * Self Storage (#4118) * Self Storage * use Hardfork.HF_Faun * Fix Delete * Rename * Storage.Local.X --------- Co-authored-by: Jimmy <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: Will <[email protected]> * Fix: avoid using obsolete AesGcm (#4165) Co-authored-by: Christopher Schuchardt <[email protected]> * Optimize: reduce one memory copy in UInt160.ToString and UInt256.ToString (#4166) * Optimize: avoid a memory copy in UInt160.ToString and UInt256.ToString * fix comments --------- Co-authored-by: NGD Admin <[email protected]> * Optimize: enable nullable for TokensTracker (#4167) Co-authored-by: NGD Admin <[email protected]> * Fixed Solution file to use `neo-build` Removed `netstandard2.1` from `neo-build` --------- Signed-off-by: Anna Shaleva <[email protected]> Co-authored-by: Alvaro <[email protected]> Co-authored-by: Shargon <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: Vitor Nazário Coelho <[email protected]> Co-authored-by: Will <[email protected]> Co-authored-by: Jimmy <[email protected]> Co-authored-by: NGD Admin <[email protected]> Co-authored-by: Owen <[email protected]> Co-authored-by: Anna Shaleva <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Just add some coverage to MPT
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: