aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[aptos-rosetta] Allow synthetic blocks in Rosetta

Open gregnazario opened this issue 2 years ago • 1 comments

Description

You can make up blocks based on transactions if you feel that variable block size is not good enough for your current state.

Remembering that the timestamps can be wrong on a block.

Additionally, drops transactions that have no operations by default.

Test Plan

This is a feature that's not supported in tests. It has been tested manually to work


This change is Reviewable

gregnazario avatar Sep 13 '22 20:09 gregnazario

This is kinda wacky lol. I understand the mechanics but what is the purpose of doing this? So that ppl can specify a smaller block size or a larger block size?

bowenyang007 avatar Sep 14 '22 04:09 bowenyang007

This is kinda wacky lol. I understand the mechanics but what is the purpose of doing this? So that ppl can specify a smaller block size or a larger block size?

In the event that you have a system built around blocks, and the blocks are being created too fast (because they have very few transactions), a per block API system has a large overhead.

So, if you build around these madeup blocks, you can smooth out the block creation rate, and decrease your API calls. Of course, with the caveat if you change, you have to re-index from the beginning of time again because your blocks will be off.

It's also pretty good for testing in general

gregnazario avatar Sep 14 '22 06:09 gregnazario

Forge is running suite land_blocking on 6f2f341f7e4592d91d7dafda7f84cee50ac9d075

Forge is running suite compat on testnet ==> 6f2f341f7e4592d91d7dafda7f84cee50ac9d075

:white_check_mark: Forge suite compat success on testnet ==> 6f2f341f7e4592d91d7dafda7f84cee50ac9d075

Compatibility test results for testnet ==> 6f2f341f7e4592d91d7dafda7f84cee50ac9d075 (PR)
1. Check liveness of validators at old version: testnet
compatibility::simple-validator-upgrade::liveness-check : 7560 TPS, 4936 ms latency, 7900 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: 6f2f341f7e4592d91d7dafda7f84cee50ac9d075
compatibility::simple-validator-upgrade::single-validator-upgrade : 5668 TPS, 6622 ms latency, 9100 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: 6f2f341f7e4592d91d7dafda7f84cee50ac9d075
compatibility::simple-validator-upgrade::half-validator-upgrade : 5392 TPS, 7052 ms latency, 9200 ms p99 latency,no expired txns
4. upgrading second batch to new version: 6f2f341f7e4592d91d7dafda7f84cee50ac9d075
compatibility::simple-validator-upgrade::rest-validator-upgrade : 7298 TPS, 4797 ms latency, 8300 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for testnet ==> 6f2f341f7e4592d91d7dafda7f84cee50ac9d075 passed
Test Ok

:white_check_mark: Forge suite land_blocking success on 6f2f341f7e4592d91d7dafda7f84cee50ac9d075

performance benchmark with full nodes : 7562 TPS, 5245 ms latency, 9100 ms p99 latency,no expired txns
Test Ok

Forge is running suite compat on testnet ==> a30981480f8a70ce2b171cffb23273589d40dfbf

Forge is running suite land_blocking on a30981480f8a70ce2b171cffb23273589d40dfbf

:white_check_mark: Forge suite compat success on testnet ==> a30981480f8a70ce2b171cffb23273589d40dfbf

Compatibility test results for testnet ==> a30981480f8a70ce2b171cffb23273589d40dfbf (PR)
1. Check liveness of validators at old version: testnet
compatibility::simple-validator-upgrade::liveness-check : 7385 TPS, 4886 ms latency, 8400 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: a30981480f8a70ce2b171cffb23273589d40dfbf
compatibility::simple-validator-upgrade::single-validator-upgrade : 5772 TPS, 6358 ms latency, 8600 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: a30981480f8a70ce2b171cffb23273589d40dfbf
compatibility::simple-validator-upgrade::half-validator-upgrade : 5951 TPS, 6200 ms latency, 8200 ms p99 latency,no expired txns
4. upgrading second batch to new version: a30981480f8a70ce2b171cffb23273589d40dfbf
compatibility::simple-validator-upgrade::rest-validator-upgrade : 7414 TPS, 4961 ms latency, 9000 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for testnet ==> a30981480f8a70ce2b171cffb23273589d40dfbf passed
Test Ok

:white_check_mark: Forge suite land_blocking success on a30981480f8a70ce2b171cffb23273589d40dfbf

performance benchmark with full nodes : 8192 TPS, 4833 ms latency, 7200 ms p99 latency,no expired txns
Test Ok

github-actions[bot] avatar Sep 14 '22 18:09 github-actions[bot]