Skip to content

Conversation

@cschuchardt88
Copy link
Member

Description

  • rebased
  • Fixed Solution file to use neo-build
  • Removed netstandard2.1 from neo-build

Fixes # (issue)

Type of change

  • Optimization (the change is only an optimization)
  • Style (the change is only a code style for better maintenance or standard purpose)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Test A
  • Test B

Test Configuration:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

ajara87 and others added 30 commits September 16, 2025 01:07
* [Optimization] - Optimize Key method

* Update src/Neo.Cryptography.MPTTrie/Cache.cs

---------

Co-authored-by: Shargon <[email protected]>
* Update packages

* more

* clean

---------

Co-authored-by: Jimmy <[email protected]>
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]>
* 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

* 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 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]>
Co-authored-by: Christopher Schuchardt <[email protected]>
Co-authored-by: Shargon <[email protected]>
* 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]>
…eo-project#4030)

* Optimize: impl GetLowestSetBit by TrailingZeroCount if available

* Update src/Neo.Extensions/BigIntegerExtensions.cs

---------

Co-authored-by: Shargon <[email protected]>
* Style

* Update .editorconfig

Co-authored-by: Christopher Schuchardt <[email protected]>

* renames

---------

Co-authored-by: Christopher Schuchardt <[email protected]>
* 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

* 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]>
…o-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]>
* 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]>
* 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

* 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]>
* Add Scan for Vulnerable Dependencies

* fix workflow

* Add dependabot

* Added @vncoelho suggestions

* Added dotnet restore

---------

Co-authored-by: Will <[email protected]>
neo-project#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]>
Wi1l-B0t and others added 19 commits September 16, 2025 01:10
…eo-project#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 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]>
* 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]>
* 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]>
* Add: parameter nullable checking for RpcMethod

* Remove unnecessary line

* Add Attribute checking

---------

Co-authored-by: Shargon <[email protected]>
* Add: unit tests for SQLite Wallet

* Remove two blank lines

---------

Co-authored-by: NGD Admin <[email protected]>
Co-authored-by: Shargon <[email protected]>
…project#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

* 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]>
…ring (neo-project#4166)

* Optimize: avoid a memory copy in UInt160.ToString and UInt256.ToString

* fix comments

---------

Co-authored-by: NGD Admin <[email protected]>
Removed `netstandard2.1` from `neo-build`
@cschuchardt88
Copy link
Member Author

cschuchardt88 commented Sep 16, 2025

@shargon make sure you click rebase when you merge this PR. Just fyi the longer you wait the more out of date this PR becomes.

@shargon
Copy link
Member

shargon commented Sep 16, 2025

image

I still can't fork your branch

@shargon
Copy link
Member

shargon commented Sep 16, 2025

@neo-project/core someone can sync this branch and ensure that dev folders are the same?

@cschuchardt88
Copy link
Member Author

cschuchardt88 commented Sep 17, 2025

image I still can't fork your branch

Looks like you have a branch with the same name already. Need to delete it 1st. Do you have a branch called dev/master already? If so you need to delete or do git checkout -b <new branch name> dev/master

@shargon shargon requested a review from Copilot September 18, 2025 08:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR rebases the dev branch onto neo-build and removes multiple files from the Neo GUI project, including Spanish and Chinese localization resources, dialog forms, and main form components. The primary changes involve removing the entire Neo.GUI module from the project structure.

  • Removes all GUI-related files including localization resources (.resx files) for Spanish and Chinese languages
  • Removes dialog forms and their associated code files for various wallet operations
  • Removes the main form and all supporting GUI components

Reviewed Changes

Copilot reviewed 95 out of 515 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Multiple .resx files Removes Spanish (es-ES) and Chinese (zh-Hans) localization resources for various GUI dialogs
Multiple .cs files Removes C# code files for GUI dialog forms and main application window
OpenWalletDialog files Removes wallet opening dialog implementation and resources
MainForm files Removes main application form and its localization resources
Various dialog files Removes import, invoice, input, and information dialog implementations
Files not reviewed (15)
  • src/Neo.GUI/GUI/BulkPayDialog.Designer.cs: Language not supported
  • src/Neo.GUI/GUI/ChangePasswordDialog.Designer.cs: Language not supported
  • src/Neo.GUI/GUI/ConsoleForm.Designer.cs: Language not supported
  • src/Neo.GUI/GUI/CreateMultiSigContractDialog.Designer.cs: Language not supported
  • src/Neo.GUI/GUI/CreateWalletDialog.designer.cs: Language not supported
  • src/Neo.GUI/GUI/DeployContractDialog.Designer.cs: Language not supported
  • src/Neo.GUI/GUI/DeveloperToolsForm.Designer.cs: Language not supported
  • src/Neo.GUI/GUI/ElectionDialog.Designer.cs: Language not supported
  • src/Neo.GUI/GUI/ImportCustomContractDialog.Designer.cs: Language not supported
  • src/Neo.GUI/GUI/ImportPrivateKeyDialog.designer.cs: Language not supported
  • src/Neo.GUI/GUI/InformationBox.Designer.cs: Language not supported
  • src/Neo.GUI/GUI/InputBox.Designer.cs: Language not supported
  • src/Neo.GUI/GUI/InvokeContractDialog.Designer.cs: Language not supported
  • src/Neo.GUI/GUI/MainForm.Designer.cs: Language not supported
  • src/Neo.GUI/GUI/OpenWalletDialog.designer.cs: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@shargon shargon merged commit 6eab9f8 into neo-project:neo-build.dev Sep 18, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants