accounts

package
v1.7.13-patch1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2024 License: GPL-3.0 Imports: 18 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthPeerAccountData        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPeerAccountData          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPeerAccountData = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthUserAccountData        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowUserAccountData          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupUserAccountData = fmt.Errorf("proto: unexpected end of group")
)

Functions

func NewPeerAccount

func NewPeerAccount(address []byte) (*peerAccount, error)

NewPeerAccount creates a new instance of peerAccount

func NewUserAccount

func NewUserAccount(
	address []byte,
	trackableDataTrie state.DataTrieTracker,
	trieLeafParser common.TrieLeafParser,
) (*userAccount, error)

NewUserAccount creates a new instance of user account

Types

type PeerAccountData

type PeerAccountData struct {
	BLSPublicKey                        []byte        `protobuf:"bytes,1,opt,name=BLSPublicKey,proto3" json:"blsPublicKey"`
	RewardAddress                       []byte        `protobuf:"bytes,2,opt,name=RewardAddress,proto3" json:"rewardAddress,omitempty"`
	ShardId                             uint32        `protobuf:"varint,3,opt,name=ShardId,proto3" json:"shardId"`
	ValidatorSuccessRate                SignRate      `protobuf:"bytes,4,opt,name=ValidatorSuccessRate,proto3" json:"validatorSuccessRate"`
	LeaderSuccessRate                   SignRate      `protobuf:"bytes,5,opt,name=LeaderSuccessRate,proto3" json:"leaderSuccessRate"`
	ValidatorIgnoredSignaturesRate      uint32        `protobuf:"varint,6,opt,name=ValidatorIgnoredSignaturesRate,proto3" json:"validatorIgnoredSignaturesRate"`
	Rating                              uint32        `protobuf:"varint,7,opt,name=Rating,proto3" json:"rating"`
	TempRating                          uint32        `protobuf:"varint,8,opt,name=TempRating,proto3" json:"tempRating"`
	AccumulatedFees                     *math_big.Int `` /* 166-byte string literal not displayed */
	NumSelectedInSuccessBlocks          uint32        `protobuf:"varint,10,opt,name=NumSelectedInSuccessBlocks,proto3" json:"numSelectedInSuccessBlocks"`
	IndexInList                         uint32        `protobuf:"varint,11,opt,name=IndexInList,proto3" json:"indexInList"`
	List                                string        `protobuf:"bytes,12,opt,name=List,proto3" json:"list,omitempty"`
	ConsecutiveProposerMisses           uint32        `protobuf:"varint,13,opt,name=ConsecutiveProposerMisses,proto3" json:"consecutiveProposerMisses"`
	TotalValidatorSuccessRate           SignRate      `protobuf:"bytes,14,opt,name=TotalValidatorSuccessRate,proto3" json:"totalValidatorSuccessRate"`
	TotalLeaderSuccessRate              SignRate      `protobuf:"bytes,15,opt,name=TotalLeaderSuccessRate,proto3" json:"totalLeaderSuccessRate"`
	TotalValidatorIgnoredSignaturesRate uint32        `protobuf:"varint,16,opt,name=TotalValidatorIgnoredSignaturesRate,proto3" json:"totalValidatorIgnoredSignaturesRate"`
	Nonce                               uint64        `protobuf:"varint,17,opt,name=Nonce,proto3" json:"nonce"`
	UnStakedEpoch                       uint32        `protobuf:"varint,18,opt,name=UnStakedEpoch,proto3" json:"unStakedEpoch"`
	PreviousList                        string        `protobuf:"bytes,19,opt,name=PreviousList,proto3" json:"previousList,omitempty"`
	PreviousIndexInList                 uint32        `protobuf:"varint,20,opt,name=PreviousIndexInList,proto3" json:"previousIndexInList,omitempty"`
}

PeerAccountData represents the data that defines the PeerAccount

func (*PeerAccountData) Descriptor

func (*PeerAccountData) Descriptor() ([]byte, []int)

func (*PeerAccountData) Equal

func (this *PeerAccountData) Equal(that interface{}) bool

func (*PeerAccountData) GetAccumulatedFees

func (m *PeerAccountData) GetAccumulatedFees() *math_big.Int

func (*PeerAccountData) GetBLSPublicKey

func (m *PeerAccountData) GetBLSPublicKey() []byte

func (*PeerAccountData) GetConsecutiveProposerMisses

func (m *PeerAccountData) GetConsecutiveProposerMisses() uint32

func (*PeerAccountData) GetIndexInList

