Skip to content

Commit

Permalink
Merge pull request #1334 from iotaledger/revert-1333-impr/memory-usage
Browse files Browse the repository at this point in the history
Revert "perf: memory usage"
  • Loading branch information
jorgemmsilva authored Sep 21, 2022
2 parents c006515 + 80ff7cc commit e7a88e1
Show file tree
Hide file tree
Showing 63 changed files with 939 additions and 388 deletions.
5 changes: 2 additions & 3 deletions contracts/wasm/corecontracts/test/core_accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import (
"math/big"
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/iotaledger/hive.go/serializer/v2"
iotago "github.com/iotaledger/iota.go/v3"
"github.com/iotaledger/wasp/packages/isc"
Expand All @@ -19,6 +16,8 @@ import (
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/coreaccounts"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/corecontracts/test/core_blob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/coreblob"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

// this is the expected blob hash for key0/val0 key1/val1
Expand Down
5 changes: 2 additions & 3 deletions contracts/wasm/corecontracts/test/core_blocklog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ package test
import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/packages/vm/core/blocklog"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/coreblocklog"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func setupBlockLog(t *testing.T) *wasmsolo.SoloContext {
Expand Down
5 changes: 2 additions & 3 deletions contracts/wasm/corecontracts/test/core_governance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ package test
import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

iotago "github.com/iotaledger/iota.go/v3"
"github.com/iotaledger/wasp/packages/vm/core/governance"
"github.com/iotaledger/wasp/packages/vm/gas"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/coregovernance"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func setupGovernance(t *testing.T) *wasmsolo.SoloContext {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/corecontracts/test/core_root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ import (
"os"
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/packages/vm/core/root"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/coreblob"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/coreroot"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func setupRoot(t *testing.T) *wasmsolo.SoloContext {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/corecontracts/test/corecontracts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/corecontracts/go/corecontracts"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func setup(t *testing.T) *wasmsolo.SoloContext {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/dividend/test/dividend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/dividend/go/dividend"
"github.com/iotaledger/wasp/packages/isc"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func dividendMember(ctx *wasmsolo.SoloContext, agent *wasmsolo.SoloAgent, factor uint64) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/donatewithfeedback/go/donatewithfeedback"
"github.com/iotaledger/wasp/packages/isc"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func setupTest(t *testing.T) *wasmsolo.SoloContext {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/erc20/test/erc20_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/erc20/go/erc20"
"github.com/iotaledger/wasp/packages/solo"
"github.com/iotaledger/wasp/packages/utxodb"
"github.com/iotaledger/wasp/packages/vm/core/corecontracts"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

var (
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/erc20/test/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/erc20/go/erc20"
"github.com/iotaledger/wasp/packages/utxodb"
"github.com/iotaledger/wasp/packages/vm/core/corecontracts"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func TestDeployErc20(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/erc721/test/erc721_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/erc721/go/erc721"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func TestDeploy(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/fairauction/test/fairauction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/fairauction/go/fairauction"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/fairroulette/test/fairroulette_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/fairroulette/go/fairroulette"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func setupTest(t *testing.T) *wasmsolo.SoloContext {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ import (
"flag"
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/gascalibration"
"github.com/iotaledger/wasp/contracts/wasm/gascalibration/executiontime/go/executiontime"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

var force = flag.Bool("force", false, "")
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/gascalibration/memory/test/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ import (
"flag"
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/gascalibration"
"github.com/iotaledger/wasp/contracts/wasm/gascalibration/memory/go/memory"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

var force = flag.Bool("force", false, "")
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/gascalibration/storage/test/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ import (
"flag"
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/gascalibration"
"github.com/iotaledger/wasp/contracts/wasm/gascalibration/storage/go/storage"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

var force = flag.Bool("force", false, "")
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/helloworld/test/helloworld_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/helloworld/go/helloworld"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func setupTest(t *testing.T) *wasmsolo.SoloContext {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/inccounter/test/inccounter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/inccounter/go/inccounter"
"github.com/iotaledger/wasp/packages/wasmvm/wasmhost"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func setupTest(t *testing.T) *wasmsolo.SoloContext {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/schemacomment/test/schemacomment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/schemacomment/go/schemacomment"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func TestDeploy(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/testcore/test/call_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/testcore/go/testcore"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/wasmtypes"
"github.com/stretchr/testify/require"
)

// N Fib(N) Calls
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/testcore/test/check_ctx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/testcore/go/testcore"
"github.com/stretchr/testify/require"
)

func TestMainCallsFromFullEP(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/testcore/test/concurrency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/testcore/go/testcore"
"github.com/iotaledger/wasp/packages/kv/codec"
"github.com/iotaledger/wasp/packages/solo"
"github.com/iotaledger/wasp/packages/utxodb"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func TestCounter(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/testcore/test/init_fail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/testcore/go/testcore"
"github.com/iotaledger/wasp/packages/vm/core/corecontracts"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func TestInitSuccess(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/testcore/test/misc_call_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/testcore/go/testcore"
"github.com/stretchr/testify/require"
)

func TestChainOwnerIDView(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/testcore/test/offledger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/testcore/go/testcore"
"github.com/iotaledger/wasp/packages/utxodb"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func TestOffLedgerFailNoAccount(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/testcore/test/sandbox_panic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import (
"strings"
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/testcore/go/testcore"
"github.com/iotaledger/wasp/packages/vm/core/testcore/sbtests/sbtestsc"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func verifyErrorInReceipts(t *testing.T, ctx *wasmsolo.SoloContext, msg string) {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/testcore/test/spawn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/testcore/go/testcore"
"github.com/iotaledger/wasp/packages/vm/core/corecontracts"
"github.com/stretchr/testify/require"
)

func TestSpawn(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/testcore/test/testcore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"fmt"
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/testcore/go/testcore"
"github.com/iotaledger/wasp/packages/solo"
"github.com/iotaledger/wasp/packages/util"
Expand All @@ -15,6 +13,7 @@ import (
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/coreaccounts"
"github.com/iotaledger/wasp/packages/wasmvm/wasmlib/go/wasmlib/coreroot"
"github.com/iotaledger/wasp/packages/wasmvm/wasmsolo"
"github.com/stretchr/testify/require"
)

func deployTestCore(t *testing.T, runWasm bool, addCreator ...bool) *wasmsolo.SoloContext {
Expand Down
3 changes: 1 addition & 2 deletions contracts/wasm/testcore/test/transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ package test
import (
"testing"

"github.com/stretchr/testify/require"

"github.com/iotaledger/wasp/contracts/wasm/testcore/go/testcore"
"github.com/iotaledger/wasp/packages/isc"
"github.com/iotaledger/wasp/packages/solo"
"github.com/stretchr/testify/require"
)

func TestDoNothing(t *testing.T) {
Expand Down
Loading

0 comments on commit e7a88e1

Please sign in to comment.