Skip to content

Commit 71dfc70

Browse files
committed
Fix 1 Teragas/second -> 1 Teragas/millisecond
1 parent b71ee34 commit 71dfc70

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/GAS.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ multiple ways:
4545

4646
## Gas overflow potential
4747

48-
CosmWasm gas aims for 1 Teragas/second, i.e. the uint64 range exceeds after 18
49-
billion seconds (213 days)<sup>1</sup>. Assuming a max supported block execution
50-
time of 100 seconds, the gas price has to be over-priced by a factor of 184
51-
million (184 Petagas/second) in order to exceed the uint64 range<sup>2</sup>.
48+
CosmWasm gas aims for 1 Teragas/millisecond, i.e. the uint64 range exceeds after
49+
18 million seconds (5 hours)<sup>1</sup>. Assuming a max supported block
50+
execution time of 30 seconds, the gas price has to be over-priced by a factor of
51+
614 (614 Teragas/millisecond) in order to exceed the uint64 range<sup>2</sup>.
5252
Since serious over or underpricing is considered a bug, using uint64 for gas
53-
mesurments is considered safe.
53+
measurements is considered safe.
5454

5555
Cosmos SDK gas uses values that are smaller by a factor of 150_000, so those
5656
don't overflow as well. Since no Cosmos SDK gas values are processed inside of
@@ -62,6 +62,6 @@ their JSON implementation. Go and Rust do that while many other implementations
6262
don't support integers numbers and convert to them to IEEE-754 doubles, which
6363
has a safe integer range up about 53 bit (e.g. JavaScript and jq).
6464

65-
<sup>1</sup> Python3: `(2**64-1) / 10**12`
65+
<sup>1</sup> Python3: `(2**64-1)/1000 / 10**12`
6666

67-
<sup>2</sup> Python3: `((2**64-1)/100) / 10**12`
67+
<sup>2</sup> Python3: `((2**64-1)/1000/30) / 10**122`

0 commit comments

Comments
 (0)