Documentation
¶
Overview ¶
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- Variables
- type Backend
- type BlockGenor
- type PowPool
- func (self *PowPool) AddMinerResult(blockHash common.Hash, diff *big.Int, minerResult *mc.HD_MiningRspMsg) error
- func (self *PowPool) DelOneResult(blockHash common.Hash, diff *big.Int, from common.Address)
- func (self *PowPool) GetMinerResults(blockHash common.Hash, diff *big.Int) ([]*mc.HD_MiningRspMsg, error)
- type Process
- func (p *Process) AddBroadcastMinerResult(result *mc.HD_BroadcastMiningRspMsg)
- func (p *Process) AddConsensusBlock(block *mc.BlockLocalVerifyOK)
- func (p *Process) AddInsertBlockInfo(blockInsert *mc.HD_BlockInsertNotify)
- func (p *Process) AddMinerResult(minerResult *mc.HD_MiningRspMsg)
- func (p *Process) Close()
- func (p *Process) ProcessFullBlockReq(req *mc.HD_FullBlockReqMsg)
- func (p *Process) ProcessFullBlockRsp(rsp *mc.HD_FullBlockRspMsg)
- func (p *Process) ProcessRecoveryMsg(msg *mc.RecoveryStateMsg)
- func (p *Process) ReInit()
- func (p *Process) ReInitNextLeader()
- func (p *Process) SetCurLeader(leader common.Address, consensusTurn uint32)
- func (p *Process) SetNextLeader(leader common.Address)
- func (p *Process) StartRunning(role common.RoleType)
- type ProcessManage
- func (pm *ProcessManage) GetCurNumber() uint64
- func (pm *ProcessManage) GetCurrentProcess() *Process
- func (pm *ProcessManage) GetProcess(number uint64) (*Process, error)
- func (pm *ProcessManage) GetProcessAndPreProcess(number uint64) (*Process, *Process, error)
- func (pm *ProcessManage) SetCurNumber(number uint64)
- type State
- type Work
Constants ¶
This section is empty.
Variables ¶
var ( TimeStampError = errors.New("Timestamp Error") NodeIDError = errors.New("Node Error") PosHeaderError = errors.New("PosHeader Error") MinerResultError = errors.New("MinerResult Error") MinerPosfail = errors.New("MinerResult POS Fail") AccountError = errors.New("Acccount Error") TxsError = errors.New("txs Error") NoWallets = errors.New("No Wallets ") NoAccount = errors.New("No Account ") ParaNull = errors.New("Para is null ") Noleader = errors.New("not leader ") SignaturesError = errors.New("Signatures Error") FakeHeaderError = errors.New("FakeHeader Error") VoteResultError = errors.New("VoteResultError Error") HeightError = errors.New("Height Error") HaveNotOKResultError = errors.New("have no satisfy miner result") HaveNoGenBlockError = errors.New("have no gen block data") HashNoSignNotMatchError = errors.New("hash without sign not match") )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
AccountManager() *accounts.Manager
BlockChain() *core.BlockChain
TxPool() *core.TxPool
ChainDb() mandb.Database
EventMux() *event.TypeMux
SignHelper() *signhelper.SignHelper
HD() *hd.HD
ReElection() *reelection.ReElection
FetcherNotify(hash common.Hash, number uint64)
}
type BlockGenor ¶
type BlockGenor struct {
// contains filtered or unexported fields
}
func New ¶
func New(man Backend) (*BlockGenor, error)
type PowPool ¶
type PowPool struct {
// contains filtered or unexported fields
}
///////////////////////////////////////////////////////////////////////////////////////// 协程安全投挖矿结果池
func NewPowPool ¶
func (*PowPool) AddMinerResult ¶
func (*PowPool) DelOneResult ¶
func (*PowPool) GetMinerResults ¶
type Process ¶
type Process struct {
FullBlockReqCache *common.ReuseMsgController
// contains filtered or unexported fields
}
func (*Process) AddBroadcastMinerResult ¶
func (p *Process) AddBroadcastMinerResult(result *mc.HD_BroadcastMiningRspMsg)
func (*Process) AddConsensusBlock ¶
func (p *Process) AddConsensusBlock(block *mc.BlockLocalVerifyOK)
func (*Process) AddInsertBlockInfo ¶
func (p *Process) AddInsertBlockInfo(blockInsert *mc.HD_BlockInsertNotify)
func (*Process) AddMinerResult ¶
func (p *Process) AddMinerResult(minerResult *mc.HD_MiningRspMsg)
func (*Process) ProcessFullBlockReq ¶
func (p *Process) ProcessFullBlockReq(req *mc.HD_FullBlockReqMsg)
func (*Process) ProcessFullBlockRsp ¶
func (p *Process) ProcessFullBlockRsp(rsp *mc.HD_FullBlockRspMsg)
func (*Process) ProcessRecoveryMsg ¶
func (p *Process) ProcessRecoveryMsg(msg *mc.RecoveryStateMsg)
func (*Process) ReInitNextLeader ¶
func (p *Process) ReInitNextLeader()
func (*Process) SetCurLeader ¶
func (*Process) SetNextLeader ¶
func (*Process) StartRunning ¶
type ProcessManage ¶
type ProcessManage struct {
// contains filtered or unexported fields
}
func NewProcessManage ¶
func NewProcessManage(matrix Backend) *ProcessManage
func (*ProcessManage) GetCurNumber ¶
func (pm *ProcessManage) GetCurNumber() uint64
func (*ProcessManage) GetCurrentProcess ¶
func (pm *ProcessManage) GetCurrentProcess() *Process
func (*ProcessManage) GetProcess ¶
func (pm *ProcessManage) GetProcess(number uint64) (*Process, error)
func (*ProcessManage) GetProcessAndPreProcess ¶
func (pm *ProcessManage) GetProcessAndPreProcess(number uint64) (*Process, *Process, error)
func (*ProcessManage) SetCurNumber ¶
func (pm *ProcessManage) SetCurNumber(number uint64)