Skip to content

Commit

Permalink
support multi txn test (#703)
Browse files Browse the repository at this point in the history
### Description
This is to help testing a sequential multi txn tests particularly for FA processor at the moment. this is done by refactoring some of codes we already have. Which means we still support a single batch of multi txns at the level of Testing Framework.




We will be working on some improvements to testing framework to:
1. Support better file generation (right now it creates two folders for one test case in the same level)
2. Support Sequential Multi txn Testing at the level of testing framework. 

Test cases That Testing Framework supports:

### A: Sequential Multi Txn testing 
you have multiple txns as an input,
processor processing order in two or more processing. 


Example:
```
Input: [txn1, txn2]

txn1 from Grpc, processor processes txn1 
txn2  from Grpc,  processor processes txn2
```

### B: Single Batch of multi txn testing 

Example:
```
input: [txn1, txn2]

1. txn1, txn2, process
2. txn3, process 
```

### C. Combo of A and B:
Example:
```
input: [txn1, txn2, txn3, ... , n]

[txn1, txn2, txn3, ... , n] and processor processes
```
  • Loading branch information
yuunlimm authored Feb 6, 2025
1 parent 9bcb77e commit e943d0f
Show file tree
Hide file tree
Showing 14 changed files with 790 additions and 71 deletions.
6 changes: 3 additions & 3 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ anyhow = "1.0.86"
aptos-indexer-processor-sdk = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "b79ed8b5864b2a12a1f9c5fd01579462e029b2ae" }
aptos-indexer-processor-sdk-server-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "b79ed8b5864b2a12a1f9c5fd01579462e029b2ae" }
aptos-protos = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "1d8460a995503574ec4e9699d3442d0150d7f3b9" }
aptos-indexer-test-transactions = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "b91d6bfe955e0df12927ae06f44c9763f5f016d3" }
aptos-indexer-test-transactions = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "6f64aea8e5aba9207ffce13060b8bdd031a8de31" }
aptos-indexer-testing-framework = { git = "https://github.com/aptos-labs/aptos-indexer-processor-sdk.git", rev = "b79ed8b5864b2a12a1f9c5fd01579462e029b2ae" }
async-trait = "0.1.53"
backtrace = "0.3.58"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"transaction_version": 2308282694,
"coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6",
"coin_type": "0x1::aptos_coin::AptosCoin",
"supply": "113830046844937808",
"transaction_timestamp": "2025-02-01T17:05:00",
"transaction_epoch": 10169
},
{
"transaction_version": 2308283617,
"coin_type_hash": "91ceb1308a98389691e05158b07ed5f079ab78461a6bb8d5a4054b1bb5cb8bb6",
"coin_type": "0x1::aptos_coin::AptosCoin",
"supply": "113830046828042038",
"transaction_timestamp": "2025-02-01T17:05:15",
"transaction_epoch": 10169
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
[
{
"storage_id": "0x2829f224066c8b5a925d277e88c9ff7f72b44c40b01a0995f1e2773ebaeca412",
"owner_address": "0x3656f551dbdddb61a5e0956b8f64fd9f9d20c48c9f8f2a07551072fd15a3cddb",
"asset_type_v2": null,
"asset_type_v1": "0x1::aptos_coin::AptosCoin",
"is_primary": true,
"is_frozen": false,
"amount_v1": "115070470560",
"amount_v2": null,
"amount": "115070470560",
"last_transaction_version_v1": 2308283617,
"last_transaction_version_v2": null,
"last_transaction_version": 2308283617,
"last_transaction_timestamp_v1": "2025-02-01T17:05:15",
"last_transaction_timestamp_v2": null,
"last_transaction_timestamp": "2025-02-01T17:05:15",
"token_standard": "v1",
"asset_type": "0x1::aptos_coin::AptosCoin"
},
{
"storage_id": "0x3adab3cb7723d75180dae65c7e75802cd9adec7eb387f50bec250d33d3313d36",
"owner_address": "0xb7cb159db88215cd1670edfe4e30df58177571610983fc06681f4c9773810b3e",
"asset_type_v2": null,
"asset_type_v1": "0x1::aptos_coin::AptosCoin",
"is_primary": true,
"is_frozen": false,
"amount_v1": "0",
"amount_v2": null,
"amount": "0",
"last_transaction_version_v1": 2308282694,
"last_transaction_version_v2": null,
"last_transaction_version": 2308282694,
"last_transaction_timestamp_v1": "2025-02-01T17:05:00",
"last_transaction_timestamp_v2": null,
"last_transaction_timestamp": "2025-02-01T17:05:00",
"token_standard": "v1",
"asset_type": "0x1::aptos_coin::AptosCoin"
},
{
"storage_id": "0x48e8342e9d33174172b0ef9f0a8333018f174a41de02d90bce68f46994e15917",
"owner_address": "0x17740e230cb5ac3f6eb16135fa1ce02baf9a07f2acfa884b33b0fb2f1bc2b91d",
"asset_type_v2": null,
"asset_type_v1": "0x1::aptos_coin::AptosCoin",
"is_primary": true,
"is_frozen": false,
"amount_v1": "912327475722",
"amount_v2": null,
"amount": "912327475722",
"last_transaction_version_v1": 2308282694,
"last_transaction_version_v2": null,
"last_transaction_version": 2308282694,
"last_transaction_timestamp_v1": "2025-02-01T17:05:00",
"last_transaction_timestamp_v2": null,
"last_transaction_timestamp": "2025-02-01T17:05:00",
"token_standard": "v1",
"asset_type": "0x1::aptos_coin::AptosCoin"
},
{
"storage_id": "0x591c18b4621f2e4703febc771289065882f612e059b9734c49ad56101dd43b7f",
"owner_address": "0xc05e013f9f81d699e5a991bd134ab8a9af4ec609714f1fd8bfce4fc38419c890",
"asset_type_v2": null,
"asset_type_v1": "0x1::aptos_coin::AptosCoin",
"is_primary": true,
"is_frozen": false,
"amount_v1": "114558714630",
"amount_v2": null,
"amount": "114558714630",
"last_transaction_version_v1": 2308282694,
"last_transaction_version_v2": null,
"last_transaction_version": 2308282694,
"last_transaction_timestamp_v1": "2025-02-01T17:05:00",
"last_transaction_timestamp_v2": null,
"last_transaction_timestamp": "2025-02-01T17:05:00",
"token_standard": "v1",
"asset_type": "0x1::aptos_coin::AptosCoin"
},
{
"storage_id": "0x6633f87950212c7ae22c5eb4410589fe265ffc046ad64b32d30091b6278ef1d0",
"owner_address": "0x17ca1ee00a2baaee0a0419bd8ef25489b96ece1906881ae702b317eefd940076",
"asset_type_v2": "0x3be35c307c15290ec13c2294d40129ddd27e5b96050ec8d43b8aa30255957088",
"asset_type_v1": "0x17740e230cb5ac3f6eb16135fa1ce02baf9a07f2acfa884b33b0fb2f1bc2b91d::coin_factory::Emojicoin",
"is_primary": true,
"is_frozen": false,
"amount_v1": "121586567739",
"amount_v2": "100000000",
"amount": "121686567739",
"last_transaction_version_v1": 2308282694,
"last_transaction_version_v2": 2308283617,
"last_transaction_version": 2308283617,
"last_transaction_timestamp_v1": "2025-02-01T17:05:00",
"last_transaction_timestamp_v2": "2025-02-01T17:05:15",
"last_transaction_timestamp": "2025-02-01T17:05:15",
"token_standard": "v1",
"asset_type": "0x17740e230cb5ac3f6eb16135fa1ce02baf9a07f2acfa884b33b0fb2f1bc2b91d::coin_factory::Emojicoin"
},
{
"storage_id": "0x6c30c7bce63ed412137a0d61c8c6e7e78c3cd0b07bc7a297b8920cef8d9eda89",
"owner_address": "0x97670e81558c0389314f57e9b14c18db37ec7a823747c1bac176553d07446653",
"asset_type_v2": "0x3be35c307c15290ec13c2294d40129ddd27e5b96050ec8d43b8aa30255957088",
"asset_type_v1": null,
"is_primary": false,
"is_frozen": false,
"amount_v1": null,
"amount_v2": "84903000000",
"amount": "84903000000",
"last_transaction_version_v1": null,
"last_transaction_version_v2": 2308283617,
"last_transaction_version": 2308283617,
"last_transaction_timestamp_v1": null,
"last_transaction_timestamp_v2": "2025-02-01T17:05:15",
"last_transaction_timestamp": "2025-02-01T17:05:15",
"token_standard": "v2",
"asset_type": "0x3be35c307c15290ec13c2294d40129ddd27e5b96050ec8d43b8aa30255957088"
},
{
"storage_id": "0xbc52b11f809e5c13236f3ec3296f56259b7bee9898d47efd621354083adb97d9",
"owner_address": "0xd0b17bea776bb87b70b2fb2ca631014f0ca94fc1acde4b8ff1a763f4172aa6c4",
"asset_type_v2": null,
"asset_type_v1": "0x1::aptos_coin::AptosCoin",
"is_primary": true,
"is_frozen": false,
"amount_v1": "42543253825",
"amount_v2": null,
"amount": "42543253825",
"last_transaction_version_v1": 2308282694,
"last_transaction_version_v2": null,
"last_transaction_version": 2308282694,
"last_transaction_timestamp_v1": "2025-02-01T17:05:00",
"last_transaction_timestamp_v2": null,
"last_transaction_timestamp": "2025-02-01T17:05:00",
"token_standard": "v1",
"asset_type": "0x1::aptos_coin::AptosCoin"
},
{
"storage_id": "0xc4fc38001ad5d8c1d85b6908c284deb29cc94faf5219061a3db6443397ba3fbf",
"owner_address": "0x17ca1ee00a2baaee0a0419bd8ef25489b96ece1906881ae702b317eefd940076",
"asset_type_v2": null,
"asset_type_v1": "0x1::aptos_coin::AptosCoin",
"is_primary": true,
"is_frozen": false,
"amount_v1": "183280722",
"amount_v2": null,
"amount": "183280722",
"last_transaction_version_v1": 2308282694,
"last_transaction_version_v2": null,
"last_transaction_version": 2308282694,
"last_transaction_timestamp_v1": "2025-02-01T17:05:00",
"last_transaction_timestamp_v2": null,
"last_transaction_timestamp": "2025-02-01T17:05:00",
"token_standard": "v1",
"asset_type": "0x1::aptos_coin::AptosCoin"
},
{
"storage_id": "0xc6fa431d283690e248c267e56f8062a49d09e81747b85cc5239d0590c40c6a45",
"owner_address": "0xb7cb159db88215cd1670edfe4e30df58177571610983fc06681f4c9773810b3e",
"asset_type_v2": null,
"asset_type_v1": "0x17740e230cb5ac3f6eb16135fa1ce02baf9a07f2acfa884b33b0fb2f1bc2b91d::coin_factory::Emojicoin",
"is_primary": true,
"is_frozen": false,
"amount_v1": "0",
"amount_v2": null,
"amount": "0",
"last_transaction_version_v1": 2308282694,
"last_transaction_version_v2": null,
"last_transaction_version": 2308282694,
"last_transaction_timestamp_v1": "2025-02-01T17:05:00",
"last_transaction_timestamp_v2": null,
"last_transaction_timestamp": "2025-02-01T17:05:00",
"token_standard": "v1",
"asset_type": "0x17740e230cb5ac3f6eb16135fa1ce02baf9a07f2acfa884b33b0fb2f1bc2b91d::coin_factory::Emojicoin"
},
{
"storage_id": "0xea2c6900b9e681af5478e679b2d20bb5f73d30534f8a420601cd019997d2e0f6",
"owner_address": "0x17740e230cb5ac3f6eb16135fa1ce02baf9a07f2acfa884b33b0fb2f1bc2b91d",
"asset_type_v2": null,
"asset_type_v1": "0x17740e230cb5ac3f6eb16135fa1ce02baf9a07f2acfa884b33b0fb2f1bc2b91d::coin_factory::Emojicoin",
"is_primary": true,
"is_frozen": false,
"amount_v1": "187091465210174",
"amount_v2": null,
"amount": "187091465210174",
"last_transaction_version_v1": 2308282694,
"last_transaction_version_v2": null,
"last_transaction_version": 2308282694,
"last_transaction_timestamp_v1": "2025-02-01T17:05:00",
"last_transaction_timestamp_v2": null,
"last_transaction_timestamp": "2025-02-01T17:05:00",
"token_standard": "v1",
"asset_type": "0x17740e230cb5ac3f6eb16135fa1ce02baf9a07f2acfa884b33b0fb2f1bc2b91d::coin_factory::Emojicoin"
}
]
Loading

0 comments on commit e943d0f

Please sign in to comment.