Multi-Owner (Sender) System

Description of the multi-owner (sender) system

The Asterizm Protocol can continuously handle a significant volume of on-chain transactions.

EVM systems incorporate nonce logic, determining a precise order for sending transactions from a specific address. This approach has a crucial nuance - if one transaction from the sequence doesn't make it into a block, all subsequent transactions won't be included in a block until the original one is included. Consequently, queues for transaction submission may form on owner addresses.

The Asterizm Protocol has been designed with this nuance in mind, allowing multiple addresses capable of sending requests to be added to contracts. These addresses are referred to as senders. In this context, the off-chain part of the system selects the least loaded sender. This approach helps reduce load and avoid transaction queues.

Sender logic on client contracts

To implement this logic, additional senders need to be added (the first sender is considered the owner who deployed the contract, and it is automatically added to the list of senders during the deployment of the client contract). To achieve this, the following method should be called on the respective contract:

function addSender(address _sender) public onlyOwner

This method adds the provided address to the list of senders, enabling the specified address to invoke basic methods for sending protocol transfers.

Sender logic (off-chain part)

After adding a sender to the client contract, it is necessary to include this sender in the off-chain module of the protocol. To achieve this, execute the following console command:

docker exec asterizm-console /app/main owners/add {netwotk-symbol} {owner-address} {owner-private-key} {?owner-public-key}

This command adds a sender to the contract of a specific network. It accepts the following parameters:

  • network-symbol - mandatory parameter, the network symbol (e.g., ETH, POL, etc.)

  • owner-address - mandatory parameter, the address of the owner

  • owner-private-key - mandatory parameter, the private key of the owner

  • owner-public-key - optional parameter, the public key of the owner (used in TVM systems).

After adding a sender to the off-chain module, it is necessary to restart the system. This is done with the following command: docker compose -f /opt/asterizm/docker-compose.yml restart

Last updated