Merge pull request #77 from filecoin-project/seq-num-for-all-miners
get seq num based on role, not based on group
This commit is contained in:
commit
b3b89b2072
@ -16,7 +16,7 @@
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"id": 16,
|
||||
"iteration": 1593204217741,
|
||||
"iteration": 1593448862489,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
@ -111,7 +111,13 @@
|
||||
}
|
||||
]
|
||||
],
|
||||
"tags": []
|
||||
"tags": [
|
||||
{
|
||||
"key": "run",
|
||||
"operator": "=~",
|
||||
"value": "/^$runid$/"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
@ -216,7 +222,13 @@
|
||||
}
|
||||
]
|
||||
],
|
||||
"tags": []
|
||||
"tags": [
|
||||
{
|
||||
"key": "run",
|
||||
"operator": "=~",
|
||||
"value": "/^$runid$/"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"alias": "all ($tag_run)",
|
||||
@ -259,7 +271,13 @@
|
||||
}
|
||||
]
|
||||
],
|
||||
"tags": []
|
||||
"tags": [
|
||||
{
|
||||
"key": "run",
|
||||
"operator": "=~",
|
||||
"value": "/^$runid$/"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
@ -406,7 +424,13 @@
|
||||
}
|
||||
]
|
||||
],
|
||||
"tags": []
|
||||
"tags": [
|
||||
{
|
||||
"key": "run",
|
||||
"operator": "=~",
|
||||
"value": "/^$runid$/"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
@ -547,7 +571,13 @@
|
||||
}
|
||||
]
|
||||
],
|
||||
"tags": []
|
||||
"tags": [
|
||||
{
|
||||
"key": "run",
|
||||
"operator": "=~",
|
||||
"value": "/^$runid$/"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"alias": "find-data.offer - $tag_miner ($tag_run)",
|
||||
@ -596,7 +626,13 @@
|
||||
}
|
||||
]
|
||||
],
|
||||
"tags": []
|
||||
"tags": [
|
||||
{
|
||||
"key": "run",
|
||||
"operator": "=~",
|
||||
"value": "/^$runid$/"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
@ -743,7 +779,13 @@
|
||||
}
|
||||
]
|
||||
],
|
||||
"tags": []
|
||||
"tags": [
|
||||
{
|
||||
"key": "run",
|
||||
"operator": "=~",
|
||||
"value": "/^$runid$/"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
@ -876,7 +918,13 @@
|
||||
}
|
||||
]
|
||||
],
|
||||
"tags": []
|
||||
"tags": [
|
||||
{
|
||||
"key": "run",
|
||||
"operator": "=~",
|
||||
"value": "/^$runid$/"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
@ -956,11 +1004,37 @@
|
||||
"refresh": 2,
|
||||
"skipUrlSync": false,
|
||||
"type": "interval"
|
||||
},
|
||||
{
|
||||
"allValue": null,
|
||||
"current": {
|
||||
"selected": true,
|
||||
"text": "All",
|
||||
"value": "$__all"
|
||||
},
|
||||
"datasource": "influxdb",
|
||||
"definition": "SHOW TAG VALUES WITH KEY = run",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"label": null,
|
||||
"multi": false,
|
||||
"name": "runid",
|
||||
"options": [],
|
||||
"query": "SHOW TAG VALUES WITH KEY = run",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 1,
|
||||
"tagValuesQuery": "",
|
||||
"tags": [],
|
||||
"tagsQuery": "",
|
||||
"type": "query",
|
||||
"useTags": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-8m",
|
||||
"from": "now-15m",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
@ -979,5 +1053,5 @@
|
||||
"timezone": "",
|
||||
"title": "Project Oni - Baseline test",
|
||||
"uid": "8em8RXWMz",
|
||||
"version": 8
|
||||
"version": 1
|
||||
}
|
||||
|
@ -20,7 +20,6 @@
|
||||
miners = "3"
|
||||
genesis_timestamp_offset = "100000"
|
||||
balance = "2000"
|
||||
sectors = "10"
|
||||
|
||||
[[groups]]
|
||||
id = "bootstrapper"
|
||||
@ -35,16 +34,30 @@
|
||||
role = "bootstrapper"
|
||||
|
||||
[[groups]]
|
||||
id = "miners"
|
||||
id = "miners-weak"
|
||||
[groups.resources]
|
||||
memory = "8192Mi"
|
||||
cpu = "1000m"
|
||||
[groups.instances]
|
||||
count = 3
|
||||
count = 2
|
||||
percentage = 0.0
|
||||
[groups.run]
|
||||
[groups.run.test_params]
|
||||
role = "miner"
|
||||
sectors = "8"
|
||||
|
||||
[[groups]]
|
||||
id = "miners-strong"
|
||||
[groups.resources]
|
||||
memory = "8192Mi"
|
||||
cpu = "1000m"
|
||||
[groups.instances]
|
||||
count = 1
|
||||
percentage = 0.0
|
||||
[groups.run]
|
||||
[groups.run.test_params]
|
||||
role = "miner"
|
||||
sectors = "24"
|
||||
|
||||
[[groups]]
|
||||
id = "clients"
|
||||
|
@ -75,9 +75,10 @@ var (
|
||||
clientsAddrsTopic = sync.NewTopic("clientsAddrsTopic", &peer.AddrInfo{})
|
||||
minersAddrsTopic = sync.NewTopic("minersAddrsTopic", &MinerAddresses{})
|
||||
|
||||
stateReady = sync.State("ready")
|
||||
stateDone = sync.State("done")
|
||||
stateStopMining = sync.State("stop-mining")
|
||||
stateReady = sync.State("ready")
|
||||
stateDone = sync.State("done")
|
||||
stateStopMining = sync.State("stop-mining")
|
||||
stateMinerPickSeqNum = sync.State("miner-pick-seq-num")
|
||||
)
|
||||
|
||||
type TestEnvironment struct {
|
||||
@ -289,7 +290,10 @@ func prepareMiner(t *TestEnvironment) (*Node, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
minerAddr, err := address.NewIDAddress(genesis_chain.MinerStart + uint64(t.GroupSeq-1))
|
||||
// pick unique sequence number for each miner, no matter in which group they are
|
||||
seq := t.SyncClient.MustSignalAndWait(ctx, stateMinerPickSeqNum, t.IntParam("miners"))
|
||||
|
||||
minerAddr, err := address.NewIDAddress(genesis_chain.MinerStart + uint64(seq-1))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -308,7 +312,7 @@ func prepareMiner(t *TestEnvironment) (*Node, error) {
|
||||
|
||||
t.RecordMessage("Miner Info: Owner: %s Worker: %s", genMiner.Owner, genMiner.Worker)
|
||||
|
||||
presealMsg := &PresealMsg{Miner: *genMiner, Seqno: t.GroupSeq}
|
||||
presealMsg := &PresealMsg{Miner: *genMiner, Seqno: seq}
|
||||
t.SyncClient.Publish(ctx, presealTopic, presealMsg)
|
||||
|
||||
// then collect the genesis block and bootstrapper address
|
||||
|
Loading…
Reference in New Issue
Block a user