Seed API

API reference for seed nodes

Currently seed node address are fixed as http://api.Fiesta4Spectrum.org:8000 for App1 and http://api.Fiesta4Spectrum.org:8001 for App2.

Register to seed node

POST http://seed_addr:port/register

Each miner node needs to register itself to seed node periodically to make itself popular

Request Body

{
    "seed_name": name_of_seed,
    "from": name_of_seed_node,
    "seedWeight": seed_weight_for_machine_learning,
    "para": {
        "alpha": mixing_weight_when_global_integeration,
	"preprocPara": {
		"avg": list_of_avg_double,
		"std": list_of_std_double
		},
	"trainPara": {
		"batch": local_training_batch_size,
		"lr": learning_rate,
		"opt": optimization_algorithm,
		"epoch": local_training_epoch_num,
		"loss": local_training_loss_func,
		},
	"samplePara": {
		"center_freq": center_frequency_int,
		"bandwidth": bandwidth_int,
		},
	"layerStructure": a_list_describe_layer_structure,
	"difficulty": prove_of_work_difficulty
	},
    "peers": list_of_peer_miners
}

Fetch the list of all miners alive

GET http://seed_addr:port/miner_peers

{
    "peers" : [list_of_addr_strings]
}

Get the reward of one node

GET http://seed_addr:port/reward

Query Parameters

{ 
    "id" : id_string,
    "role" : category_string,
    "uploads" : uploads_int,
    "reward" : reward_double
}

Last updated