run

package
v0.0.0-...-a5060f3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockPrint

func BlockPrint(block chain.Block)

func NewTask

func NewTask(model *python3.PyObject, unlabel *python3.PyObject, size [][]int, comp_size []int, globalParam [][]float64, momentum [][]float64, rank int, beta float64, slr float64) network.TaskInfo

New FL task

func NodesCommitteeUpdate

func NodesCommitteeUpdate(nodes []*node.Node, conn *rpc.Client, bcnet *network.BlockchainNetwork)

Update the committee info from the blockchain network

func NodesGetTask

func NodesGetTask(nodes []*node.Node, bcnet *network.BlockchainNetwork)

Nodes get task from network

func ProcessBlock

func ProcessBlock(bcnet *network.BlockchainNetwork, nodes []*node.Node, testData *python3.PyObject, conn *rpc.Client)

Achieve the consensus via byzantine fault tolerance

func ProcessBlockPre

func ProcessBlockPre(nodes []*node.Node, round int, conn *rpc.Client, bcnet *network.BlockchainNetwork)

Block preparation

func ProcessCommittee

func ProcessCommittee(nodes []*node.Node, conn *rpc.Client, bcnet *network.BlockchainNetwork)

Constitute the committee

func ProcessFL

func ProcessFL(workers []*client.Client, attackers []*client.Client, round int, nodes []*node.Node, conn *rpc.Client)

func ProcessNextRound

func ProcessNextRound(bcnet *network.BlockchainNetwork, nodes []*node.Node, conn *rpc.Client, round *int)

func SaveStakeMap

func SaveStakeMap(nodes []*node.Node, stakemap map[int]int)

func TaskPublish

func TaskPublish(task network.TaskInfo, bcnet *network.BlockchainNetwork)

Task publish

func Test

func Test(model *python3.PyObject, globalModel *python3.PyObject, testData *python3.PyObject, model_size [][]int) float64

Types

This section is empty.

Jump to

Keyboard shortcuts

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