func (m *PeerAccountData) GetIndexInList() uint32

func (*PeerAccountData) GetLeaderSuccessRate

func (m *PeerAccountData) GetLeaderSuccessRate() SignRate

func (*PeerAccountData) GetList

func (m *PeerAccountData) GetList() string

func (*PeerAccountData) GetNonce

func (m *PeerAccountData) GetNonce() uint64

func (*PeerAccountData) GetNumSelectedInSuccessBlocks

func (m *PeerAccountData) GetNumSelectedInSuccessBlocks() uint32

func (*PeerAccountData) GetPreviousIndexInList added in v1.7.0

func (m *PeerAccountData) GetPreviousIndexInList() uint32

func (*PeerAccountData) GetPreviousList added in v1.7.0

func (m *PeerAccountData) GetPreviousList() string

func (*PeerAccountData) GetRating

func (m *PeerAccountData) GetRating() uint32

func (*PeerAccountData) GetRewardAddress

func (m *PeerAccountData) GetRewardAddress() []byte

func (*PeerAccountData) GetShardId

func (m *PeerAccountData) GetShardId() uint32

func (*PeerAccountData) GetTempRating

func (m *PeerAccountData) GetTempRating() uint32

func (*PeerAccountData) GetTotalLeaderSuccessRate

func (m *PeerAccountData) GetTotalLeaderSuccessRate() SignRate

func (*PeerAccountData) GetTotalValidatorIgnoredSignaturesRate

func (m *PeerAccountData) GetTotalValidatorIgnoredSignaturesRate() uint32

func (*PeerAccountData) GetTotalValidatorSuccessRate

func (m *PeerAccountData) GetTotalValidatorSuccessRate() SignRate

func (*PeerAccountData) GetUnStakedEpoch

func (m *PeerAccountData) GetUnStakedEpoch() uint32

func (*PeerAccountData) GetValidatorIgnoredSignaturesRate

func (m *PeerAccountData) GetValidatorIgnoredSignaturesRate() uint32

func (*PeerAccountData) GetValidatorSuccessRate

func (m *PeerAccountData) GetValidatorSuccessRate() SignRate

func (*PeerAccountData) GoString

func (this *PeerAccountData) GoString() string

func (*PeerAccountData) Marshal

func (m *PeerAccountData) Marshal() (dAtA []byte, err error)

func (*PeerAccountData) MarshalTo

func (m *PeerAccountData) MarshalTo(dAtA []byte) (int, error)

func (*PeerAccountData) MarshalToSizedBuffer

func (m *PeerAccountData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PeerAccountData) ProtoMessage

func (*PeerAccountData) ProtoMessage()

func (*PeerAccountData) Reset

func (m *PeerAccountData) Reset()

func (*PeerAccountData) Size

func (m *PeerAccountData) Size() (n int)

func (*PeerAccountData) String

func (this *PeerAccountData) String() string

func (*PeerAccountData) Unmarshal

func (m *PeerAccountData) Unmarshal(dAtA []byte) error

func (*PeerAccountData) XXX_DiscardUnknown

func (m *PeerAccountData) XXX_DiscardUnknown()

func (*PeerAccountData) XXX_Marshal

func (m *PeerAccountData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerAccountData) XXX_Merge

func (m *PeerAccountData) XXX_Merge(src proto.Message)

func (*PeerAccountData) XXX_Size

func (m *PeerAccountData) XXX_Size() int

func (*PeerAccountData) XXX_Unmarshal

func (m *PeerAccountData) XXX_Unmarshal(b []byte) error

type SignRate

type SignRate struct {
	NumSuccess uint32 `protobuf:"varint,1,opt,name=NumSuccess,proto3" json:"NumSuccess,omitempty"`
	NumFailure uint32 `protobuf:"varint,2,opt,name=NumFailure,proto3" json:"NumFailure,omitempty"`
}

SignRate is used to keep the number of success and failed signings

func (*SignRate) Descriptor

func (*SignRate) Descriptor() ([]byte, []int)

func (*SignRate) Equal

func (this *SignRate) Equal(that interface{}) bool

func (*SignRate) GetNumFailure

func (m *SignRate) GetNumFailure() uint32

func (*SignRate) GetNumSuccess

func (m *SignRate) GetNumSuccess() uint32

func (*SignRate) GoString

func (this *SignRate) GoString() string

func (*SignRate) Marshal

func (m *SignRate) Marshal() (dAtA []byte, err error)

func (*SignRate) MarshalTo

func (m *SignRate) MarshalTo(dAtA []byte) (int, error)

