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
{{ message }}
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.
Figure out remaining mechanisms (reconciliation coverage under 100%, and way to generate account as recipient randomly for automating test)
Reconciliation coverage is calculated using the following formula. coverage = reconciledAccounts/seenAccounts.
So if there are 15 accounts allocated KLAY by genesis config and only 1 account is mining(meaning it get mining reward per every block and it is a balance change), then coverage result is always be 1/15 = 0.666......
The number at the Scenario name (e.g. transfer(10)) means concurrency level(At this concurrency level, a same scenario can be ran concurrently.).
And the loop condition (how many txs should be sent during test) is positioned at end_condition at config.json.
In the end_condition, we should provide scenario name and count(how many should we execute).
FindBalance
It searches all accounts stored in KeyStroage.
Call Procedure can save accounts to KeyStorage are: KeyStorage.ImportAccounts -> KeyStorage.Store and called SaveAccount workflow -> CoordinatorHelper.StoreKey -> KeyStorage.StoreTransactional.
KeyStorage.ImportAccounts is called when there are prefunded_accounts at config.json.
Conclusion: accounts scope can be searched during FindBalance is exactly limited to accounts in KeyStorage.
How to create random recipient address?
Please check the ethereum.ros at the below of this document.
Below is the contents of config.json while I'm using for testing rosetta-ethereum.
use generate_key and derive function to calculate random address.
transfer(10){transfer{transfer.network={"network":"Local","blockchain":"Ethereum"};currency={"symbol":"ETH","decimals":18};sender=find_balance({"minimum_balance":{"value": "10000000000000000","currency": {{currency}}}});// Set the recipient_amount as some value <= sender.balance-max_feemax_fee="84000000000000";available_amount={{sender.balance.value}}-{{max_fee}};recipient_amount=random_number({"minimum": "1","maximum": {{available_amount}}});print_message({"recipient_amount":{{recipient_amount}}});random_key=generate_key({"curve_type": "secp256k1"});random_recipient=derive({"network_identifier": {{transfer.network}},"public_key": {{random_key.public_key}}});// Find recipient and construct operationssender_amount=0-{{recipient_amount}};transfer.confirmation_depth="1";transfer.operations=[{"operation_identifier":{"index":0},"type":"CALL","account":{{sender.account_identifier}},"amount":{"value":{{sender_amount}},"currency":{{currency}}}},{"operation_identifier":{"index":1},"type":"CALL","account":{"address": {{random_recipient.address}}},"amount":{"value":{{recipient_amount}},"currency":{{currency}}}}];}}
The text was updated successfully, but these errors were encountered:
Try to run test with rosetta-ethereum.
Subtask of #4
Tasks:
check:data
is working.check:construction
is working.coverage = reconciledAccounts/seenAccounts
.1/15 = 0.666.....
.end_condition
atconfig.json
.end_condition
, we should provide scenario name and count(how many should we execute).KeyStroage
.KeyStorage.ImportAccounts
->KeyStorage.Store
and calledSaveAccount
workflow ->CoordinatorHelper.StoreKey
->KeyStorage.StoreTransactional
.KeyStorage.ImportAccounts
is called when there areprefunded_accounts
atconfig.json
.ethereum.ros
at the below of this document.Below is the contents of config.json while I'm using for testing rosetta-ethereum.
ethereum.ros for construction testing.
generate_key
andderive
function to calculate random address.The text was updated successfully, but these errors were encountered: