
Oleksandr Romanov
Oleksandr Romanov is a Software Engineer in Test / Software Engineer from Dnipro, Ukraine.
He has 11+ years of experience in testing and test automation. His main area of expertise is building and leading test automation processes. He has worked with banking apps and payments services, CMS systems and mobile games. At the moment he is responsible for test engineering for a complex blockchain and blockchain-based applications.
He loves to share his knowledge in the form of articles and conference talks. Currently he contributes to these projects:
How can developers get started with building DApps on Web3, and what are some best practices to follow?
Decentralized applications in a nutshell very similar to the regular applications. From frontend part it is not different at all. The difference starts with the backend part. You need to learn what is blockchain, how it works, how to store data on-chain, how to create smart contracts and use oracles to fetch data from the world.
Best practice is to test smart contract code before the release. Due to the nature of blockchain, you can’t easily change the code after the release. That’s why in case of a bug, you have a huge risk to loose a lot of money and user’s credibility. Thus you need to put a lot of effort to test business logic and security of smart contract as much as possible.
What are some of the current trends and developments in Web3, and how might they shape the future of the internet?
Trends and developments in Web3 can be split into to major groups.
First, there are totally new things – available and used mostly at the blockchain world: decentralized identities, zero-knowledge proofs, tokens and NFTs.
Second group – are the projects where people want to move successful business model from a Web2 to Web3 world. In some cases it is almost one-to-one movement, in other – it results in a totally new models. One of examples here are projects from the decentralized finances sector and any project with a prefix “decentralized-”: web browsers, social media and video hosting platforms, file hosting like IPFS and many many others.
What are the most important things to test when building a decentralized application (DApp) on Web3?
Functionality. One of the biggest differences building DApp is that you as an engineer do not have a full control of your backend – it is distributed among ten of thousands of computers around the world. The blockchain is constantly evolving and you to be aware of changes and how they can affect your application.
That’s why you need to understand how your application deals with the blockchain, how data is stored and retrieved, how pays the fees, how you present on-chain data to your customers. The deeper your knowledge of a particular blockchain – the less obvious bugs you will encounter at your DApp.
Security. When dealing with decentralized applications the majority of bugs come from the purely written smart contracts (or any code working with the blockchain). Hundreds of millions of dollars are lost due to neglecting the question of security for DApps. You can check some (not all) known hacks for Solidity at solidity-by-example resource.
So in-depth security testing are the must-have for such applications. There are security testing tools like Slither, Echidna, Manticore, MythX available. But as any security tool – they can’t provide 100% security guarantees. Additionally, there are separate companies or people who do security audit for smart contracts.
Performance. You should also understand how DApps behave in terms of the performance. As blockchain of the DApp is partially or fully stored at the blockchain – you don’t have a direct influence at the performance of the network. So you need to build usef flows in such a way that application should be blocked until transaction is stable. Stability or correctness can be checked as side – process. But it is all depends on the type of the DApp.
What tools and frameworks are available for testing smart contracts and other components of Web3 applications?
In Ethereum world the standard frameworks are Hardhat, Truffle or Brownie. All of them have nice toolset for keeping contracts testable and observable.
If you want to use some other programming toolset for smart contract development – it is possible to simulate the network locally using Ganache.
The testing of the Dapp can be split onto various levels.
- Unit tests for the frontend usually created by the developers in Javascript / Typescript
- Unit tests for the smart contracts can be done using Solidity or Javascript. Or Python if you use Vyper.
- Integration tests are usually implemented in Javascript as well. Hardhat for example offers integration with Mocha out of the box.
- UI tests can be created at any available language, but in case of JS stack – it can be plain old Selenium WebDriver or it’s fancier competitors – Playwright or Cypress.
How does Cardano Blockchain differ from other blockchain platforms like Ethereum?
Cardano has a lot of differences from other blockchains available on the market.
- Transaction model. instead of account-based transaction model (like in Ethereum), Cardano has UTXO model – similar to Bitcoin’s. More precisely – an extended UTXO model.
- Tokens. You don’t need to create special smart contracts to get new tokens on Cardano. Here tokens are natively supported along with the native currency – ADA.
- Consensus protocol. Cardano uses “Ouroboros” proof-of-stake protocol (in some variations) from the launch date. So the chain itself much greener and consumes less energy for producing blocks. Ethereum has only recently switched to proof-of-stake.
- Upgradability. It was a long and hard road, but now it is possible to update the main chain and protocol almost instantly and without a risk to get issues or a big forks.
- Formal Verification. All new major technical improvements to the chain starts as a whitepapers and then formally proved by a scientist community. Only after that it become a code.
What programming languages and development frameworks are used for building applications on Cardano?
At this time the main programming language for creating smart contracts at Cardano is Plutus. It is a Haskell-like language, that allows to build and test smart contracts before they are deployed. You can start to dig into Plutus from the documentation page. From the first sight Plutus may seem like a hard one – but it offers a better security and auditabilty comparing to Ethereum’s Solidity.
In addition to Plutus, you can try Marlowe – the domain-specific language for financial contracts. It can work either with Haskell or with Javascript.
If you want to learn how to create smart contracts using I can also recommend the Plutus Pioneer Program course. For better understanding you check a prerequisite course on Haskell.
What resources and communities are available for learning and collaborating on Web3 development?
Official documentation is the first source of information about a particular blockchain or technology. Additionally, each major blockchain projects has it’s own forums and Discord communities.
If you have some background in programming language, I can recommend the following resources:
- Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32 hours of highly practical knowledge on how to work with Solidity and JS for creating DApps. And it’s totally free.
- Blockchain Developer roadmap – collection of topics and blog posts about blockchain development
- The Ultimate Smart Contract Developer Roadmap another good roadmap to learn from scratch
From testing point of view – I definitely can recommend Web3 tests community. It is a very young community, but will be useful for those who want to understand testing in blockchain a little deeper.
Also – you can check Awesome Blockchain Testing repo in search for posts and whitepapers on testing in blockchain.
To get a glance on how testing is done for Plutus on Cardano – check out Testing Plutus Smart Contracts series of blog posts.
Thanks for the participation Oleksandr ! Amazing interview and a leader to follow in the web3 area! 🚀