Last active
September 19, 2024 11:15
-
-
Save nholland94/b4546284029006cf7b4d177c6ce84908 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
max_zkapp_account_updates = 6 | |
max_zkapp_txns_per_block = 128 | |
max_txns_per_block = 128 | |
max_txn_pool_size = 3000 | |
k = 290 | |
est_blocks = 3*k # 2*k for best tip path, k for duplicate block producers | |
est_scan_states = 2*k # k for best tip path, k for duplicate block producers | |
payment_txn_size = 3072-1968 | |
zkapp_txn_size_max_cost = 235312 | |
zkapp_base_work_size = 422864 | |
payment_base_work_size = 3072 | |
merge_work_size = 69480 | |
# zkapp_account_update_proof_size = 27704 | |
zkapp_account_size = 8018 | |
merkle_path_size = 3376 | |
scan_state_base = est_scan_states*max_zkapp_txns_per_block*zkapp_base_work_size + est_scan_states*(max_txns_per_block-max_zkapp_txns_per_block)*payment_base_work_size | |
scan_state_merge = est_scan_states*(max_txns_per_block-1)*merge_work_size | |
staged_ledger_diffs = est_blocks*max_zkapp_txns_per_block*zkapp_txn_size_max_cost + est_blocks*(max_txns_per_block-max_zkapp_txns_per_block)*payment_txn_size | |
ledger_masks = est_blocks*max_zkapp_txns_per_block*max_zkapp_account_updates*zkapp_account_size + est_blocks*max_zkapp_txns_per_block*max_zkapp_account_updates*merkle_path_size + est_blocks*(max_txns_per_block-max_zkapp_txns_per_block)*2*zkapp_account_size + est_blocks*(max_txns_per_block-max_zkapp_txns_per_block)*2*merkle_path_size | |
transaction_pool = max_txn_pool_size*zkapp_txn_size_max_cost | |
# snark_pool = max_txns_per_block*3 + 64*2 + 32*2 + 16*2 + 8*2 + 4*2 + 2*2 + 2 | |
snark_pool = 2*est_blocks*256*3*27704 | |
print('scan_state_base = %dmb' % (scan_state_base / 1024 / 1024)) | |
print('scan_state_merge = %dmb' % (scan_state_merge / 1024 / 1024)) | |
print('staged_ledger_diffs = %dmb' % (staged_ledger_diffs / 1024 / 1024)) | |
print('ledger_masks = %dmb' % (ledger_masks / 1024 / 1024)) | |
print('transaction_pool = %dmb' % (transaction_pool / 1024 / 1024)) | |
print('snark_pool = %dmb' % (snark_pool / 1024 / 1024)) | |
# print('sum = %dmb' % ((scan_state_base+scan_state_merge+staged_ledger_diffs+merkle_path_size+transaction_pool+snark_pool) / 1024 / 1024)) | |
print('sum = %dmb' % ((scan_state_base+scan_state_merge+staged_ledger_diffs+merkle_path_size+transaction_pool) / 1024 / 1024)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment