Skip to content
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

Dragan's Builder Journey #108

Open
Milosevic02 opened this issue Feb 6, 2025 · 8 comments
Open

Dragan's Builder Journey #108

Milosevic02 opened this issue Feb 6, 2025 · 8 comments
Assignees

Comments

@Milosevic02
Copy link

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.

@Milosevic02
Copy link
Author

Milosevic02 commented Feb 11, 2025

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!

@Milosevic02 Milosevic02 changed the title Dragon's Builder Jurney Dragan's Builder Jurney Feb 19, 2025
@Milosevic02
Copy link
Author

Milosevic02 commented Feb 19, 2025

Hey everyone,

This week, I finished my Home Realm implementation and opened a PR for it. Along the way, I became more familiar with gnokey, Adena, gno studio, etc., by calling functions and testing how everything works under the hood.

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!

@Milosevic02
Copy link
Author

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!

@Milosevic02
Copy link
Author

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.

@Milosevic02
Copy link
Author

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.

@Milosevic02 Milosevic02 changed the title Dragan's Builder Jurney Dragan's Builder Journey Mar 13, 2025
@Milosevic02
Copy link
Author

Milosevic02 commented Mar 19, 2025

Hey everyone,

This week, I officially completed my review of the entire project by finishing the bench_test and cache_test. With this, I’ve gone through all the files and have a solid understanding of the system.

After that, I started writing my own tests to further explore and validate different aspects of the mempool:

  • TestConcurrentCheckTx – Ensures transactions are correctly written to the mempool when processed concurrently by multiple goroutines.
  • TestMempoolFullBehavior – Tests how the mempool behaves when reaching its maximum transaction capacity.
  • TestRemoveTxOnError – Verifies what happens when an update includes a transaction with an error.
  • TestPreCheckFunction – Checks if the pre-checking mechanism works as expected.

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.

@Milosevic02
Copy link
Author

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:

  • Fixed Sorting Issue – Initially, transactions were only sorted by gas fee, which caused failures when higher-fee transactions were selected without processing their lower-nonce predecessors. I solved this by modifying the selection process to:

    • First, pick the transaction with the highest gas fee.
    • Then, ensure that all previous transactions from the same sender (with lower nonce) are included before processing the chosen transaction.
  • Efficient Data Structure – Switched to a map-based approach to improve lookup and sorting performance. This structure allows for faster updates and ensures transactions are selected correctly.

  • Optimized Transaction Selection – To avoid unnecessary iterations, I introduced an additional map that tracks the transaction with the highest gas fee per account. This way, the mempool doesn’t need to scan all transactions when picking the next one.

  • Implemented Basic Functionality – The core logic for transaction addition, removal, and prioritization is now in place and working as expected.

  • Test Coverage – Wrote tests to verify that transaction ordering, selection, and updates behave correctly. Everything is running smoothly so far.

Next Steps:

  • Further refine and optimize the mempool structure for better performance.
  • Improve handling of edge cases to ensure stability under load.
  • Start working on transaction validation and committing, making sure the mempool correctly interacts with real transactions.

Right now, the mempool is behaving well, and I’m excited to push it further.

@Milosevic02
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants