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

reproducer / visualizer #2095 #4

Closed
wants to merge 5 commits into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ class ErgoTransactionSpec extends ErgoPropertyTest with ErgoTestConstants {
}

property("transaction with too many inputs should be rejected") {
// stress-test https://github.com/ergoplatform/ergo/issues/2095
for (iii <- 1 to 50) {


//we assume that verifier must finish verification of any script in less time than 250K hash calculations
// (for the Blake2b256 hash function over a single block input)
Expand Down Expand Up @@ -366,8 +369,10 @@ class ErgoTransactionSpec extends ErgoPropertyTest with ErgoTestConstants {
val (_, time) = BenchmarkUtil.measureTime(
tx.statefulValidity(from, IndexedSeq(), sc)(verifier)
)
printf("%d: %d > %d (Timeout/2)\n", iii, time, Timeout/2)
assert(time > Timeout/2)
} // test-loop

assert(time > Timeout)
}

property("transaction cost") {
Expand Down
Loading