Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rolback dag-effective-height to zero #4117

Closed
wants to merge 20 commits into from

Conversation

simonjiao
Copy link
Collaborator

  • init dag when executing genesis block
  • fix check_dag_type
  • restore dag_fork_height
  • build dev network as dag chain

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Other information

@simonjiao simonjiao requested a review from jolestar as a code owner May 26, 2024 07:11
@simonjiao simonjiao removed the request for review from jolestar May 26, 2024 07:12
@simonjiao simonjiao force-pushed the rollback-dag-height-to-zero branch from f280b2c to 364c6ba Compare May 26, 2024 07:15
Copy link

Benchmark for 7622200

Click to view benchmark
Test Base PR %
accumulator_append 1231.9±230.01µs 1263.0±368.53µs +2.52%
block_apply/block_apply_10 534.5±62.44ms 500.3±84.26ms -6.40%
block_apply/block_apply_1000 59.0±2.11s 58.9±2.52s -0.17%
get_with_proof/db_store 80.1±12.27µs 63.0±14.10µs -21.35%
get_with_proof/mem_store 62.9±9.90µs 65.8±10.10µs +4.61%
put_and_commit/db_store/1 224.9±43.72µs 167.6±38.15µs -25.48%
put_and_commit/db_store/10 1625.8±256.09µs 1741.2±290.18µs +7.10%
put_and_commit/db_store/100 13.9±2.28ms 15.3±1.99ms +10.07%
put_and_commit/db_store/5 809.7±159.51µs 826.4±159.70µs +2.06%
put_and_commit/db_store/50 7.8±1.23ms 7.7±1.16ms -1.28%
put_and_commit/mem_store/1 106.4±28.22µs 127.1±17.10µs +19.45%
put_and_commit/mem_store/10 1147.3±175.47µs 956.8±190.50µs -16.60%
put_and_commit/mem_store/100 10.1±1.87ms 10.5±2.02ms +3.96%
put_and_commit/mem_store/5 537.2±93.86µs 499.2±99.72µs -7.07%
put_and_commit/mem_store/50 5.9±0.38ms 5.5±0.74ms -6.78%
query_block/query_block_in(10)_times(100) 7.9±1.54ms 7.6±1.29ms -3.80%
query_block/query_block_in(10)_times(1000) 107.0±4.07ms 82.3±10.54ms -23.08%
query_block/query_block_in(10)_times(10000) 710.3±134.12ms 733.2±95.44ms +3.22%
query_block/query_block_in(1000)_times(100) 1919.1±260.17µs 1921.5±236.61µs +0.13%
query_block/query_block_in(1000)_times(1000) 19.5±1.93ms 22.4±1.63ms +14.87%
query_block/query_block_in(1000)_times(10000) 196.1±14.56ms 205.9±28.57ms +5.00%
storage_transaction 1573.3±798.28µs 1443.1±520.16µs -8.28%
vm/transaction_execution/1 536.3±61.84ms 651.0±67.38ms +21.39%
vm/transaction_execution/10 171.8±18.63ms 183.9±19.48ms +7.04%
vm/transaction_execution/20 165.2±11.40ms 185.8±12.45ms +12.47%
vm/transaction_execution/5 203.2±17.73ms 230.8±14.23ms +13.58%
vm/transaction_execution/50 195.5±12.13ms 194.2±12.41ms -0.66%

@simonjiao simonjiao force-pushed the rollback-dag-height-to-zero branch from 364c6ba to 7e64858 Compare May 26, 2024 12:51
Copy link

Benchmark for c17c090

