Documentation ¶
Overview ¶
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library. * * The poly network is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The poly network is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License * along with The poly network . If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Constants
- func ConvertAddr(base58Addr string) sccm.Address
- func DeserializeKeepers(raw []byte) []polycm.Address
- func RawMultiSigsToList(sigData []byte) ([][]byte, error)
- func RecoverSignersFromMultiSigs(hash sccm.Hash, sigs [][]byte) ([]sccm.Address, error)
- func VerifyPolyHeader(hdr *polytyps.Header, peers *ont.ConsensusPeers) error
- func VerifySig(hash sccm.Hash, multiSigData []byte, keepers []sccm.Address, m int) error
- type BookKeepersChangedEvent
- type CrossTransfer
- type GenesisInitEvent
- type PolyManager
- type QuorumManager
- type QuorumSender
- type QuorumTxInfo
Constants ¶
const (
ChanLen = 64
)
Variables ¶
This section is empty.
Functions ¶
func ConvertAddr ¶
func DeserializeKeepers ¶
func RawMultiSigsToList ¶
func VerifyPolyHeader ¶
func VerifyPolyHeader(hdr *polytyps.Header, peers *ont.ConsensusPeers) error
Types ¶
type BookKeepersChangedEvent ¶
type BookKeepersChangedEvent struct {
RawPeers []byte `json:"raw_peers"`
}
type CrossTransfer ¶
type CrossTransfer struct {
// contains filtered or unexported fields
}
func (*CrossTransfer) Deserialization ¶
func (t *CrossTransfer) Deserialization(source *common.ZeroCopySource) error
func (*CrossTransfer) Serialization ¶
func (t *CrossTransfer) Serialization(sink *common.ZeroCopySink)
type GenesisInitEvent ¶
type PolyManager ¶
type PolyManager struct {
// contains filtered or unexported fields
}
func NewPolyManager ¶
func (*PolyManager) MonitorChain ¶
func (m *PolyManager) MonitorChain()
func (*PolyManager) Stop ¶
func (m *PolyManager) Stop()
type QuorumManager ¶
type QuorumManager struct {
// contains filtered or unexported fields
}
QuorumManager quorum->poly: 1. record quorum height in poly 2. fetch quorum header and proof and send to poly chain 3. The synchronization process is often batch processing, rather than block-by-block synchronization or submitting events, etc., so two slices are required to record the header and crossTx. 4. To ensure that each block is not dropped, we need a currentHeight mark stored in the headerSync contract of the relay chain to record which block is currently processed. 5. A cross chain manager is required to obtain cross-chain events from the solidity contract on the quorum chain
func NewQuorumManager ¶
func (*QuorumManager) CheckDeposit ¶
func (m *QuorumManager) CheckDeposit()
func (*QuorumManager) MonitorChain ¶
func (m *QuorumManager) MonitorChain()
MonitorChain the `QuorumManager` needs to traverse all of blocks and events on the quorum chain, and record the relationship of block height and block content which contains block header and event logs. and these data should be synced to `headerSync` and `crossChainManager` contracts located on poly chain.
func (*QuorumManager) MonitorDeposit ¶
func (m *QuorumManager) MonitorDeposit()
type QuorumSender ¶
type QuorumSender struct {
// contains filtered or unexported fields
}
type QuorumTxInfo ¶
type QuorumTxInfo struct {
// contains filtered or unexported fields
}