diff --git a/pkg/core/util.go b/pkg/core/util.go index 5a963c80c..8600d4b41 100644 --- a/pkg/core/util.go +++ b/pkg/core/util.go @@ -51,7 +51,7 @@ func createGenesisBlock(cfg config.ProtocolConfiguration) (*block.Block, error) NextConsensus: nextConsensus, Script: transaction.Witness{ InvocationScript: []byte{}, - VerificationScript: []byte{byte(opcode.OLDPUSH1)}, + VerificationScript: []byte{byte(opcode.PUSH1)}, }, } diff --git a/pkg/rpc/server/testdata/testblocks.acc b/pkg/rpc/server/testdata/testblocks.acc index eaba989ac..fdea207f7 100644 Binary files a/pkg/rpc/server/testdata/testblocks.acc and b/pkg/rpc/server/testdata/testblocks.acc differ diff --git a/pkg/vm/context.go b/pkg/vm/context.go index 08c439ac4..1cecbc4f9 100644 --- a/pkg/vm/context.go +++ b/pkg/vm/context.go @@ -77,12 +77,6 @@ func (c *Context) Next() (opcode.Opcode, []byte, error) { var numtoread int switch instr { - case opcode.OLDPUSH1: - // OLDPUSH1 is used during transition to NEO3 in verification scripts. - // FIXME remove #927 - if len(c.prog) == 1 { - return opcode.PUSH1, nil, nil - } case opcode.PUSHDATA1: if c.nextip >= len(c.prog) { err = errNoInstParam diff --git a/pkg/vm/json_test.go b/pkg/vm/json_test.go index 4c35e5641..00eb106a2 100644 --- a/pkg/vm/json_test.go +++ b/pkg/vm/json_test.go @@ -135,12 +135,8 @@ func testFile(t *testing.T, filename string) { require.NoErrorf(t, json.Unmarshal(data, ut), "file: %s", filename) t.Run(ut.Category+":"+ut.Name, func(t *testing.T) { - isRot := strings.HasSuffix(filename, "ROT.json") for i := range ut.Tests { test := ut.Tests[i] - if isRot && test.Name == "Without push" { - return // FIXME #927 single ROT is interpreted as PUSH1 - } t.Run(ut.Tests[i].Name, func(t *testing.T) { prog := []byte(test.Script) vm := load(prog) diff --git a/pkg/vm/opcode/opcode.go b/pkg/vm/opcode/opcode.go index b8d56666e..76149a798 100644 --- a/pkg/vm/opcode/opcode.go +++ b/pkg/vm/opcode/opcode.go @@ -1,6 +1,6 @@ package opcode -//go:generate stringer -type=Opcode +//go:generate stringer -type=Opcode -linecomment // Opcode represents a single operation code for the NEO virtual machine. type Opcode byte @@ -87,7 +87,6 @@ const ( TUCK Opcode = 0x4E SWAP Opcode = 0x50 ROT Opcode = 0x51 - OLDPUSH1 Opcode = 0x51 // FIXME remove #927 ROLL Opcode = 0x52 REVERSE3 Opcode = 0x53 REVERSE4 Opcode = 0x54 diff --git a/pkg/vm/opcode/opcode_string.go b/pkg/vm/opcode/opcode_string.go index d5ab10d51..6b44af438 100644 --- a/pkg/vm/opcode/opcode_string.go +++ b/pkg/vm/opcode/opcode_string.go @@ -1,4 +1,4 @@ -// Code generated by "stringer -type Opcode -linecomment"; DO NOT EDIT. +// Code generated by "stringer -type=Opcode -linecomment"; DO NOT EDIT. package opcode @@ -77,7 +77,6 @@ func _() { _ = x[TUCK-78] _ = x[SWAP-80] _ = x[ROT-81] - _ = x[OLDPUSH1-81] _ = x[ROLL-82] _ = x[REVERSE3-83] _ = x[REVERSE4-84]