Fix node scaling, smart contract scaling, and propagation system issues#7
Draft
Fix node scaling, smart contract scaling, and propagation system issues#7
Conversation
Co-authored-by: connor33341 <107011324+connor33341@users.noreply.github.com>
…ting Co-authored-by: connor33341 <107011324+connor33341@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix the node scaling / connecting and make sure that smartcontracts scale properly. Make sure propagation and node identity works
Fix node scaling, smart contract scaling, and propagation system issues
Sep 28, 2025
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
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.
This PR addresses critical issues with node scaling, smart contract execution scaling, and network propagation that were affecting the reliability and performance of the Stellaris blockchain network.
Issues Fixed
Node Identity and Connection Problems
The handshake system was not properly verifying node identities, leading to unreliable peer connections. The
HandshakeManagerwas using placeholder verification instead of cryptographic validation:Smart Contract Scaling Bottlenecks
The VM scaler was creating unnecessary dependencies between smart contract transactions, forcing sequential execution when parallel execution was safe:
Node Selection and Load Balancing
The node selection algorithm was primitive and could lead to poor load distribution:
Memory Leaks in Cache Management
The cache systems were growing unbounded, causing memory issues in long-running nodes:
Key Improvements
Enhanced NodeInterface: Added proper node_id tracking, handshake completion status, and helper methods for common operations like
get_nodes(),get_block(), andget_blocks().Improved Propagation Logic: The propagation system now attempts proper handshake to get authentic node_id, with graceful fallback to URL-based identification when handshake fails.
Optimized Dependency Analysis: Smart contract transactions are now analyzed for actual state conflicts rather than assuming all transactions to the same contract must be serialized.
Better Health Monitoring: Added node recovery tracking, stalled execution detection, and automatic reset mechanisms for improved reliability.
Memory Management: Implemented cache size limits, automatic cleanup of expired entries, and removal of old completed tasks to prevent memory leaks.
Testing
All changes have been thoroughly tested with comprehensive integration tests covering:
The improvements maintain full backward compatibility while significantly enhancing performance, reliability, and scalability of the Stellaris network.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.