Files
zeekayandHanzo Dev 920d56f2ec Carry the P and X chain packages the node still held
The platform and exchange VMs are the last chain code living in luxfi/node
and the reason the node cannot be retired. This brings over the part of them
proto did not already have: the adopt registry, the ZAP wire generators for
signer, warp and validator fees, the hybrid and runtime proof-of-possession
signers, the native admission check, the zwarp client and server, the
X-chain network layer, the xvmroot state root, the batch verifier and owner
root, and the credential policy the P and X mempools share, which lands
beside the mempool it gates as proto/txs/auth.

The X-chain genesis builder moves into proto/x/genesis, where the codec it
calls already lives, so it no longer reaches for the xvm package to build
primary-asset bytes.

Imports point at the packages that already have homes: cache, upgrade,
version and util as their own modules, and gas, verify and index in
luxfi/vm. The three generated files bring github.com/zap-proto/go with them,
which requires go 1.26.5.

Most of the remaining difference between the node's trees and proto is not a
backlog. proto restructured this code in August and the node's copies predate
it, so files that look absent are largely present here under other names.
What genuinely cannot come yet is anything reaching for node/server/http,
node/vms or node/wallet, and the tests written against tx constructors
proto's tx layer no longer exports.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-06 11:46:03 -07:00

221 lines
6.9 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/luxfi/proto/p/fx (interfaces: Fx,Owner)
//
// Generated by this command:
//
// mockgen -package=fx -destination=vms/platformvm/fx/mock_fx.go github.com/luxfi/proto/p/fx Fx,Owner
//
// Package fx is a generated GoMock package.
package fx
import (
"context"
"go.uber.org/mock/gomock"
"github.com/luxfi/runtime"
reflect "reflect"
verify "github.com/luxfi/vm/components/verify"
)
// MockFx is a mock of Fx interface.
type MockFx struct {
ctrl *gomock.Controller
recorder *MockFxMockRecorder
}
// MockFxMockRecorder is the mock recorder for MockFx.
type MockFxMockRecorder struct {
mock *MockFx
}
// NewMockFx creates a new mock instance.
func NewMockFx(ctrl *gomock.Controller) *MockFx {
mock := &MockFx{ctrl: ctrl}
mock.recorder = &MockFxMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockFx) EXPECT() *MockFxMockRecorder {
return m.recorder
}
// Bootstrapped mocks base method.
func (m *MockFx) Bootstrapped() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Bootstrapped")
ret0, _ := ret[0].(error)
return ret0
}
// Bootstrapped indicates an expected call of Bootstrapped.
func (mr *MockFxMockRecorder) Bootstrapped() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrapped", reflect.TypeOf((*MockFx)(nil).Bootstrapped))
}
// Bootstrapping mocks base method.
func (m *MockFx) Bootstrapping() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Bootstrapping")
ret0, _ := ret[0].(error)
return ret0
}
// Bootstrapping indicates an expected call of Bootstrapping.
func (mr *MockFxMockRecorder) Bootstrapping() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Bootstrapping", reflect.TypeOf((*MockFx)(nil).Bootstrapping))
}
// CreateOutput mocks base method.
func (m *MockFx) CreateOutput(arg0 uint64, arg1 any) (any, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateOutput", arg0, arg1)
ret0, _ := ret[0].(any)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateOutput indicates an expected call of CreateOutput.
func (mr *MockFxMockRecorder) CreateOutput(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOutput", reflect.TypeOf((*MockFx)(nil).CreateOutput), arg0, arg1)
}
// Initialize mocks base method.
func (m *MockFx) Initialize(arg0 any) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Initialize", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Initialize indicates an expected call of Initialize.
func (mr *MockFxMockRecorder) Initialize(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Initialize", reflect.TypeOf((*MockFx)(nil).Initialize), arg0)
}
// VerifyPermission mocks base method.
func (m *MockFx) VerifyPermission(arg0, arg1, arg2, arg3 any) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "VerifyPermission", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(error)
return ret0
}
// VerifyPermission indicates an expected call of VerifyPermission.
func (mr *MockFxMockRecorder) VerifyPermission(arg0, arg1, arg2, arg3 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyPermission", reflect.TypeOf((*MockFx)(nil).VerifyPermission), arg0, arg1, arg2, arg3)
}
// VerifyTransfer mocks base method.
func (m *MockFx) VerifyTransfer(arg0, arg1, arg2, arg3 any) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "VerifyTransfer", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(error)
return ret0
}
// VerifyTransfer indicates an expected call of VerifyTransfer.
func (mr *MockFxMockRecorder) VerifyTransfer(arg0, arg1, arg2, arg3 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyTransfer", reflect.TypeOf((*MockFx)(nil).VerifyTransfer), arg0, arg1, arg2, arg3)
}
// VerifyOperation mocks base method.
func (m *MockFx) VerifyOperation(arg0, arg1, arg2 any, arg3 []any) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "VerifyOperation", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(error)
return ret0
}
// VerifyOperation indicates an expected call of VerifyOperation.
func (mr *MockFxMockRecorder) VerifyOperation(arg0, arg1, arg2, arg3 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyOperation", reflect.TypeOf((*MockFx)(nil).VerifyOperation), arg0, arg1, arg2, arg3)
}
// MockOwner is a mock of Owner interface.
type MockOwner struct {
verify.IsNotState
ctrl *gomock.Controller
recorder *MockOwnerMockRecorder
}
// MockOwnerMockRecorder is the mock recorder for MockOwner.
type MockOwnerMockRecorder struct {
mock *MockOwner
}
// NewMockOwner creates a new mock instance.
func NewMockOwner(ctrl *gomock.Controller) *MockOwner {
mock := &MockOwner{ctrl: ctrl}
mock.recorder = &MockOwnerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockOwner) EXPECT() *MockOwnerMockRecorder {
return m.recorder
}
// InitRuntime mocks base method.
func (m *MockOwner) InitRuntime(arg0 *runtime.Runtime) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "InitRuntime", arg0)
}
// InitRuntime indicates an expected call of InitRuntime.
func (mr *MockOwnerMockRecorder) InitRuntime(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitRuntime", reflect.TypeOf((*MockOwner)(nil).InitRuntime), arg0)
}
// InitializeRuntime mocks base method (delegates to InitRuntime for compatibility).
func (m *MockOwner) InitializeRuntime(arg0 context.Context) error {
// This method exists for interface compatibility but does nothing
// The actual context initialization is handled via InitRuntime with runtime.Runtime
return nil
}
// InitializeRuntime indicates an expected call of InitializeRuntime.
func (mr *MockOwnerMockRecorder) InitializeRuntime(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitializeRuntime", reflect.TypeOf((*MockOwner)(nil).InitializeRuntime), arg0)
}
// Verify mocks base method.
func (m *MockOwner) Verify() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Verify")
ret0, _ := ret[0].(error)
return ret0
}
// Verify indicates an expected call of Verify.
func (mr *MockOwnerMockRecorder) Verify() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockOwner)(nil).Verify))
}
// isState mocks base method.
func (m *MockOwner) isState() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "isState")
ret0, _ := ret[0].(error)
return ret0
}
// isState indicates an expected call of isState.
func (mr *MockOwnerMockRecorder) isState() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "isState", reflect.TypeOf((*MockOwner)(nil).isState))
}