Documentation
¶
Index ¶
- Constants
- Variables
- func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string
- func SimulateAddObserver(k keeper.Keeper) simtypes.Operation
- func SimulateAddObserverNodeAccount(k keeper.Keeper) simtypes.Operation
- func SimulateDisableCCTX(k keeper.Keeper) simtypes.Operation
- func SimulateDisableFastConfirmation(k keeper.Keeper) simtypes.Operation
- func SimulateEnableCCTX(k keeper.Keeper) simtypes.Operation
- func SimulateMsgRemoveChainParams(k keeper.Keeper) simtypes.Operation
- func SimulateMsgVoteTSS(k keeper.Keeper) simtypes.Operation
- func SimulateResetChainNonces(k keeper.Keeper) simtypes.Operation
- func SimulateUpdateChainParams(k keeper.Keeper) simtypes.Operation
- func SimulateUpdateGasPriceIncreaseFlags(k keeper.Keeper) simtypes.Operation
- func SimulateUpdateKeygen(k keeper.Keeper) simtypes.Operation
- func SimulateUpdateObserver(k keeper.Keeper) simtypes.Operation
- func WeightedOperations(appParams simtypes.AppParams, k keeper.Keeper) simulation.WeightedOperations
Constants ¶
const ( OpWeightMsgTypeMsgEnableCCTX = "op_weight_msg_enable_crosschain_flags" // #nosec G101 not a hardcoded credential OpWeightMsgTypeMsgDisableCCTX = "op_weight_msg_disable_crosschain_flags" // #nosec G101 not a hardcoded credential OpWeightMsgTypeMsgDisableFastConfirmation = "op_weight_msg_disable_fast_confirmation" // #nosec G101 not a hardcoded credential OpWeightMsgTypeMsgVoteTSS = "op_weight_msg_vote_tss" // #nosec G101 not a hardcoded credential OpWeightMsgTypeMsgUpdateKeygen = "op_weight_msg_update_keygen" // #nosec G101 not a hardcoded credential OpWeightMsgTypeMsgUpdateObserver = "op_weight_msg_update_observer" // #nosec G101 not a hardcoded credential OpWeightMsgTypeMsgUpdateChainParams = "op_weight_msg_update_chain_params" // #nosec G101 not a hardcoded credential OpWeightMsgTypeMsgRemoveChainParams = "op_weight_msg_remove_chain_params" // #nosec G101 not a hardcoded credential OpWeightMsgTypeMsgResetChainNonces = "op_weight_msg_reset_chain_nonces" // #nosec G101 not a hardcoded credential OpWeightMsgTypeMsgUpdateGasPriceIncreaseFlags = "op_weight_msg_update_gas_price_increase_flags" // #nosec G101 not a hardcoded credential OpWeightMsgTypeMsgAddObserver = "op_weight_msg_add_observer" // #nosec G101 not a hardcoded credential // DefaultWeightMsgTypeMsgEnableCCTX We use a high weight for this operation // to ensure that it is present in the block more number of times than any operation that changes the validator set // Arrived at this number based on the weights used in the cosmos sdk staking module and through some trial and error DefaultWeightMsgTypeMsgEnableCCTX = 100 DefaultWeightMsgTypeMsgDisableCCTX = 10 DefaultWeightMsgTypeMsgDisableFastConfirmation = 10 DefaultWeightMsgTypeMsgVoteTSS = 10 DefaultWeightMsgTypeMsgUpdateKeygen = 10 DefaultWeightMsgTypeMsgUpdateObserver = 10 DefaultWeightMsgTypeMsgUpdateChainParams = 10 DefaultWeightMsgTypeMsgRemoveChainParams = 10 DefaultWeightMsgTypeMsgResetChainNonces = 5 DefaultWeightMsgTypeMsgUpdateGasPriceIncreaseFlags = 10 DefaultWeightMsgTypeMsgAddObserver = 5 )
Based on the weights assigned in the cosmos sdk modules, 100 seems to the max weight used,and we should use relative weights to signify the number of each operation in a block.
Variables ¶
var ( TypeMsgEnableCCTX = sdk.MsgTypeURL(&observertypes.MsgEnableCCTX{}) TypeMsgDisableCCTX = sdk.MsgTypeURL(&observertypes.MsgDisableCCTX{}) TypeMsgDisableFastConfirmation = sdk.MsgTypeURL(&observertypes.MsgDisableFastConfirmation{}) TypeMsgVoteTSS = sdk.MsgTypeURL(&observertypes.MsgVoteTSS{}) TypeMsgUpdateKeygen = sdk.MsgTypeURL(&observertypes.MsgUpdateKeygen{}) TypeMsgUpdateObserver = sdk.MsgTypeURL(&observertypes.MsgUpdateObserver{}) TypeMsgUpdateChainParams = sdk.MsgTypeURL(&observertypes.MsgUpdateChainParams{}) TypeMsgRemoveChainParams = sdk.MsgTypeURL(&observertypes.MsgRemoveChainParams{}) TypeMsgResetChainNonces = sdk.MsgTypeURL(&observertypes.MsgResetChainNonces{}) TypeMsgUpdateGasPriceIncreaseFlags = sdk.MsgTypeURL(&observertypes.MsgUpdateGasPriceIncreaseFlags{}) TypeMsgAddObserver = sdk.MsgTypeURL(&observertypes.MsgAddObserver{}) )
Functions ¶
func NewDecodeStore ¶
NewDecodeStore returns a decoder function closure that unmarshals the KVPair's Value to the corresponding observer types.
func SimulateAddObserver ¶
SimulateAddObserver generates a TypeMsgAddObserver and delivers it. This message sets AddNodeAccountOnly to false; Therefore, it adds the observer to the observer set
func SimulateAddObserverNodeAccount ¶
SimulateAddObserverNodeAccount generates a TypeMsgAddObserver and delivers it. This message sets AddNodeAccountOnly to true to it does not add the observer to the observer set
func SimulateDisableCCTX ¶
SimulateDisableCCTX generates a MsgDisableCCTX and delivers it.
func SimulateDisableFastConfirmation ¶
SimulateDisableFastConfirmation generates a MsgDisableFastConfirmation and delivers it.
func SimulateEnableCCTX ¶
SimulateEnableCCTX generates a MsgEnableCCTX and delivers it.
func SimulateMsgRemoveChainParams ¶
SimulateMsgRemoveChainParams generates a MsgRemoveChainParams and delivers it. This message removes a chain from the list This is not being run right now as the removal causes a lot of errors for the other operations.
func SimulateMsgVoteTSS ¶
SimulateMsgVoteTSS generates a MsgVoteTSS with random values and delivers it, it also schedules future votes for the same ballot
func SimulateResetChainNonces ¶
SimulateResetChainNonces generates a MsgResetChainNonces and delivers it.
func SimulateUpdateChainParams ¶
SimulateUpdateChainParams generates a MsgUpdateChainParams and delivers it.
func SimulateUpdateGasPriceIncreaseFlags ¶
SimulateUpdateGasPriceIncreaseFlags generates a MsgUpdateGasPriceIncreaseFlags with random values
func SimulateUpdateKeygen ¶
SimulateUpdateKeygen generates a MsgUpdateKeygen and delivers it.
func SimulateUpdateObserver ¶
SimulateUpdateObserver generates a TypeMsgUpdateObserver and delivers it.
func WeightedOperations ¶
func WeightedOperations( appParams simtypes.AppParams, k keeper.Keeper, ) simulation.WeightedOperations
WeightedOperations for observer module
Types ¶
This section is empty.
Source Files
¶
- decoders.go
- operation_add_observer.go
- operation_add_observer_node_account.go
- operation_disable_cctx.go
- operation_disable_fast_confirmation.go
- operation_enable_cctx.go
- operation_remove_chain_params.go
- operation_reset_chain_nonces.go
- operation_update_chain_params.go
- operation_update_gas_price_increase_flags.go
- operation_update_keygen.go
- operation_update_observer.go
- operation_vote_tss.go
- operations.go