Documentation ¶
Overview ¶
Package penumbra provides an implementation of ibc.Chain for the Penumbra blockchain.
Index ¶
- func NewPenumbraChainConfig() ibc.ChainConfig
- type GenesisFile
- type GenesisValidatorPubKey
- type GenesisValidators
- type PenumbraAppNode
- func (p *PenumbraAppNode) AllocationsInputFileContainer() string
- func (p *PenumbraAppNode) Bind() []string
- func (p *PenumbraAppNode) CreateKey(ctx context.Context, keyName string) error
- func (p *PenumbraAppNode) CreateNodeContainer(ctx context.Context) error
- func (p *PenumbraAppNode) Exec(ctx context.Context, cmd []string, env []string) ([]byte, []byte, error)
- func (p *PenumbraAppNode) GenerateGenesisFile(ctx context.Context, chainID string, validators []PenumbraValidatorDefinition, ...) error
- func (p *PenumbraAppNode) GetAddress(ctx context.Context, keyName string) ([]byte, error)
- func (p *PenumbraAppNode) GetAddressBech32m(ctx context.Context, keyName string) (string, error)
- func (p *PenumbraAppNode) HomeDir() string
- func (p *PenumbraAppNode) HostName() string
- func (p *PenumbraAppNode) InitValidatorFile(ctx context.Context) error
- func (p *PenumbraAppNode) Name() string
- func (p *PenumbraAppNode) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error
- func (p *PenumbraAppNode) SendIBCTransfer(ctx context.Context, channelID, keyName string, amount ibc.WalletAmount, ...) (ibc.Tx, error)
- func (p *PenumbraAppNode) StartContainer(ctx context.Context) error
- func (p *PenumbraAppNode) StopContainer(ctx context.Context) error
- func (p *PenumbraAppNode) ValidatorDefinitionTemplateFilePathContainer() string
- func (p *PenumbraAppNode) ValidatorsInputFileContainer() string
- type PenumbraChain
- func (c *PenumbraChain) Acknowledgements(ctx context.Context, height uint64) ([]ibc.PacketAcknowledgement, error)
- func (c *PenumbraChain) Config() ibc.ChainConfig
- func (c *PenumbraChain) CreateKey(ctx context.Context, keyName string) error
- func (c *PenumbraChain) CreatePool(ctx context.Context, keyName string, contractAddress string, swapFee float64, ...) error
- func (c *PenumbraChain) DumpContractState(ctx context.Context, contractAddress string, height int64) (*ibc.DumpContractStateResponse, error)
- func (c *PenumbraChain) Exec(ctx context.Context, cmd []string, env []string) (stdout, stderr []byte, err error)
- func (c *PenumbraChain) ExecuteContract(ctx context.Context, keyName string, contractAddress string, message string) error
- func (c *PenumbraChain) ExportState(ctx context.Context, height int64) (string, error)
- func (c *PenumbraChain) GetAddress(ctx context.Context, keyName string) ([]byte, error)
- func (c *PenumbraChain) GetBalance(ctx context.Context, address string, denom string) (int64, error)
- func (c *PenumbraChain) GetGRPCAddress() string
- func (c *PenumbraChain) GetGasFeesInNativeDenom(gasPaid int64) int64
- func (c *PenumbraChain) GetHostGRPCAddress() string
- func (c *PenumbraChain) GetHostRPCAddress() string
- func (c *PenumbraChain) GetRPCAddress() string
- func (c *PenumbraChain) Height(ctx context.Context) (uint64, error)
- func (c *PenumbraChain) HomeDir() string
- func (c *PenumbraChain) Initialize(ctx context.Context, testName string, cli *client.Client, networkID string) error
- func (c *PenumbraChain) InstantiateContract(ctx context.Context, keyName string, amount ibc.WalletAmount, ...) (string, error)
- func (c *PenumbraChain) RecoverKey(ctx context.Context, name, mnemonic string) error
- func (c *PenumbraChain) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error
- func (c *PenumbraChain) SendIBCTransfer(ctx context.Context, channelID, keyName string, amount ibc.WalletAmount, ...) (ibc.Tx, error)
- func (c *PenumbraChain) Start(testName string, ctx context.Context, ...) error
- func (c *PenumbraChain) Timeouts(ctx context.Context, height uint64) ([]ibc.PacketTimeout, error)
- func (c *PenumbraChain) UpgradeProposal(ctx context.Context, keyName string, prop ibc.SoftwareUpgradeProposal) (ibc.SoftwareUpgradeTx, error)
- type PenumbraGenesisAppStateAllocation
- type PenumbraNode
- type PenumbraNodes
- type PenumbraValidatorDefinition
- type PenumbraValidatorFundingStream
- type ValidatorWithIntPower
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPenumbraChainConfig ¶
func NewPenumbraChainConfig() ibc.ChainConfig
Types ¶
type GenesisFile ¶
type GenesisFile struct {
Validators []GenesisValidators `json:"validators"`
}
type GenesisValidatorPubKey ¶
type GenesisValidators ¶
type GenesisValidators struct { Address string `json:"address"` Name string `json:"name"` Power string `json:"power"` PubKey GenesisValidatorPubKey `json:"pub_key"` }
type PenumbraAppNode ¶
type PenumbraAppNode struct { Index int VolumeName string Chain ibc.Chain TestName string NetworkID string DockerClient *client.Client Image ibc.DockerImage // contains filtered or unexported fields }
func (*PenumbraAppNode) AllocationsInputFileContainer ¶
func (p *PenumbraAppNode) AllocationsInputFileContainer() string
func (*PenumbraAppNode) Bind ¶
func (p *PenumbraAppNode) Bind() []string
Bind returns the home folder bind point for running the node
func (*PenumbraAppNode) CreateKey ¶
func (p *PenumbraAppNode) CreateKey(ctx context.Context, keyName string) error
func (*PenumbraAppNode) CreateNodeContainer ¶
func (p *PenumbraAppNode) CreateNodeContainer(ctx context.Context) error
func (*PenumbraAppNode) Exec ¶
func (p *PenumbraAppNode) Exec(ctx context.Context, cmd []string, env []string) ([]byte, []byte, error)
Exec run a container for a specific job and block until the container exits
func (*PenumbraAppNode) GenerateGenesisFile ¶
func (p *PenumbraAppNode) GenerateGenesisFile( ctx context.Context, chainID string, validators []PenumbraValidatorDefinition, allocations []PenumbraGenesisAppStateAllocation, ) error
func (*PenumbraAppNode) GetAddress ¶
func (*PenumbraAppNode) GetAddressBech32m ¶
func (*PenumbraAppNode) HomeDir ¶
func (p *PenumbraAppNode) HomeDir() string
func (*PenumbraAppNode) HostName ¶
func (p *PenumbraAppNode) HostName() string
the hostname of the test node container
func (*PenumbraAppNode) InitValidatorFile ¶
func (p *PenumbraAppNode) InitValidatorFile(ctx context.Context) error
initializes validator definition template file wallet must be generated first
func (*PenumbraAppNode) Name ¶
func (p *PenumbraAppNode) Name() string
Name of the test node container
func (*PenumbraAppNode) SendFunds ¶
func (p *PenumbraAppNode) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error
func (*PenumbraAppNode) SendIBCTransfer ¶
func (p *PenumbraAppNode) SendIBCTransfer(ctx context.Context, channelID, keyName string, amount ibc.WalletAmount, timeout *ibc.IBCTimeout) (ibc.Tx, error)
func (*PenumbraAppNode) StartContainer ¶
func (p *PenumbraAppNode) StartContainer(ctx context.Context) error
func (*PenumbraAppNode) StopContainer ¶
func (p *PenumbraAppNode) StopContainer(ctx context.Context) error
func (*PenumbraAppNode) ValidatorDefinitionTemplateFilePathContainer ¶
func (p *PenumbraAppNode) ValidatorDefinitionTemplateFilePathContainer() string
func (*PenumbraAppNode) ValidatorsInputFileContainer ¶
func (p *PenumbraAppNode) ValidatorsInputFileContainer() string
type PenumbraChain ¶
type PenumbraChain struct { PenumbraNodes PenumbraNodes // contains filtered or unexported fields }
func NewPenumbraChain ¶
func NewPenumbraChain(log *zap.Logger, testName string, chainConfig ibc.ChainConfig, numValidators int, numFullNodes int) *PenumbraChain
func (*PenumbraChain) Acknowledgements ¶
func (c *PenumbraChain) Acknowledgements(ctx context.Context, height uint64) ([]ibc.PacketAcknowledgement, error)
func (*PenumbraChain) Config ¶
func (c *PenumbraChain) Config() ibc.ChainConfig
Implements Chain interface
func (*PenumbraChain) CreateKey ¶
func (c *PenumbraChain) CreateKey(ctx context.Context, keyName string) error
Implements Chain interface
func (*PenumbraChain) CreatePool ¶
func (c *PenumbraChain) CreatePool(ctx context.Context, keyName string, contractAddress string, swapFee float64, exitFee float64, assets []ibc.WalletAmount) error
Implements Chain interface
func (*PenumbraChain) DumpContractState ¶
func (c *PenumbraChain) DumpContractState(ctx context.Context, contractAddress string, height int64) (*ibc.DumpContractStateResponse, error)
Implements Chain interface
func (*PenumbraChain) Exec ¶
func (c *PenumbraChain) Exec(ctx context.Context, cmd []string, env []string) (stdout, stderr []byte, err error)
Exec implements chain interface.
func (*PenumbraChain) ExecuteContract ¶
func (c *PenumbraChain) ExecuteContract(ctx context.Context, keyName string, contractAddress string, message string) error
Implements Chain interface
func (*PenumbraChain) ExportState ¶
Implements Chain interface
func (*PenumbraChain) GetAddress ¶
Implements Chain interface
func (*PenumbraChain) GetBalance ¶
func (c *PenumbraChain) GetBalance(ctx context.Context, address string, denom string) (int64, error)
Implements Chain interface
func (*PenumbraChain) GetGRPCAddress ¶
func (c *PenumbraChain) GetGRPCAddress() string
Implements Chain interface
func (*PenumbraChain) GetGasFeesInNativeDenom ¶
func (c *PenumbraChain) GetGasFeesInNativeDenom(gasPaid int64) int64
Implements Chain interface
func (*PenumbraChain) GetHostGRPCAddress ¶
func (c *PenumbraChain) GetHostGRPCAddress() string
GetHostGRPCAddress returns the address of the gRPC server accessible by the host. This will not return a valid address until the chain has been started.
func (*PenumbraChain) GetHostRPCAddress ¶
func (c *PenumbraChain) GetHostRPCAddress() string
GetHostRPCAddress returns the address of the RPC server accessible by the host. This will not return a valid address until the chain has been started.
func (*PenumbraChain) GetRPCAddress ¶
func (c *PenumbraChain) GetRPCAddress() string
Implements Chain interface
func (*PenumbraChain) HomeDir ¶
func (c *PenumbraChain) HomeDir() string
func (*PenumbraChain) Initialize ¶
func (c *PenumbraChain) Initialize(ctx context.Context, testName string, cli *client.Client, networkID string) error
Implements Chain interface
func (*PenumbraChain) InstantiateContract ¶
func (c *PenumbraChain) InstantiateContract(ctx context.Context, keyName string, amount ibc.WalletAmount, fileName, initMessage string, needsNoAdminFlag bool) (string, error)
Implements Chain interface
func (*PenumbraChain) RecoverKey ¶
func (c *PenumbraChain) RecoverKey(ctx context.Context, name, mnemonic string) error
func (*PenumbraChain) SendFunds ¶
func (c *PenumbraChain) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error
Implements Chain interface
func (*PenumbraChain) SendIBCTransfer ¶
func (c *PenumbraChain) SendIBCTransfer(ctx context.Context, channelID, keyName string, amount ibc.WalletAmount, timeout *ibc.IBCTimeout) (ibc.Tx, error)
Implements Chain interface
func (*PenumbraChain) Start ¶
func (c *PenumbraChain) Start(testName string, ctx context.Context, additionalGenesisWallets ...ibc.WalletAmount) error
func (*PenumbraChain) Timeouts ¶
func (c *PenumbraChain) Timeouts(ctx context.Context, height uint64) ([]ibc.PacketTimeout, error)
func (*PenumbraChain) UpgradeProposal ¶
func (c *PenumbraChain) UpgradeProposal(ctx context.Context, keyName string, prop ibc.SoftwareUpgradeProposal) (ibc.SoftwareUpgradeTx, error)
type PenumbraNode ¶
type PenumbraNode struct { TendermintNode *tendermint.TendermintNode PenumbraAppNode *PenumbraAppNode }
type PenumbraNodes ¶
type PenumbraNodes []PenumbraNode
type PenumbraValidatorDefinition ¶
type PenumbraValidatorDefinition struct { IdentityKey string `json:"identity_key"` ConsensusKey string `json:"consensus_key"` Name string `json:"name"` Website string `json:"website"` Description string `json:"description"` FundingStreams []PenumbraValidatorFundingStream `json:"funding_streams"` SequenceNumber int64 `json:"sequence_number"` }