-
Notifications
You must be signed in to change notification settings - Fork 8
Dragan's Builder Journey #108
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
Comments
Hey everyone, this week I set up my Home Realm and implemented the core functionality. I also spent time styling it and making sure everything works smoothly (when it's fully ready, I'll open a PR). To get familiar with the system, I explored the codebase and learned how things are organized. I also got more comfortable with GitHub workflow. To make development easier, I set up dual boot on my machine. A big thanks to @leohhhn , and @Nemanya8 , who helped me get started and introduced me to the key concepts. I also went through all the journey examples, read issues and watched workshop videos to better understand what’s possible and to gather inspiration for future improvements. I started brainstorming projects I could work on to deepen my understanding of the concepts and possibilities within Gnoland. One idea is to implement a Mastermind game, and another is an NFT auction where bids are placed anonymously, so no one knows who offered what price. I got feedback from Leon to try thinking of something even better if possible, so I’ll continue exploring new ideas. I also reported and worked on an issue that I encountered, which you can find here. This week was all about getting comfortable with the environment and exploring ideas for future development. Excited to keep making progress! |
Hey everyone, This week, I finished my Home Realm implementation and opened a PR for it. Along the way, I became more familiar with Regarding the issue I mentioned last week, @gfanton provided a fix, and after reviewing it, we closed the issue. Big thanks to him for the quick response! You can check out the issue here. I also refactored backend code for @Nemanya8 in gno-visualized. For my next steps, I’d love to build Liars Lie on Gnoland. This project will help me get even closer to Gnoland while allowing me to dive deeper into topics like oracle mechanisms, protocol communication, and potentially even AI-driven liar detection in the future. Another interesting aspect could be implementing a voting system for identifying liars based on reputation and consensus. I'm currently waiting for feedback before diving into development. Excited for what's next! |
Hey everyone, This week, I initially started working on the Liars Lie game, but during the Coworking Day in Belgrade, Milos assigned me a much more important task —improving the mempool— so I shifted my focus entirely to that. This is a significantly bigger challenge, and I’m really excited to dive deep into it. Since I’m new to this area, I spent a lot of time watching videos and reading extensively about mempools to fully understand the concept, its purpose, and how it operates under the hood. I also got familiar with the existing mempool implementation in Milos' code —analyzing its structure and understanding how different components interact. This deep dive helped me build a solid foundation for what comes next. I’m super excited to continue working on this because it’s a truly fascinating topic. Big thanks to Milos for the idea and guidance! |
Hey everyone, This week, I focused on understanding the core mempool implementation, particularly the CListMempool component. I spent time analyzing how it manages transaction storage using a concurrent linked list (CList), handles transaction validation through ABCI interface, and maintains transaction order. The most interesting part was seeing how it efficiently manages transaction lifecycle from receipt to finalization, including its sophisticated caching mechanism to prevent duplicate transactions. I learned about key concepts like transaction rechecking, Write-Ahead Logging (WAL) for persistence, and how the mempool handles transaction size limits and overflow conditions. I'm excited to continue exploring this area and potentially contribute improvements to the implementation! I also had a great sync with @zivkovicmilos where he helped clarify some concepts I wasn't fully grasping and we discussed setting up a weekly sync to ensure I'm on the right track. Big thanks to Milos for his support and guidance! Next week, I plan to dive deep into the reactor component to understand how it handles peer-to-peer communication and transaction broadcasting across the network. This will help me get a complete picture of how the mempool interacts with other nodes in the network. |
Hey everyone, This week, I deployed my home realm and closed the PR, shifting my full focus to the mempool work. I've decided to put aside adding unique features to the home realm for now so I can concentrate on understanding and improving the mempool implementation. I also discovered a bug related to images not displaying on the portal loop due to CSP restrictions and opened an issue for it: #3880. Additionally, I focused on the mempool's reactor component, analyzing how it handles peer connections and transaction propagation across the network. I learned about peer state tracking, transaction broadcasting protocols, and concurrent transaction propagation, which helped me better understand its role in network-wide transaction distribution. I'm excited to explore this further and potentially contribute improvements. Next week, I plan to go through bench_test and cache_test, which will complete my review of all files in the project. Once that’s done, I might start working on my own tests to further explore and validate different aspects of the system. |
Hey everyone, This week, I officially completed my review of the entire project by finishing the After that, I started writing my own tests to further explore and validate different aspects of the mempool:
You can find my tests here: clist_mempool_test.go I also attended a coworking day where I discussed the mempool with @zivkovicmilos . Based on our discussion, I received a new task: instead of fixing issues incrementally, I will start writing my own mempool from scratch. This shift in approach should lead to a cleaner and more efficient implementation. Next week, I plan to focus on laying the foundation for this new mempool design, identifying key components, and setting up initial structures. |
Hey everyone, This week, I focused entirely on improving the core behavior of the mempool—how transactions are added, removed, and selected—without worrying about broader integration just yet. The goal was to make sure the mempool handles transactions efficiently before moving on to validation and committing. And of course, I must thank @zivkovicmilos again! We had a deep discussion about different mempool implementations, and he patiently answered all my questions. His insights helped me refine my approach and solve some key issues. Key Accomplishments:
Next Steps:
Right now, the mempool is behaving well, and I’m excited to push it further. |
Hey everyone, As per my contract, I will be taking two weeks off from April 1st to April 14th. After that, I’ll be back and ready to continue with the project at full speed. See you soon! |
Hi everyone, Although I only had two days to work this week due to being on break, I managed to accomplish quite a lot in that time, focusing on core improvements to the mempool. My goal was to make the system more robust, efficient, and fair, especially under conditions like transaction spam or unordered input. Key AccomplishmentsHeap-Based PrioritizationSwitched the representative transaction structure from a basic map to a heap-based approach. This significantly improves selection performance when deciding which transactions to pop during the Immediate Heap InsertionAs soon as a new representative (highest-fee transaction) is determined for a sender, it's inserted into the heap right away. This ensures the heap is always ready for the next Spam Protection via Sender LimitAdded a per-sender cap on the number of transactions that can be included in a single block. This prevents a single user from injecting one high-fee transaction followed by 10,000 micro-fee spam transactions. Strict Nonce EnforcementEnforced a strict rule that each transaction from a sender must have a nonce exactly one greater than the previous one. This prevents gaps and guarantees ordered processing without skipping. Test Suite ImprovementsWrote a comprehensive set of tests to validate all of the above changes. These include:
I currently have a small bug related to concurrency. I have a rough idea of where the issue lies and plan to fix it soon. Next Steps
The mempool is now significantly more predictable, fair, and efficient. I’m happy with the progress and excited for the next layer of robustness. |
Hi everyone, This week, I focused on a complete redesign of the mempool. Key ImprovementsRepresentative RedesignPreviously, each sender was represented in the heap by their highest-fee transaction. I changed this so that:
This ensures fairness, prevents skipped nonces, and keeps transaction order deterministic. Heap-Based SelectionThe selection logic now uses a heap of sender representatives. Once a transaction is popped from the heap, a new representative (next-lowest nonce) is immediately pushed back in, keeping the heap ready for further selection. Cache for Selected TransactionsWhen transactions are selected for a block via
Update Mechanism for Network SyncThe Rollback SupportIf the block fails or is not committed, Test SuiteI wrote an entirely new suite of tests to verify:
Known Limitation
Next Steps
The new design provides a clean, safe, and deterministic mempool that is ready for further integration. The core logic is now complete and stable, and I’m excited to move on to the final layer of nonce enforcement. |
Hi everyone, This week, I focused on further optimizing and simplifying the mempool implementation, with the goal of making it cleaner, faster, and more predictable in behavior. Following a suggestion from @gfanton, I opened a draft PR to share progress and facilitate early feedback. Key ImprovementsHeap Removal and Simplified Representative ModelI removed the heap structure that was previously used to maintain sender representatives. Instead, the new model treats the transaction with the expected nonce per sender as their representative. Clean Functional APII refactored the mempool into well-defined, functional components with a clear API:
This structure makes the logic easier to test, debug, and extend in future iterations. Sequence Fetching for Expected NonceI implemented two approaches for retrieving the account sequence (nonce):
This capability will be used to enforce correct transaction order and detect nonce gaps, which is essential for safe and deterministic execution. Weekly Coworking PracticeHad a productive coworking session with @zivkovicmilos where we aligned on goals, reviewed design tradeoffs, and planned next steps. We've decided to keep doing this weekly to maintain strong collaboration. Next Steps
The mempool is now much leaner and better structured, with a clear path forward for enforcing correct transaction order and handling edge cases like nonce gaps. |
Hi everyone, This week, I focused on enforcing strict nonce-based transaction ordering in the mempool by introducing expected nonce caching and replacing all remaining RPC-based logic with clean ABCI integration. I also added an initial README to explain the design goals and how the custom mempool works. Key ImprovementsABCI-Based Sequence FetchingI removed all previous RPC logic and replaced it with ABCI-based querying using Expected Nonce CachingTo avoid repeated ABCI calls, I implemented caching of the expected nonce per sender after the first query. Support for Pending and Queued TransactionsTo further optimize performance, I introduced a distinction between:
This allows the mempool to select only from ready transactions, reducing complexity and avoiding unnecessary iteration over invalid candidates. Test Coverage with ABCI MockingAll logic is now tested with mock ABCI responses.
Started having daily coworking sessions with @zivkovicmilos to align on architecture decisions and push the quality of the mempool implementation to an even higher level. Next Steps
|
Hi everyone, This week, Milos and I collaborated on writing a full RFC that outlines the design and architecture of a new custom mempool. The implementation has been initiated and closely follows the structure proposed in the RFC. Key ProgressRFC-Based Mempool FoundationA new mempool structure was implemented to reflect the ideas proposed in the RFC:
ABCI IntegrationABCI-based querying ( Queueing Logic and PromotionTransactions with nonces above the expected value are added to the queued set. The core structure defined in the RFC is now functional. However, we've encountered some design tradeoffs and implementation challenges that will be discussed in more depth with @zivkovicmilos in our upcoming session. Next Steps
|
Hi everyone, This week, we hit a key limitation in the current Tendermint2 implementation — there's no way to extract the New Direction: Simplified and Optimized MempoolGiven this constraint, @zivkovicmilos and I decided to pivot from that design and focus on creating a clean, minimal, and optimized version of the mempool. This new approach is a significant improvement over the original Key Improvements Over the CList Version
Current StatusThe new implementation resolves the issues we observed in the Even though our original nonce-based design is not viable under Tendermint2, this alternative approach has turned out to be a practical and elegant solution. We're confident that it will serve as a solid baseline for future iterations. Next Steps
|
Hey, I’m Dragan Milosevic, a final-year student of Applied Software Engineering at the Faculty of Technical Sciences in Novi Sad, Serbia, with a strong focus on blockchain and Web3 technologies.
Since attending the Web3 Camp in Petnica, I’ve been actively exploring decentralized systems, smart contract development, and blockchain infrastructure. My journey in Web3 started with building a bridge between Ethereum and gno.land, which really sparked my passion for blockchain development.
I also have experience in AI, particularly in NLP and neural networks, and I’ve competed in and won two AI hackathons (the first focused on CNN, the second on chatbots). Additionally, I won the ETH Sofia hackathon, where I secured four sponsor bounties. I’m truly passionate about contributing to the blockchain ecosystem, and I’m eager to collaborate on innovative projects and continue expanding my expertise.
The text was updated successfully, but these errors were encountered: