codec

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Copyright 2019 dfuse Platform Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2019 dfuse Platform Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountRAMDeltasToEOS

func AccountRAMDeltasToEOS(deltas []*pbantelope.AccountRAMDelta) (out []*eos.AccountRAMDelta)

func ActionToEOS

func ActionToEOS(action *pbantelope.Action) (out *eos.Action)

func ActionTraceToEOS

func ActionTraceToEOS(in *pbantelope.ActionTrace) (out eos.ActionTrace)

func ActionTracesToEOS

func ActionTracesToEOS(actionTraces []*pbantelope.ActionTrace) (out []eos.ActionTrace)

func AuthSequenceListToEOS

func AuthSequenceListToEOS(in []*pbantelope.AuthSequence) (out []eos.TransactionTraceAuthSequence)

func AuthSequenceToEOS

func AuthSequenceToEOS(in *pbantelope.AuthSequence) eos.TransactionTraceAuthSequence

func AuthoritiesToEOS

func AuthoritiesToEOS(authority *pbantelope.Authority) eos.Authority

func AuthorizationToEOS

func AuthorizationToEOS(authorization []*pbantelope.PermissionLevel) (out []eos.PermissionLevel)

func BlockHeaderToEOS

func BlockHeaderToEOS(in *pbantelope.BlockHeader) *eos.BlockHeader

func BlockSigningAuthorityToEOS

func BlockSigningAuthorityToEOS(in *pbantelope.BlockSigningAuthority) *eos.BlockSigningAuthority

func ChecksumToEOS

func ChecksumToEOS(in string) eos.Checksum256

func DeduplicateTransactionTrace

func DeduplicateTransactionTrace(trx *pbantelope.TransactionTrace)

func ErrorCodeToEOS

func ErrorCodeToEOS(in uint64) *eos.Uint64

func ExceptionToEOS

func ExceptionToEOS(in *pbantelope.Exception) *eos.Except

func ExtensionsToEOS

func ExtensionsToEOS(in []*pbantelope.Extension) (out []*eos.Extension)

func ExtractEOSSignedTransactionFromReceipt

func ExtractEOSSignedTransactionFromReceipt(trxReceipt *pbantelope.TransactionReceipt) (*eos.SignedTransaction, error)

func KeyWeightsPToEOS

func KeyWeightsPToEOS(keys []*pbantelope.KeyWeight) (out []*eos.KeyWeight)

func KeyWeightsToEOS

func KeyWeightsToEOS(keys []*pbantelope.KeyWeight) (out []eos.KeyWeight)

func LogContextToEOS

func LogContextToEOS(in *pbantelope.Exception_LogContext) *eos.ExceptLogContext

func NewConsoleReader

func NewConsoleReader(lines chan string, blockEncoder firecore.BlockEncoder, logger *zap.Logger, tracer logging.Tracer) (mindreader.ConsolerReader, error)

func PermissionLevelToEOS

func PermissionLevelToEOS(perm *pbantelope.PermissionLevel) eos.PermissionLevel

func PermissionLevelWeightsToEOS

func PermissionLevelWeightsToEOS(weights []*pbantelope.PermissionLevelWeight) (out []eos.PermissionLevelWeight)

func ProducerAuthoritiesToEOS

func ProducerAuthoritiesToEOS(producerAuthorities []*pbantelope.ProducerAuthority) (out []*eos.ProducerAuthority)

func ProducerAuthorityScheduleToEOS

func ProducerAuthorityScheduleToEOS(in *pbantelope.ProducerAuthoritySchedule) *eos.ProducerAuthoritySchedule

func ProducerKeysToEOS

func ProducerKeysToEOS(in []*pbantelope.ProducerKey) (out []eos.ProducerKey)

func ProducerScheduleToEOS

func ProducerScheduleToEOS(in *pbantelope.ProducerSchedule) *eos.ProducerSchedule

func PublicKeysToEOS

func PublicKeysToEOS(in []string) (out []*ecc.PublicKey)

func ReduplicateTransactionTrace

func ReduplicateTransactionTrace(trx *pbantelope.TransactionTrace)

func SignaturesToEOS

func SignaturesToEOS(in []string) []ecc.Signature

func SignedTransactionToEOS

func SignedTransactionToEOS(trx *pbantelope.SignedTransaction) *eos.SignedTransaction

func TimestampToBlockTimestamp

func TimestampToBlockTimestamp(in *timestamppb.Timestamp) eos.BlockTimestamp

func TimestampToJSONTime

func TimestampToJSONTime(in *timestamppb.Timestamp) eos.JSONTime

func TransactionHeaderToEOS

func TransactionHeaderToEOS(trx *pbantelope.TransactionHeader) *eos.TransactionHeader

func TransactionReceiptHeaderToEOS

func TransactionReceiptHeaderToEOS(in *pbantelope.TransactionReceiptHeader) *eos.TransactionReceiptHeader

func TransactionStatusToEOS

func TransactionStatusToEOS(in pbantelope.TransactionStatus) eos.TransactionStatus

func TransactionToEOS

func TransactionToEOS(trx *pbantelope.Transaction) *eos.Transaction

func TransactionTraceToEOS

func TransactionTraceToEOS(in *pbantelope.TransactionTrace) (out *eos.TransactionTrace)

func WaitWeightsToEOS

func WaitWeightsToEOS(waits []*pbantelope.WaitWeight) (out []eos.WaitWeight)

Types

type ABICache

type ABICache struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

type ABIDecoder

type ABIDecoder struct {
	// contains filtered or unexported fields
}

ABIDecoder holds the ABI cache, controls it and process transaction on the fly parallel decoding the various elements that needs ABI decoding in-place in the data structure.

The ABI decoder is the one that controls the locking of the cache, so all locking of the cache should be performed by the decoder. The idea here is to have full control of the locking, so we can write-lock the cache and add multiple ABIs inside a single locking session, than resume with the read. That is to improve lock-contention.

type ConsoleReader

type ConsoleReader struct {
	// contains filtered or unexported fields
}

ConsoleReader is what reads the `nodeos` output directly. It builds up some LogEntry objects. See `LogReader to read those entries.

func (*ConsoleReader) Close

func (c *ConsoleReader) Close()

func (*ConsoleReader) Done

func (c *ConsoleReader) Done() <-chan interface{}

todo: WTF?

func (*ConsoleReader) ProcessData

func (c *ConsoleReader) ProcessData(reader io.Reader) error

func (*ConsoleReader) ReadBlock

func (c *ConsoleReader) ReadBlock() (out *pbbstream.Block, err error)

type PermOp

type PermOp struct {
	Operation   string            `json:"op"`
	ActionIndex int               `json:"action_idx"`
	OldPerm     *permissionObject `json:"old,omitempty"`
	NewPerm     *permissionObject `json:"new,omitempty"`
}

type Specification

type Specification struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type SubjectiveRestrictions

type SubjectiveRestrictions struct {
	Enable                        bool         `json:"enable"`
	PreactivationRequired         bool         `json:"preactivation_required"`
	EarliestAllowedActivationTime eos.JSONTime `json:"earliest_allowed_activation_time"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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