Skip to content

Commit 6672dd3

Browse files
committed
Separate cell for Soroban limits
1 parent 7112ab0 commit 6672dd3

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

scripts/resource-calc.ipynb

+20-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,20 @@
99
},
1010
{
1111
"cell_type": "code",
12-
"execution_count": 102,
12+
"execution_count": null,
13+
"metadata": {},
14+
"outputs": [],
15+
"source": [
16+
"########### Soroban limits\n",
17+
"SOROBAN_READ_ENTRIES_PER_TX = 40\n",
18+
"SOROBAN_WRITE_ENTRIES_PER_TX = 25\n",
19+
"SOROBAN_WRITE_BYTES_PER_TX = 129*1024\n",
20+
"SOROBAN_EVENT_SIZE_PER_TX = 16*1024"
21+
]
22+
},
23+
{
24+
"cell_type": "code",
25+
"execution_count": null,
1326
"metadata": {},
1427
"outputs": [],
1528
"source": [
@@ -48,15 +61,15 @@
4861
"\n",
4962
" # soroban\n",
5063
" # max number of LE reads\n",
51-
" LE_reads_per_op['soroban'] = 40\n",
64+
" LE_reads_per_op['soroban'] = SOROBAN_READ_ENTRIES_PER_TX\n",
5265
" # max number of LE writes\n",
53-
" LE_writes_per_op['soroban'] = 25\n",
66+
" LE_writes_per_op['soroban'] = SOROBAN_WRITE_ENTRIES_PER_TX\n",
5467
" # write as much as possible, use max allowed per tx\n",
5568
" # note that this also impacts the total of amount read per tx\n",
5669
" # but as tx also need to load wasm blobs, in average is probably fine\n",
57-
" LE_size['soroban'] = (129*1024)/LE_writes_per_op['soroban']\n",
70+
" LE_size['soroban'] = (SOROBAN_WRITE_BYTES_PER_TX) / LE_writes_per_op['soroban']\n",
5871
" # max event produced\n",
59-
" event_size_per_op['soroban'] = 16*1024\n",
72+
" event_size_per_op['soroban'] = SOROBAN_EVENT_SIZE_PER_TX\n",
6073
"\n",
6174
" # speedex\n",
6275
" LE_reads_per_op['speedex'] = 4\n",
@@ -81,9 +94,9 @@
8194
" # avg number of LE writes\n",
8295
" LE_writes_per_op['soroban'] = 5\n",
8396
" # use a 10th of capacity\n",
84-
" LE_size['soroban'] = (129*1024)/LE_writes_per_op['soroban']/10\n",
97+
" LE_size['soroban'] = SOROBAN_WRITE_BYTES_PER_TX / LE_writes_per_op['soroban']/10\n",
8598
" # event produced is 50% of max\n",
86-
" event_size_per_op['soroban'] = 16*1024/2\n",
99+
" event_size_per_op['soroban'] = SOROBAN_EVENT_SIZE_PER_TX / 2\n",
87100
"\n",
88101
" # speedex\n",
89102
" LE_reads_per_op['speedex'] = 4\n",

0 commit comments

Comments
 (0)