func (*SignRate) MarshalToSizedBuffer

func (m *SignRate) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SignRate) ProtoMessage

func (*SignRate) ProtoMessage()

func (*SignRate) Reset

func (m *SignRate) Reset()

func (*SignRate) Size

func (m *SignRate) Size() (n int)

func (*SignRate) String

func (this *SignRate) String() string

func (*SignRate) Unmarshal

func (m *SignRate) Unmarshal(dAtA []byte) error

func (*SignRate) XXX_DiscardUnknown

func (m *SignRate) XXX_DiscardUnknown()

func (*SignRate) XXX_Marshal

func (m *SignRate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignRate) XXX_Merge

func (m *SignRate) XXX_Merge(src proto.Message)

func (*SignRate) XXX_Size

func (m *SignRate) XXX_Size() int

func (*SignRate) XXX_Unmarshal

func (m *SignRate) XXX_Unmarshal(b []byte) error

type UserAccountData

type UserAccountData struct {
	Nonce           uint64        `protobuf:"varint,1,opt,name=Nonce,proto3" json:"nonce"`
	Balance         *math_big.Int `` /* 150-byte string literal not displayed */
	CodeHash        []byte        `protobuf:"bytes,3,opt,name=CodeHash,proto3" json:"codeHash,omitempty"`
	RootHash        []byte        `protobuf:"bytes,4,opt,name=RootHash,proto3" json:"rootHash,omitempty"`
	Address         []byte        `protobuf:"bytes,5,opt,name=Address,proto3" json:"address,omitempty"`
	DeveloperReward *math_big.Int `` /* 166-byte string literal not displayed */
	OwnerAddress    []byte        `protobuf:"bytes,7,opt,name=OwnerAddress,proto3" json:"ownerAddress,omitempty"`
	UserName        []byte        `protobuf:"bytes,8,opt,name=UserName,proto3" json:"userName,omitempty"`
	CodeMetadata    []byte        `protobuf:"bytes,9,opt,name=CodeMetadata,proto3" json:"codeMetadata,omitempty"`
}

func (*UserAccountData) Descriptor

func (*UserAccountData) Descriptor() ([]byte, []int)

func (*UserAccountData) Equal

func (this *UserAccountData) Equal(that interface{}) bool

func (*UserAccountData) GetAddress

func (m *UserAccountData) GetAddress() []byte

func (*UserAccountData) GetBalance

func (m *UserAccountData) GetBalance() *math_big.Int

func (*UserAccountData) GetCodeHash

func (m *UserAccountData) GetCodeHash() []byte

func (*UserAccountData) GetCodeMetadata

func (m *UserAccountData) GetCodeMetadata() []byte

func (*UserAccountData) GetDeveloperReward

func (m *UserAccountData) GetDeveloperReward() *math_big.Int

func (*UserAccountData) GetNonce

func (m *UserAccountData) GetNonce() uint64

func (*UserAccountData) GetOwnerAddress

func (m *UserAccountData) GetOwnerAddress() []byte

func (*UserAccountData) GetRootHash

func (m *UserAccountData) GetRootHash() []byte

func (*UserAccountData) GetUserName

func (m *UserAccountData) GetUserName() []byte

func (*UserAccountData) GoString

func (this *UserAccountData) GoString() string

func (*UserAccountData) Marshal

func (m *UserAccountData) Marshal() (dAtA []byte, err error)

func (*UserAccountData) MarshalTo

func (m *UserAccountData) MarshalTo(dAtA []byte) (int, error)

func (*UserAccountData) MarshalToSizedBuffer

func (m *UserAccountData) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UserAccountData) ProtoMessage

func (*UserAccountData) ProtoMessage()

func (*UserAccountData) Reset

func (m *UserAccountData) Reset()

func (*UserAccountData) Size

func (m *UserAccountData) Size() (n int)

func (*UserAccountData) String

func (this *UserAccountData) String() string

func (*UserAccountData) Unmarshal

func (m *UserAccountData) Unmarshal(dAtA []byte) error

func (*UserAccountData) XXX_DiscardUnknown

func (m *UserAccountData) XXX_DiscardUnknown()

func (*UserAccountData) XXX_Marshal

func (m *UserAccountData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserAccountData) XXX_Merge

func (m *UserAccountData) XXX_Merge(src proto.Message)

func (*UserAccountData) XXX_Size

func (m *UserAccountData) XXX_Size() int

func (*UserAccountData) XXX_Unmarshal

func (m *UserAccountData) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL