Winter protocol improvements - Tech Update

Winter protocol improvements - Tech Update

I. Improvements proposals
II. TransactionChain concurrency
III. Smart Contract Optimizations

For this new tech update, we would like to present some enhancements we have been worked on for Archethic’s protocol to give a better and more reliable network.

Since the last update to support and make bridge & DEX applications feasible and scalable, we emphasize our attention on a lot of bug fixes and enhancements present from the v1.3.0 to the current one v1.4.7.

Many of those fixes involved transaction chains validation, beacon chain synchronization and self-repair of the nodes.

Apart from those, we aim to explain some of new exciting features we enabled in the current network and the nearest next updates.

I. Improvements proposals

Stateful UTXO

As a reminder, Archethic relies on UTXO model, this means we are not using some centralized state by default for the exchange of assets or smart contract interaction.

There is no reality outside the transaction themselves.
This model ensures better transparency, scalability, and security.

However, sometimes you may want to store some additional context for your chain — particularly for smart contracts.

Even if, transaction’s model offers a free place to store arbitrary data, depending on the type of transaction, this zone is already taken and interpreted by the network.

For instance, if you want to create a token, you don't have to a code anything, but just define a token in a textual representation and let the network makes the magic.

But in that case, if you wish to create tokens and still leverage some state/snapshot of your smart contract chain, you are a bit screwed.

For this reason, we introduce a hybrid approach, where UTXO can hold state but still leverages the source of truth from transaction and synchronization by UTXO transfers. (less complication than other sharding solutions thanks to this model)

For more details, please take a look at this AEIP

II. TransactionChain concurrency

Archethic is using TransactionChain as multiple independent chains through the UTXO model to list of your transactions (wallet, contract, websites, etc.)

In certain instances, particularly in cases of intensive usage, a concurrency issue may arise due to the serialization of transactions' chains, wherein each transaction is serialized individually for a single chain. Furthermore, Archethic ensures that your transfers or smart contract calls are routed to the final address of the chain.

If the chain destination evolves too much or too quickly, you can have some issue in terms of security of your assets. So, to prevent lost of transaction and hence lost of funds, we introduced a new concurrency model to resolve this problem to handle concurrency for independent chains.

Most of the blockchain which leverages UTXO model handle this concurrency either off-chain or accept the lack of concurrency but in our case, we are able to respond to this concern with an elegant solution on-chain.

We take the approach of not having a lock system, otherwise every time someone will do a transaction, no one could send some funds to it.
But we leverage a point of synchronization using what is called genesis pool.
It's a shard representing independent chains. Each of the chains has its own genesis's pool.

Hence, we decided to redirect the output towards the genesis chain instead of the last transaction of the chain, and use them as input for new ones. Resolving then the concurrency issue, as genesis doesn't evolve and acts a pivot of synchronization.

Because it's a huge feature, we decided to ship it into two times, two phases.

The first one will prepare the work for the second one, by defining the inputs which have been consumed from the transaction and store them on genesis pools.

The second one will use the inputs from the genesis pool to resolve the concurrency issues and will make the changes from Explorer to API to be backward compatible.

The first phase is currently under test and will ensure the migration of the second phase (which is in development) will go smoothly and prevent any downtime.

We preferred to take time to implement this feature, to make sure everything works as expected and provide a high service level agreement.

For more details, you can look at the AEIP

III. Smart Contract Optimizations

Interoperability with EVM

As we developed the bridge for two ways communication between Archethic and EVM blockchains, we ended in situations to need some utilities in smart contract to be able to attest something from EVM networks.

While Archethic's smart contract is able to contact any off-chain endpoints (i.e., EVM RCP node), we needed to encode some data to be EVM compatible.

Hence, we added few functions in the smart contract language to do so:

This kind of feature is needed for example to make sure bridge contracts haven't been refund or the lock time is not reached, etc., by requesting EVM contract data.

To help out with the functions for bridge and DEX smart contract, we've added some fresh tools, like a Math module, new Cryptography primitives, HTTP post requests and new chain functions. These make possible to sign something from the nodes (to have trusted signature), to fetch token balances or to be able to compute mathematical formulas for DeFi.

Explicit errors
Also, to provide a better experience for developers and users of smart contracts, we worked to improve the error handling in smart contracts. The contracts are able to return more explicit messages in case of errors.

Moreover, we will add soon a feature to be able to customize the errors from the smart contract themselves, allowing to create custom error messages for even a better understanding.

We hope this tech update was useful and full of information about the last subjects from our core team and community growth.

We would like also to thank all the contributors who have already given us feedback and reported issues to make the network and dApps even better.

Archethic Public Blockchain

Archethic is a Layer 1 blockchain that seeks to empower people over data ownership, decentralized applications over slow internet, and cost-effective energy solutions over expensive carbon emissions.

Due to the use of a new consensus called "ARCH," its blockchain architecture is the most scalable, secure, and energy-efficient solution on the market.

With the addition of an internal oracle, time-triggers, editable content, and interpreted language; Archethic smart contracts broaden the capabilities of developers and builders!

Archethic provides an open and interoperable ecosystem for all blockchains with native integration for Defi, NFTs, and decentralized identities.

Let us work together to empower Archethic

Archethic Foundation: Non-profit to manage decentralized governance of the public blockchain

Do you want to learn more?  

White Paper
Yellow Paper

Join our community!