Click to view benchmark
Test Base PR %
accumulator_append 1322.8±232.47µs 1311.1±182.00µs -0.88%
block_apply/block_apply_10 572.6±31.69ms 510.2±66.29ms -10.90%
block_apply/block_apply_1000 64.5±1.66s 59.8±1.77s -7.29%
get_with_proof/db_store 77.6±14.38µs 74.0±15.35µs -4.64%
get_with_proof/mem_store 63.2±11.57µs 67.9±9.60µs +7.44%
put_and_commit/db_store/1 218.0±13.36µs 211.1±15.97µs -3.17%
put_and_commit/db_store/10 1736.0±223.37µs 1546.5±284.48µs -10.92%
put_and_commit/db_store/100 14.5±2.72ms 13.9±1.84ms -4.14%
put_and_commit/db_store/5 859.9±119.05µs 948.0±69.22µs +10.25%
put_and_commit/db_store/50 8.4±0.95ms 8.3±1.08ms -1.19%
put_and_commit/mem_store/1 133.2±16.29µs 115.4±14.74µs -13.36%
put_and_commit/mem_store/10 1027.2±224.58µs 1224.5±204.53µs +19.21%
put_and_commit/mem_store/100 10.8±1.68ms 11.2±1.58ms +3.70%
put_and_commit/mem_store/5 540.5±93.68µs 523.6±111.16µs -3.13%
put_and_commit/mem_store/50 4.6±0.89ms 4.6±0.93ms 0.00%
query_block/query_block_in(10)_times(100) 8.6±1.01ms 8.7±1.05ms +1.16%
query_block/query_block_in(10)_times(1000) 70.8±12.03ms 77.1±10.49ms +8.90%
query_block/query_block_in(10)_times(10000) 715.9±90.15ms 745.8±148.99ms +4.18%
query_block/query_block_in(1000)_times(100) 2.2±0.15ms 2.2±0.24ms 0.00%
query_block/query_block_in(1000)_times(1000) 21.9±1.85ms 22.2±1.18ms +1.37%
query_block/query_block_in(1000)_times(10000) 216.4±18.97ms 211.5±19.98ms -2.26%
storage_transaction 1833.3±748.73µs 1828.7±807.23µs -0.25%
vm/transaction_execution/1 621.7±50.87ms 653.5±46.06ms +5.12%
vm/transaction_execution/10 184.3±15.26ms 186.7±10.64ms +1.30%
vm/transaction_execution/20 171.8±14.06ms 207.1±8.48ms +20.55%
vm/transaction_execution/5 250.1±12.22ms 261.8±12.86ms +4.68%
vm/transaction_execution/50 186.2±16.99ms 209.1±14.33ms +12.30%

@simonjiao simonjiao marked this pull request as draft May 27, 2024 03:18
Copy link

Benchmark for 796d00a

Click to view benchmark
Test Base PR %
accumulator_append 1429.9±868.42µs 1175.9±304.12µs -17.76%
block_apply/block_apply_10 517.1±63.32ms 505.5±35.86ms -2.24%
block_apply/block_apply_1000 63.6±1.30s 62.2±2.54s -2.20%
get_with_proof/db_store 79.4±10.63µs 80.2±9.91µs +1.01%
get_with_proof/mem_store 70.5±4.92µs 62.5±14.15µs -11.35%
put_and_commit/db_store/1 177.1±29.90µs 216.4±20.12µs +22.19%
put_and_commit/db_store/10 1707.0±184.37µs 1524.1±249.62µs -10.71%
put_and_commit/db_store/100 16.6±1.77ms 15.4±2.30ms -7.23%
put_and_commit/db_store/5 891.4±87.00µs 877.1±91.31µs -1.60%
put_and_commit/db_store/50 8.3±0.91ms 7.8±1.17ms -6.02%
put_and_commit/mem_store/1 122.4±16.08µs 118.0±15.09µs -3.59%
put_and_commit/mem_store/10 1180.8±153.45µs 1012.5±196.46µs -14.25%
put_and_commit/mem_store/100 11.1±1.32ms 10.8±2.33ms -2.70%
put_and_commit/mem_store/5 582.3±71.07µs 576.3±96.85µs -1.03%
put_and_commit/mem_store/50 5.9±0.69ms 4.3±0.88ms -27.12%
query_block/query_block_in(10)_times(100) 7.6±1.25ms 8.2±0.29ms +7.89%
query_block/query_block_in(10)_times(1000) 75.3±12.82ms 81.9±6.80ms +8.76%
query_block/query_block_in(10)_times(10000) 798.5±123.66ms 760.3±98.56ms -4.78%
query_block/query_block_in(1000)_times(100) 2.1±0.19ms 1848.4±138.86µs -11.98%
query_block/query_block_in(1000)_times(1000) 22.6±0.86ms 20.9±1.30ms -7.52%
query_block/query_block_in(1000)_times(10000) 233.8±8.39ms 209.7±10.55ms -10.31%
storage_transaction 1912.3±925.93µs 2.1±0.96ms +9.82%
vm/transaction_execution/1 655.7±17.67ms 586.2±57.26ms -10.60%
vm/transaction_execution/10 205.8±11.40ms 175.7±9.04ms -14.63%
vm/transaction_execution/20 178.7±10.85ms 167.3±15.29ms -6.38%
vm/transaction_execution/5 265.0±7.18ms 228.2±19.78ms -13.89%
vm/transaction_execution/50 192.1±26.38ms 205.5±11.19ms +6.98%

