You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, qubic protocol has these limitation about transactions & mempool:
One address (ID) can only have 1 transaction(tx) per tick. Eg: if you submit 2 transactions to tick N: A sends QUs to B and A sends QUs to C, only one of them will be included (picked by tick leader).
Recently we allow computor ID to have 128 txs per tick (they have their own mempool):
We now want to remove above limitation and allow all IDs to have many txs per tick. (thus many txs in the mempool)
Structure of Transaction (in network_messages/transaction.h):
struct Transaction
{
m256i sourcePublicKey;
m256i destinationPublicKey;
long long amount;
unsigned int tick; // <~ scheduled tick
unsigned short inputType;
unsigned short inputSize;
}
A mempool should be able to do these 3 basic functions (just suggestion, you can improve while doing this):
void update(Transaction* tx, enum strategy):
check valid and add tx to the pool. It maybe unnecessary to add a tx that has scheduled_tick = current_tick + 2000
To avoid spamming to the pool, we need a strategy (to add/remove which tx) to keep total number of tx per tick less than or equal NUMBER_OF_TRANSACTIONS_PER_TICK (1024 atm)
Currently, qubic protocol has these limitation about transactions & mempool:
A sends QUs to B
andA sends QUs to C
, only one of them will be included (picked by tick leader).A sends QUs to B at tick N
and Update efi-build-develop.yml #2A sends QUs to C at tick (N+1)
. Tx Update efi-build-develop.yml #2 will replace update #1 because it has higher scheduled tick.mempool
):We now want to remove above limitation and allow all IDs to have many txs per tick. (thus many txs in the mempool)
Structure of
Transaction
(innetwork_messages/transaction.h
):A mempool should be able to do these 3 basic functions (just suggestion, you can improve while doing this):
void update(Transaction* tx, enum strategy)
:scheduled_tick = current_tick + 2000
NUMBER_OF_TRANSACTIONS_PER_TICK
(1024 atm)(future tx picking strategy)
Transaction* get(unsigned int tick, int index)
:tick
(already sorted by strategy above), returnnullptr
if there is no more txsvoid prune(unsigned int tick)
:tick
The text was updated successfully, but these errors were encountered: