chainconfigmgr

package
v2.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetChainConfig added in v2.2.0

func SetChainConfig(txSimContext protocol.TxSimContext, chainConfig *configPb.ChainConfig) ([]byte, error)

SetChainConfig 写入新的链配置 @param txSimContext @param chainConfig @return []byte @return error

Types

type ChainBlockRuntime

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

ChainBlockRuntime chain block config update

func (*ChainBlockRuntime) BlockUpdate

func (r *ChainBlockRuntime) BlockUpdate(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

BlockUpdate update block config for chain @param tx_timestamp_verify To enable this attribute, ensure that the clock of the node is consistent

Verify the transaction timestamp or not

@param tx_timeout Transaction timeout, in second. @param block_tx_capacity Max transaction count in a block. @param block_size Max block size, in MB, Ineffectual @param block_interval The interval of block proposing attempts, in millisecond @param tx_parameter_size maximum size of transaction's parameter, in MB

type ChainConfigContract

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

ChainConfigContract 链配置管理合约对象

func NewChainConfigContract

func NewChainConfigContract(log protocol.Logger) *ChainConfigContract

NewChainConfigContract 构造ChainConfigContract @param log @return *ChainConfigContract

func (*ChainConfigContract) GetMethod

func (c *ChainConfigContract) GetMethod(methodName string) common.ContractFunc

GetMethod get register method by name

type ChainConfigRuntime

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

ChainConfigRuntime get chain config info

func (*ChainConfigRuntime) AlterAddrType added in v2.2.0

func (r *ChainConfigRuntime) AlterAddrType(txSimContext protocol.TxSimContext, params map[string][]byte) (result []byte,
	err error)

AlterAddrType upgrade the type of address

func (*ChainConfigRuntime) EnableOrDisableGas added in v2.2.0

func (r *ChainConfigRuntime) EnableOrDisableGas(txSimContext protocol.TxSimContext,
	params map[string][]byte) (result []byte, err error)

EnableOrDisableGas enable or able gas

func (*ChainConfigRuntime) GetChainConfig

func (r *ChainConfigRuntime) GetChainConfig(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

GetChainConfig get newest chain config

func (*ChainConfigRuntime) GetChainConfigFromBlockHeight

func (r *ChainConfigRuntime) GetChainConfigFromBlockHeight(txSimContext protocol.TxSimContext,
	params map[string][]byte) (result []byte, err error)

GetChainConfigFromBlockHeight get chain config from less than or equal to block height

func (*ChainConfigRuntime) SetAccountManagerAdmin added in v2.3.0

func (g *ChainConfigRuntime) SetAccountManagerAdmin(txSimContext protocol.TxSimContext,
	params map[string][]byte) ([]byte, error)

SetAccountManagerAdmin 设置gas account的管理员 @param txSimContext @param params @return []byte @return error

func (*ChainConfigRuntime) SetInstallBaseGas added in v2.3.3

func (r *ChainConfigRuntime) SetInstallBaseGas(txSimContext protocol.TxSimContext,
	params map[string][]byte) (result []byte, err error)

SetInstallBaseGas set default gas for install contract @param set_install_base_gas @return *ChainConfigContract

func (*ChainConfigRuntime) SetInstallGasPrice added in v2.3.3

func (r *ChainConfigRuntime) SetInstallGasPrice(txSimContext protocol.TxSimContext,
	params map[string][]byte) (result []byte, err error)

SetInstallGasPrice set default gas for install contract @param set_install_gas_price @return *ChainConfigContract

func (*ChainConfigRuntime) SetInvokeBaseGas added in v2.3.0

func (r *ChainConfigRuntime) SetInvokeBaseGas(txSimContext protocol.TxSimContext,
	params map[string][]byte) (result []byte, err error)

SetInvokeBaseGas set default gas for invoke @param set_invoke_base_gas @return *ChainConfigContract

func (*ChainConfigRuntime) SetInvokeGasPrice added in v2.3.3

func (r *ChainConfigRuntime) SetInvokeGasPrice(txSimContext protocol.TxSimContext,
	params map[string][]byte) (result []byte, err error)

SetInvokeGasPrice set default gas for invoke @param set_invoke_gas_price @return *ChainConfigContract

func (*ChainConfigRuntime) UpdateVersion added in v2.3.0

func (r *ChainConfigRuntime) UpdateVersion(txSimContext protocol.TxSimContext,
	params map[string][]byte) (result []byte, err error)

UpdateVersion 更新ChainConfig.Version字段 @param txSimContext @param params key:block_version @return result @return err

type ChainConsensusRuntime

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

ChainConsensusRuntime chain consensus config update

func (*ChainConsensusRuntime) ConsensusExtAdd

func (r *ChainConsensusRuntime) ConsensusExtAdd(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

ConsensusExtAdd add consensus extra

func (*ChainConsensusRuntime) ConsensusExtDelete

func (r *ChainConsensusRuntime) ConsensusExtDelete(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

ConsensusExtDelete delete consensus extra

func (*ChainConsensusRuntime) ConsensusExtUpdate

func (r *ChainConsensusRuntime) ConsensusExtUpdate(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

ConsensusExtUpdate update consensus extra

func (*ChainConsensusRuntime) NodeIdAdd

func (r *ChainConsensusRuntime) NodeIdAdd(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

NodeIdAdd add nodeId for org @param org_id @param node_ids @return chainConfig

func (*ChainConsensusRuntime) NodeIdDelete

func (r *ChainConsensusRuntime) NodeIdDelete(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

NodeIdDelete delete nodeId raft consensus in public key mode, when delete nodes, the remaining consensus nodes counts need >= 2 @param org_id @param node_id @return chainConfig

func (*ChainConsensusRuntime) NodeIdUpdate

func (r *ChainConsensusRuntime) NodeIdUpdate(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

NodeIdUpdate update nodeId @param org_id @param node_id @param new_node_id @return chainConfig

func (*ChainConsensusRuntime) NodeOrgAdd

func (r *ChainConsensusRuntime) NodeOrgAdd(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

NodeOrgAdd add nodeOrg @param org_id @param node_ids @return chainConfig

func (*ChainConsensusRuntime) NodeOrgDelete

func (r *ChainConsensusRuntime) NodeOrgDelete(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

NodeOrgDelete delete nodeOrg raft consensus in public key mode, when delete nodes, the remaining consensus nodes counts need >= 2 @param org_id @return chainConfig

func (*ChainConsensusRuntime) NodeOrgUpdate

func (r *ChainConsensusRuntime) NodeOrgUpdate(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

NodeOrgUpdate update nodeOrg @param org_id @param node_ids @return chainConfig

type ChainCoreRuntime

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

ChainCoreRuntime chain core config update

func (*ChainCoreRuntime) CoreUpdate

func (r *ChainCoreRuntime) CoreUpdate(txSimContext protocol.TxSimContext, params map[string][]byte) ([]byte, error)

CoreUpdate update core for chain @param tx_scheduler_timeout Max scheduling time of a block, in second. [0, 60] @param tx_scheduler_validate_timeout Max validating time of a block, in second. [0, 60] @param enable_sender_group Used for handling txs with sender conflicts efficiently @param enable_conflicts_bit_window Used for dynamic tuning the capacity of tx execution goroutine pool @param enable_optimize_charge_gas enable gas

type ChainPermissionRuntime added in v2.3.0

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

ChainPermissionRuntime 关于Permission的配置操作

func (*ChainPermissionRuntime) ResourcePolicyAdd added in v2.3.0

func (r *ChainPermissionRuntime) ResourcePolicyAdd(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

ResourcePolicyAdd add permission

func (*ChainPermissionRuntime) ResourcePolicyDelete added in v2.3.0

func (r *ChainPermissionRuntime) ResourcePolicyDelete(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

ResourcePolicyDelete delete permission

func (*ChainPermissionRuntime) ResourcePolicyList added in v2.3.0

func (r *ChainPermissionRuntime) ResourcePolicyList(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

ResourcePolicyList get newest resource policy list

func (*ChainPermissionRuntime) ResourcePolicyUpdate added in v2.3.0

func (r *ChainPermissionRuntime) ResourcePolicyUpdate(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

ResourcePolicyUpdate update resource policy

type ChainTrustMembersRuntime

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

ChainTrustMembersRuntime trust member(third cert) manager

func (*ChainTrustMembersRuntime) TrustMemberAdd

func (r *ChainTrustMembersRuntime) TrustMemberAdd(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

TrustMemberAdd add third party certificate @param org_id @param member_info @param role @param node_id @return chainConfig

func (*ChainTrustMembersRuntime) TrustMemberDelete

func (r *ChainTrustMembersRuntime) TrustMemberDelete(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

TrustMemberDelete delete third party certificate @param org_id @param member_info @return chainConfig

type ChainTrustRootsRuntime

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

ChainTrustRootsRuntime chain trust root manager

func (*ChainTrustRootsRuntime) TrustRootAdd

func (r *ChainTrustRootsRuntime) TrustRootAdd(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

TrustRootAdd add trustRoot @param org_id @param root @return chainConfig

func (*ChainTrustRootsRuntime) TrustRootDelete

func (r *ChainTrustRootsRuntime) TrustRootDelete(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

TrustRootDelete delete the org all trust root must not contain the consensus node cert issued by the cert @param org_id @return chainConfig

func (*ChainTrustRootsRuntime) TrustRootUpdate

func (r *ChainTrustRootsRuntime) TrustRootUpdate(txSimContext protocol.TxSimContext, params map[string][]byte) (
	result []byte, err error)

TrustRootUpdate update the trustRoot @param org_id @param root @return chainConfig

type UPMRuntime added in v2.3.3

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

UPMRuntime upgrade permission manager

type VmRuntime added in v2.3.2

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

VmRuntime Vm config update

func (*VmRuntime) EnableOrDisableMultiSignManualRun added in v2.3.2

func (r *VmRuntime) EnableOrDisableMultiSignManualRun(txSimContext protocol.TxSimContext,
	params map[string][]byte) (result []byte, err error)

EnableOrDisableMultiSignManualRun set enable_manual_run flag by `multi_sign_enable_manual_run` key

Jump to

Keyboard shortcuts

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