Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches: [main, "release/**"]
pull_request:
branches: [main, "release/**"]
merge_group:
types: [checks_requested]
workflow_dispatch:

concurrency:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/libevm-delta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches: [main, "release/**"]
pull_request:
branches: [main, "release/**"]
merge_group:
types: [checks_requested]
workflow_dispatch:

concurrency:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches: [main, "release/**"]
pull_request:
branches: [main, "release/**"]
merge_group:
types: [checks_requested]
workflow_dispatch:

permissions:
Expand Down
6 changes: 0 additions & 6 deletions core/types/rlp_payload.libevm.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"fmt"
"io"

"github.com/ava-labs/libevm/common"
"github.com/ava-labs/libevm/libevm/pseudo"
"github.com/ava-labs/libevm/libevm/register"
"github.com/ava-labs/libevm/libevm/testonly"
Expand Down Expand Up @@ -366,8 +365,3 @@ func (e *StateAccountExtra) Format(s fmt.State, verb rune) {
}
_, _ = s.Write([]byte(out))
}

// RLPHash returns the hash of the RLP encoding of `x`.
func RLPHash(x any) common.Hash {
return rlpHash(x)
}
36 changes: 2 additions & 34 deletions params/version.libevm.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@

package params

import "fmt"

const (
LibEVMVersionMajor = 0
LibEVMVersionMinor = 1
LibEVMVersionMinor = 2
LibEVMVersionPatch = 0

LibEVMReleaseType ReleaseType = BetaRelease
Expand Down Expand Up @@ -50,23 +48,7 @@ const (
// triplet.
//
// [semver v2]: https://semver.org/
var LibEVMVersion = func() string {
v := libEVMSemver{
geth: semverTriplet{VersionMajor, VersionMinor, VersionPatch},
libEVM: semverTriplet{LibEVMVersionMajor, LibEVMVersionMinor, LibEVMVersionPatch},
typ: LibEVMReleaseType,
rc: libEVMReleaseCandidate,
}
return v.String()
}()

type semverTriplet struct {
major, minor, patch uint
}

func (t semverTriplet) String() string {
return fmt.Sprintf("%d.%d.%d", t.major, t.minor, t.patch)
}
const LibEVMVersion = "1.13.14-0.2.0.beta"

// A ReleaseType is a suffix for [LibEVMVersion].
type ReleaseType string
Expand All @@ -86,17 +68,3 @@ const (
func (t ReleaseType) ForReleaseBranch() bool {
return t == ReleaseCandidate || t == ProductionRelease
}

type libEVMSemver struct {
geth, libEVM semverTriplet
typ ReleaseType
rc uint
}

func (v libEVMSemver) String() string {
suffix := v.typ
if suffix == ReleaseCandidate {
suffix = ReleaseType(fmt.Sprintf("%s.%d", suffix, v.rc))
}
return fmt.Sprintf("%s-%s.%s", v.geth, v.libEVM, suffix)
}
43 changes: 34 additions & 9 deletions params/version.libevm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,47 @@
package params

import (
"fmt"
"testing"

"github.com/stretchr/testify/assert"
"golang.org/x/mod/semver"
)

func TestLibEVMVersioning(t *testing.T) {
// We have an unusual version structure as defined by [LibEVMVersion] that
// is easy to mess up, so it's easier to just automate it and test the
// ordering assumptions.
// libEVMServer automates the version rules described by the [LibEVMVersion]
// documentation.
type libEVMSemver struct {
geth, libEVM semverTriplet
typ ReleaseType
rc uint
}

// This is a deliberate change-detector test to provide us with a copyable
// string of the current version, useful for git tagging.
const curr = "1.13.14-0.1.0.beta"
if got, want := LibEVMVersion, curr; got != want {
t.Errorf("got LibEVMVersion %q; want %q", got, want)
func (v libEVMSemver) String() string {
suffix := v.typ
if suffix == ReleaseCandidate {
suffix = ReleaseType(fmt.Sprintf("%s.%d", suffix, v.rc))
}
return fmt.Sprintf("%s-%s.%s", v.geth, v.libEVM, suffix)
}

type semverTriplet struct {
major, minor, patch uint
}

func (t semverTriplet) String() string {
return fmt.Sprintf("%d.%d.%d", t.major, t.minor, t.patch)
}

func TestLibEVMVersioning(t *testing.T) {
t.Run("current", func(t *testing.T) {
want := libEVMSemver{
geth: semverTriplet{VersionMajor, VersionMinor, VersionPatch},
libEVM: semverTriplet{LibEVMVersionMajor, LibEVMVersionMinor, LibEVMVersionPatch},
typ: LibEVMReleaseType,
rc: libEVMReleaseCandidate,
}.String()
assert.Equal(t, want, LibEVMVersion, "LibEVMVersion")
})

ordered := []libEVMSemver{
{
Expand Down
Loading