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 ¶
- func AccountRAMDeltasToDEOS(deltas []*zsw.AccountRAMDelta) (out []*pbcodec.AccountRAMDelta)
- func AccountRAMDeltasToEOS(deltas []*pbcodec.AccountRAMDelta) (out []*zsw.AccountRAMDelta)
- func ActionToDEOS(action *zsw.Action) *pbcodec.Action
- func ActionToEOS(action *pbcodec.Action) (out *zsw.Action)
- func ActionTraceToDEOS(in zsw.ActionTrace, execIndex uint32, opts ...conversionOption) (out *pbcodec.ActionTrace, consoleTruncated bool)
- func ActionTraceToEOS(in *pbcodec.ActionTrace) (out zsw.ActionTrace)
- func ActionTracesToDEOS(actionTraces []zsw.ActionTrace, opts ...conversionOption) (out []*pbcodec.ActionTrace, someConsoleTruncated bool)
- func ActionTracesToEOS(actionTraces []*pbcodec.ActionTrace) (out []zsw.ActionTrace)
- func ActivatedProtocolFeaturesToDEOS(in *zsw.ProtocolFeatureActivationSet) *pbcodec.ActivatedProtocolFeatures
- func AuthSequenceListToEOS(in []*pbcodec.AuthSequence) (out []zsw.TransactionTraceAuthSequence)
- func AuthSequenceToDEOS(in zsw.TransactionTraceAuthSequence) *pbcodec.AuthSequence
- func AuthSequenceToEOS(in *pbcodec.AuthSequence) zsw.TransactionTraceAuthSequence
- func AuthoritiesToDEOS(authority *zsw.Authority) *pbcodec.Authority
- func AuthoritiesToEOS(authority *pbcodec.Authority) zsw.Authority
- func AuthorizationToDEOS(authorization []zsw.PermissionLevel) (out []*pbcodec.PermissionLevel)
- func AuthorizationToEOS(authorization []*pbcodec.PermissionLevel) (out []zsw.PermissionLevel)
- func BlockDecoder(blk *bstream.Block) (interface{}, error)
- func BlockFromProto(b *pbcodec.Block) (*bstream.Block, error)
- func BlockHeaderToDEOS(blockHeader *zsw.BlockHeader) *pbcodec.BlockHeader
- func BlockHeaderToEOS(in *pbcodec.BlockHeader) *zsw.BlockHeader
- func BlockReaderFactory(reader io.Reader) (bstream.BlockReader, error)
- func BlockSigningAuthorityToDEOS(authority *zsw.BlockSigningAuthority) *pbcodec.BlockSigningAuthority
- func BlockSigningAuthorityToEOS(in *pbcodec.BlockSigningAuthority) *zsw.BlockSigningAuthority
- func BlockWriterFactory(writer io.Writer) (bstream.BlockWriter, error)
- func BlockrootMerkleToDEOS(merkle *zsw.MerkleRoot) *pbcodec.BlockRootMerkle
- func BlockstoreStartBlockResolver(blocksStore dstore.Store) bstream.StartBlockResolver
- func ChecksumToEOS(in string) zsw.Checksum256
- func CreationTreeToDEOS(tree CreationFlatTree) []*pbcodec.CreationFlatNode
- func DeduplicateTransactionTrace(trx *pbcodec.TransactionTrace)
- func ErrorCodeToDEOS(in *zsw.Uint64) uint64
- func ErrorCodeToEOS(in uint64) *zsw.Uint64
- func ExceptionToDEOS(in *zsw.Except) *pbcodec.Exception
- func ExceptionToEOS(in *pbcodec.Exception) *zsw.Except
- func ExtensionsToDEOS(in []*zsw.Extension) (out []*pbcodec.Extension)
- func ExtensionsToEOS(in []*pbcodec.Extension) (out []*zsw.Extension)
- func ExtractEOSSignedTransactionFromReceipt(trxReceipt *pbcodec.TransactionReceipt) (*zsw.SignedTransaction, error)
- func GetPublicKeysFromSignedTransaction(chainID zsw.Checksum256, signedTransaction *zsw.SignedTransaction) []string
- func KeyWeightsPToDEOS(keys []*zsw.KeyWeight) (out []*pbcodec.KeyWeight)
- func KeyWeightsPToEOS(keys []*pbcodec.KeyWeight) (out []*zsw.KeyWeight)
- func KeyWeightsToDEOS(keys []zsw.KeyWeight) (out []*pbcodec.KeyWeight)
- func KeyWeightsToEOS(keys []*pbcodec.KeyWeight) (out []zsw.KeyWeight)
- func LogContextToDEOS(in zsw.ExceptLogContext) *pbcodec.Exception_LogContext
- func LogContextToEOS(in *pbcodec.Exception_LogContext) *zsw.ExceptLogContext
- func PendingScheduleToDEOS(in *zsw.PendingSchedule) *pbcodec.PendingProducerSchedule
- func PermissionLevelToDEOS(perm zsw.PermissionLevel) *pbcodec.PermissionLevel
- func PermissionLevelToEOS(perm *pbcodec.PermissionLevel) zsw.PermissionLevel
- func PermissionLevelWeightsToDEOS(weights []zsw.PermissionLevelWeight) (out []*pbcodec.PermissionLevelWeight)
- func PermissionLevelWeightsToEOS(weights []*pbcodec.PermissionLevelWeight) (out []zsw.PermissionLevelWeight)
- func PermissionToDEOS(perm *zsw.Permission) *pbcodec.Permission
- func ProducerAuthoritiesToDEOS(producerAuthorities []*zsw.ProducerAuthority) (out []*pbcodec.ProducerAuthority)
- func ProducerAuthoritiesToEOS(producerAuthorities []*pbcodec.ProducerAuthority) (out []*zsw.ProducerAuthority)
- func ProducerAuthorityScheduleToDEOS(e *zsw.ProducerAuthoritySchedule) *pbcodec.ProducerAuthoritySchedule
- func ProducerAuthorityScheduleToEOS(in *pbcodec.ProducerAuthoritySchedule) *zsw.ProducerAuthoritySchedule
- func ProducerKeysToDEOS(in []zsw.ProducerKey) (out []*pbcodec.ProducerKey)
- func ProducerKeysToEOS(in []*pbcodec.ProducerKey) (out []zsw.ProducerKey)
- func ProducerScheduleToDEOS(e *zsw.ProducerSchedule) *pbcodec.ProducerSchedule
- func ProducerScheduleToEOS(in *pbcodec.ProducerSchedule) *zsw.ProducerSchedule
- func ProducerToLastImpliedIrbToDEOS(in []zsw.PairAccountNameBlockNum) []*pbcodec.ProducerToLastImpliedIRB
- func ProducerToLastProducedToDEOS(in []zsw.PairAccountNameBlockNum) []*pbcodec.ProducerToLastProduced
- func PublicKeysToEOS(in []string) (out []*ecc.PublicKey)
- func ReduplicateTransactionTrace(trx *pbcodec.TransactionTrace)
- func SignaturesToDEOS(in []ecc.Signature) (out []string)
- func SignaturesToEOS(in []string) []ecc.Signature
- func SignedTransactionToDEOS(trx *zsw.SignedTransaction) *pbcodec.SignedTransaction
- func SignedTransactionToEOS(trx *pbcodec.SignedTransaction) *zsw.SignedTransaction
- func TimestampToBlockTimestamp(in *timestamp.Timestamp) zsw.BlockTimestamp
- func TimestampToJSONTime(in *timestamp.Timestamp) zsw.JSONTime
- func TransactionHeaderToDEOS(trx *zsw.TransactionHeader) *pbcodec.TransactionHeader
- func TransactionHeaderToEOS(trx *pbcodec.TransactionHeader) *zsw.TransactionHeader
- func TransactionReceiptHeaderToDEOS(in *zsw.TransactionReceiptHeader) *pbcodec.TransactionReceiptHeader
- func TransactionReceiptHeaderToEOS(in *pbcodec.TransactionReceiptHeader) *zsw.TransactionReceiptHeader
- func TransactionReceiptToDEOS(txReceipt *zsw.TransactionReceipt) *pbcodec.TransactionReceipt
- func TransactionStatusToDEOS(in zsw.TransactionStatus) pbcodec.TransactionStatus
- func TransactionStatusToEOS(in pbcodec.TransactionStatus) zsw.TransactionStatus
- func TransactionToDEOS(trx *zsw.Transaction) *pbcodec.Transaction
- func TransactionToEOS(trx *pbcodec.Transaction) *zsw.Transaction
- func TransactionTraceToDEOS(in *zsw.TransactionTrace, opts ...conversionOption) *pbcodec.TransactionTrace
- func TransactionTraceToEOS(in *pbcodec.TransactionTrace) (out *zsw.TransactionTrace)
- func WaitWeightsToDEOS(waits []zsw.WaitWeight) (out []*pbcodec.WaitWeight)
- func WaitWeightsToEOS(waits []*pbcodec.WaitWeight) (out []zsw.WaitWeight)
- type ABICache
- type ABIDecoder
- type BlockReader
- type BlockWriter
- type ConsoleReader
- type ConsoleReaderOption
- type CreationFlatNode
- type CreationFlatTree
- type PermOp
- type Specification
- type SubjectiveRestrictions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountRAMDeltasToDEOS ¶
func AccountRAMDeltasToDEOS(deltas []*zsw.AccountRAMDelta) (out []*pbcodec.AccountRAMDelta)
func AccountRAMDeltasToEOS ¶
func AccountRAMDeltasToEOS(deltas []*pbcodec.AccountRAMDelta) (out []*zsw.AccountRAMDelta)
func ActionTraceToDEOS ¶
func ActionTraceToDEOS(in zsw.ActionTrace, execIndex uint32, opts ...conversionOption) (out *pbcodec.ActionTrace, consoleTruncated bool)
func ActionTraceToEOS ¶
func ActionTraceToEOS(in *pbcodec.ActionTrace) (out zsw.ActionTrace)
func ActionTracesToDEOS ¶
func ActionTracesToDEOS(actionTraces []zsw.ActionTrace, opts ...conversionOption) (out []*pbcodec.ActionTrace, someConsoleTruncated bool)
func ActionTracesToEOS ¶
func ActionTracesToEOS(actionTraces []*pbcodec.ActionTrace) (out []zsw.ActionTrace)
func ActivatedProtocolFeaturesToDEOS ¶
func ActivatedProtocolFeaturesToDEOS(in *zsw.ProtocolFeatureActivationSet) *pbcodec.ActivatedProtocolFeatures
func AuthSequenceListToEOS ¶
func AuthSequenceListToEOS(in []*pbcodec.AuthSequence) (out []zsw.TransactionTraceAuthSequence)
func AuthSequenceToDEOS ¶
func AuthSequenceToDEOS(in zsw.TransactionTraceAuthSequence) *pbcodec.AuthSequence
func AuthSequenceToEOS ¶
func AuthSequenceToEOS(in *pbcodec.AuthSequence) zsw.TransactionTraceAuthSequence
func AuthorizationToDEOS ¶
func AuthorizationToDEOS(authorization []zsw.PermissionLevel) (out []*pbcodec.PermissionLevel)
func AuthorizationToEOS ¶
func AuthorizationToEOS(authorization []*pbcodec.PermissionLevel) (out []zsw.PermissionLevel)
func BlockDecoder ¶
BlockDecoder transforms a `bstream.Block` payload into a proper `deth.Block` value
func BlockHeaderToDEOS ¶
func BlockHeaderToDEOS(blockHeader *zsw.BlockHeader) *pbcodec.BlockHeader
func BlockHeaderToEOS ¶
func BlockHeaderToEOS(in *pbcodec.BlockHeader) *zsw.BlockHeader
func BlockReaderFactory ¶
func BlockReaderFactory(reader io.Reader) (bstream.BlockReader, error)
func BlockSigningAuthorityToDEOS ¶
func BlockSigningAuthorityToDEOS(authority *zsw.BlockSigningAuthority) *pbcodec.BlockSigningAuthority
func BlockSigningAuthorityToEOS ¶
func BlockSigningAuthorityToEOS(in *pbcodec.BlockSigningAuthority) *zsw.BlockSigningAuthority
func BlockWriterFactory ¶
func BlockWriterFactory(writer io.Writer) (bstream.BlockWriter, error)
func BlockrootMerkleToDEOS ¶
func BlockrootMerkleToDEOS(merkle *zsw.MerkleRoot) *pbcodec.BlockRootMerkle
func BlockstoreStartBlockResolver ¶
func BlockstoreStartBlockResolver(blocksStore dstore.Store) bstream.StartBlockResolver
func ChecksumToEOS ¶
func ChecksumToEOS(in string) zsw.Checksum256
func CreationTreeToDEOS ¶
func CreationTreeToDEOS(tree CreationFlatTree) []*pbcodec.CreationFlatNode
func DeduplicateTransactionTrace ¶
func DeduplicateTransactionTrace(trx *pbcodec.TransactionTrace)
func ErrorCodeToDEOS ¶
func ErrorCodeToEOS ¶
func ExtractEOSSignedTransactionFromReceipt ¶
func ExtractEOSSignedTransactionFromReceipt(trxReceipt *pbcodec.TransactionReceipt) (*zsw.SignedTransaction, error)
func GetPublicKeysFromSignedTransaction ¶
func GetPublicKeysFromSignedTransaction(chainID zsw.Checksum256, signedTransaction *zsw.SignedTransaction) []string
Best effort to extract public keys from a signed transaction
func LogContextToDEOS ¶
func LogContextToDEOS(in zsw.ExceptLogContext) *pbcodec.Exception_LogContext
func LogContextToEOS ¶
func LogContextToEOS(in *pbcodec.Exception_LogContext) *zsw.ExceptLogContext
func PendingScheduleToDEOS ¶
func PendingScheduleToDEOS(in *zsw.PendingSchedule) *pbcodec.PendingProducerSchedule
func PermissionLevelToDEOS ¶
func PermissionLevelToDEOS(perm zsw.PermissionLevel) *pbcodec.PermissionLevel
func PermissionLevelToEOS ¶
func PermissionLevelToEOS(perm *pbcodec.PermissionLevel) zsw.PermissionLevel
func PermissionLevelWeightsToDEOS ¶
func PermissionLevelWeightsToDEOS(weights []zsw.PermissionLevelWeight) (out []*pbcodec.PermissionLevelWeight)
func PermissionLevelWeightsToEOS ¶
func PermissionLevelWeightsToEOS(weights []*pbcodec.PermissionLevelWeight) (out []zsw.PermissionLevelWeight)
func PermissionToDEOS ¶
func PermissionToDEOS(perm *zsw.Permission) *pbcodec.Permission
func ProducerAuthoritiesToDEOS ¶
func ProducerAuthoritiesToDEOS(producerAuthorities []*zsw.ProducerAuthority) (out []*pbcodec.ProducerAuthority)
func ProducerAuthoritiesToEOS ¶
func ProducerAuthoritiesToEOS(producerAuthorities []*pbcodec.ProducerAuthority) (out []*zsw.ProducerAuthority)
func ProducerAuthorityScheduleToDEOS ¶
func ProducerAuthorityScheduleToDEOS(e *zsw.ProducerAuthoritySchedule) *pbcodec.ProducerAuthoritySchedule
func ProducerAuthorityScheduleToEOS ¶
func ProducerAuthorityScheduleToEOS(in *pbcodec.ProducerAuthoritySchedule) *zsw.ProducerAuthoritySchedule
func ProducerKeysToDEOS ¶
func ProducerKeysToDEOS(in []zsw.ProducerKey) (out []*pbcodec.ProducerKey)
func ProducerKeysToEOS ¶
func ProducerKeysToEOS(in []*pbcodec.ProducerKey) (out []zsw.ProducerKey)
func ProducerScheduleToDEOS ¶
func ProducerScheduleToDEOS(e *zsw.ProducerSchedule) *pbcodec.ProducerSchedule
func ProducerScheduleToEOS ¶
func ProducerScheduleToEOS(in *pbcodec.ProducerSchedule) *zsw.ProducerSchedule
func ProducerToLastImpliedIrbToDEOS ¶
func ProducerToLastImpliedIrbToDEOS(in []zsw.PairAccountNameBlockNum) []*pbcodec.ProducerToLastImpliedIRB
func ProducerToLastProducedToDEOS ¶
func ProducerToLastProducedToDEOS(in []zsw.PairAccountNameBlockNum) []*pbcodec.ProducerToLastProduced
func PublicKeysToEOS ¶
func ReduplicateTransactionTrace ¶
func ReduplicateTransactionTrace(trx *pbcodec.TransactionTrace)
func SignaturesToDEOS ¶
func SignaturesToEOS ¶
func SignedTransactionToDEOS ¶
func SignedTransactionToDEOS(trx *zsw.SignedTransaction) *pbcodec.SignedTransaction
func SignedTransactionToEOS ¶
func SignedTransactionToEOS(trx *pbcodec.SignedTransaction) *zsw.SignedTransaction
func TimestampToBlockTimestamp ¶
func TimestampToBlockTimestamp(in *timestamp.Timestamp) zsw.BlockTimestamp
func TransactionHeaderToDEOS ¶
func TransactionHeaderToDEOS(trx *zsw.TransactionHeader) *pbcodec.TransactionHeader
func TransactionHeaderToEOS ¶
func TransactionHeaderToEOS(trx *pbcodec.TransactionHeader) *zsw.TransactionHeader
func TransactionReceiptHeaderToDEOS ¶
func TransactionReceiptHeaderToDEOS(in *zsw.TransactionReceiptHeader) *pbcodec.TransactionReceiptHeader
func TransactionReceiptHeaderToEOS ¶
func TransactionReceiptHeaderToEOS(in *pbcodec.TransactionReceiptHeader) *zsw.TransactionReceiptHeader
func TransactionReceiptToDEOS ¶
func TransactionReceiptToDEOS(txReceipt *zsw.TransactionReceipt) *pbcodec.TransactionReceipt
func TransactionStatusToDEOS ¶
func TransactionStatusToDEOS(in zsw.TransactionStatus) pbcodec.TransactionStatus
func TransactionStatusToEOS ¶
func TransactionStatusToEOS(in pbcodec.TransactionStatus) zsw.TransactionStatus
func TransactionToDEOS ¶
func TransactionToDEOS(trx *zsw.Transaction) *pbcodec.Transaction
func TransactionToEOS ¶
func TransactionToEOS(trx *pbcodec.Transaction) *zsw.Transaction
func TransactionTraceToDEOS ¶
func TransactionTraceToDEOS(in *zsw.TransactionTrace, opts ...conversionOption) *pbcodec.TransactionTrace
func TransactionTraceToEOS ¶
func TransactionTraceToEOS(in *pbcodec.TransactionTrace) (out *zsw.TransactionTrace)
func WaitWeightsToDEOS ¶
func WaitWeightsToDEOS(waits []zsw.WaitWeight) (out []*pbcodec.WaitWeight)
func WaitWeightsToEOS ¶
func WaitWeightsToEOS(waits []*pbcodec.WaitWeight) (out []zsw.WaitWeight)
Types ¶
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 BlockReader ¶
type BlockReader struct {
// contains filtered or unexported fields
}
BlockReader reads the dbin format where each element is assumed to be a `bstream.Block`.
func NewBlockReader ¶
func NewBlockReader(reader io.Reader) (out *BlockReader, err error)
type BlockWriter ¶
type BlockWriter struct {
// contains filtered or unexported fields
}
BlockWriter reads the dbin format where each element is assumed to be a `bstream.Block`.
func NewBlockWriter ¶
func NewBlockWriter(writer io.Writer) (*BlockWriter, error)
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 NewConsoleReader ¶
func NewConsoleReader(reader io.Reader, opts ...ConsoleReaderOption) (*ConsoleReader, error)
TODO: At some point, the interface of a ConsoleReader should be re-done.
Indeed, the `ConsoleReader` could simply receive each line already split since the upstream caller is already doing this job it self. This way, we would have a single split job instead of two. Only the upstream would split the line and the console reader would simply process each line, one at a time.
func (*ConsoleReader) Close ¶
func (l *ConsoleReader) Close()
func (*ConsoleReader) Done ¶
func (l *ConsoleReader) Done() <-chan interface{}
func (*ConsoleReader) Read ¶
func (l *ConsoleReader) Read() (out interface{}, err error)
type ConsoleReaderOption ¶
type ConsoleReaderOption interface {
// contains filtered or unexported methods
}
func LimitConsoleLength ¶
func LimitConsoleLength(maxByteCount int) ConsoleReaderOption
LimitConsoleLength ensure that `Console` field on `pbcodec.ActionTrace` are never bigger than `maxByteCount` bytes.
This is sadly incomplete as failing deferred transaction can still log out of band via the standard nodeos logging mecanism.
type CreationFlatNode ¶
type CreationFlatNode = [3]int
CreationFlatNode represents a flat node in a flat tree. It's a triplet slice where elements reprensents the following values, assuming `(<depthFirstWalkIndex>, <parentDepthFirstWalkIndex>, <executionActionIndex>)`:
The first value of the node is it's id, derived by doing a depth-first walk of the creation tree and incrementing an index at each node visited.
The second value is the parent index of the current node, the index is the index of the initial element of the `CreationFlatNode` slice.
The third value is the execution action index to get the actual execution traces from the actual execution tree (deep-first walking index in the execution tree).
type CreationFlatTree ¶
type CreationFlatTree = []CreationFlatNode
CreationFlatTree represents the creation order tree in a flatten manners. The flat list is built by doing a deep-first walk of the creational tree, outputting at each traversal the `CreationNode` triplet `(index, creatorParentIndex, executionIndex)` where a parent of `-1` represents a root node.
For example, assuming a `CreationFlatTree` of the form:
[
[0, -1, 0], [1, 0, 1], [2, 0, 2], [3, 2, 3],
]
Represents the following creational tree:
```
0 ├── 1 └── 2 └── 3
```
The tree can be reconstructed using the following quick Python.