-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce gas prices for aggregate verifications
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
- Loading branch information
Jakub Sztandera
committed
May 27, 2021
1 parent
2b93bcd
commit cb59daf
Showing
3 changed files
with
101 additions
and
7 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package vm | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestStepGasCost(t *testing.T) { | ||
s := stepCost{ | ||
{4, 103994170}, | ||
{7, 112356810}, | ||
{13, 122912610}, | ||
{26, 137559930}, | ||
{52, 162039100}, | ||
{103, 210960780}, | ||
{205, 318351180}, | ||
{410, 528274980}, | ||
} | ||
|
||
assert.EqualValues(t, 0, s.Lookup(0)) | ||
assert.EqualValues(t, 0, s.Lookup(3)) | ||
assert.EqualValues(t, 103994170, s.Lookup(4)) | ||
assert.EqualValues(t, 103994170, s.Lookup(6)) | ||
assert.EqualValues(t, 112356810, s.Lookup(7)) | ||
assert.EqualValues(t, 210960780, s.Lookup(103)) | ||
assert.EqualValues(t, 210960780, s.Lookup(204)) | ||
assert.EqualValues(t, 318351180, s.Lookup(205)) | ||
assert.EqualValues(t, 318351180, s.Lookup(409)) | ||
assert.EqualValues(t, 528274980, s.Lookup(410)) | ||
assert.EqualValues(t, 528274980, s.Lookup(10000000000)) | ||
} |