Documentation ¶
Index ¶
- Constants
- Variables
- func GetProtocolVersionsNtC() []uint16
- func GetProtocolVersionsNtN() []uint16
- type Ouroboros
- type OuroborosOptionFunc
- func WithBlockFetchConfig(cfg blockfetch.Config) OuroborosOptionFunc
- func WithChainSyncConfig(cfg chainsync.Config) OuroborosOptionFunc
- func WithConnection(conn net.Conn) OuroborosOptionFunc
- func WithDelayMuxerStart(delayMuxerStart bool) OuroborosOptionFunc
- func WithErrorChan(errorChan chan error) OuroborosOptionFunc
- func WithFullDuplex(fullDuplex bool) OuroborosOptionFunc
- func WithKeepAlive(keepAlive bool) OuroborosOptionFunc
- func WithKeepAliveConfig(cfg keepalive.Config) OuroborosOptionFunc
- func WithLocalStateQueryConfig(cfg localstatequery.Config) OuroborosOptionFunc
- func WithLocalTxSubmissionConfig(cfg localtxsubmission.Config) OuroborosOptionFunc
- func WithNetworkMagic(networkMagic uint32) OuroborosOptionFunc
- func WithNodeToNode(nodeToNode bool) OuroborosOptionFunc
- func WithServer(server bool) OuroborosOptionFunc
- func WithTxSubmissionConfig(cfg txsubmission.Config) OuroborosOptionFunc
- type ProtocolVersionNtC
- type ProtocolVersionNtN
Constants ¶
View Source
const (
// The NtC protocol versions have the 15th bit set in the handshake
PROTOCOL_VERSION_NTC_FLAG = 0x8000
)
Variables ¶
View Source
var ProtocolVersionMapNtC = map[uint16]ProtocolVersionNtC{ 9: ProtocolVersionNtC{ EnableLocalQueryProtocol: true, EnableShelleyEra: true, EnableAllegraEra: true, EnableMaryEra: true, EnableAlonzoEra: true, }, 10: ProtocolVersionNtC{ EnableLocalQueryProtocol: true, EnableShelleyEra: true, EnableAllegraEra: true, EnableMaryEra: true, EnableAlonzoEra: true, }, 11: ProtocolVersionNtC{ EnableLocalQueryProtocol: true, EnableShelleyEra: true, EnableAllegraEra: true, EnableMaryEra: true, EnableAlonzoEra: true, }, 12: ProtocolVersionNtC{ EnableLocalQueryProtocol: true, EnableShelleyEra: true, EnableAllegraEra: true, EnableMaryEra: true, EnableAlonzoEra: true, EnableLocalTxMonitorProtocol: true, }, 13: ProtocolVersionNtC{ EnableLocalQueryProtocol: true, EnableShelleyEra: true, EnableAllegraEra: true, EnableMaryEra: true, EnableAlonzoEra: true, EnableBabbageEra: true, EnableLocalTxMonitorProtocol: true, }, 14: ProtocolVersionNtC{ EnableLocalQueryProtocol: true, EnableShelleyEra: true, EnableAllegraEra: true, EnableMaryEra: true, EnableAlonzoEra: true, EnableBabbageEra: true, EnableLocalTxMonitorProtocol: true, }, }
We don't bother supporting NtC protocol versions before 9 (when Alonzo was enabled)
View Source
var ProtocolVersionMapNtN = map[uint16]ProtocolVersionNtN{ 7: ProtocolVersionNtN{ EnableShelleyEra: true, EnableKeepAliveProtocol: true, EnableAllegraEra: true, EnableMaryEra: true, EnableAlonzoEra: true, }, 8: ProtocolVersionNtN{ EnableShelleyEra: true, EnableKeepAliveProtocol: true, EnableAllegraEra: true, EnableMaryEra: true, EnableAlonzoEra: true, }, 9: ProtocolVersionNtN{ EnableShelleyEra: true, EnableKeepAliveProtocol: true, EnableAllegraEra: true, EnableMaryEra: true, EnableAlonzoEra: true, EnableBabbageEra: true, }, 10: ProtocolVersionNtN{ EnableShelleyEra: true, EnableKeepAliveProtocol: true, EnableAllegraEra: true, EnableMaryEra: true, EnableAlonzoEra: true, EnableBabbageEra: true, EnableFullDuplex: true, }, }
We don't bother supporting NtN protocol versions before 7 (when Alonzo was enabled)
Functions ¶
func GetProtocolVersionsNtC ¶ added in v0.6.0
func GetProtocolVersionsNtC() []uint16
func GetProtocolVersionsNtN ¶ added in v0.6.0
func GetProtocolVersionsNtN() []uint16
Types ¶
type Ouroboros ¶
type Ouroboros struct { ErrorChan chan error // Mini-protocols Handshake *handshake.Handshake ChainSync *chainsync.ChainSync BlockFetch *blockfetch.BlockFetch KeepAlive *keepalive.KeepAlive LocalTxSubmission *localtxsubmission.LocalTxSubmission LocalStateQuery *localstatequery.LocalStateQuery TxSubmission *txsubmission.TxSubmission // contains filtered or unexported fields }
func New ¶
func New(options ...OuroborosOptionFunc) (*Ouroboros, error)
type OuroborosOptionFunc ¶ added in v0.18.0
type OuroborosOptionFunc func(*Ouroboros)
func WithBlockFetchConfig ¶ added in v0.18.0
func WithBlockFetchConfig(cfg blockfetch.Config) OuroborosOptionFunc
func WithChainSyncConfig ¶ added in v0.18.0
func WithChainSyncConfig(cfg chainsync.Config) OuroborosOptionFunc
func WithConnection ¶ added in v0.18.0
func WithConnection(conn net.Conn) OuroborosOptionFunc
func WithDelayMuxerStart ¶ added in v0.18.0
func WithDelayMuxerStart(delayMuxerStart bool) OuroborosOptionFunc
func WithErrorChan ¶ added in v0.18.0
func WithErrorChan(errorChan chan error) OuroborosOptionFunc
func WithFullDuplex ¶ added in v0.18.0
func WithFullDuplex(fullDuplex bool) OuroborosOptionFunc
func WithKeepAlive ¶ added in v0.18.0
func WithKeepAlive(keepAlive bool) OuroborosOptionFunc
func WithKeepAliveConfig ¶ added in v0.18.0
func WithKeepAliveConfig(cfg keepalive.Config) OuroborosOptionFunc
func WithLocalStateQueryConfig ¶ added in v0.18.0
func WithLocalStateQueryConfig(cfg localstatequery.Config) OuroborosOptionFunc
func WithLocalTxSubmissionConfig ¶ added in v0.18.0
func WithLocalTxSubmissionConfig(cfg localtxsubmission.Config) OuroborosOptionFunc
func WithNetworkMagic ¶ added in v0.18.0
func WithNetworkMagic(networkMagic uint32) OuroborosOptionFunc
func WithNodeToNode ¶ added in v0.18.0
func WithNodeToNode(nodeToNode bool) OuroborosOptionFunc
func WithServer ¶ added in v0.18.0
func WithServer(server bool) OuroborosOptionFunc
func WithTxSubmissionConfig ¶ added in v0.18.0
func WithTxSubmissionConfig(cfg txsubmission.Config) OuroborosOptionFunc
type ProtocolVersionNtC ¶ added in v0.6.0
type ProtocolVersionNtC struct { // Most of these are enabled in all of the protocol versions that we support, but // they are here for completeness EnableLocalQueryProtocol bool EnableShelleyEra bool EnableAllegraEra bool EnableMaryEra bool EnableAlonzoEra bool EnableBabbageEra bool EnableLocalTxMonitorProtocol bool }
func GetProtocolVersionNtC ¶ added in v0.6.0
func GetProtocolVersionNtC(version uint16) ProtocolVersionNtC
type ProtocolVersionNtN ¶ added in v0.6.0
type ProtocolVersionNtN struct { // Most of these are enabled in all of the protocol versions that we support, but // they are here for completeness EnableShelleyEra bool EnableKeepAliveProtocol bool EnableAllegraEra bool EnableMaryEra bool EnableAlonzoEra bool EnableBabbageEra bool EnableFullDuplex bool }
func GetProtocolVersionNtN ¶ added in v0.6.0
func GetProtocolVersionNtN(version uint16) ProtocolVersionNtN
Click to show internal directories.
Click to hide internal directories.