Documentation
¶
Overview ¶
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
ZooBC Copyright (C) 2020 Quasisoft Limited - Hong Kong This file is part of ZooBC <https://github.com/zoobc/zoobc-core>
ZooBC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
ZooBC 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with ZooBC. If not, see <http://www.gnu.org/licenses/>.
Additional Permission Under GNU GPL Version 3 section 7. As the special exception permitted under Section 7b, c and e, in respect with the Author’s copyright, please refer to this section:
- You are free to convey this Program according to GNU GPL Version 3, as long as you respect and comply with the Author’s copyright by showing in its user interface an Appropriate Notice that the derivate program and its source code are “powered by ZooBC”. This is an acknowledgement for the copyright holder, ZooBC, as the implementation of appreciation of the exclusive right of the creator and to avoid any circumvention on the rights under trademark law for use of some trade names, trademarks, or service marks.
- Complying to the GNU GPL Version 3, you may distribute the program without any permission from the Author. However a prior notification to the authors will be appreciated.
ZooBC is architected by Roberto Capodieci & Barton Johnston
contact us at roberto.capodieci[at]blockchainzoo.com and barton.johnston[at]blockchainzoo.com
Core developers that contributed to the current implementation of the software are:
Ahmad Ali Abdilah ahmad.abdilah[at]blockchainzoo.com Allan Bintoro allan.bintoro[at]blockchainzoo.com Andy Herman Gede Sukra Ketut Ariasa Nawi Kartini nawi.kartini[at]blockchainzoo.com Stefano Galassi stefano.galassi[at]blockchainzoo.com
IMPORTANT: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Index ¶
- func AddGenesisAccount(executor query.ExecutorInterface) error
- func AddGenesisNextNodeAdmission(executor query.ExecutorInterface, genesisBlockTimestamp int64, ...) error
- func FlattenReceiptGroups(receiptGroups map[string][]model.Receipt) []model.Receipt
- func GetGenesisNodeRegistrationTx(accountAddress []byte, message string, lockedBalance int64, ...) (*model.Transaction, error)
- func GetGenesisTransactions(chainType chaintype.ChainType, genesisEntries []constant.GenesisConfigEntry) ([]*model.Transaction, error)
- func SortReceipts(receipts []model.Receipt) []model.Receipt
- type BlockIDsMap
- type BlockIncompleteQueueService
- func (buqs *BlockIncompleteQueueService) AddBlockQueue(block *model.Block)
- func (buqs *BlockIncompleteQueueService) AddTransaction(transaction *model.Transaction) []*model.Block
- func (buqs *BlockIncompleteQueueService) GetBlockQueue(blockID int64) *model.Block
- func (buqs *BlockIncompleteQueueService) PruneTimeoutBlockQueue()
- func (buqs *BlockIncompleteQueueService) RequestBlockTransactions(txIds []int64, blockID int64, peer *model.Peer)
- func (buqs *BlockIncompleteQueueService) SetTransactionsRequired(blockIDs int64, requiredTxIDs TransactionIDsMap)
- type BlockIncompleteQueueServiceInterface
- type BlockPoolService
- type BlockPoolServiceInterface
- type BlockService
- func (bs *BlockService) AddGenesis() error
- func (bs *BlockService) BlockTransactionsRequestedListener() observer.Listener
- func (bs *BlockService) ChainWriteLock(actionType int)
- func (bs *BlockService) ChainWriteUnlock(actionType int)
- func (bs *BlockService) CheckGenesis() (bool, error)
- func (bs *BlockService) GenerateBlock(previousBlock *model.Block, secretPhrase string, timestamp int64, empty bool) (*model.Block, error)
- func (bs *BlockService) GenerateGenesisBlock(genesisEntries []constant.GenesisConfigEntry) (*model.Block, error)
- func (bs *BlockService) GetBlockByHeight(height uint32) (*model.Block, error)
- func (bs *BlockService) GetBlockByHeightCacheFormat(height uint32) (*storage.BlockCacheObject, error)
- func (bs *BlockService) GetBlockByID(id int64, withAttachedData bool) (*model.Block, error)
- func (bs *BlockService) GetBlockByIDCacheFormat(id int64) (*storage.BlockCacheObject, error)
- func (bs *BlockService) GetBlockHash(block *model.Block) ([]byte, error)
- func (bs *BlockService) GetBlocks() ([]*model.Block, error)
- func (bs *BlockService) GetBlocksFromHeight(startHeight, limit uint32, withAttachedData bool) ([]*model.Block, error)
- func (bs *BlockService) GetBlocksmithStrategy() strategy.BlocksmithStrategyInterface
- func (bs *BlockService) GetChainType() chaintype.ChainType
- func (bs *BlockService) GetGenesisBlock() (*model.Block, error)
- func (bs *BlockService) GetLastBlock() (*model.Block, error)
- func (bs *BlockService) GetLastBlockCacheFormat() (*storage.BlockCacheObject, error)
- func (bs *BlockService) GetPayloadHashAndLength(block *model.Block) (payloadHash []byte, payloadLength uint32, err error)
- func (bs *BlockService) InitializeBlocksCache() error
- func (bs *BlockService) NewGenesisBlock(version uint32, ...) (*model.Block, error)
- func (bs *BlockService) NewMainBlock(version uint32, previousBlockHash, blockSeed, blockSmithPublicKey []byte, ...) (*model.Block, error)
- func (bs *BlockService) PopOffToBlock(commonBlock *model.Block) ([]*model.Block, error)
- func (bs *BlockService) PopulateBlockData(block *model.Block) error
- func (bs *BlockService) ProcessCompletedBlock(block *model.Block) error
- func (bs *BlockService) ProcessPushBlock(previousBlock, block *model.Block, broadcast, persist bool, round int64) (nodeAdmissionTimestamp *model.NodeAdmissionTimestamp, transactionIDs []int64, ...)
- func (bs *BlockService) ProcessQueueBlock(block *model.Block, peer *model.Peer) (needWaiting bool, err error)
- func (bs *BlockService) PushBlock(previousBlock, block *model.Block, broadcast, persist bool) error
- func (bs *BlockService) ReceiveBlock(senderPublicKey []byte, lastBlock, block *model.Block, nodeSecretPhrase string, ...) (*model.Receipt, error)
- func (bs *BlockService) ReceivedValidatedBlockTransactionsListener() observer.Listener
- func (bs *BlockService) ScanBlockPool() error
- func (bs *BlockService) UpdateLastBlockCache(block *model.Block) error
- func (bs *BlockService) ValidateBlock(block, previousLastBlock *model.Block) error
- func (bs *BlockService) ValidatePayloadHash(block *model.Block) error
- type BlockServiceInterface
- type BlockServiceMainInterface
- type BlockServiceSpineInterface
- type BlockSpinePublicKeyService
- func (bsf *BlockSpinePublicKeyService) BuildSpinePublicKeysFromNodeRegistry(mainFromHeight, mainToHeight, spineHeight uint32) (spinePublicKeys []*model.SpinePublicKey, err error)
- func (bsf *BlockSpinePublicKeyService) GetSpinePublicKeysByBlockHeight(height uint32) (spinePublicKeys []*model.SpinePublicKey, err error)
- func (bsf *BlockSpinePublicKeyService) GetValidSpinePublicKeyByBlockHeightInterval(fromHeight, toHeight uint32) ([]*model.SpinePublicKey, error)
- func (bsf *BlockSpinePublicKeyService) InsertSpinePublicKeys(block *model.Block) error
- type BlockSpinePublicKeyServiceInterface
- type BlockSpineService
- func (bs *BlockSpineService) AddGenesis() error
- func (bs *BlockSpineService) BlockTransactionsRequestedListener() observer.Listener
- func (bs *BlockSpineService) ChainWriteLock(actionType int)
- func (bs *BlockSpineService) ChainWriteUnlock(actionType int)
- func (bs *BlockSpineService) CheckGenesis() (bool, error)
- func (bs *BlockSpineService) GenerateBlock(previousBlock *model.Block, secretPhrase string, timestamp int64, _ bool) (*model.Block, error)
- func (bs *BlockSpineService) GenerateGenesisBlock(genesisEntries []constant.GenesisConfigEntry) (*model.Block, error)
- func (bs *BlockSpineService) GetBlockByHeight(height uint32) (*model.Block, error)
- func (bs *BlockSpineService) GetBlockByHeightCacheFormat(height uint32) (*storage.BlockCacheObject, error)
- func (bs *BlockSpineService) GetBlockByID(id int64, withAttachedData bool) (*model.Block, error)
- func (bs *BlockSpineService) GetBlockByIDCacheFormat(id int64) (*storage.BlockCacheObject, error)
- func (bs *BlockSpineService) GetBlockHash(block *model.Block) ([]byte, error)
- func (bs *BlockSpineService) GetBlocks() ([]*model.Block, error)
- func (bs *BlockSpineService) GetBlocksFromHeight(startHeight, limit uint32, withAttachedData bool) ([]*model.Block, error)
- func (bs *BlockSpineService) GetBlocksmithStrategy() strategy.BlocksmithStrategyInterface
- func (bs *BlockSpineService) GetChainType() chaintype.ChainType
- func (bs *BlockSpineService) GetGenesisBlock() (*model.Block, error)
- func (bs *BlockSpineService) GetLastBlock() (*model.Block, error)
- func (bs *BlockSpineService) GetLastBlockCacheFormat() (*storage.BlockCacheObject, error)
- func (bs *BlockSpineService) GetPayloadHashAndLength(block *model.Block) (payloadHash []byte, payloadLength uint32, err error)
- func (bs *BlockSpineService) InitializeBlocksCache() error
- func (bs *BlockSpineService) NewGenesisBlock(version uint32, ...) (*model.Block, error)
- func (bs *BlockSpineService) NewSpineBlock(version uint32, ...) (*model.Block, error)
- func (bs *BlockSpineService) PopOffToBlock(commonBlock *model.Block) ([]*model.Block, error)
- func (bs *BlockSpineService) PopulateBlockData(block *model.Block) error
- func (bs *BlockSpineService) ProcessPushBlock(previousBlock, block *model.Block, broadcast, persist bool) error
- func (bs *BlockSpineService) ProcessSkippedBlocksmiths(previousBlock, block *model.Block) error
- func (bs *BlockSpineService) PushBlock(previousBlock, block *model.Block, broadcast, persist bool) error
- func (bs *BlockSpineService) ReceiveBlock(_ []byte, lastBlock, block *model.Block, _ string, _ *model.Peer, _ bool) (*model.Receipt, error)
- func (bs *BlockSpineService) ReceivedValidatedBlockTransactionsListener() observer.Listener
- func (bs *BlockSpineService) UpdateLastBlockCache(block *model.Block) error
- func (bs *BlockSpineService) ValidateBlock(block, previousLastBlock *model.Block) error
- func (bs *BlockSpineService) ValidatePayloadHash(block *model.Block) error
- func (bs *BlockSpineService) ValidateSpineBlockManifest(spineBlockManifest *model.SpineBlockManifest) error
- type BlockWithMetaData
- type BlockchainStatusService
- func (btss *BlockchainStatusService) GetLastBlock(ct chaintype.ChainType) *model.Block
- func (btss *BlockchainStatusService) IsBlocksmith() bool
- func (btss *BlockchainStatusService) IsDownloading(ct chaintype.ChainType) bool
- func (btss *BlockchainStatusService) IsDownloadingSnapshot(ct chaintype.ChainType) bool
- func (btss *BlockchainStatusService) IsFirstDownloadFinished(ct chaintype.ChainType) bool
- func (btss *BlockchainStatusService) IsSmithing(ct chaintype.ChainType) bool
- func (btss *BlockchainStatusService) IsSmithingLocked() bool
- func (btss *BlockchainStatusService) SetFirstDownloadFinished(ct chaintype.ChainType, finished bool)
- func (btss *BlockchainStatusService) SetIsBlocksmith(blocksmith bool)
- func (btss *BlockchainStatusService) SetIsDownloading(ct chaintype.ChainType, downloading bool)
- func (btss *BlockchainStatusService) SetIsDownloadingSnapshot(ct chaintype.ChainType, downloadingSnapshot bool)
- func (btss *BlockchainStatusService) SetIsSmithing(ct chaintype.ChainType, smithing bool)
- func (btss *BlockchainStatusService) SetIsSmithingLocked(smithingLocked bool)
- func (btss *BlockchainStatusService) SetLastBlock(block *model.Block, ct chaintype.ChainType)
- type BlockchainStatusServiceInterface
- type BlocksmithService
- type BlocksmithServiceInterface
- type CoinbaseService
- func (cbs *CoinbaseService) CoinbaseLotteryWinners(activeRegistries []storage.NodeRegistry, scoreSum, blockTimestamp int64, ...) ([][]byte, error)
- func (cbs *CoinbaseService) GetCoinbase(blockTimesatamp, previousBlockTimesatamp int64) int64
- func (cbs *CoinbaseService) GetTotalDistribution(blockTimestamp int64) int64
- type CoinbaseServiceInterface
- type FileService
- func (fs *FileService) DecodePayload(b []byte, v interface{}) error
- func (fs *FileService) DeleteSnapshotChunkFromDir(dir, fileName string) error
- func (fs *FileService) DeleteSnapshotDir(dir string) error
- func (fs *FileService) EncodePayload(v interface{}) (b []byte, err error)
- func (fs *FileService) GetDownloadPath() string
- func (fs *FileService) GetEncoderHandler() codec.Handle
- func (fs *FileService) GetFileNameFromBytes(fileBytes []byte) string
- func (*FileService) GetFileNameFromHash(fileHash []byte) string
- func (*FileService) GetHashFromFileName(fileName string) ([]byte, error)
- func (fs *FileService) HashPayload(b []byte) ([]byte, error)
- func (fs *FileService) ParseFileChunkHashes(fileHashes []byte, hashLength int) (fileHashesAry [][]byte, err error)
- func (fs *FileService) ReadFileFromDir(dir, fileName string) ([]byte, error)
- func (fs *FileService) SaveSnapshotChunks(dir string, chunks [][]byte) (fileHashes [][]byte, err error)
- func (fs *FileService) SetEncoder(hh codec.Handle)
- func (fs *FileService) VerifyFileChecksum(fileBytes, hash []byte) bool
- type FileServiceInterface
- type MempoolService
- func (mps *MempoolService) AddMempoolTransaction(tx *model.Transaction, txBytes []byte) error
- func (mps *MempoolService) BackupMempools(commonBlock *model.Block) error
- func (mps *MempoolService) DeleteExpiredMempoolTransactions() error
- func (mps *MempoolService) GetMempoolTransactions() (storage.MempoolMap, error)
- func (mps *MempoolService) GetMempoolTransactionsWantToBackup(height uint32) ([]*model.Transaction, error)
- func (mps *MempoolService) GetTotalMempoolTransactions() (int, error)
- func (mps *MempoolService) InitMempoolTransaction() error
- func (mps *MempoolService) ProcessReceivedTransaction(senderPublicKey, receivedTxBytes []byte, ...) (*model.Receipt, *model.Transaction, error)
- func (mps *MempoolService) ReceivedBlockTransactions(senderPublicKey []byte, receivedTxBytes [][]byte, ...) ([]*model.Receipt, error)
- func (mps *MempoolService) ReceivedTransaction(senderPublicKey, receivedTxBytes []byte, ...) (*model.Receipt, error)
- func (mps *MempoolService) RemoveMempoolTransactions(transactions []*model.Transaction) error
- func (mps *MempoolService) SelectTransactionsFromMempool(blockTimestamp int64, blockHeight uint32) ([]*model.Transaction, error)
- func (mps *MempoolService) ValidateMempoolTransaction(mpTx *model.Transaction) error
- type MempoolServiceInterface
- type NodeAddressInfoService
- func (nru *NodeAddressInfoService) BeginCacheTransaction() error
- func (nru *NodeAddressInfoService) ClearUpdateNodeAddressInfoCache() error
- func (nru *NodeAddressInfoService) CommitCacheTransaction() error
- func (nru *NodeAddressInfoService) ConfirmNodeAddressInfo(pendingNodeAddressInfo *model.NodeAddressInfo) error
- func (nru *NodeAddressInfoService) CountNodesAddressByStatus() (map[model.NodeAddressStatus]int, error)
- func (nru *NodeAddressInfoService) CountRegistredNodeAddressWithAddressInfo() (int, error)
- func (nru *NodeAddressInfoService) DeleteNodeAddressInfoByNodeIDInDBTx(nodeID int64) error
- func (nru *NodeAddressInfoService) DeletePendingNodeAddressInfo(nodeID int64) error
- func (nru *NodeAddressInfoService) GenerateNodeAddressInfo(nodeID int64, nodeAddress string, port uint32, nodeSecretPhrase string) (*model.NodeAddressInfo, error)
- func (nru *NodeAddressInfoService) GetAddressInfoByAddressPort(address string, port uint32, nodeAddressStatuses []model.NodeAddressStatus) ([]*model.NodeAddressInfo, error)
- func (nru *NodeAddressInfoService) GetAddressInfoByNodeID(nodeID int64, addressStatuses []model.NodeAddressStatus) ([]*model.NodeAddressInfo, error)
- func (nru *NodeAddressInfoService) GetAddressInfoByNodeIDWithPreferredStatus(nodeID int64, preferredStatus model.NodeAddressStatus) (*model.NodeAddressInfo, error)
- func (nru *NodeAddressInfoService) GetAddressInfoByNodeIDs(nodeIDs []int64, addressStatuses []model.NodeAddressStatus) ([]*model.NodeAddressInfo, error)
- func (nru *NodeAddressInfoService) GetAddressInfoByStatus(nodeAddressStatuses []model.NodeAddressStatus) ([]*model.NodeAddressInfo, error)
- func (nru *NodeAddressInfoService) GetAddressInfoTableWithConsolidatedAddresses(preferredStatus model.NodeAddressStatus) ([]*model.NodeAddressInfo, error)
- func (nru *NodeAddressInfoService) GetUnsignedNodeAddressInfoBytes(nodeAddressMessage *model.NodeAddressInfo) []byte
- func (nru *NodeAddressInfoService) InsertAddressInfo(nodeAddressInfo *model.NodeAddressInfo) error
- func (nru *NodeAddressInfoService) RollbackCacheTransaction() error
- func (nru *NodeAddressInfoService) UpdateAddrressInfo(nodeAddressInfo *model.NodeAddressInfo) error
- func (nru *NodeAddressInfoService) UpdateOrInsertAddressInfo(nodeAddressInfo *model.NodeAddressInfo, updatedStatus model.NodeAddressStatus) (updated bool, err error)
- func (nru *NodeAddressInfoService) ValidateNodeAddressInfo(nodeAddressInfo *model.NodeAddressInfo) (found bool, err error)
- type NodeAddressInfoServiceInterface
- type NodeAdminService
- func (nas *NodeAdminService) GenerateNodeKey(seed string) ([]byte, error)
- func (nas *NodeAdminService) GenerateProofOfOwnership(accountAddress []byte) (*model.ProofOfOwnership, error)
- func (*NodeAdminService) GetLastNodeKey(nodeKeys []*model.NodeKey) *model.NodeKey
- func (nas *NodeAdminService) ParseKeysFile() ([]*model.NodeKey, error)
- type NodeAdminServiceInterface
- type NodeConfigurationService
- func (nss *NodeConfigurationService) GetHost() *model.Host
- func (nss *NodeConfigurationService) GetHostID() (int64, error)
- func (nss *NodeConfigurationService) GetMyAddress() (string, error)
- func (nss *NodeConfigurationService) GetMyPeerPort() (uint32, error)
- func (nss *NodeConfigurationService) GetNodePublicKey() []byte
- func (nss *NodeConfigurationService) GetNodeSecretPhrase() string
- func (nss *NodeConfigurationService) IsMyAddressDynamic() bool
- func (nss *NodeConfigurationService) SetHost(host *model.Host)
- func (nss *NodeConfigurationService) SetHostID(nodeID int64)
- func (nss *NodeConfigurationService) SetIsMyAddressDynamic(nodeAddressDynamic bool)
- func (nss *NodeConfigurationService) SetMyAddress(nodeAddress string, nodePort uint32)
- func (nss *NodeConfigurationService) SetNodeSeed(seed string)
- type NodeConfigurationServiceHelper
- type NodeConfigurationServiceInterface
- type NodeRegistrationService
- func (nrs *NodeRegistrationService) AddParticipationScore(nodeID, scoreDelta int64, height uint32, dbTx bool) (newScore int64, err error)
- func (nrs *NodeRegistrationService) AdmitNodes(nodeRegistrations []*model.NodeRegistration, height uint32) error
- func (nrs *NodeRegistrationService) BeginCacheTransaction() error
- func (nrs *NodeRegistrationService) CommitCacheTransaction() error
- func (nrs *NodeRegistrationService) ExpelNodes(nodeRegistrations []*model.NodeRegistration, height uint32) error
- func (nrs *NodeRegistrationService) GetActiveNodeRegistrationByNodeID(nodeID int64) (*model.NodeRegistration, error)
- func (nrs *NodeRegistrationService) GetActiveRegisteredNodes() ([]*model.NodeRegistration, error)
- func (nrs *NodeRegistrationService) GetActiveRegistryNodeWithTotalParticipationScore() ([]storage.NodeRegistry, int64, error)
- func (nrs *NodeRegistrationService) GetNextNodeAdmissionTimestamp() (*model.NodeAdmissionTimestamp, error)
- func (nrs *NodeRegistrationService) GetNodeRegistrationByNodeID(nodeID int64) (*model.NodeRegistration, error)
- func (nrs *NodeRegistrationService) GetNodeRegistrationByNodePublicKey(nodePublicKey []byte) (*model.NodeRegistration, error)
- func (nrs *NodeRegistrationService) GetNodeRegistryAtHeight(height uint32) ([]*model.NodeRegistration, error)
- func (nrs *NodeRegistrationService) InitializeCache() error
- func (nrs *NodeRegistrationService) InsertNextNodeAdmissionTimestamp(lastAdmissionTimestamp int64, blockHeight uint32, dbTx bool) (*model.NodeAdmissionTimestamp, error)
- func (nrs *NodeRegistrationService) RollbackCacheTransaction() error
- func (nrs *NodeRegistrationService) SelectNodesToBeAdmitted(limit uint32) ([]*model.NodeRegistration, error)
- func (nrs *NodeRegistrationService) SelectNodesToBeExpelled() ([]*model.NodeRegistration, error)
- func (nrs *NodeRegistrationService) SetCurrentNodePublicKey(publicKey []byte)
- func (nrs *NodeRegistrationService) UpdateNextNodeAdmissionCache(newNextNodeAdmission *model.NodeAdmissionTimestamp) error
- type NodeRegistrationServiceInterface
- type ParticipationScoreService
- func (pss *ParticipationScoreService) GetLatestParticipationScoreByNodeAddress(nodeAddress string) (*model.ParticipationScore, error)
- func (pss *ParticipationScoreService) GetLatestParticipationScoreByNodeID(nodeID int64) (*model.ParticipationScore, error)
- func (pss *ParticipationScoreService) GetParticipationScoreByBlockHeightRange(fromBlockHeight, toBlockHeight uint32) ([]*model.ParticipationScore, error)
- type ParticipationScoreServiceInterface
- type PendingTransactionService
- type PendingTransactionServiceInterface
- type PublishedReceiptService
- type PublishedReceiptServiceInterface
- type ReceiptService
- func (rs *ReceiptService) CheckDuplication(publicKey, datumHash []byte) (err error)
- func (rs *ReceiptService) ClearCache()
- func (rs *ReceiptService) FlattenSelectedReceipts(selectedReceiptsMatrix [][]*model.PublishedReceipt) []*model.PublishedReceipt
- func (rs *ReceiptService) GenerateReceiptWithReminder(ct chaintype.ChainType, receivedDatumHash []byte, ...) (*model.Receipt, error)
- func (rs *ReceiptService) GenerateReceiptsMerkleRoot(block *model.Block) error
- func (rs *ReceiptService) GenerateReceiptsMerkleRootListener() observer.Listener
- func (rs *ReceiptService) GetPublishedReceiptsByHeight(blockHeight uint32) ([]*model.PublishedReceipt, error)
- func (rs *ReceiptService) Initialize() error
- func (rs *ReceiptService) SelectLinkedReceipts(numberOfUnlinkedReceipts, numberOfReceipt, blockHeight uint32, ...) ([]*model.PublishedReceipt, error)
- func (rs *ReceiptService) SelectReceipts(numberOfReceipt, blockHeight uint32, blockSeed []byte) ([][]*model.PublishedReceipt, error)
- func (rs *ReceiptService) SelectUnlinkedReceipts(numberOfReceipt, blockHeight uint32, blockSeed []byte) ([]*model.PublishedReceipt, error)
- func (rs *ReceiptService) StoreReceipt(receipt *model.Receipt, senderPublicKey []byte, chaintype chaintype.ChainType) (err error)
- func (rs *ReceiptService) ValidateLinkedReceipts(receiptsToValidate []*model.PublishedReceipt, blockToValidate *model.Block, ...) (validReceipts []*model.PublishedReceipt, err error)
- func (rs *ReceiptService) ValidateReceipt(receipt *model.Receipt, validateRefBlock bool) error
- func (rs *ReceiptService) ValidateUnlinkedReceipts(receiptsToValidate []*model.PublishedReceipt, blockToValidate *model.Block) (validReceipts []*model.PublishedReceipt, err error)
- type ReceiptServiceInterface
- type ScrambleNodeService
- func (sns *ScrambleNodeService) BuildScrambledNodes(block *model.Block) error
- func (sns *ScrambleNodeService) BuildScrambledNodesAtHeight(blockHeight uint32) (*model.ScrambledNodes, error)
- func (*ScrambleNodeService) GetBlockHeightToBuildScrambleNodes(lastBlockHeight uint32) uint32
- func (sns *ScrambleNodeService) GetScrambleNodesByHeight(blockHeight uint32) (*model.ScrambledNodes, error)
- func (sns *ScrambleNodeService) InitializeScrambleCache(lastBlockHeight uint32) error
- func (sns *ScrambleNodeService) PopOffScrambleToHeight(height uint32) error
- func (sns *ScrambleNodeService) ScrambleNodeRegistries(block *model.Block) (*model.ScrambledNodes, error)
- type ScrambleNodeServiceInterface
- type SnapshotBasicChunkStrategy
- func (ss *SnapshotBasicChunkStrategy) BuildSnapshotFromChunks(snapshotHash []byte, fileChunkHashes [][]byte) (*model.SnapshotPayload, error)
- func (ss *SnapshotBasicChunkStrategy) DeleteFileByChunkHashes(concatenatedFileChunks []byte) error
- func (ss *SnapshotBasicChunkStrategy) GenerateSnapshotChunks(snapshotPayload *model.SnapshotPayload) (fullHash []byte, fileChunkHashes [][]byte, err error)
- type SnapshotBlockServiceInterface
- type SnapshotChunkStrategyInterface
- type SnapshotMainBlockService
- func (ss *SnapshotMainBlockService) DeleteFileByChunkHashes(fileChunkHashes []byte) error
- func (ss *SnapshotMainBlockService) ImportSnapshotFile(snapshotFileInfo *model.SnapshotFileInfo) error
- func (ss *SnapshotMainBlockService) InsertSnapshotPayloadToDB(payload *model.SnapshotPayload, height uint32) error
- func (ss *SnapshotMainBlockService) IsSnapshotHeight(height uint32) bool
- func (ss *SnapshotMainBlockService) NewSnapshotFile(block *model.Block) (snapshotFileInfo *model.SnapshotFileInfo, err error)
- type SnapshotService
- func (ss *SnapshotService) GenerateSnapshot(block *model.Block, ct chaintype.ChainType, snapshotChunkBytesLength int) (*model.SnapshotFileInfo, error)
- func (*SnapshotService) IsSnapshotProcessing(ct chaintype.ChainType) bool
- func (ss *SnapshotService) StartSnapshotListener() observer.Listener
- func (ss *SnapshotService) StopSnapshotGeneration(ct chaintype.ChainType) error
- type SnapshotServiceInterface
- type SpineBlockManifestService
- func (ss *SpineBlockManifestService) CreateSpineBlockManifest(fullFileHash []byte, megablockHeight uint32, expirationTimestamp int64, ...) (*model.SpineBlockManifest, error)
- func (ss *SpineBlockManifestService) GetLastSpineBlockManifest(ct chaintype.ChainType, mbType model.SpineBlockManifestType) (*model.SpineBlockManifest, error)
- func (ss *SpineBlockManifestService) GetSpineBlockManifestBySpineBlockHeight(spineBlockHeight uint32) ([]*model.SpineBlockManifest, error)
- func (ss *SpineBlockManifestService) GetSpineBlockManifestBytes(spineBlockManifest *model.SpineBlockManifest) []byte
- func (ss *SpineBlockManifestService) GetSpineBlockManifestID(spineBlockManifest *model.SpineBlockManifest) (int64, error)
- func (ss *SpineBlockManifestService) GetSpineBlockManifestsByManifestReferenceHeightRange(fromHeight, toHeight uint32) (manifests []*model.SpineBlockManifest, err error)
- func (ss *SpineBlockManifestService) GetSpineBlockManifestsForSpineBlock(spineHeight uint32, spineTimestamp int64) ([]*model.SpineBlockManifest, error)
- func (ss *SpineBlockManifestService) GetSpineBlockManifestsFromSpineBlockHeight(spineBlockHeight uint32) ([]*model.SpineBlockManifest, error)
- func (ss *SpineBlockManifestService) InsertSpineBlockManifest(spineBlockManifest *model.SpineBlockManifest) error
- type SpineBlockManifestServiceInterface
- type TransactionCoreService
- func (tg *TransactionCoreService) ApplyConfirmedTransaction(txAction transaction.TypeAction, blockTimestamp int64) error
- func (tg *TransactionCoreService) ApplyUnconfirmedTransaction(txAction transaction.TypeAction) error
- func (tg *TransactionCoreService) CompletePassedLiquidPayment(block *model.Block) error
- func (tg *TransactionCoreService) ExpiringEscrowTransactions(blockHeight uint32, blockTimestamp int64, useTX bool) error
- func (tg *TransactionCoreService) GetTransactionsByBlockID(blockID int64) ([]*model.Transaction, error)
- func (tg *TransactionCoreService) GetTransactionsByIds(transactionIds []int64) ([]*model.Transaction, error)
- func (tg *TransactionCoreService) UndoApplyUnconfirmedTransaction(txAction transaction.TypeAction) error
- func (tg *TransactionCoreService) ValidateTransaction(txAction transaction.TypeAction, useTX bool) error
- type TransactionCoreServiceInterface
- type TransactionIDsMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGenesisAccount ¶
func AddGenesisAccount(executor query.ExecutorInterface) error
AddGenesisAccount create genesis account into `account` and `account_balance` table
func AddGenesisNextNodeAdmission ¶
func AddGenesisNextNodeAdmission( executor query.ExecutorInterface, genesisBlockTimestamp int64, nextNodeAdmissionTimestampStorage storage.CacheStorageInterface, ) error
AddGenesisNextNodeAdmission create genesis next node admission timestamp
func FlattenReceiptGroups ¶
func GetGenesisNodeRegistrationTx ¶
func GetGenesisNodeRegistrationTx( accountAddress []byte, message string, lockedBalance int64, nodePublicKey []byte, ) (*model.Transaction, error)
GetGenesisNodeRegistrationTx given a genesisEntry, returns a nodeRegistrationTransaction for genesis block
func GetGenesisTransactions ¶
func GetGenesisTransactions( chainType chaintype.ChainType, genesisEntries []constant.GenesisConfigEntry, ) ([]*model.Transaction, error)
GetGenesisTransactions return list of genesis transaction to be executed in the very beginning of running the blockchain
Types ¶
type BlockIDsMap ¶
type BlockIncompleteQueueService ¶
type BlockIncompleteQueueService struct { // map of block ID with the blocks that have been received but waiting transactions to be completed BlocksQueue map[int64]*BlockWithMetaData // map of blockID with an array of transactionIds it requires BlockRequiringTransactionsMap map[int64]TransactionIDsMap // map of transactionIds with blockIds that requires them TransactionsRequiredMap map[int64]BlockIDsMap Chaintype chaintype.ChainType BlockQueueLock sync.Mutex Observer *observer.Observer }
BlockIncompleteQueueService reperesent a list of blocks while waiting their transaction
func (*BlockIncompleteQueueService) AddBlockQueue ¶
func (buqs *BlockIncompleteQueueService) AddBlockQueue(block *model.Block)
AddBlockQueue add new block into block queue list
func (*BlockIncompleteQueueService) AddTransaction ¶
func (buqs *BlockIncompleteQueueService) AddTransaction(transaction *model.Transaction) []*model.Block
AddTransaction will add validated transaction for queue block and return completed block
func (*BlockIncompleteQueueService) GetBlockQueue ¶
func (buqs *BlockIncompleteQueueService) GetBlockQueue(blockID int64) *model.Block
GetBlockQueue return a block based on block ID
func (*BlockIncompleteQueueService) PruneTimeoutBlockQueue ¶
func (buqs *BlockIncompleteQueueService) PruneTimeoutBlockQueue()
PruneTimeoutBlockQueue used as scheduler remove block when already expired
func (*BlockIncompleteQueueService) RequestBlockTransactions ¶
func (buqs *BlockIncompleteQueueService) RequestBlockTransactions(txIds []int64, blockID int64, peer *model.Peer)
RequestBlockTransactions request transactons to the peers
func (*BlockIncompleteQueueService) SetTransactionsRequired ¶
func (buqs *BlockIncompleteQueueService) SetTransactionsRequired(blockIDs int64, requiredTxIDs TransactionIDsMap)
SetTransactionsRequired setup map of block with required transactions and map of transaction required by block
type BlockIncompleteQueueServiceInterface ¶
type BlockIncompleteQueueServiceInterface interface { GetBlockQueue(blockID int64) *model.Block AddBlockQueue(block *model.Block) SetTransactionsRequired(blockIDs int64, requiredTxIDs TransactionIDsMap) AddTransaction(transaction *model.Transaction) []*model.Block RequestBlockTransactions(txIds []int64, blockID int64, peer *model.Peer) PruneTimeoutBlockQueue() }
func NewBlockIncompleteQueueService ¶
func NewBlockIncompleteQueueService( ct chaintype.ChainType, obsr *observer.Observer, ) BlockIncompleteQueueServiceInterface
type BlockPoolService ¶
func NewBlockPoolService ¶
func NewBlockPoolService() *BlockPoolService
func (*BlockPoolService) ClearBlockPool ¶
func (bps *BlockPoolService) ClearBlockPool()
ClearBlockPool clear all the block in the block pool, this should be executed every push block
func (*BlockPoolService) GetBlock ¶
func (bps *BlockPoolService) GetBlock(index int64) *model.Block
GetBlock return the block in the pool at [index], return nil if no block at the [index]
func (*BlockPoolService) GetBlocks ¶
func (bps *BlockPoolService) GetBlocks() map[int64]*model.Block
GetBlocks return all block that are currently in the pool
func (*BlockPoolService) InsertBlock ¶
func (bps *BlockPoolService) InsertBlock(block *model.Block, index int64)
InsertBlock insert block to mempool
type BlockPoolServiceInterface ¶
type BlockPoolServiceInterface interface { GetBlocks() map[int64]*model.Block GetBlock(index int64) *model.Block InsertBlock(block *model.Block, index int64) ClearBlockPool() }
BlockPoolServiceInterface interface the block pool to smithing process
type BlockService ¶
type BlockService struct { sync.RWMutex Chaintype chaintype.ChainType QueryExecutor query.ExecutorInterface BlockQuery query.BlockQueryInterface MempoolQuery query.MempoolQueryInterface TransactionQuery query.TransactionQueryInterface PublishedReceiptQuery query.PublishedReceiptQueryInterface SkippedBlocksmithQuery query.SkippedBlocksmithQueryInterface Signature crypto.SignatureInterface MempoolService MempoolServiceInterface ReceiptService ReceiptServiceInterface NodeRegistrationService NodeRegistrationServiceInterface NodeAddressInfoService NodeAddressInfoServiceInterface BlocksmithService BlocksmithServiceInterface FeeScaleService fee.FeeScaleServiceInterface ActionTypeSwitcher transaction.TypeActionSwitcher AccountBalanceQuery query.AccountBalanceQueryInterface ParticipationScoreQuery query.ParticipationScoreQueryInterface NodeRegistrationQuery query.NodeRegistrationQueryInterface AccountLedgerQuery query.AccountLedgerQueryInterface FeeVoteRevealVoteQuery query.FeeVoteRevealVoteQueryInterface BlocksmithStrategy strategy.BlocksmithStrategyInterface BlockIncompleteQueueService BlockIncompleteQueueServiceInterface BlockPoolService BlockPoolServiceInterface Observer *observer.Observer Logger *log.Logger TransactionUtil transaction.UtilInterface ReceiptUtil coreUtil.ReceiptUtilInterface PublishedReceiptUtil coreUtil.PublishedReceiptUtilInterface TransactionCoreService TransactionCoreServiceInterface PendingTransactionService PendingTransactionServiceInterface CoinbaseService CoinbaseServiceInterface ParticipationScoreService ParticipationScoreServiceInterface PublishedReceiptService PublishedReceiptServiceInterface PruneQuery []query.PruneQuery BlockStateStorage storage.CacheStorageInterface BlocksStorage storage.CacheStackStorageInterface BlockchainStatusService BlockchainStatusServiceInterface ScrambleNodeService ScrambleNodeServiceInterface }
TODO: rename to BlockMainService
func NewBlockMainService ¶
func NewBlockMainService( ct chaintype.ChainType, queryExecutor query.ExecutorInterface, blockQuery query.BlockQueryInterface, mempoolQuery query.MempoolQueryInterface, transactionQuery query.TransactionQueryInterface, skippedBlocksmithQuery query.SkippedBlocksmithQueryInterface, signature crypto.SignatureInterface, mempoolService MempoolServiceInterface, receiptService ReceiptServiceInterface, nodeRegistrationService NodeRegistrationServiceInterface, nodeAddressInfoService NodeAddressInfoServiceInterface, txTypeSwitcher transaction.TypeActionSwitcher, accountBalanceQuery query.AccountBalanceQueryInterface, participationScoreQuery query.ParticipationScoreQueryInterface, nodeRegistrationQuery query.NodeRegistrationQueryInterface, feeVoteRevealVoteQuery query.FeeVoteRevealVoteQueryInterface, obsr *observer.Observer, blocksmithStrategy strategy.BlocksmithStrategyInterface, logger *log.Logger, accountLedgerQuery query.AccountLedgerQueryInterface, blockIncompleteQueueService BlockIncompleteQueueServiceInterface, transactionUtil transaction.UtilInterface, receiptUtil coreUtil.ReceiptUtilInterface, publishedReceiptUtil coreUtil.PublishedReceiptUtilInterface, transactionCoreService TransactionCoreServiceInterface, pendingTransactionService PendingTransactionServiceInterface, blockPoolService BlockPoolServiceInterface, blocksmithService BlocksmithServiceInterface, coinbaseService CoinbaseServiceInterface, participationScoreService ParticipationScoreServiceInterface, publishedReceiptService PublishedReceiptServiceInterface, feeScaleService fee.FeeScaleServiceInterface, pruneQuery []query.PruneQuery, blockStateStorage storage.CacheStorageInterface, blocksStorage storage.CacheStackStorageInterface, blockchainStatusService BlockchainStatusServiceInterface, scrambleNodeService ScrambleNodeServiceInterface, ) *BlockService
func (*BlockService) AddGenesis ¶
func (bs *BlockService) AddGenesis() error
AddGenesis generate and add (push) genesis block to db
func (*BlockService) BlockTransactionsRequestedListener ¶
func (bs *BlockService) BlockTransactionsRequestedListener() observer.Listener
BlockTransactionsRequestedListener will send the transactions required by blocks
func (*BlockService) ChainWriteLock ¶
func (bs *BlockService) ChainWriteLock(actionType int)
ChainWriteLock locks the chain
func (*BlockService) ChainWriteUnlock ¶
func (bs *BlockService) ChainWriteUnlock(actionType int)
ChainWriteUnlock unlocks the chain
func (*BlockService) CheckGenesis ¶
func (bs *BlockService) CheckGenesis() (bool, error)
CheckGenesis check if genesis has been added
func (*BlockService) GenerateBlock ¶
func (bs *BlockService) GenerateBlock( previousBlock *model.Block, secretPhrase string, timestamp int64, empty bool, ) (*model.Block, error)
GenerateBlock generate block from transactions in mempool, pass empty flag to generate an empty block
func (*BlockService) GenerateGenesisBlock ¶
func (bs *BlockService) GenerateGenesisBlock(genesisEntries []constant.GenesisConfigEntry) (*model.Block, error)
GenerateGenesisBlock generate and return genesis block from a given template (see constant/genesis.go)
func (*BlockService) GetBlockByHeight ¶
func (bs *BlockService) GetBlockByHeight(height uint32) (*model.Block, error)
GetBlockByHeight return block by provided height
func (*BlockService) GetBlockByHeightCacheFormat ¶
func (bs *BlockService) GetBlockByHeightCacheFormat(height uint32) (*storage.BlockCacheObject, error)
func (*BlockService) GetBlockByID ¶
GetBlockByID return a block by its ID withAttachedData if true returns extra attached data for the block (transactions)
func (*BlockService) GetBlockByIDCacheFormat ¶
func (bs *BlockService) GetBlockByIDCacheFormat(id int64) (*storage.BlockCacheObject, error)
GetBlockByID return a block by its ID using cache format
func (*BlockService) GetBlockHash ¶
func (bs *BlockService) GetBlockHash(block *model.Block) ([]byte, error)
GetBlockHash return block's hash (makes sure always include transactions)
func (*BlockService) GetBlocks ¶
func (bs *BlockService) GetBlocks() ([]*model.Block, error)
GetBlocks return all pushed blocks
func (*BlockService) GetBlocksFromHeight ¶
func (bs *BlockService) GetBlocksFromHeight(startHeight, limit uint32, withAttachedData bool) ([]*model.Block, error)
GetBlocksFromHeight get all blocks from a given height till last block (or a given limit is reached). Note: this only returns main block data, it doesn't populate attached data (transactions, receipts)
func (*BlockService) GetBlocksmithStrategy ¶
func (bs *BlockService) GetBlocksmithStrategy() strategy.BlocksmithStrategyInterface
func (*BlockService) GetChainType ¶
func (bs *BlockService) GetChainType() chaintype.ChainType
GetChainType returns the chaintype
func (*BlockService) GetGenesisBlock ¶
func (bs *BlockService) GetGenesisBlock() (*model.Block, error)
GetGenesisBlock return the last pushed block
func (*BlockService) GetLastBlock ¶
func (bs *BlockService) GetLastBlock() (*model.Block, error)
GetLastBlock return the last pushed block from block state storage
func (*BlockService) GetLastBlockCacheFormat ¶
func (bs *BlockService) GetLastBlockCacheFormat() (*storage.BlockCacheObject, error)
GetLastBlockCacheFormat return the last pushed block in storage.BlockCacheObject format block getting from Blocks Storage Cache
func (*BlockService) GetPayloadHashAndLength ¶
func (*BlockService) InitializeBlocksCache ¶
func (bs *BlockService) InitializeBlocksCache() error
func (*BlockService) NewGenesisBlock ¶
func (bs *BlockService) NewGenesisBlock( version uint32, previousBlockHash, blockSeed, blockSmithPublicKey, merkleRoot, merkleTree []byte, previousBlockHeight, referenceBlockHeight uint32, timestamp, totalAmount, totalFee, totalCoinBase int64, transactions []*model.Transaction, publishedReceipts []*model.PublishedReceipt, spinePublicKeys []*model.SpinePublicKey, payloadHash []byte, payloadLength uint32, cumulativeDifficulty *big.Int, genesisSignature []byte, ) (*model.Block, error)
NewGenesisBlock create new block that is fixed in the value of cumulative difficulty, smith scale, and the block signature
func (*BlockService) NewMainBlock ¶
func (bs *BlockService) NewMainBlock( version uint32, previousBlockHash, blockSeed, blockSmithPublicKey []byte, previousBlockHeight uint32, timestamp, totalAmount, totalFee, totalCoinBase int64, transactions []*model.Transaction, publishedReceipts []*model.PublishedReceipt, secretPhrase string, ) (*model.Block, error)
NewMainBlock generate new mainchain block
func (*BlockService) PopOffToBlock ¶
func (*BlockService) PopulateBlockData ¶
func (bs *BlockService) PopulateBlockData(block *model.Block) error
PopulateBlockData add transactions and published receipts to model.Block instance
func (*BlockService) ProcessCompletedBlock ¶
func (bs *BlockService) ProcessCompletedBlock(block *model.Block) error
ProcessCompletedBlock to process block that already having all needed transactions
func (*BlockService) ProcessPushBlock ¶
func (bs *BlockService) ProcessPushBlock(previousBlock, block *model.Block, broadcast, persist bool, round int64) (nodeAdmissionTimestamp *model.NodeAdmissionTimestamp, transactionIDs []int64, err error)
ProcessPushBlock processes inside pushBlock that is guarded with DB transaction outside
func (*BlockService) ProcessQueueBlock ¶
func (bs *BlockService) ProcessQueueBlock(block *model.Block, peer *model.Peer) (needWaiting bool, err error)
ProcessQueueBlock process to queue block when waiting their transactions
func (*BlockService) PushBlock ¶
func (bs *BlockService) PushBlock(previousBlock, block *model.Block, broadcast, persist bool) error
PushBlock push block into blockchain, to broadcast the block after pushing to own node, switch the broadcast flag to `true`, and `false` otherwise
func (*BlockService) ReceiveBlock ¶
func (bs *BlockService) ReceiveBlock( senderPublicKey []byte, lastBlock, block *model.Block, nodeSecretPhrase string, peer *model.Peer, generateReceipt bool, ) (*model.Receipt, error)
ReceiveBlock handle the block received from connected peers argument lastBlock is the lastblock in this node argument block is the in coming block from peer
func (*BlockService) ReceivedValidatedBlockTransactionsListener ¶
func (bs *BlockService) ReceivedValidatedBlockTransactionsListener() observer.Listener
ReceivedValidatedBlockTransactionsListener will receive validated transactions to complete transactions of blocks queued
func (*BlockService) ScanBlockPool ¶
func (bs *BlockService) ScanBlockPool() error
ScanBlockPool scan the whole block pool to check if there are any block that's legal to be pushed yet
func (*BlockService) UpdateLastBlockCache ¶
func (bs *BlockService) UpdateLastBlockCache(block *model.Block) error
UpdateLastBlockCache to update the state of last block cache
func (*BlockService) ValidateBlock ¶
func (bs *BlockService) ValidateBlock(block, previousLastBlock *model.Block) error
ValidateBlock validate block to be pushed into the blockchain
func (*BlockService) ValidatePayloadHash ¶
func (bs *BlockService) ValidatePayloadHash(block *model.Block) error
ValidatePayloadHash validate (computed) block's payload data hash against block's payload hash
type BlockServiceInterface ¶
type BlockServiceInterface interface { NewGenesisBlock(version uint32, previousBlockHash []byte, blockSeed, blockSmithPublicKey []byte, mRoot, mTree []byte, previousBlockHeight, referenceBlockHeight uint32, timestamp int64, totalAmount int64, totalFee int64, totalCoinBase int64, transactions []*model.Transaction, blockReceipts []*model.PublishedReceipt, spinePublicKeys []*model.SpinePublicKey, payloadHash []byte, payloadLength uint32, cumulativeDifficulty *big.Int, genesisSignature []byte) (*model.Block, error) GenerateBlock( previousBlock *model.Block, secretPhrase string, timestamp int64, empty bool, ) (*model.Block, error) ValidateBlock(block, previousLastBlock *model.Block) error ValidatePayloadHash(block *model.Block) error GetPayloadHashAndLength(block *model.Block) (payloadHash []byte, payloadLength uint32, err error) PushBlock(previousBlock, block *model.Block, broadcast, persist bool) error GetBlockByID(id int64, withAttachedData bool) (*model.Block, error) GetBlockByIDCacheFormat(id int64) (*storage.BlockCacheObject, error) GetBlockByHeight(uint32) (*model.Block, error) GetBlockByHeightCacheFormat(uint32) (*storage.BlockCacheObject, error) GetBlocksFromHeight(startHeight, limit uint32, withAttachedData bool) ([]*model.Block, error) GetLastBlock() (*model.Block, error) GetLastBlockCacheFormat() (*storage.BlockCacheObject, error) UpdateLastBlockCache(block *model.Block) error InitializeBlocksCache() error GetBlockHash(block *model.Block) ([]byte, error) GetBlocks() ([]*model.Block, error) PopulateBlockData(block *model.Block) error GetGenesisBlock() (*model.Block, error) GenerateGenesisBlock(genesisEntries []constant.GenesisConfigEntry) (*model.Block, error) AddGenesis() error CheckGenesis() (exist bool, err error) GetChainType() chaintype.ChainType ChainWriteLock(int) ChainWriteUnlock(actionType int) ReceiveBlock( senderPublicKey []byte, lastBlock, block *model.Block, nodeSecretPhrase string, peer *model.Peer, generateReceipt bool, ) (*model.Receipt, error) PopOffToBlock(commonBlock *model.Block) ([]*model.Block, error) GetBlocksmithStrategy() strategy.BlocksmithStrategyInterface ReceivedValidatedBlockTransactionsListener() observer.Listener BlockTransactionsRequestedListener() observer.Listener }
type BlockServiceMainInterface ¶
type BlockServiceMainInterface interface { NewMainBlock( version uint32, previousBlockHash, blockSeed, blockSmithPublicKey []byte, previousBlockHeight uint32, timestamp, totalAmount, totalFee, totalCoinBase int64, transactions []*model.Transaction, blockReceipts []*model.PublishedReceipt, secretPhrase string, ) (*model.Block, error) ReceivedValidatedBlockTransactionsListener() observer.Listener BlockTransactionsRequestedListener() observer.Listener ScanBlockPool() error }
BlockServiceMainInterface interface that contains methods specific of BlockService
type BlockServiceSpineInterface ¶
type BlockServiceSpineInterface interface {
ValidateSpineBlockManifest(spineBlockManifest *model.SpineBlockManifest) error
}
BlockServiceSpineInterface interface that contains methods specific of BlockSpineService
type BlockSpinePublicKeyService ¶
type BlockSpinePublicKeyService struct { Signature crypto.SignatureInterface QueryExecutor query.ExecutorInterface NodeRegistrationQuery query.NodeRegistrationQueryInterface SpinePublicKeyQuery query.SpinePublicKeyQueryInterface Logger *log.Logger }
func NewBlockSpinePublicKeyService ¶
func NewBlockSpinePublicKeyService( signature crypto.SignatureInterface, queryExecutor query.ExecutorInterface, nodeRegistrationQuery query.NodeRegistrationQueryInterface, spinePublicKeyQuery query.SpinePublicKeyQueryInterface, logger *log.Logger, ) *BlockSpinePublicKeyService
func (*BlockSpinePublicKeyService) BuildSpinePublicKeysFromNodeRegistry ¶
func (bsf *BlockSpinePublicKeyService) BuildSpinePublicKeysFromNodeRegistry( mainFromHeight, mainToHeight, spineHeight uint32, ) (spinePublicKeys []*model.SpinePublicKey, err error)
BuildSpinePublicKeysFromNodeRegistry build the list of spine public keys from the node registry
func (*BlockSpinePublicKeyService) GetSpinePublicKeysByBlockHeight ¶
func (bsf *BlockSpinePublicKeyService) GetSpinePublicKeysByBlockHeight(height uint32) (spinePublicKeys []*model.SpinePublicKey, err error)
func (*BlockSpinePublicKeyService) GetValidSpinePublicKeyByBlockHeightInterval ¶
func (bsf *BlockSpinePublicKeyService) GetValidSpinePublicKeyByBlockHeightInterval( fromHeight, toHeight uint32, ) ( []*model.SpinePublicKey, error, )
GetValidSpinePublicKeyByBlockHeightInterval return the spine_public_key rows that were valid
func (*BlockSpinePublicKeyService) InsertSpinePublicKeys ¶
func (bsf *BlockSpinePublicKeyService) InsertSpinePublicKeys(block *model.Block) error
InsertSpinePublicKeys insert all spine block publicKeys into spinePublicKey table Note: at this stage the spine pub keys have already been parsed into their model struct
type BlockSpinePublicKeyServiceInterface ¶
type BlockSpinePublicKeyServiceInterface interface { BuildSpinePublicKeysFromNodeRegistry( mainFromHeight, mainToHeight, spineHeight uint32, ) (spinePublicKeys []*model.SpinePublicKey, err error) GetSpinePublicKeysByBlockHeight(height uint32) (spinePublicKeys []*model.SpinePublicKey, err error) GetValidSpinePublicKeyByBlockHeightInterval( fromHeight, toHeight uint32, ) ( []*model.SpinePublicKey, error, ) InsertSpinePublicKeys(block *model.Block) error }
type BlockSpineService ¶
type BlockSpineService struct { sync.RWMutex Chaintype chaintype.ChainType QueryExecutor query.ExecutorInterface BlockQuery query.BlockQueryInterface SpineSkippedBlocksmithQuery query.SkippedBlocksmithQueryInterface Signature crypto.SignatureInterface BlocksmithStrategy strategy.BlocksmithStrategyInterface Observer *observer.Observer Logger *log.Logger SpinePublicKeyService BlockSpinePublicKeyServiceInterface SpineBlockManifestService SpineBlockManifestServiceInterface BlocksmithService BlocksmithServiceInterface SnapshotMainBlockService SnapshotBlockServiceInterface BlockStateStorage storage.CacheStorageInterface BlocksStorage storage.CacheStackStorageInterface BlockchainStatusService BlockchainStatusServiceInterface MainBlockService BlockServiceInterface }
func NewBlockSpineService ¶
func NewBlockSpineService( ct chaintype.ChainType, queryExecutor query.ExecutorInterface, spineBlockQuery query.BlockQueryInterface, spineSkippedBlocksmithQuery query.SkippedBlocksmithQueryInterface, signature crypto.SignatureInterface, obsr *observer.Observer, blocksmithStrategy strategy.BlocksmithStrategyInterface, logger *log.Logger, megablockQuery query.SpineBlockManifestQueryInterface, blocksmithService BlocksmithServiceInterface, snapshotMainblockService SnapshotBlockServiceInterface, blockStateStorage storage.CacheStorageInterface, blockchainStatusService BlockchainStatusServiceInterface, spinePublicKeyService BlockSpinePublicKeyServiceInterface, mainBlockService BlockServiceInterface, blocksStorage storage.CacheStackStorageInterface, ) *BlockSpineService
func (*BlockSpineService) AddGenesis ¶
func (bs *BlockSpineService) AddGenesis() error
AddGenesis generate and add (push) genesis block to db
func (*BlockSpineService) BlockTransactionsRequestedListener ¶
func (bs *BlockSpineService) BlockTransactionsRequestedListener() observer.Listener
func (*BlockSpineService) ChainWriteLock ¶
func (bs *BlockSpineService) ChainWriteLock(actionType int)
ChainWriteLock locks the chain
func (*BlockSpineService) ChainWriteUnlock ¶
func (bs *BlockSpineService) ChainWriteUnlock(actionType int)
ChainWriteUnlock unlocks the chain
func (*BlockSpineService) CheckGenesis ¶
func (bs *BlockSpineService) CheckGenesis() (bool, error)
CheckGenesis check if genesis has been added
func (*BlockSpineService) GenerateBlock ¶
func (bs *BlockSpineService) GenerateBlock( previousBlock *model.Block, secretPhrase string, timestamp int64, _ bool, ) (*model.Block, error)
GenerateBlock generate block from transactions in mempool
func (*BlockSpineService) GenerateGenesisBlock ¶
func (bs *BlockSpineService) GenerateGenesisBlock(genesisEntries []constant.GenesisConfigEntry) (*model.Block, error)
GenerateGenesisBlock generate and return genesis block from a given template (see constant/genesis.go)
func (*BlockSpineService) GetBlockByHeight ¶
func (bs *BlockSpineService) GetBlockByHeight(height uint32) (*model.Block, error)
GetBlockByHeight return the last pushed block
func (*BlockSpineService) GetBlockByHeightCacheFormat ¶
func (bs *BlockSpineService) GetBlockByHeightCacheFormat(height uint32) (*storage.BlockCacheObject, error)
func (*BlockSpineService) GetBlockByID ¶
GetBlockByID return a block by its ID withAttachedData if true returns extra attached data for the block (transactions)
func (*BlockSpineService) GetBlockByIDCacheFormat ¶
func (bs *BlockSpineService) GetBlockByIDCacheFormat(id int64) (*storage.BlockCacheObject, error)
GetBlockByID return a block by its ID using cache format
func (*BlockSpineService) GetBlockHash ¶
func (bs *BlockSpineService) GetBlockHash(block *model.Block) ([]byte, error)
GetBlockHash return block's hash (makes sure always include spine public keys)
func (*BlockSpineService) GetBlocks ¶
func (bs *BlockSpineService) GetBlocks() ([]*model.Block, error)
GetBlocks return all pushed blocks
func (*BlockSpineService) GetBlocksFromHeight ¶
func (bs *BlockSpineService) GetBlocksFromHeight(startHeight, limit uint32, withAttachedData bool) ([]*model.Block, error)
GetBlocksFromHeight get all blocks from a given height till last block (or a given limit is reached). Note: this only returns main block data, it doesn't populate attached data (spinePublicKeys)
func (*BlockSpineService) GetBlocksmithStrategy ¶
func (bs *BlockSpineService) GetBlocksmithStrategy() strategy.BlocksmithStrategyInterface
func (*BlockSpineService) GetChainType ¶
func (bs *BlockSpineService) GetChainType() chaintype.ChainType
GetChainType returns the chaintype
func (*BlockSpineService) GetGenesisBlock ¶
func (bs *BlockSpineService) GetGenesisBlock() (*model.Block, error)
GetGenesisBlock return the genesis block
func (*BlockSpineService) GetLastBlock ¶
func (bs *BlockSpineService) GetLastBlock() (*model.Block, error)
GetLastBlock return the last pushed block
func (*BlockSpineService) GetLastBlockCacheFormat ¶
func (bs *BlockSpineService) GetLastBlockCacheFormat() (*storage.BlockCacheObject, error)
func (*BlockSpineService) GetPayloadHashAndLength ¶
func (bs *BlockSpineService) GetPayloadHashAndLength(block *model.Block) (payloadHash []byte, payloadLength uint32, err error)
GetPayloadHashAndLength compute and return the block's payload hash
func (*BlockSpineService) InitializeBlocksCache ¶
func (bs *BlockSpineService) InitializeBlocksCache() error
func (*BlockSpineService) NewGenesisBlock ¶
func (bs *BlockSpineService) NewGenesisBlock( version uint32, previousBlockHash, blockSeed, blockSmithPublicKey, merkleRoot, merkleTree []byte, previousBlockHeight, referenceBlockHeight uint32, timestamp, totalAmount, totalFee, totalCoinBase int64, transactions []*model.Transaction, publishedReceipts []*model.PublishedReceipt, spinePublicKeys []*model.SpinePublicKey, payloadHash []byte, payloadLength uint32, cumulativeDifficulty *big.Int, genesisSignature []byte, ) (*model.Block, error)
NewGenesisBlock create new block that is fixed in the value of cumulative difficulty, smith scale, and the block signature
func (*BlockSpineService) NewSpineBlock ¶
func (bs *BlockSpineService) NewSpineBlock( version uint32, previousBlockHash, blockSeed, blockSmithPublicKey, merkleRoot, merkleTree []byte, previousBlockHeight, referenceBlockHeight uint32, timestamp int64, secretPhrase string, spinePublicKeys []*model.SpinePublicKey, spineBlockManifests []*model.SpineBlockManifest, ) (*model.Block, error)
NewSpineBlock generate new spinechain block
func (*BlockSpineService) PopOffToBlock ¶
func (*BlockSpineService) PopulateBlockData ¶
func (bs *BlockSpineService) PopulateBlockData(block *model.Block) error
PopulateBlockData add spine public keys to model.Block instance
func (*BlockSpineService) ProcessPushBlock ¶
func (bs *BlockSpineService) ProcessPushBlock(previousBlock, block *model.Block, broadcast, persist bool) error
ProcessPushBlock processes inside pushBlock that is guarded with DB transaction outside
func (*BlockSpineService) ProcessSkippedBlocksmiths ¶
func (bs *BlockSpineService) ProcessSkippedBlocksmiths(previousBlock, block *model.Block) error
func (*BlockSpineService) PushBlock ¶
func (bs *BlockSpineService) PushBlock(previousBlock, block *model.Block, broadcast, persist bool) error
PushBlock push block into blockchain, to broadcast the block after pushing to own node, switch the broadcast flag to `true`, and `false` otherwise
func (*BlockSpineService) ReceiveBlock ¶
func (bs *BlockSpineService) ReceiveBlock(_ []byte, lastBlock, block *model.Block, _ string, _ *model.Peer, _ bool) (*model.Receipt, error)
ReceiveBlock handle the block received from connected peers argument lastBlock is the lastblock in this node argument block is the in coming block from peer
func (*BlockSpineService) ReceivedValidatedBlockTransactionsListener ¶
func (bs *BlockSpineService) ReceivedValidatedBlockTransactionsListener() observer.Listener
func (*BlockSpineService) UpdateLastBlockCache ¶
func (bs *BlockSpineService) UpdateLastBlockCache(block *model.Block) error
UpdateLastBlockCache to update the state of last block cache
func (*BlockSpineService) ValidateBlock ¶
func (bs *BlockSpineService) ValidateBlock(block, previousLastBlock *model.Block) error
ValidateBlock validate block to be pushed into the blockchain
func (*BlockSpineService) ValidatePayloadHash ¶
func (bs *BlockSpineService) ValidatePayloadHash(block *model.Block) error
ValidatePayloadHash validate (computed) block's payload data hash against block's payload hash
func (*BlockSpineService) ValidateSpineBlockManifest ¶
func (bs *BlockSpineService) ValidateSpineBlockManifest(spineBlockManifest *model.SpineBlockManifest) error
type BlockWithMetaData ¶
BlockWithMetaData is incoming block with some information while waiting transaction
type BlockchainStatusService ¶
func NewBlockchainStatusService ¶
func NewBlockchainStatusService( lockSmithing bool, logger *log.Logger, ) *BlockchainStatusService
func (*BlockchainStatusService) GetLastBlock ¶
func (btss *BlockchainStatusService) GetLastBlock(ct chaintype.ChainType) *model.Block
GetLastBlock get 'cached' last block (updated every time a block is pushed)
func (*BlockchainStatusService) IsBlocksmith ¶
func (btss *BlockchainStatusService) IsBlocksmith() bool
func (*BlockchainStatusService) IsDownloading ¶
func (btss *BlockchainStatusService) IsDownloading(ct chaintype.ChainType) bool
func (*BlockchainStatusService) IsDownloadingSnapshot ¶
func (btss *BlockchainStatusService) IsDownloadingSnapshot(ct chaintype.ChainType) bool
func (*BlockchainStatusService) IsFirstDownloadFinished ¶
func (btss *BlockchainStatusService) IsFirstDownloadFinished(ct chaintype.ChainType) bool
func (*BlockchainStatusService) IsSmithing ¶
func (btss *BlockchainStatusService) IsSmithing(ct chaintype.ChainType) bool
func (*BlockchainStatusService) IsSmithingLocked ¶
func (btss *BlockchainStatusService) IsSmithingLocked() bool
func (*BlockchainStatusService) SetFirstDownloadFinished ¶
func (btss *BlockchainStatusService) SetFirstDownloadFinished(ct chaintype.ChainType, finished bool)
func (*BlockchainStatusService) SetIsBlocksmith ¶
func (btss *BlockchainStatusService) SetIsBlocksmith(blocksmith bool)
func (*BlockchainStatusService) SetIsDownloading ¶
func (btss *BlockchainStatusService) SetIsDownloading(ct chaintype.ChainType, downloading bool)
func (*BlockchainStatusService) SetIsDownloadingSnapshot ¶
func (btss *BlockchainStatusService) SetIsDownloadingSnapshot(ct chaintype.ChainType, downloadingSnapshot bool)
func (*BlockchainStatusService) SetIsSmithing ¶
func (btss *BlockchainStatusService) SetIsSmithing(ct chaintype.ChainType, smithing bool)
func (*BlockchainStatusService) SetIsSmithingLocked ¶
func (btss *BlockchainStatusService) SetIsSmithingLocked(smithingLocked bool)
func (*BlockchainStatusService) SetLastBlock ¶
func (btss *BlockchainStatusService) SetLastBlock(block *model.Block, ct chaintype.ChainType)
SetLastBlock set 'cached' last block (updated every time a block is pushed)
type BlockchainStatusServiceInterface ¶
type BlockchainStatusServiceInterface interface { SetFirstDownloadFinished(ct chaintype.ChainType, isSpineBlocksDownloadFinished bool) IsFirstDownloadFinished(ct chaintype.ChainType) bool SetIsDownloading(ct chaintype.ChainType, newValue bool) IsDownloading(ct chaintype.ChainType) bool SetIsSmithingLocked(isSmithingLocked bool) IsSmithingLocked() bool SetIsSmithing(ct chaintype.ChainType, smithing bool) IsSmithing(ct chaintype.ChainType) bool SetIsDownloadingSnapshot(ct chaintype.ChainType, isDownloadingSnapshot bool) IsDownloadingSnapshot(ct chaintype.ChainType) bool SetIsBlocksmith(isBlocksmith bool) IsBlocksmith() bool SetLastBlock(block *model.Block, ct chaintype.ChainType) GetLastBlock(ct chaintype.ChainType) *model.Block }
type BlocksmithService ¶
type BlocksmithService struct { AccountBalanceQuery query.AccountBalanceQueryInterface AccountLedgerQuery query.AccountLedgerQueryInterface NodeRegistrationQuery query.NodeRegistrationQueryInterface QueryExecutor query.ExecutorInterface Chaintype chaintype.ChainType }
func NewBlocksmithService ¶
func NewBlocksmithService( accountBalanceQuery query.AccountBalanceQueryInterface, accountLedgerQuery query.AccountLedgerQueryInterface, nodeRegistrationQuery query.NodeRegistrationQueryInterface, queryExecutor query.ExecutorInterface, chaintype chaintype.ChainType, ) *BlocksmithService
func (*BlocksmithService) GetBlocksmithAccountAddress ¶
func (bs *BlocksmithService) GetBlocksmithAccountAddress(block *model.Block) ([]byte, error)
GetBlocksmithAccountAddress get the address of blocksmith by its public key at the block's height
func (*BlocksmithService) RewardBlocksmithAccountAddresses ¶
func (bs *BlocksmithService) RewardBlocksmithAccountAddresses( blocksmithAccountAddresses [][]byte, totalReward, blockTimestamp int64, height uint32, ) error
RewardBlocksmithAccountAddresses accrue the block total fees + total coinbase to selected list of accounts
type CoinbaseService ¶
type CoinbaseService struct { NodeRegistrationQuery query.NodeRegistrationQueryInterface QueryExecutor query.ExecutorInterface Chaintype chaintype.ChainType Rng *crypto.RandomNumberGenerator }
func NewCoinbaseService ¶
func NewCoinbaseService( nodeRegistrationQuery query.NodeRegistrationQueryInterface, queryExecutor query.ExecutorInterface, chaintype chaintype.ChainType, rng *crypto.RandomNumberGenerator, ) *CoinbaseService
func (*CoinbaseService) CoinbaseLotteryWinners ¶
func (cbs *CoinbaseService) CoinbaseLotteryWinners( activeRegistries []storage.NodeRegistry, scoreSum, blockTimestamp int64, previousBlock *model.Block, ) ([][]byte, error)
CoinbaseLotteryWinners get the current list of blocksmiths, duplicate it (to not change the original one) and sort it using the NodeOrder algorithm. The first n (n = constant.MaxNumBlocksmithRewards) in the newly ordered list are the coinbase lottery winner (the blocksmiths that will be rewarded for the current block)
func (*CoinbaseService) GetCoinbase ¶
func (cbs *CoinbaseService) GetCoinbase(blockTimesatamp, previousBlockTimesatamp int64) int64
GetCoinbase return the value of coinbase / new coins that will be created every block.
func (*CoinbaseService) GetTotalDistribution ¶
func (cbs *CoinbaseService) GetTotalDistribution(blockTimestamp int64) int64
GetTotalDistribution get number of token that should be distributed by given timestamp
type FileService ¶
func (*FileService) DecodePayload ¶
func (fs *FileService) DecodePayload(b []byte, v interface{}) error
DecodePayload decodes a byte slice encoded using service's encoder handler (default should be CBOR) into a model.
func (*FileService) DeleteSnapshotChunkFromDir ¶
func (fs *FileService) DeleteSnapshotChunkFromDir(dir, fileName string) error
DeleteSnapshotChunkFromDir deleting chunk files from snapshot hash directory
func (*FileService) DeleteSnapshotDir ¶
func (fs *FileService) DeleteSnapshotDir(dir string) error
DeleteSnapshotDir deleting specific snapshot directory which named as file hashes
func (*FileService) EncodePayload ¶
func (fs *FileService) EncodePayload(v interface{}) (b []byte, err error)
EncodePayload encodes a generic interface (eg. any model) using service's encoder handler (default should be CBOR)
func (*FileService) GetDownloadPath ¶
func (fs *FileService) GetDownloadPath() string
func (*FileService) GetEncoderHandler ¶
func (fs *FileService) GetEncoderHandler() codec.Handle
func (*FileService) GetFileNameFromBytes ¶
func (fs *FileService) GetFileNameFromBytes(fileBytes []byte) string
GetFileNameFromBytes helper method to get a hash-name from file raw bytes
func (*FileService) GetFileNameFromHash ¶
func (*FileService) GetFileNameFromHash(fileHash []byte) string
GetFileNameFromHash file hash to fileName conversion: base64 urlencoded
func (*FileService) GetHashFromFileName ¶
func (*FileService) GetHashFromFileName(fileName string) ([]byte, error)
GetHashFromFileName file hash to hash-name conversion: base64 urlencoded
func (*FileService) HashPayload ¶
func (fs *FileService) HashPayload(b []byte) ([]byte, error)
func (*FileService) ParseFileChunkHashes ¶
func (fs *FileService) ParseFileChunkHashes(fileHashes []byte, hashLength int) (fileHashesAry [][]byte, err error)
func (*FileService) ReadFileFromDir ¶
func (fs *FileService) ReadFileFromDir(dir, fileName string) ([]byte, error)
ReadFileFromDir allowing to io read file from dir which is base64 of snapshotHash
func (*FileService) SaveSnapshotChunks ¶
func (fs *FileService) SaveSnapshotChunks(dir string, chunks [][]byte) (fileHashes [][]byte, err error)
SaveSnapshotChunks saving snapshot chunks into a directory named as file hashes
- dir could be file hashes to string
func (*FileService) SetEncoder ¶
func (fs *FileService) SetEncoder(hh codec.Handle)
func (*FileService) VerifyFileChecksum ¶
func (fs *FileService) VerifyFileChecksum(fileBytes, hash []byte) bool
type FileServiceInterface ¶
type FileServiceInterface interface { GetDownloadPath() string ParseFileChunkHashes(fileHashes []byte, hashLength int) (fileHashesAry [][]byte, err error) GetFileNameFromHash(fileHash []byte) string GetFileNameFromBytes(fileBytes []byte) string GetHashFromFileName(fileName string) ([]byte, error) VerifyFileChecksum(fileBytes, hash []byte) bool HashPayload(b []byte) ([]byte, error) EncodePayload(v interface{}) (b []byte, err error) DecodePayload(b []byte, v interface{}) error GetEncoderHandler() codec.Handle SaveSnapshotChunks(dir string, chunks [][]byte) (fileHashes [][]byte, err error) DeleteSnapshotDir(dir string) error DeleteSnapshotChunkFromDir(dir string, fileName string) error ReadFileFromDir(dir, fileName string) ([]byte, error) }
func NewFileService ¶
type MempoolService ¶
type MempoolService struct { TransactionUtil transaction.UtilInterface Chaintype chaintype.ChainType QueryExecutor query.ExecutorInterface MempoolQuery query.MempoolQueryInterface MerkleTreeQuery query.MerkleTreeQueryInterface ActionTypeSwitcher transaction.TypeActionSwitcher AccountBalanceQuery query.AccountBalanceQueryInterface TransactionQuery query.TransactionQueryInterface Signature crypto.SignatureInterface Observer *observer.Observer Logger *log.Logger ReceiptUtil coreUtil.ReceiptUtilInterface ReceiptService ReceiptServiceInterface TransactionCoreService TransactionCoreServiceInterface BlocksStorage storage.CacheStackStorageInterface MempoolCacheStorage storage.CacheStorageInterface MempoolBackupStorage storage.CacheStorageInterface }
MempoolService contains all transactions in mempool plus a mux to manage locks in concurrency
func NewMempoolService ¶
func NewMempoolService( transactionUtil transaction.UtilInterface, ct chaintype.ChainType, queryExecutor query.ExecutorInterface, mempoolQuery query.MempoolQueryInterface, merkleTreeQuery query.MerkleTreeQueryInterface, actionTypeSwitcher transaction.TypeActionSwitcher, accountBalanceQuery query.AccountBalanceQueryInterface, transactionQuery query.TransactionQueryInterface, signature crypto.SignatureInterface, observer *observer.Observer, logger *log.Logger, receiptUtil coreUtil.ReceiptUtilInterface, receiptService ReceiptServiceInterface, transactionCoreService TransactionCoreServiceInterface, blocksStorage storage.CacheStackStorageInterface, mempoolCacheStorage, mempoolBackupStorage storage.CacheStorageInterface, ) *MempoolService
NewMempoolService returns an instance of mempool service
func (*MempoolService) AddMempoolTransaction ¶
func (mps *MempoolService) AddMempoolTransaction(tx *model.Transaction, txBytes []byte) error
AddMempoolTransaction validates and insert a transaction into the mempool and also set the BlockHeight as well
func (*MempoolService) BackupMempools ¶
func (mps *MempoolService) BackupMempools(commonBlock *model.Block) error
func (*MempoolService) DeleteExpiredMempoolTransactions ¶
func (mps *MempoolService) DeleteExpiredMempoolTransactions() error
DeleteExpiredMempoolTransactions handle fresh clean the mempool which is the mempool transaction has been hit expiration time
func (*MempoolService) GetMempoolTransactions ¶
func (mps *MempoolService) GetMempoolTransactions() (storage.MempoolMap, error)
GetMempoolTransactions fetch transactions from mempool
func (*MempoolService) GetMempoolTransactionsWantToBackup ¶
func (mps *MempoolService) GetMempoolTransactionsWantToBackup(height uint32) ([]*model.Transaction, error)
func (*MempoolService) GetTotalMempoolTransactions ¶
func (mps *MempoolService) GetTotalMempoolTransactions() (int, error)
func (*MempoolService) InitMempoolTransaction ¶
func (mps *MempoolService) InitMempoolTransaction() error
func (*MempoolService) ProcessReceivedTransaction ¶
func (mps *MempoolService) ProcessReceivedTransaction( senderPublicKey, receivedTxBytes []byte, lastBlockCacheFormat *storage.BlockCacheObject, nodeSecretPhrase string, isGenerateReceipt bool, ) (*model.Receipt, *model.Transaction, error)
ProcessReceivedTransaction process the transaction received from peer will return batchReceipt, `nil`, `nil` if duplicate transaction found
func (*MempoolService) ReceivedBlockTransactions ¶
func (mps *MempoolService) ReceivedBlockTransactions( senderPublicKey []byte, receivedTxBytes [][]byte, lastBlockCacheFormat *storage.BlockCacheObject, nodeSecretPhrase string, isGenerateReceipt bool, ) ([]*model.Receipt, error)
ReceivedBlockTransactions
func (*MempoolService) ReceivedTransaction ¶
func (mps *MempoolService) ReceivedTransaction( senderPublicKey, receivedTxBytes []byte, lastBlockCacheFormat *storage.BlockCacheObject, nodeSecretPhrase string, isGenerateReceipt bool, ) (*model.Receipt, error)
func (*MempoolService) RemoveMempoolTransactions ¶
func (mps *MempoolService) RemoveMempoolTransactions(transactions []*model.Transaction) error
RemoveMempoolTransactions removes a list of transactions tx from mempool given their Ids
func (*MempoolService) SelectTransactionsFromMempool ¶
func (mps *MempoolService) SelectTransactionsFromMempool(blockTimestamp int64, blockHeight uint32) ([]*model.Transaction, error)
SelectTransactionsFromMempool Select transactions from mempool to be included in the block and return an ordered list.
- get all mempool transaction from db (all mpTx already processed but still not included in a block)
- merge with mempool, until it's full (payload <= MAX_PAYLOAD_LENGTH and max 255 mpTx) and do formal validation (timestamp <= MAX_TIMEDRIFT, mpTx is formally valid)
- sort new mempool by fee per byte, arrival timestamp then ID (this last one sounds useless to me unless ids are sortable..)
Note: Tx Order is important to allow every node with a same set of transactions to build the block and always obtain
the same block hash.
This function is equivalent of selectMempoolTransactions in NXT
func (*MempoolService) ValidateMempoolTransaction ¶
func (mps *MempoolService) ValidateMempoolTransaction(mpTx *model.Transaction) error
type MempoolServiceInterface ¶
type MempoolServiceInterface interface { InitMempoolTransaction() error AddMempoolTransaction(tx *model.Transaction, txBytes []byte) error RemoveMempoolTransactions(mempoolTxs []*model.Transaction) error GetMempoolTransactions() (storage.MempoolMap, error) GetTotalMempoolTransactions() (int, error) SelectTransactionsFromMempool(blockTimestamp int64, blockHeight uint32) ([]*model.Transaction, error) ValidateMempoolTransaction(mpTx *model.Transaction) error ReceivedTransaction( senderPublicKey, receivedTxBytes []byte, lastBlockCacheFormat *storage.BlockCacheObject, nodeSecretPhrase string, isGenerateReceipt bool, ) (*model.Receipt, error) ReceivedBlockTransactions( senderPublicKey []byte, receivedTxBytes [][]byte, lastBlockCacheFormat *storage.BlockCacheObject, nodeSecretPhrase string, isGenerateReceipt bool, ) ([]*model.Receipt, error) DeleteExpiredMempoolTransactions() error GetMempoolTransactionsWantToBackup(height uint32) ([]*model.Transaction, error) BackupMempools(commonBlock *model.Block) error }
MempoolServiceInterface represents interface for MempoolService
type NodeAddressInfoService ¶
type NodeAddressInfoService struct { QueryExecutor query.ExecutorInterface NodeAddressInfoQuery query.NodeAddressInfoQueryInterface NodeRegistrationQuery query.NodeRegistrationQueryInterface BlockQuery query.BlockQueryInterface Signature crypto.SignatureInterface NodeAddressInfoStorage storage.CacheStorageInterface ActiveNodeRegistryCache storage.CacheStorageInterface MainBlockStateStorage storage.CacheStorageInterface MainBlocksStorage storage.CacheStackStorageInterface Logger *log.Logger }
NodeAddressInfoService nodeRegistration helper service methods
func NewNodeAddressInfoService ¶
func NewNodeAddressInfoService( executor query.ExecutorInterface, nodeAddressInfoQuery query.NodeAddressInfoQueryInterface, nodeRegistrationQuery query.NodeRegistrationQueryInterface, blockQuery query.BlockQueryInterface, signature crypto.SignatureInterface, nodeAddressesInfoStorage, mainBlockStateStorage, activeNodeRegistryCache storage.CacheStorageInterface, mainBlocksStorage storage.CacheStackStorageInterface, logger *log.Logger, ) *NodeAddressInfoService
func (*NodeAddressInfoService) BeginCacheTransaction ¶
func (nru *NodeAddressInfoService) BeginCacheTransaction() error
BeginCacheTransaction to begin transactional process of NodeAddressInfoStorage
func (*NodeAddressInfoService) ClearUpdateNodeAddressInfoCache ¶
func (nru *NodeAddressInfoService) ClearUpdateNodeAddressInfoCache() error
ClearUpdateNodeAddressInfoCache to clear cache node address info and pull again from DB
func (*NodeAddressInfoService) CommitCacheTransaction ¶
func (nru *NodeAddressInfoService) CommitCacheTransaction() error
CommitCacheTransaction to commiut all transactional process from NodeAddressInfoStorage
func (*NodeAddressInfoService) ConfirmNodeAddressInfo ¶
func (nru *NodeAddressInfoService) ConfirmNodeAddressInfo(pendingNodeAddressInfo *model.NodeAddressInfo) error
ConfirmPendingNodeAddress confirm a pending address by inserting or replacing the previously confirmed one and deleting the pending address
func (*NodeAddressInfoService) CountNodesAddressByStatus ¶
func (nru *NodeAddressInfoService) CountNodesAddressByStatus() (map[model.NodeAddressStatus]int, error)
CountNodesAddressByStatus return a map with a count of nodes addresses in db for every node address status
func (*NodeAddressInfoService) CountRegistredNodeAddressWithAddressInfo ¶
func (nru *NodeAddressInfoService) CountRegistredNodeAddressWithAddressInfo() (int, error)
CountRegistredNodeAddressWithAddressInfo return the number of node registry that already have node address info
func (*NodeAddressInfoService) DeleteNodeAddressInfoByNodeIDInDBTx ¶
func (nru *NodeAddressInfoService) DeleteNodeAddressInfoByNodeIDInDBTx(nodeID int64) error
DeleteNodeAddressInfoByNodeIDInDBTx will remove node adddress info in PushBlock process
func (*NodeAddressInfoService) DeletePendingNodeAddressInfo ¶
func (nru *NodeAddressInfoService) DeletePendingNodeAddressInfo(nodeID int64) error
DeletePendingNodeAddressInfo to delete pending node addrress based on node ID
func (*NodeAddressInfoService) GenerateNodeAddressInfo ¶
func (nru *NodeAddressInfoService) GenerateNodeAddressInfo( nodeID int64, nodeAddress string, port uint32, nodeSecretPhrase string) (*model.NodeAddressInfo, error)
GenerateNodeAddressInfo generate a nodeAddressInfo signed message
func (*NodeAddressInfoService) GetAddressInfoByAddressPort ¶
func (nru *NodeAddressInfoService) GetAddressInfoByAddressPort( address string, port uint32, nodeAddressStatuses []model.NodeAddressStatus) ([]*model.NodeAddressInfo, error)
GetAddressInfoByAddressPort returns a node address info given and address and port pairs
func (*NodeAddressInfoService) GetAddressInfoByNodeID ¶
func (nru *NodeAddressInfoService) GetAddressInfoByNodeID( nodeID int64, addressStatuses []model.NodeAddressStatus, ) ([]*model.NodeAddressInfo, error)
GetAddressInfoByNodeID return a list of node address info that have provied nodeID
func (*NodeAddressInfoService) GetAddressInfoByNodeIDWithPreferredStatus ¶
func (nru *NodeAddressInfoService) GetAddressInfoByNodeIDWithPreferredStatus( nodeID int64, preferredStatus model.NodeAddressStatus, ) (*model.NodeAddressInfo, error)
GetAddressInfoByNodeIDWithPreferredStatus returns a single address info from relative node id, preferring 'preferredStatus' address status over the others
func (*NodeAddressInfoService) GetAddressInfoByNodeIDs ¶
func (nru *NodeAddressInfoService) GetAddressInfoByNodeIDs( nodeIDs []int64, addressStatuses []model.NodeAddressStatus, ) ([]*model.NodeAddressInfo, error)
GetAddressInfoByNodeIDs return a list of node address info that have provied nodeIDs
func (*NodeAddressInfoService) GetAddressInfoByStatus ¶
func (nru *NodeAddressInfoService) GetAddressInfoByStatus( nodeAddressStatuses []model.NodeAddressStatus, ) ([]*model.NodeAddressInfo, error)
GetAddressInfoByStatus return a list of Node Address Info that have provided statuses
func (*NodeAddressInfoService) GetAddressInfoTableWithConsolidatedAddresses ¶
func (nru *NodeAddressInfoService) GetAddressInfoTableWithConsolidatedAddresses( preferredStatus model.NodeAddressStatus, ) ([]*model.NodeAddressInfo, error)
GetAddressInfoTableWithConsolidatedAddresses returns registered nodes that have relative node address info records, selecting addresses with 'preferredStatus', when available, over the other ones
func (*NodeAddressInfoService) GetUnsignedNodeAddressInfoBytes ¶
func (nru *NodeAddressInfoService) GetUnsignedNodeAddressInfoBytes(nodeAddressMessage *model.NodeAddressInfo) []byte
GetUnsignedNodeAddressInfoBytes get NodeAddressInfo message bytes
func (*NodeAddressInfoService) InsertAddressInfo ¶
func (nru *NodeAddressInfoService) InsertAddressInfo(nodeAddressInfo *model.NodeAddressInfo) error
func (*NodeAddressInfoService) RollbackCacheTransaction ¶
func (nru *NodeAddressInfoService) RollbackCacheTransaction() error
RollbackCacheTransaction to rollback all transactional precess from NodeAddressInfoStorage
func (*NodeAddressInfoService) UpdateAddrressInfo ¶
func (nru *NodeAddressInfoService) UpdateAddrressInfo(nodeAddressInfo *model.NodeAddressInfo) error
func (*NodeAddressInfoService) UpdateOrInsertAddressInfo ¶
func (nru *NodeAddressInfoService) UpdateOrInsertAddressInfo( nodeAddressInfo *model.NodeAddressInfo, updatedStatus model.NodeAddressStatus, ) (updated bool, err error)
InsertOrUpdateAddressInfo updates or adds (in case new) a node address info record to db
func (*NodeAddressInfoService) ValidateNodeAddressInfo ¶
func (nru *NodeAddressInfoService) ValidateNodeAddressInfo(nodeAddressInfo *model.NodeAddressInfo) (found bool, err error)
ValidateNodeAddressInfo validate message data against: - main blocks: block height and hash - node registry: nodeID and message signature (use node public key in registry to validate the signature) Validation also fails if there is already a nodeAddressInfo record in db with same nodeID, address, port
type NodeAddressInfoServiceInterface ¶
type NodeAddressInfoServiceInterface interface { GetUnsignedNodeAddressInfoBytes(nodeAddressMessage *model.NodeAddressInfo) []byte GenerateNodeAddressInfo( nodeID int64, nodeAddress string, port uint32, nodeSecretPhrase string) (*model.NodeAddressInfo, error) ValidateNodeAddressInfo(nodeAddressInfo *model.NodeAddressInfo) (found bool, err error) GetAddressInfoTableWithConsolidatedAddresses(preferredStatus model.NodeAddressStatus) ([]*model.NodeAddressInfo, error) GetAddressInfoByNodeIDWithPreferredStatus(nodeID int64, preferredStatus model.NodeAddressStatus) (*model.NodeAddressInfo, error) GetAddressInfoByNodeID(nodeID int64, addressStatuses []model.NodeAddressStatus) ([]*model.NodeAddressInfo, error) GetAddressInfoByNodeIDs(nodeIDs []int64, addressStatuses []model.NodeAddressStatus) ([]*model.NodeAddressInfo, error) GetAddressInfoByAddressPort( address string, port uint32, nodeAddressStatuses []model.NodeAddressStatus) ([]*model.NodeAddressInfo, error) GetAddressInfoByStatus(nodeAddressStatuses []model.NodeAddressStatus) ([]*model.NodeAddressInfo, error) InsertAddressInfo(nodeAddressInfo *model.NodeAddressInfo) error UpdateAddrressInfo(nodeAddressInfo *model.NodeAddressInfo) error UpdateOrInsertAddressInfo( nodeAddressInfo *model.NodeAddressInfo, updatedStatus model.NodeAddressStatus, ) (updated bool, err error) ConfirmNodeAddressInfo(pendingNodeAddressInfo *model.NodeAddressInfo) error DeletePendingNodeAddressInfo(nodeID int64) error DeleteNodeAddressInfoByNodeIDInDBTx(nodeID int64) error CountNodesAddressByStatus() (map[model.NodeAddressStatus]int, error) CountRegistredNodeAddressWithAddressInfo() (int, error) ClearUpdateNodeAddressInfoCache() error BeginCacheTransaction() error RollbackCacheTransaction() error CommitCacheTransaction() error }
NodeAddressInfoServiceInterface represents interface for NodeAddressInfoService
type NodeAdminService ¶
type NodeAdminService struct { QueryExecutor query.ExecutorInterface BlockQuery query.BlockQueryInterface Signature crypto.SignatureInterface BlockService BlockServiceInterface FilePath string }
NodeAdminServiceHelpersInterface mockable service methods
func NewNodeAdminService ¶
func NewNodeAdminService( queryExecutor query.ExecutorInterface, blockQuery query.BlockQueryInterface, signature crypto.SignatureInterface, blockService BlockServiceInterface, nodeKeyFilePath string) *NodeAdminService
func (*NodeAdminService) GenerateNodeKey ¶
func (nas *NodeAdminService) GenerateNodeKey(seed string) ([]byte, error)
GenerateNodeKey generates a new node key from its seed and store it, together with relative public key into node_keys file
func (*NodeAdminService) GenerateProofOfOwnership ¶
func (nas *NodeAdminService) GenerateProofOfOwnership( accountAddress []byte) (*model.ProofOfOwnership, error)
generate proof of ownership
func (*NodeAdminService) GetLastNodeKey ¶
func (*NodeAdminService) GetLastNodeKey(nodeKeys []*model.NodeKey) *model.NodeKey
GetLastNodeKey retrieves the last node key object from the node_key configuration file
func (*NodeAdminService) ParseKeysFile ¶
func (nas *NodeAdminService) ParseKeysFile() ([]*model.NodeKey, error)
ParseNodeKeysFile read the node key file and parses it into an array of NodeKey struct
type NodeAdminServiceInterface ¶
type NodeAdminServiceInterface interface { GenerateProofOfOwnership(accountAddress []byte) (*model.ProofOfOwnership, error) ParseKeysFile() ([]*model.NodeKey, error) GetLastNodeKey(nodeKeys []*model.NodeKey) *model.NodeKey GenerateNodeKey(seed string) ([]byte, error) }
NodeAdminServiceInterface represents interface for NodeAdminService
type NodeConfigurationService ¶
type NodeConfigurationService struct { Logger *log.Logger // contains filtered or unexported fields }
var (
NodeConfigurationServiceInstance *NodeConfigurationService
)
func NewNodeConfigurationService ¶
func NewNodeConfigurationService(logger *log.Logger) *NodeConfigurationService
func (*NodeConfigurationService) GetHost ¶
func (nss *NodeConfigurationService) GetHost() *model.Host
func (*NodeConfigurationService) GetHostID ¶
func (nss *NodeConfigurationService) GetHostID() (int64, error)
func (*NodeConfigurationService) GetMyAddress ¶
func (nss *NodeConfigurationService) GetMyAddress() (string, error)
func (*NodeConfigurationService) GetMyPeerPort ¶
func (nss *NodeConfigurationService) GetMyPeerPort() (uint32, error)
func (*NodeConfigurationService) GetNodePublicKey ¶
func (nss *NodeConfigurationService) GetNodePublicKey() []byte
func (*NodeConfigurationService) GetNodeSecretPhrase ¶
func (nss *NodeConfigurationService) GetNodeSecretPhrase() string
func (*NodeConfigurationService) IsMyAddressDynamic ¶
func (nss *NodeConfigurationService) IsMyAddressDynamic() bool
func (*NodeConfigurationService) SetHost ¶
func (nss *NodeConfigurationService) SetHost(host *model.Host)
func (*NodeConfigurationService) SetHostID ¶
func (nss *NodeConfigurationService) SetHostID(nodeID int64)
func (*NodeConfigurationService) SetIsMyAddressDynamic ¶
func (nss *NodeConfigurationService) SetIsMyAddressDynamic(nodeAddressDynamic bool)
func (*NodeConfigurationService) SetMyAddress ¶
func (nss *NodeConfigurationService) SetMyAddress(nodeAddress string, nodePort uint32)
func (*NodeConfigurationService) SetNodeSeed ¶
func (nss *NodeConfigurationService) SetNodeSeed(seed string)
type NodeConfigurationServiceHelper ¶
type NodeConfigurationServiceHelper struct{}
type NodeConfigurationServiceInterface ¶
type NodeConfigurationServiceInterface interface { SetMyAddress(nodeAddress string, port uint32) GetMyAddress() (string, error) GetMyPeerPort() (uint32, error) SetIsMyAddressDynamic(nodeAddressDynamic bool) IsMyAddressDynamic() bool GetHost() *model.Host SetHostID(nodeID int64) GetHostID() (int64, error) GetNodeSecretPhrase() string GetNodePublicKey() []byte SetHost(host *model.Host) SetNodeSeed(seed string) }
type NodeRegistrationService ¶
type NodeRegistrationService struct { QueryExecutor query.ExecutorInterface AccountBalanceQuery query.AccountBalanceQueryInterface NodeRegistrationQuery query.NodeRegistrationQueryInterface ParticipationScoreQuery query.ParticipationScoreQueryInterface NodeAdmissionTimestampQuery query.NodeAdmissionTimestampQueryInterface NextNodeAdmissionStorage storage.CacheStorageInterface ActiveNodeRegistryCacheStorage storage.CacheStorageInterface PendingNodeRegistryCacheStorage storage.CacheStorageInterface Logger *log.Logger BlockchainStatusService BlockchainStatusServiceInterface CurrentNodePublicKey []byte NodeAddressInfoService NodeAddressInfoServiceInterface }
NodeRegistrationService mockable service methods
func NewNodeRegistrationService ¶
func NewNodeRegistrationService( queryExecutor query.ExecutorInterface, accountBalanceQuery query.AccountBalanceQueryInterface, nodeRegistrationQuery query.NodeRegistrationQueryInterface, participationScoreQuery query.ParticipationScoreQueryInterface, nodeAdmissionTimestampQuery query.NodeAdmissionTimestampQueryInterface, logger *log.Logger, blockchainStatusService BlockchainStatusServiceInterface, nodeAddressInfoService NodeAddressInfoServiceInterface, nextNodeAdmissionStorage, activeNodeRegistryCacheStorage, pendingNodeRegistryCache storage.CacheStorageInterface, ) *NodeRegistrationService
func (*NodeRegistrationService) AddParticipationScore ¶
func (nrs *NodeRegistrationService) AddParticipationScore( nodeID, scoreDelta int64, height uint32, dbTx bool, ) (newScore int64, err error)
AddParticipationScore updates a node's participation score by increment/deincrement a previous score by a given number
func (*NodeRegistrationService) AdmitNodes ¶
func (nrs *NodeRegistrationService) AdmitNodes(nodeRegistrations []*model.NodeRegistration, height uint32) error
AdmitNodes update given node registrations' registrationStatus field to NodeRegistrationState_NodeRegistered (=0) and set default participation score to it
func (*NodeRegistrationService) BeginCacheTransaction ¶
func (nrs *NodeRegistrationService) BeginCacheTransaction() error
func (*NodeRegistrationService) CommitCacheTransaction ¶
func (nrs *NodeRegistrationService) CommitCacheTransaction() error
func (*NodeRegistrationService) ExpelNodes ¶
func (nrs *NodeRegistrationService) ExpelNodes(nodeRegistrations []*model.NodeRegistration, height uint32) error
ExpelNode (similar to delete node registration) Increase node's owner account balance by node registration's locked balance, then update the node registration by setting registrationStatus field to 3 (deleted) and locked balance to zero
func (*NodeRegistrationService) GetActiveNodeRegistrationByNodeID ¶
func (nrs *NodeRegistrationService) GetActiveNodeRegistrationByNodeID(nodeID int64) (*model.NodeRegistration, error)
GetActiveNodeRegistrationByNodeID fetch node registration by its nodeID from database
func (*NodeRegistrationService) GetActiveRegisteredNodes ¶
func (nrs *NodeRegistrationService) GetActiveRegisteredNodes() ([]*model.NodeRegistration, error)
func (*NodeRegistrationService) GetActiveRegistryNodeWithTotalParticipationScore ¶
func (nrs *NodeRegistrationService) GetActiveRegistryNodeWithTotalParticipationScore() ([]storage.NodeRegistry, int64, error)
func (*NodeRegistrationService) GetNextNodeAdmissionTimestamp ¶
func (nrs *NodeRegistrationService) GetNextNodeAdmissionTimestamp() (*model.NodeAdmissionTimestamp, error)
GetNextNodeAdmissionTimestamp get the next node admission timestamp
func (*NodeRegistrationService) GetNodeRegistrationByNodeID ¶
func (nrs *NodeRegistrationService) GetNodeRegistrationByNodeID(nodeID int64) (*model.NodeRegistration, error)
GetNodeRegistrationByNodeID fetch node registration by its nodeID from database
func (*NodeRegistrationService) GetNodeRegistrationByNodePublicKey ¶
func (nrs *NodeRegistrationService) GetNodeRegistrationByNodePublicKey(nodePublicKey []byte) (*model.NodeRegistration, error)
func (*NodeRegistrationService) GetNodeRegistryAtHeight ¶
func (nrs *NodeRegistrationService) GetNodeRegistryAtHeight(height uint32) ([]*model.NodeRegistration, error)
GetNodeRegistryAtHeight get active node registry list at the given height
func (*NodeRegistrationService) InitializeCache ¶
func (nrs *NodeRegistrationService) InitializeCache() error
InitializeCache prefill the node registry cache with latest state from database
func (*NodeRegistrationService) InsertNextNodeAdmissionTimestamp ¶
func (nrs *NodeRegistrationService) InsertNextNodeAdmissionTimestamp( lastAdmissionTimestamp int64, blockHeight uint32, dbTx bool, ) (*model.NodeAdmissionTimestamp, error)
InsertNextNodeAdmissionTimestamp set new next node admission timestamp
func (*NodeRegistrationService) RollbackCacheTransaction ¶
func (nrs *NodeRegistrationService) RollbackCacheTransaction() error
func (*NodeRegistrationService) SelectNodesToBeAdmitted ¶
func (nrs *NodeRegistrationService) SelectNodesToBeAdmitted(limit uint32) ([]*model.NodeRegistration, error)
SelectNodesToBeAdmitted Select n (=limit) queued nodes with the highest locked balance
func (*NodeRegistrationService) SelectNodesToBeExpelled ¶
func (nrs *NodeRegistrationService) SelectNodesToBeExpelled() ([]*model.NodeRegistration, error)
SelectNodesToBeExpelled Select n (=limit) registered nodes with participation score = 0
func (*NodeRegistrationService) SetCurrentNodePublicKey ¶
func (nrs *NodeRegistrationService) SetCurrentNodePublicKey(publicKey []byte)
SetCurrentNodePublicKey set the public key of running node, this information will be used to check if current node is being admitted and can start unlock smithing process
func (*NodeRegistrationService) UpdateNextNodeAdmissionCache ¶
func (nrs *NodeRegistrationService) UpdateNextNodeAdmissionCache(newNextNodeAdmission *model.NodeAdmissionTimestamp) error
type NodeRegistrationServiceInterface ¶
type NodeRegistrationServiceInterface interface { SelectNodesToBeAdmitted(limit uint32) ([]*model.NodeRegistration, error) SelectNodesToBeExpelled() ([]*model.NodeRegistration, error) GetActiveRegisteredNodes() ([]*model.NodeRegistration, error) GetActiveRegistryNodeWithTotalParticipationScore() ([]storage.NodeRegistry, int64, error) GetNodeRegistrationByNodePublicKey(nodePublicKey []byte) (*model.NodeRegistration, error) GetNodeRegistrationByNodeID(nodeID int64) (*model.NodeRegistration, error) GetActiveNodeRegistrationByNodeID(nodeID int64) (*model.NodeRegistration, error) GetNodeRegistryAtHeight(height uint32) ([]*model.NodeRegistration, error) AdmitNodes(nodeRegistrations []*model.NodeRegistration, height uint32) error ExpelNodes(nodeRegistrations []*model.NodeRegistration, height uint32) error GetNextNodeAdmissionTimestamp() (*model.NodeAdmissionTimestamp, error) InsertNextNodeAdmissionTimestamp( lastAdmissionTimestamp int64, blockHeight uint32, dbTx bool, ) (*model.NodeAdmissionTimestamp, error) UpdateNextNodeAdmissionCache(newNextNodeAdmission *model.NodeAdmissionTimestamp) error AddParticipationScore(nodeID, scoreDelta int64, height uint32, dbTx bool) (newScore int64, err error) SetCurrentNodePublicKey(publicKey []byte) // cache controllers InitializeCache() error BeginCacheTransaction() error RollbackCacheTransaction() error CommitCacheTransaction() error }
NodeRegistrationServiceInterface represents interface for NodeRegistrationService
type ParticipationScoreService ¶
type ParticipationScoreService struct { ParticipationScoreQuery query.ParticipationScoreQueryInterface QueryExecutor query.ExecutorInterface }
func NewParticipationScoreService ¶
func NewParticipationScoreService( participationScoreQuery query.ParticipationScoreQueryInterface, queryExecutor query.ExecutorInterface, ) *ParticipationScoreService
func (*ParticipationScoreService) GetLatestParticipationScoreByNodeAddress ¶
func (pss *ParticipationScoreService) GetLatestParticipationScoreByNodeAddress(nodeAddress string) (*model.ParticipationScore, error)
GetParticipationScoreByNodeID get latest participation score of a node nodeAddress must be a full address formatted as "address:port"
func (*ParticipationScoreService) GetLatestParticipationScoreByNodeID ¶
func (pss *ParticipationScoreService) GetLatestParticipationScoreByNodeID(nodeID int64) (*model.ParticipationScore, error)
GetParticipationScoreByNodeID get latest participation score of a node
func (*ParticipationScoreService) GetParticipationScoreByBlockHeightRange ¶
func (pss *ParticipationScoreService) GetParticipationScoreByBlockHeightRange(fromBlockHeight, toBlockHeight uint32) ([]*model.ParticipationScore, error)
GetParticipationScoreByBlockHeightRange get list of participation score change in the range Heights
type ParticipationScoreServiceInterface ¶
type ParticipationScoreServiceInterface interface { GetLatestParticipationScoreByNodeID(nodeID int64) (*model.ParticipationScore, error) GetLatestParticipationScoreByNodeAddress(nodeAddress string) (*model.ParticipationScore, error) GetParticipationScoreByBlockHeightRange(fromBlockHeight, toBlockHeight uint32) ([]*model.ParticipationScore, error) }
type PendingTransactionService ¶
type PendingTransactionService struct { Log *logrus.Logger QueryExecutor query.ExecutorInterface TypeActionSwitcher transaction.TypeActionSwitcher TransactionUtil transaction.UtilInterface TransactionQuery query.TransactionQueryInterface PendingTransactionQuery query.PendingTransactionQueryInterface }
func (*PendingTransactionService) ExpiringPendingTransactions ¶
func (tg *PendingTransactionService) ExpiringPendingTransactions(blockHeight uint32, useTX bool) error
ExpiringPendingTransactions will set status to be expired caused by current block height
type PendingTransactionServiceInterface ¶
type PendingTransactionServiceInterface interface {
ExpiringPendingTransactions(blockHeight uint32, useTX bool) error
}
func NewPendingTransactionService ¶
func NewPendingTransactionService( log *logrus.Logger, queryExecutor query.ExecutorInterface, typeActionSwitcher transaction.TypeActionSwitcher, transactionUtil transaction.UtilInterface, transactionQuery query.TransactionQueryInterface, pendingTransactionQuery query.PendingTransactionQueryInterface, ) PendingTransactionServiceInterface
type PublishedReceiptService ¶
type PublishedReceiptService struct { PublishedReceiptQuery query.PublishedReceiptQueryInterface ReceiptUtil util.ReceiptUtilInterface PublishedReceiptUtil util.PublishedReceiptUtilInterface ReceiptService ReceiptServiceInterface QueryExecutor query.ExecutorInterface }
func NewPublishedReceiptService ¶
func NewPublishedReceiptService( publishedReceiptQuery query.PublishedReceiptQueryInterface, receiptUtil util.ReceiptUtilInterface, publishedReceiptUtil util.PublishedReceiptUtilInterface, receiptService ReceiptServiceInterface, queryExecutor query.ExecutorInterface, ) *PublishedReceiptService
func (*PublishedReceiptService) ProcessPublishedReceipts ¶
func (ps *PublishedReceiptService) ProcessPublishedReceipts( block *model.Block, numberOfEstimatedReceipts uint32, validateReceipt bool, ) (unlinkedCount, linkedCount int, err error)
ProcessPublishedReceipts takes published receipts in a block and validate them, this function will run in a db transaction so ensure queryExecutor.Begin() is called before calling this function.
type PublishedReceiptServiceInterface ¶
type PublishedReceiptServiceInterface interface { ProcessPublishedReceipts( block *model.Block, numberOfEstimatedReceipts uint32, validateReceipt bool, ) (unlinkedCount, linkedCount int, err error) }
PublishedReceiptServiceInterface act as interface for processing the published receipt data
type ReceiptService ¶
type ReceiptService struct { NodeReceiptQuery query.BatchReceiptQueryInterface MerkleTreeQuery query.MerkleTreeQueryInterface NodeRegistrationQuery query.NodeRegistrationQueryInterface BlockQuery query.BlockQueryInterface TransactionQuery query.TransactionQueryInterface QueryExecutor query.ExecutorInterface NodeRegistrationService NodeRegistrationServiceInterface Signature crypto.SignatureInterface PublishedReceiptQuery query.PublishedReceiptQueryInterface ReceiptUtil coreUtil.ReceiptUtilInterface MainBlockStateStorage storage.CacheStorageInterface ScrambleNodeService ScrambleNodeServiceInterface ReceiptReminderStorage storage.CacheStorageInterface BatchReceiptCacheStorage storage.CacheStorageInterface MainBlocksStorage storage.CacheStackStorageInterface NodeConfiguration NodeConfigurationServiceInterface // local cache LastMerkleRoot []byte MerkleRootUtil util.MerkleRootInterface Logger *log.Logger }
func NewReceiptService ¶
func NewReceiptService( nodeReceiptQuery query.BatchReceiptQueryInterface, merkleTreeQuery query.MerkleTreeQueryInterface, nodeRegistrationQuery query.NodeRegistrationQueryInterface, blockQuery query.BlockQueryInterface, transactionQuery query.TransactionQueryInterface, queryExecutor query.ExecutorInterface, nodeRegistrationService NodeRegistrationServiceInterface, signature crypto.SignatureInterface, publishedReceiptQuery query.PublishedReceiptQueryInterface, receiptUtil coreUtil.ReceiptUtilInterface, mainBlockStateStorage, receiptReminderStorage, batchReceiptCacheStorage storage.CacheStorageInterface, scrambleNodeService ScrambleNodeServiceInterface, mainBlocksStorage storage.CacheStackStorageInterface, merkleRootUtil util.MerkleRootInterface, nodeConfiguration NodeConfigurationServiceInterface, logger *log.Logger, ) *ReceiptService
func (*ReceiptService) CheckDuplication ¶
func (rs *ReceiptService) CheckDuplication(publicKey, datumHash []byte) (err error)
CheckDuplication check existing batch receipt in cache storage
func (*ReceiptService) ClearCache ¶
func (rs *ReceiptService) ClearCache()
func (*ReceiptService) FlattenSelectedReceipts ¶
func (rs *ReceiptService) FlattenSelectedReceipts( selectedReceiptsMatrix [][]*model.PublishedReceipt, ) []*model.PublishedReceipt
FlattenSelectedReceipts make a flat array of unlinked and linked receipts
func (*ReceiptService) GenerateReceiptWithReminder ¶
func (rs *ReceiptService) GenerateReceiptWithReminder( ct chaintype.ChainType, receivedDatumHash []byte, lastBlock *storage.BlockCacheObject, senderPublicKey []byte, nodeSecretPhrase string, datumType uint32, ) (*model.Receipt, error)
GenerateReceiptWithReminder generate batch receipt at last block and store into batch receipt storage
func (*ReceiptService) GenerateReceiptsMerkleRoot ¶
func (rs *ReceiptService) GenerateReceiptsMerkleRoot(block *model.Block) error
GenerateReceiptsMerkleRoot generate merkle root of some batch receipts and also remove from cache generating will do when number of collected receipts(batch receipts) already <= the number of required
func (*ReceiptService) GenerateReceiptsMerkleRootListener ¶
func (rs *ReceiptService) GenerateReceiptsMerkleRootListener() observer.Listener
func (*ReceiptService) GetPublishedReceiptsByHeight ¶
func (rs *ReceiptService) GetPublishedReceiptsByHeight(blockHeight uint32) ([]*model.PublishedReceipt, error)
GetPublishedReceiptsByHeight that handling database connection to get published receipts by height
func (*ReceiptService) Initialize ¶
func (rs *ReceiptService) Initialize() error
func (*ReceiptService) SelectLinkedReceipts ¶
func (rs *ReceiptService) SelectLinkedReceipts( numberOfUnlinkedReceipts, numberOfReceipt, blockHeight uint32, blockSeed []byte, ) ([]*model.PublishedReceipt, error)
SelectLinkedReceipts select receipts received from node's priority peers at a given block height (from either a transaction or block broadcast to them by current node
func (*ReceiptService) SelectReceipts ¶
func (rs *ReceiptService) SelectReceipts( numberOfReceipt, blockHeight uint32, blockSeed []byte, ) ([][]*model.PublishedReceipt, error)
SelectReceipts select list of (linked and unlinked) receipts to be included in a block
func (*ReceiptService) SelectUnlinkedReceipts ¶
func (rs *ReceiptService) SelectUnlinkedReceipts( numberOfReceipt, blockHeight uint32, blockSeed []byte, ) ([]*model.PublishedReceipt, error)
SelectUnlinkedReceipts select receipts received from node's priority peers at a given block height (from either a transaction or block broadcast to them by current node
func (*ReceiptService) StoreReceipt ¶
func (*ReceiptService) ValidateLinkedReceipts ¶
func (rs *ReceiptService) ValidateLinkedReceipts( receiptsToValidate []*model.PublishedReceipt, blockToValidate *model.Block, maxLookBackwardSteps int32, ) (validReceipts []*model.PublishedReceipt, err error)
func (*ReceiptService) ValidateReceipt ¶
func (rs *ReceiptService) ValidateReceipt( receipt *model.Receipt, validateRefBlock bool, ) error
func (*ReceiptService) ValidateUnlinkedReceipts ¶
func (rs *ReceiptService) ValidateUnlinkedReceipts( receiptsToValidate []*model.PublishedReceipt, blockToValidate *model.Block, ) (validReceipts []*model.PublishedReceipt, err error)
ValidateUnlinkedReceipts validate receipt published in a block downloaded from a peer (part of block validation process)
type ReceiptServiceInterface ¶
type ReceiptServiceInterface interface { Initialize() error SelectReceipts( numberOfReceipt, blockHeight uint32, blockSeed []byte, ) ([][]*model.PublishedReceipt, error) SelectLinkedReceipts( numberOfUnlinkedReceipts, numberOfReceipt, blockHeight uint32, blockSeed []byte, ) ([]*model.PublishedReceipt, error) SelectUnlinkedReceipts( numberOfReceipt, blockHeight uint32, blockSeed []byte, ) ([]*model.PublishedReceipt, error) ValidateUnlinkedReceipts( receiptsToValidate []*model.PublishedReceipt, blockToValidate *model.Block, ) (validReceipts []*model.PublishedReceipt, err error) ValidateLinkedReceipts( receiptsToValidate []*model.PublishedReceipt, blockToValidate *model.Block, maxLookBackwardSteps int32, ) (validReceipts []*model.PublishedReceipt, err error) FlattenSelectedReceipts( selectedReceiptsMatrix [][]*model.PublishedReceipt, ) []*model.PublishedReceipt GenerateReceiptsMerkleRoot(lastBlock *model.Block) error GenerateReceiptsMerkleRootListener() observer.Listener // ValidateReceipt to validating *model.BatchReceipt when send block or send transaction and also when want to publishing receipt ValidateReceipt( receipt *model.Receipt, validateRefBlock bool, ) error GetPublishedReceiptsByHeight(blockHeight uint32) ([]*model.PublishedReceipt, error) // GenerateReceiptWithReminder generating batch receipt and store to reminder also GenerateReceiptWithReminder( ct chaintype.ChainType, receivedDatumHash []byte, lastBlock *storage.BlockCacheObject, senderPublicKey []byte, nodeSecretPhrase string, datumType uint32, ) (*model.Receipt, error) // CheckDuplication to check duplication of *model.BatchReceipt when get response from send block and send transaction CheckDuplication(publicKey []byte, datumHash []byte) (err error) StoreReceipt(receipt *model.Receipt, senderPublicKey []byte, chaintype chaintype.ChainType) error ClearCache() }
type ScrambleNodeService ¶
type ScrambleNodeService struct { NodeRegistrationService NodeRegistrationServiceInterface NodeAddressInfoService NodeAddressInfoServiceInterface QueryExecutor query.ExecutorInterface BlockQuery query.BlockQueryInterface // contains filtered or unexported fields }
func NewScrambleNodeService ¶
func NewScrambleNodeService( nodeRegistrationService NodeRegistrationServiceInterface, nodeAddressInfoService NodeAddressInfoServiceInterface, queryExecutor query.ExecutorInterface, blockQuery query.BlockQueryInterface, scrambleNodeStackStorage storage.CacheStackStorageInterface, ) *ScrambleNodeService
func (*ScrambleNodeService) BuildScrambledNodes ¶
func (sns *ScrambleNodeService) BuildScrambledNodes(block *model.Block) error
BuildScrambledNodes build sorted scramble nodes based on node registry
func (*ScrambleNodeService) BuildScrambledNodesAtHeight ¶
func (sns *ScrambleNodeService) BuildScrambledNodesAtHeight(blockHeight uint32) (*model.ScrambledNodes, error)
BuildScrambledNodesAtHeight build scramble node at custom height, used to build older scramble node this function will not store the scramble result in cache
func (*ScrambleNodeService) GetBlockHeightToBuildScrambleNodes ¶
func (*ScrambleNodeService) GetBlockHeightToBuildScrambleNodes(lastBlockHeight uint32) uint32
func (*ScrambleNodeService) GetScrambleNodesByHeight ¶
func (sns *ScrambleNodeService) GetScrambleNodesByHeight( blockHeight uint32, ) (*model.ScrambledNodes, error)
func (*ScrambleNodeService) InitializeScrambleCache ¶
func (sns *ScrambleNodeService) InitializeScrambleCache(lastBlockHeight uint32) error
func (*ScrambleNodeService) PopOffScrambleToHeight ¶
func (sns *ScrambleNodeService) PopOffScrambleToHeight(height uint32) error
PopOffScrambleToHeight delete cache of scrambles to given height's nearest scramble
func (*ScrambleNodeService) ScrambleNodeRegistries ¶
func (sns *ScrambleNodeService) ScrambleNodeRegistries(block *model.Block) (*model.ScrambledNodes, error)
ScrambleNodeRegistries this function is responsible of selecting and sorting registered nodes so that nodes/peers in scrambledNodes map changes order at a given interval note: this algorithm is deterministic for the whole network so that, at any point in time every node can calculate this map autonomously, given its node registry is updated
type ScrambleNodeServiceInterface ¶
type ScrambleNodeServiceInterface interface { InitializeScrambleCache(lastBlockHeight uint32) error GetBlockHeightToBuildScrambleNodes(lastBlockHeight uint32) uint32 GetScrambleNodesByHeight( blockHeight uint32, ) (*model.ScrambledNodes, error) BuildScrambledNodes(block *model.Block) error BuildScrambledNodesAtHeight(blockHeight uint32) (*model.ScrambledNodes, error) PopOffScrambleToHeight(height uint32) error }
type SnapshotBasicChunkStrategy ¶
type SnapshotBasicChunkStrategy struct { // chunk size in bytes ChunkSize int FileService FileServiceInterface }
func NewSnapshotBasicChunkStrategy ¶
func NewSnapshotBasicChunkStrategy( chunkSize int, fileService FileServiceInterface, ) *SnapshotBasicChunkStrategy
func (*SnapshotBasicChunkStrategy) BuildSnapshotFromChunks ¶
func (ss *SnapshotBasicChunkStrategy) BuildSnapshotFromChunks(snapshotHash []byte, fileChunkHashes [][]byte) (*model.SnapshotPayload, error)
BuildSnapshotFromChunks rebuilds a whole snapshot file from its file chunks and parses the encoded file into a SnapshotPayload struct
func (*SnapshotBasicChunkStrategy) DeleteFileByChunkHashes ¶
func (ss *SnapshotBasicChunkStrategy) DeleteFileByChunkHashes(concatenatedFileChunks []byte) error
DeleteFileByChunkHashes take in the concatenated file hashes (file name) and delete them.
func (*SnapshotBasicChunkStrategy) GenerateSnapshotChunks ¶
func (ss *SnapshotBasicChunkStrategy) GenerateSnapshotChunks( snapshotPayload *model.SnapshotPayload, ) (fullHash []byte, fileChunkHashes [][]byte, err error)
GenerateSnapshotChunks generates a spliced (multiple file chunks of the same size) snapshot from a SnapshotPayload struct and returns encoded snapshot payload's hash and the file chunks' hashes (to be included in a spine block manifest)
type SnapshotChunkStrategyInterface ¶
type SnapshotChunkStrategyInterface interface { GenerateSnapshotChunks(snapshotPayload *model.SnapshotPayload) (fullHash []byte, fileChunkHashes [][]byte, err error) BuildSnapshotFromChunks(snapshotHash []byte, fileChunkHashes [][]byte) (*model.SnapshotPayload, error) DeleteFileByChunkHashes(concatenatedFileChunks []byte) error }
type SnapshotMainBlockService ¶
type SnapshotMainBlockService struct { SnapshotPath string TransactionUtil transaction.UtilInterface TypeActionSwitcher transaction.TypeActionSwitcher Logger *log.Logger SnapshotBasicChunkStrategy SnapshotChunkStrategyInterface QueryExecutor query.ExecutorInterface AccountBalanceQuery query.AccountBalanceQueryInterface NodeRegistrationQuery query.NodeRegistrationQueryInterface ParticipationScoreQuery query.ParticipationScoreQueryInterface AccountDatasetQuery query.AccountDatasetQueryInterface EscrowTransactionQuery query.EscrowTransactionQueryInterface PublishedReceiptQuery query.PublishedReceiptQueryInterface PendingTransactionQuery query.PendingTransactionQueryInterface PendingSignatureQuery query.PendingSignatureQueryInterface MultisignatureInfoQuery query.MultisignatureInfoQueryInterface MultisignatureParticipantQuery query.MultiSignatureParticipantQueryInterface SkippedBlocksmithQuery query.SkippedBlocksmithQueryInterface BlockQuery query.BlockQueryInterface FeeScaleQuery query.FeeScaleQueryInterface FeeVoteCommitmentVoteQuery query.FeeVoteCommitmentVoteQueryInterface FeeVoteRevealVoteQuery query.FeeVoteRevealVoteQueryInterface LiquidPaymentTransactionQuery query.LiquidPaymentTransactionQueryInterface NodeAdmissionTimestampQuery query.NodeAdmissionTimestampQueryInterface SnapshotQueries map[string]query.SnapshotQuery BlocksmithSafeQuery map[string]bool DerivedQueries []query.DerivedQuery BlockMainService BlockServiceInterface NodeRegistrationService NodeRegistrationServiceInterface ScrambleNodeService ScrambleNodeServiceInterface // contains filtered or unexported fields }
func NewSnapshotMainBlockService ¶
func NewSnapshotMainBlockService( snapshotPath string, queryExecutor query.ExecutorInterface, logger *log.Logger, snapshotChunkStrategy SnapshotChunkStrategyInterface, accountBalanceQuery query.AccountBalanceQueryInterface, nodeRegistrationQuery query.NodeRegistrationQueryInterface, participationScoreQuery query.ParticipationScoreQueryInterface, accountDatasetQuery query.AccountDatasetQueryInterface, escrowTransactionQuery query.EscrowTransactionQueryInterface, publishedReceiptQuery query.PublishedReceiptQueryInterface, pendingTransactionQuery query.PendingTransactionQueryInterface, pendingSignatureQuery query.PendingSignatureQueryInterface, multisignatureInfoQuery query.MultisignatureInfoQueryInterface, multisignatureParticipantQuery query.MultiSignatureParticipantQueryInterface, skippedBlocksmithQuery query.SkippedBlocksmithQueryInterface, feeScaleQuery query.FeeScaleQueryInterface, feeVoteCommitmentVoteQuery query.FeeVoteCommitmentVoteQueryInterface, feeVoteRevealVoteQuery query.FeeVoteRevealVoteQueryInterface, liquidPaymentTransactionQuery query.LiquidPaymentTransactionQueryInterface, nodeAdmissionTimestampQuery query.NodeAdmissionTimestampQueryInterface, blockQuery query.BlockQueryInterface, snapshotQueries map[string]query.SnapshotQuery, blocksmithSafeQueries map[string]bool, derivedQueries []query.DerivedQuery, transactionUtil transaction.UtilInterface, typeSwitcher transaction.TypeActionSwitcher, blockMainService BlockServiceInterface, nodeRegistrationService NodeRegistrationServiceInterface, scrambleNodeService ScrambleNodeServiceInterface, ) *SnapshotMainBlockService
func (*SnapshotMainBlockService) DeleteFileByChunkHashes ¶
func (ss *SnapshotMainBlockService) DeleteFileByChunkHashes(fileChunkHashes []byte) error
DeleteFileByChunkHashes delete the files included in the file chunk hashes.
func (*SnapshotMainBlockService) ImportSnapshotFile ¶
func (ss *SnapshotMainBlockService) ImportSnapshotFile(snapshotFileInfo *model.SnapshotFileInfo) error
ImportSnapshotFile parses a downloaded snapshot file into db
func (*SnapshotMainBlockService) InsertSnapshotPayloadToDB ¶
func (ss *SnapshotMainBlockService) InsertSnapshotPayloadToDB(payload *model.SnapshotPayload, height uint32) error
InsertSnapshotPayloadToDB insert snapshot data to db
func (*SnapshotMainBlockService) IsSnapshotHeight ¶
func (ss *SnapshotMainBlockService) IsSnapshotHeight(height uint32) bool
IsSnapshotHeight returns true if chain height passed is a snapshot height
func (*SnapshotMainBlockService) NewSnapshotFile ¶
func (ss *SnapshotMainBlockService) NewSnapshotFile(block *model.Block) (snapshotFileInfo *model.SnapshotFileInfo, err error)
NewSnapshotFile creates a new snapshot file (or multiple file chunks) and return the snapshotFileInfo
type SnapshotService ¶
type SnapshotService struct { SpineBlockManifestService SpineBlockManifestServiceInterface BlockSpinePublicKeyService BlockSpinePublicKeyServiceInterface SnapshotChunkUtil util.ChunkUtilInterface BlockchainStatusService BlockchainStatusServiceInterface SnapshotBlockServices map[int32]SnapshotBlockServiceInterface // map key = chaintype number (eg. mainchain = 0) Logger *log.Logger }
func NewSnapshotService ¶
func NewSnapshotService( spineBlockManifestService SpineBlockManifestServiceInterface, blockSpinePublicKeyService BlockSpinePublicKeyServiceInterface, blockchainStatusService BlockchainStatusServiceInterface, snapshotBlockServices map[int32]SnapshotBlockServiceInterface, snapshotChunkUtil util.ChunkUtilInterface, logger *log.Logger, ) *SnapshotService
func (*SnapshotService) GenerateSnapshot ¶
func (ss *SnapshotService) GenerateSnapshot(block *model.Block, ct chaintype.ChainType, snapshotChunkBytesLength int) (*model.SnapshotFileInfo, error)
GenerateSnapshot compute and persist a snapshot to file
func (*SnapshotService) IsSnapshotProcessing ¶
func (*SnapshotService) IsSnapshotProcessing(ct chaintype.ChainType) bool
func (*SnapshotService) StartSnapshotListener ¶
func (ss *SnapshotService) StartSnapshotListener() observer.Listener
StartSnapshotListener setup listener for snapshots generation TODO: allow only active blocksmiths (registered nodes at this block height) to generate snapshots
one way to do this is to inject the actual node public key and nodeRegistration service into this service
func (*SnapshotService) StopSnapshotGeneration ¶
func (ss *SnapshotService) StopSnapshotGeneration(ct chaintype.ChainType) error
StopSnapshotGeneration stops current snapshot generation
type SnapshotServiceInterface ¶
type SnapshotServiceInterface interface { GenerateSnapshot(block *model.Block, ct chaintype.ChainType, chunkSizeBytes int) (*model.SnapshotFileInfo, error) IsSnapshotProcessing(ct chaintype.ChainType) bool StopSnapshotGeneration(ct chaintype.ChainType) error StartSnapshotListener() observer.Listener }
SnapshotServiceInterface snapshot logic shared across block types
type SpineBlockManifestService ¶
type SpineBlockManifestService struct { QueryExecutor query.ExecutorInterface SpineBlockManifestQuery query.SpineBlockManifestQueryInterface SpineBlockQuery query.BlockQueryInterface Logger *log.Logger }
func NewSpineBlockManifestService ¶
func NewSpineBlockManifestService( queryExecutor query.ExecutorInterface, megablockQuery query.SpineBlockManifestQueryInterface, spineBlockQuery query.BlockQueryInterface, logger *log.Logger, ) *SpineBlockManifestService
func (*SpineBlockManifestService) CreateSpineBlockManifest ¶
func (ss *SpineBlockManifestService) CreateSpineBlockManifest(fullFileHash []byte, megablockHeight uint32, expirationTimestamp int64, sortedFileChunksHashes [][]byte, ct chaintype.ChainType, mbType model.SpineBlockManifestType) (*model.SpineBlockManifest, error)
CreateSpineBlockManifest persist a new spineBlockManifest fullFileHash: hash of the full (snapshot) file content megablockHeight: (mainchain) height at which the (snapshot) file computation has started (note: this is not the captured snapshot's height, which should be = mainHeight - minRollbackHeight) sortedFileChunksHashes all (snapshot) file chunks hashes for this spineBlockManifest (already sorted from first to last chunk) ct the spineBlockManifest's chain type (eg. mainchain) ct the spineBlockManifest's type (eg. snapshot)
func (*SpineBlockManifestService) GetLastSpineBlockManifest ¶
func (ss *SpineBlockManifestService) GetLastSpineBlockManifest(ct chaintype.ChainType, mbType model.SpineBlockManifestType) (*model.SpineBlockManifest, error)
GetLastSpineBlockManifest retrieve the last available spineBlockManifest for the given chaintype
func (*SpineBlockManifestService) GetSpineBlockManifestBySpineBlockHeight ¶
func (ss *SpineBlockManifestService) GetSpineBlockManifestBySpineBlockHeight(spineBlockHeight uint32) ( []*model.SpineBlockManifest, error, )
GetSpineBlockManifestBySpineBlockHeight return all manifests published in spine block
func (*SpineBlockManifestService) GetSpineBlockManifestBytes ¶
func (ss *SpineBlockManifestService) GetSpineBlockManifestBytes(spineBlockManifest *model.SpineBlockManifest) []byte
GetSpineBlockManifestBytes translate tx body to bytes representation
func (*SpineBlockManifestService) GetSpineBlockManifestID ¶
func (ss *SpineBlockManifestService) GetSpineBlockManifestID(spineBlockManifest *model.SpineBlockManifest) (int64, error)
GetSpineBlockManifestID hash the spineBlockManifest bytes and return its little endian representation
func (*SpineBlockManifestService) GetSpineBlockManifestsByManifestReferenceHeightRange ¶
func (ss *SpineBlockManifestService) GetSpineBlockManifestsByManifestReferenceHeightRange( fromHeight, toHeight uint32, ) (manifests []*model.SpineBlockManifest, err error)
func (*SpineBlockManifestService) GetSpineBlockManifestsForSpineBlock ¶
func (ss *SpineBlockManifestService) GetSpineBlockManifestsForSpineBlock(spineHeight uint32, spineTimestamp int64) ([]*model.SpineBlockManifest, error)
GetSpineBlockManifestsForSpineBlock retrieve all spineBlockManifests for a given spine height if there are no spineBlockManifest at this height, return nil spineHeight height of the spine block we want to fetch the spineBlockManifests for spineTimestamp timestamp spine block we want to fetch the spineBlockManifests for
func (*SpineBlockManifestService) GetSpineBlockManifestsFromSpineBlockHeight ¶
func (ss *SpineBlockManifestService) GetSpineBlockManifestsFromSpineBlockHeight(spineBlockHeight uint32) ( []*model.SpineBlockManifest, error, )
GetSpineBlockManifestsFromSpineBlockHeight return all manifest where height > spineBlockHeight
func (*SpineBlockManifestService) InsertSpineBlockManifest ¶
func (ss *SpineBlockManifestService) InsertSpineBlockManifest(spineBlockManifest *model.SpineBlockManifest) error
InsertSpineBlockManifest persist a spineBlockManifest to db (query wrapper)
type SpineBlockManifestServiceInterface ¶
type SpineBlockManifestServiceInterface interface { GetSpineBlockManifestID(spineBlockManifest *model.SpineBlockManifest) (int64, error) GetSpineBlockManifestsForSpineBlock(spineHeight uint32, spineTimestamp int64) ([]*model.SpineBlockManifest, error) GetLastSpineBlockManifest(ct chaintype.ChainType, mbType model.SpineBlockManifestType) (*model.SpineBlockManifest, error) CreateSpineBlockManifest(fullFileHash []byte, megablockHeight uint32, expirationTimestamp int64, sortedFileChunksHashes [][]byte, ct chaintype.ChainType, mbType model.SpineBlockManifestType) (*model.SpineBlockManifest, error) GetSpineBlockManifestBytes(spineBlockManifest *model.SpineBlockManifest) []byte InsertSpineBlockManifest(spineBlockManifest *model.SpineBlockManifest) error GetSpineBlockManifestBySpineBlockHeight(spineBlockHeight uint32) ( []*model.SpineBlockManifest, error, ) GetSpineBlockManifestsFromSpineBlockHeight(spineBlockHeight uint32) ( []*model.SpineBlockManifest, error, ) GetSpineBlockManifestsByManifestReferenceHeightRange(fromHeight, toHeight uint32) (manifests []*model.SpineBlockManifest, err error) }
type TransactionCoreService ¶
type TransactionCoreService struct { Log *logrus.Logger QueryExecutor query.ExecutorInterface TypeActionSwitcher transaction.TypeActionSwitcher TransactionUtil transaction.UtilInterface TransactionQuery query.TransactionQueryInterface EscrowTransactionQuery query.EscrowTransactionQueryInterface LiquidPaymentTransactionQuery query.LiquidPaymentTransactionQueryInterface }
func (*TransactionCoreService) ApplyConfirmedTransaction ¶
func (tg *TransactionCoreService) ApplyConfirmedTransaction( txAction transaction.TypeAction, blockTimestamp int64, ) error
func (*TransactionCoreService) ApplyUnconfirmedTransaction ¶
func (tg *TransactionCoreService) ApplyUnconfirmedTransaction(txAction transaction.TypeAction) error
func (*TransactionCoreService) CompletePassedLiquidPayment ¶
func (tg *TransactionCoreService) CompletePassedLiquidPayment(block *model.Block) error
func (*TransactionCoreService) ExpiringEscrowTransactions ¶
func (tg *TransactionCoreService) ExpiringEscrowTransactions(blockHeight uint32, blockTimestamp int64, useTX bool) error
ExpiringEscrowTransactions push an observer event that is ExpiringEscrowTransactions, will set status to be expired caused by current block height query lock from outside (PushBlock)
func (*TransactionCoreService) GetTransactionsByBlockID ¶
func (tg *TransactionCoreService) GetTransactionsByBlockID(blockID int64) ([]*model.Transaction, error)
GetTransactionsByBlockID get transactions of the block
func (*TransactionCoreService) GetTransactionsByIds ¶
func (tg *TransactionCoreService) GetTransactionsByIds(transactionIds []int64) ([]*model.Transaction, error)
func (*TransactionCoreService) UndoApplyUnconfirmedTransaction ¶
func (tg *TransactionCoreService) UndoApplyUnconfirmedTransaction(txAction transaction.TypeAction) error
func (*TransactionCoreService) ValidateTransaction ¶
func (tg *TransactionCoreService) ValidateTransaction(txAction transaction.TypeAction, useTX bool) error
type TransactionCoreServiceInterface ¶
type TransactionCoreServiceInterface interface { GetTransactionsByIds(transactionIds []int64) ([]*model.Transaction, error) GetTransactionsByBlockID(blockID int64) ([]*model.Transaction, error) ValidateTransaction(txAction transaction.TypeAction, useTX bool) error ApplyUnconfirmedTransaction(txAction transaction.TypeAction) error UndoApplyUnconfirmedTransaction(txAction transaction.TypeAction) error ApplyConfirmedTransaction(txAction transaction.TypeAction, blockTimestamp int64) error ExpiringEscrowTransactions(blockHeight uint32, blockTimestamp int64, useTX bool) error CompletePassedLiquidPayment(block *model.Block) error }
func NewTransactionCoreService ¶
func NewTransactionCoreService( log *logrus.Logger, queryExecutor query.ExecutorInterface, typeActionSwitcher transaction.TypeActionSwitcher, transactionUtil transaction.UtilInterface, transactionQuery query.TransactionQueryInterface, escrowTransactionQuery query.EscrowTransactionQueryInterface, liquidPaymentTransactionQuery query.LiquidPaymentTransactionQueryInterface, ) TransactionCoreServiceInterface
type TransactionIDsMap ¶
TransactionIDs reperesent key value of transaction ID with it's index potition in the block
Source Files
¶
- blockCoreService.go
- blockIncompleteQueueService.go
- blockMainService.go
- blockPoolService.go
- blockSpinePublickeyService.go
- blockSpineService.go
- blockchainStatusService.go
- blocksmithService.go
- coinbaseService.go
- fileService.go
- genesisCoreService.go
- mempoolCoreService.go
- nodeAddressInfoService.go
- nodeAdminCoreService.go
- nodeConfigurationService.go
- nodeRegistrationCoreService.go
- participationScoreService.go
- pendingTransactionService.go
- publishedReceiptService.go
- receiptService.go
- scrambleNodeService.go
- snapshotBasicChunkStrategy.go
- snapshotBlockService.go
- snapshotChunkStrategy.go
- snapshotMainBlockService.go
- snapshotService.go
- spineBlockManifestService.go
- transactionCoreService.go