Documentation ¶
Overview ¶
- Copyright (C) 2021 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/>.
Copyright 2017 The go-ethereum Authors This file is part of the go-ethereum library.
The go-ethereum library 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 go-ethereum library 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 go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2021 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/>.
Copyright (C) 2021 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 ¶
- Variables
- func CopyHeader(h *types.Header) *types.Header
- func GetCurrentValHeight(ns *native.NativeService, chainID uint64) (uint64, error)
- func GetQuorumHeaderHash(h *types.Header) common.Hash
- func GetSignatureAddress(data []byte, sig []byte) (common.Address, error)
- func GetSigners(hash ecom.Hash, sealArr [][]byte) ([]ecom.Address, error)
- func IstanbulFilteredHeader(h *types.Header, keepSeal bool) *types.Header
- func PrepareCommittedSeal(hash common.Hash) []byte
- type IstanbulExtra
- type QuorumHandler
- type QuorumValSet
- func (vs *QuorumValSet) Deserialize(source *pcom.ZeroCopySource) error
- func (vs QuorumValSet) Exist(address common.Address) bool
- func (vs QuorumValSet) F() int
- func (vs QuorumValSet) GetByAddress(addr common.Address) (int, common.Address)
- func (vs QuorumValSet) IfChanged(another QuorumValSet) bool
- func (vs QuorumValSet) JustOneChanged(another QuorumValSet) error
- func (vs QuorumValSet) Serialize(sink *pcom.ZeroCopySink)
- func (vs QuorumValSet) String() (res string)
- func (vs QuorumValSet) VerifyCommittedSeals(extra *IstanbulExtra, hash common.Hash) error
- func (vs QuorumValSet) VerifySigner(hdr *types.Header, seal []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( IstanbulExtraVanity = 32 // Fixed number of extra-data bytes reserved for validator vanity IstanbulDigest = ecom.HexToHash("0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365") )
Functions ¶
func GetCurrentValHeight ¶
func GetCurrentValHeight(ns *native.NativeService, chainID uint64) (uint64, error)
func GetSignatureAddress ¶
copy from quorum
func IstanbulFilteredHeader ¶
copy from quorum
Types ¶
type IstanbulExtra ¶
func ExtractIstanbulExtra ¶
func ExtractIstanbulExtra(h *types.Header) (*IstanbulExtra, error)
copy from quorum
func VerifyQuorumHeader ¶
func VerifyQuorumHeader(vs QuorumValSet, hdr *types.Header, isEpoch bool) (*IstanbulExtra, error)
type QuorumHandler ¶
type QuorumHandler struct{}
func NewQuorumHandler ¶
func NewQuorumHandler() *QuorumHandler
func (*QuorumHandler) SyncBlockHeader ¶
func (h *QuorumHandler) SyncBlockHeader(ns *native.NativeService) error
func (*QuorumHandler) SyncCrossChainMsg ¶
func (h *QuorumHandler) SyncCrossChainMsg(ns *native.NativeService) error
func (*QuorumHandler) SyncGenesisHeader ¶
func (h *QuorumHandler) SyncGenesisHeader(ns *native.NativeService) error
type QuorumValSet ¶
func GetValSet ¶
func GetValSet(ns *native.NativeService, chainID uint64) (QuorumValSet, error)
func (*QuorumValSet) Deserialize ¶
func (vs *QuorumValSet) Deserialize(source *pcom.ZeroCopySource) error
func (QuorumValSet) F ¶
func (vs QuorumValSet) F() int
func (QuorumValSet) GetByAddress ¶
func (QuorumValSet) IfChanged ¶
func (vs QuorumValSet) IfChanged(another QuorumValSet) bool
func (QuorumValSet) JustOneChanged ¶
func (vs QuorumValSet) JustOneChanged(another QuorumValSet) error
func (QuorumValSet) Serialize ¶
func (vs QuorumValSet) Serialize(sink *pcom.ZeroCopySink)
func (QuorumValSet) String ¶
func (vs QuorumValSet) String() (res string)
func (QuorumValSet) VerifyCommittedSeals ¶
func (vs QuorumValSet) VerifyCommittedSeals(extra *IstanbulExtra, hash common.Hash) error
func (QuorumValSet) VerifySigner ¶
func (vs QuorumValSet) VerifySigner(hdr *types.Header, seal []byte) error