A series on Web2 and Web3 pioneers on blockchain operating systems

Meet Marcus Souza, Software Systems Engineer at Locus Software. With a naturally open and curious mindset, he constantly tests blockchain operating systems with OpenCV to explore what it can achieve. He is always looking for ways to push blockchain operating systems to the limit, and at the same time, he creates a series of test cases. In the process of testing, he seems to be building a fairer world, improving biometrics, and looking for ways to prevent fraudulent IDs. Let's see how he clears the road for blockchain operating system developers.

 

Challenges of blockchain operating system

 

When I joined The Blockchain OS, I started following Cartesi’s easy to understand Echo DApp documentation, and instead of wasting a lot of time on the documentation overview, I did a few simple treatments of it. This way I could learn more about it and challenge the technology, and I was curious to see what would happen if I did that.

 

I have been thinking about how to use machine learning to join the blockchain. The first approach is to use KNN (k-nearest neighbor algorithm) to classify the iris data set and then implement the classification using Python.

 

When it succeeds, I think we can explore more. I created a Titanic DApp that collects input data (such as age, gender) and can predict whether a person can survive the epic event of the sinking of the Titanic. To do this, I used traditional tools to train the model, and then converted this model to pure Python code using a library called m2cgen (Model 2 Code Generator), which I think worked well.

 

Next, I started using OpenCV, exploring it to process biometric data from fingerprints and feeding the extracted feature data into a tested classification machine to identify fraudulent fake fingerprints. I think bringing machine learning to blockchain is essential, so let me go further.

 

The problem with biometrics

 

Biometrics are information we can use to identify ourselves, such as our fingerprints, face and voice. Biometric data is used in systems such as banking and mobile phones. For example, when you unlock your phone with your face or fingerprint.

 

In Brazil, fingerprints are often used to control the start and end of work, especially in public institutions. Whenever civil servants go to work, they enter their fingerprints to confirm that they are starting work. When they go home, they also do this. But there can be some fraudulent behavior. Silicone fingerprint keychains can be used, which means that everyone can forge fingerprints to punch in. But we can formulate a machine learning model to identify fake fingerprints on prostheses based on live fingerprint information stored on the blockchain. This is a fairly large data project, and you need to make a lot of live fingerprint data and fake fingerprint data to test the model. In the end, the real identity from the forger can be verified.

 

Why introduce OpenCV to blockchain?

 

Let's say we use OpenCV to process satellite images and monitor deforestation in forests. The government gets extra money for protecting forests, or gets penalized for deforestation. We can check from satellite imaging that forests in area A have increased by 15%, and forests in area B have decreased by 3%. Putting this data on the blockchain makes it available to everyone, meaning no one can dispute it. And the local municipality can't complain about not getting rewarded or penalized. Everything is securely stored on the blockchain for people to check.

 

OpenCV is a well-known open source project with many examples. It runs in any phone and camera, and OpenCV allowed me to port to the C library for the Cartesi Machine. The tricky part was cross-compiling it to different platforms, but it wasn't that hard (I got great support from the Cartesi team). The most surprising part of the process was when I started using the Docker toolchain image provided by Cartesi. Everything I needed to cross-compile was there, and it just worked. For the biometric application, we used C++ and OpenCV to extract the features of the fingerprint. These features were then fed into a Python program that decided if it was a fake or real fingerprint.

 

Cross-compiling

 

Cross-compiling can be tricky; imagine a program that is built on your machine. It knows the instructions and checks that it can support everything at runtime. But for cross-compiling, you have to run that program in a different architecture and figure out the correct parameters to build the program, which can be a challenge. So I used the Cartesi Toolchain Docker image, which already has the tools for other environments that I need. Everything is already configured correctly on this Docker image. I just put the code in this container and it compiles everything to run in the Cartesi machine and runs with all the correct parameters.

 

Groundbreaking blockchain technology

 

All of this led me to become a blockchain evangelist at our web development company, Locus Software, and as I got to know the blockchain industry better, we finally found a new partner to take care of the front-end of our blockchain project. There is a lot of interest in this topic both inside and outside our company.

While it’s difficult for many developers to imagine the benefits of blockchain, 99% of the Brazilian market are Web2 developers, which makes Locus Software an industry leader in our local market.

 

Stay positive and keep moving forward

 

Next, I want to work on the gaming part, trying to bring our existing Web2 into Web3. For example, decentralized games. I would use the Unity game engine and try to integrate it into the blockchain using the blockchain operating system. In Unity, there are languages ​​that can be used to express game logic, such as C#. I think C# has not been tested on The Blockchain OS yet, so it would be a great opportunity to push the boundaries again.

 

https://youtu.be/4ZaKiG7lDjQ

 

Want to hear more stories from developers building blockchain-based operating systems? Check out the decentralized puzzle RPG that Aetheras co-founders Teddy and Denis are creating:

 

https://medium.com/cartesi/groundbreaking-blockchain-os-projects-puzzle-rpg-game-94da0212b6ef

 

About Locus Custom Software

 

Locus Custom Software is a global full-service company providing creative design and software development services and digital solutions. We create value for our clients' businesses every day through creative and innovative digital services.

 

About Marcus Souza

 

Marcus Souza is from Paudalho, Pernambuco, Brazil, and works as a Software Engineer at Locus Custom Software. With a Master of Science degree from the Federal University of Pernambuco, he has eight years of experience in technology, specializing in Machine Learning and Computer Vision, and has recently become interested in Blockchain and Game Development.

 

About Cartesi

 

Blockchain OS is a decentralized layer 2 infrastructure that supports Linux and mainstream programming software components. For the first time, developers can use a rich set of traditional software tools, libraries, and services they are accustomed to on Blockchain OS to write scalable smart contracts. Cartesi bridges the gap between mainstream software and blockchain.

 

Cartesi is leading millions of new startups and their developers to join and use the blockchain operating system while incorporating Linux applications. With its groundbreaking virtual machines, rollups, and sidechains, Cartesi paves the way for all developers to enter the world of blockchain and build the next generation of blockchain applications.

 

Cartesi sincerely invites everyone to join us in the world of blockchain operating systems and explore the future together.