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

Separate cell for Soroban limits in resource calculator for readability #4550

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions scripts/resource-calc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,20 @@
},
{
"cell_type": "code",
"execution_count": 102,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"########### Soroban limits\n",
"SOROBAN_READ_ENTRIES_PER_TX = 40\n",
"SOROBAN_WRITE_ENTRIES_PER_TX = 25\n",
"SOROBAN_WRITE_BYTES_PER_TX = 129*1024\n",
"SOROBAN_EVENT_SIZE_PER_TX = 16*1024"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -48,15 +61,15 @@
"\n",
" # soroban\n",
" # max number of LE reads\n",
" LE_reads_per_op['soroban'] = 40\n",
" LE_reads_per_op['soroban'] = SOROBAN_READ_ENTRIES_PER_TX\n",
" # max number of LE writes\n",
" LE_writes_per_op['soroban'] = 25\n",
" LE_writes_per_op['soroban'] = SOROBAN_WRITE_ENTRIES_PER_TX\n",
" # write as much as possible, use max allowed per tx\n",
" # note that this also impacts the total of amount read per tx\n",
" # but as tx also need to load wasm blobs, in average is probably fine\n",
" LE_size['soroban'] = (129*1024)/LE_writes_per_op['soroban']\n",
" LE_size['soroban'] = (SOROBAN_WRITE_BYTES_PER_TX) / LE_writes_per_op['soroban']\n",
" # max event produced\n",
" event_size_per_op['soroban'] = 16*1024\n",
" event_size_per_op['soroban'] = SOROBAN_EVENT_SIZE_PER_TX\n",
"\n",
" # speedex\n",
" LE_reads_per_op['speedex'] = 4\n",
Expand All @@ -81,9 +94,9 @@
" # avg number of LE writes\n",
" LE_writes_per_op['soroban'] = 5\n",
" # use a 10th of capacity\n",
" LE_size['soroban'] = (129*1024)/LE_writes_per_op['soroban']/10\n",
" LE_size['soroban'] = SOROBAN_WRITE_BYTES_PER_TX / LE_writes_per_op['soroban']/10\n",
" # event produced is 50% of max\n",
" event_size_per_op['soroban'] = 16*1024/2\n",
" event_size_per_op['soroban'] = SOROBAN_EVENT_SIZE_PER_TX / 2\n",
"\n",
" # speedex\n",
" LE_reads_per_op['speedex'] = 4\n",
Expand Down
Loading