@simonjiao simonjiao force-pushed the rollback-dag-height-to-zero branch from 1ad7c4f to b393b0f Compare May 27, 2024 06:51
@simonjiao
Copy link
Collaborator Author

simonjiao commented May 27, 2024

failed test cases in test_block_chain.rs when configuring test network as dag chain:

-     test_block_chain_for_dag_fork
-     test_block_chain_txn_info_fork_mapping
-     test_find_ancestor_fork:
-     test_random_uncle
-     test_switch_epoch
-     test_uncle
-     test_uncle_exist
-     test_uncle_in_diff_epoch
-     test_uncle_son

simonjiao and others added 5 commits May 31, 2024 13:47
* init dag when executing genesis block
* fix check_dag_type
* restore dag_fork_height
* build dev network as dag chain
* Update generated genesis
@simonjiao simonjiao force-pushed the rollback-dag-height-to-zero branch from c119a02 to 0ed3a57 Compare May 31, 2024 05:47
* only initialize dag genesis when executing genesis block
* only get tips against genesis hash
Copy link

Benchmark for 87967c6

Click to view benchmark
Test Base PR %
accumulator_append 1198.9±271.57µs 1294.1±170.01µs +7.94%
block_apply/block_apply_10 592.1±33.58ms 518.2±57.99ms -12.48%
block_apply/block_apply_1000 62.0±2.76s 64.2±2.69s +3.55%
get_with_proof/db_store 86.1±10.47µs 82.2±6.44µs -4.53%
get_with_proof/mem_store 59.8±7.89µs 65.3±6.61µs +9.20%
put_and_commit/db_store/1 200.9±21.02µs 196.7±20.98µs -2.09%
put_and_commit/db_store/10 1708.7±183.24µs 1717.8±191.46µs +0.53%
put_and_commit/db_store/100 14.7±1.80ms 15.0±1.19ms +2.04%
put_and_commit/db_store/5 878.8±81.46µs 899.9±86.02µs +2.40%
put_and_commit/db_store/50 7.6±0.84ms 8.5±0.63ms +11.84%
put_and_commit/mem_store/1 119.9±10.77µs 120.2±16.49µs +0.25%
put_and_commit/mem_store/10 1151.8±109.98µs 1143.9±129.02µs -0.69%
put_and_commit/mem_store/100 10.2±1.11ms 10.8±1.46ms +5.88%
put_and_commit/mem_store/5 614.6±59.70µs 584.5±54.52µs -4.90%
put_and_commit/mem_store/50 5.5±0.97ms 5.8±0.30ms +5.45%
query_block/query_block_in(10)_times(100) 8.2±0.92ms 8.0±0.31ms -2.44%
query_block/query_block_in(10)_times(1000) 79.8±5.89ms 79.9±7.15ms +0.13%
query_block/query_block_in(10)_times(10000) 781.6±26.29ms 793.1±43.76ms +1.47%
query_block/query_block_in(1000)_times(100) 2.2±0.17ms 2.2±0.06ms 0.00%
query_block/query_block_in(1000)_times(1000) 20.4±1.19ms 22.4±1.00ms +9.80%
query_block/query_block_in(1000)_times(10000) 225.0±2.71ms 222.8±12.93ms -0.98%
storage_transaction 1544.5±589.82µs 1760.1±766.98µs +13.96%
vm/transaction_execution/1 554.0±42.28ms 660.1±31.27ms +19.15%
vm/transaction_execution/10 188.7±14.45ms 210.8±10.15ms +11.71%
vm/transaction_execution/20 171.3±7.76ms 197.5±5.36ms +15.29%
vm/transaction_execution/5 229.6±17.82ms 247.0±11.90ms +7.58%
vm/transaction_execution/50 194.1±12.46ms 229.6±10.90ms +18.29%

