availproject / avail

775 stars 529 forks source link

E2E tests move #583

Closed fmiguelgarcia closed 2 months ago

fmiguelgarcia commented 2 months ago

Pull Request type

Description

Move avail-subxt examples into E2E tests. It also run them concurrently, using a couple of tools/functions:

HAL-01: Missing Maximum Size Validation

:warning: NOTE: Moved to another PR. ~This includes an E2E test to ensure that failed_send_message transactions is bounded. It reaches the maximum number of failed vector::send_message transactions per block, so we can determine the maximum number of integers used by MemeoryTemporaryStorage. We use the minimum size send_message transaction possible as an ArbitraryMessage and FungibleToken. In order to get that minimum size, and produce a maximum number of failed TXs, the parameters of the call are:~

~Having that, the maximum number of TXs per block is just 136, filling the 86% of the block weight. That generates a post inherent TX failed_send_message of 136 items (Compact<u32>) with an encoded size of `432 bytes``, and an extra block weight of 12M (around 0.62 % of total block).~

In Summary,

~The worst case means, *`136 size_of ~= 544 bytesextra memory requirements per block**. The impact of this post inherent TX **could be up to0.62%` of the total block weight**. Keep in mind that transactions from regular users could fill up to 85% of the block.~

Checklist

fmiguelgarcia commented 2 months ago

maybe e2e_kate.sh could just be renamed e2e.

You're right!. Done. Thanks @Leouarz