@simonjiao simonjiao force-pushed the rollback-dag-height-to-zero branch from 2f126b1 to e929f99 Compare June 3, 2024 10:25
@simonjiao
Copy link
Collaborator Author

failed test (incompleted)
test_verified_client_for_dag

@jackzhhuang
Copy link
Collaborator

failed test (incompleted) test_verified_client_for_dag

Ignore or delete this case because get_dag_block_children will not be used for now.

@simonjiao
Copy link
Collaborator Author

simonjiao commented Jun 4, 2024

failed test (incompleted) test_verified_client_for_dag

Ignore or delete this case because get_dag_block_children will not be used for now.

Please give starcoin-sync a full test run to check out other failed or timeout test cases. And remove more unused codes, DONOT waste other members' time. Thanks a lot!

Copy link

github-actions bot commented Jun 4, 2024

Benchmark for f81af62

Click to view benchmark
Test Base PR %
accumulator_append 984.2±235.05µs 1004.8±242.57µs +2.09%
block_apply/block_apply_10 514.0±62.39ms 415.0±20.98ms -19.26%
block_apply/block_apply_1000 50.4±2.88s 50.5±3.89s +0.20%
get_with_proof/db_store 54.5±11.37µs 75.1±11.32µs +37.80%
get_with_proof/mem_store 54.2±12.31µs 64.1±3.81µs +18.27%
put_and_commit/db_store/1 153.0±39.46µs 148.5±33.16µs -2.94%
put_and_commit/db_store/10 1598.5±369.45µs 1184.1±169.37µs -25.92%
put_and_commit/db_store/100 12.8±2.29ms 14.9±2.67ms +16.41%
put_and_commit/db_store/5 675.1±162.64µs 817.8±197.31µs +21.14%
put_and_commit/db_store/50 7.0±1.31ms 6.7±1.47ms -4.29%
put_and_commit/mem_store/1 80.1±16.50µs 100.5±22.64µs +25.47%
put_and_commit/mem_store/10 793.0±164.30µs 803.2±185.97µs +1.29%
put_and_commit/mem_store/100 9.5±1.83ms 8.0±1.93ms -15.79%
put_and_commit/mem_store/5 439.3±107.24µs 410.3±103.06µs -6.60%
put_and_commit/mem_store/50 5.0±0.83ms 5.0±1.07ms 0.00%
query_block/query_block_in(10)_times(100) 6.6±0.79ms 6.1±0.97ms -7.58%
query_block/query_block_in(10)_times(1000) 76.7±10.00ms 61.3±11.66ms -20.08%
query_block/query_block_in(10)_times(10000) 611.9±129.65ms 561.3±86.06ms -8.27%
query_block/query_block_in(1000)_times(100) 1634.8±413.83µs 1486.1±207.20µs -9.10%
query_block/query_block_in(1000)_times(1000) 18.6±3.96ms 13.1±2.47ms -29.57%
query_block/query_block_in(1000)_times(10000) 175.4±32.36ms 167.2±30.76ms -4.68%
storage_transaction 1486.5±670.25µs 1369.3±557.77µs -7.88%
vm/transaction_execution/1 516.0±63.24ms 537.7±59.72ms +4.21%
vm/transaction_execution/10 170.2±17.67ms 172.2±9.51ms +1.18%
vm/transaction_execution/20 136.8±10.67ms 158.1±9.74ms +15.57%
vm/transaction_execution/5 194.9±19.89ms 226.4±13.08ms +16.16%
vm/transaction_execution/50 153.1±9.55ms 177.4±12.51ms +15.87%

@jackzhhuang
Copy link
Collaborator

failed test (incompleted) test_verified_client_for_dag

Ignore or delete this case because get_dag_block_children will not be used for now.

Please give starcoin-sync a full test run to check out other failed or timeout test cases. And remove more unused codes, DONOT waste other members' time. Thanks a lot!

Sorry about that.
I fix that in #4127.
If you're not familiar with the code, I'd be happy to help.

@simonjiao simonjiao closed this Jun 5, 2024
@simonjiao simonjiao deleted the rollback-dag-height-to-zero branch June 20, 2024 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants