diff --git a/bn256/cf/bn256_test.go b/bn256/cf/bn256_test.go index 8d2041b..e3f7a22 100644 --- a/bn256/cf/bn256_test.go +++ b/bn256/cf/bn256_test.go @@ -2,6 +2,7 @@ package bn256 import ( "crypto/rand" + "fmt" "testing" "time" @@ -44,7 +45,8 @@ func TestSign(t *testing.T) { sig, err := sk.Sign(msg, nil) require.NoError(t, err) - + buff, _ := sig.MarshalBinary() + fmt.Println(len(buff)) err = pk.VerifySignature(msg, sig) require.NoError(t, err) } diff --git a/bn256/go/bn256_test.go b/bn256/go/bn256_test.go index 8d2041b..f0f8891 100644 --- a/bn256/go/bn256_test.go +++ b/bn256/go/bn256_test.go @@ -2,6 +2,7 @@ package bn256 import ( "crypto/rand" + "fmt" "testing" "time" @@ -45,6 +46,11 @@ func TestSign(t *testing.T) { sig, err := sk.Sign(msg, nil) require.NoError(t, err) + buff, _ := sig.MarshalBinary() + fmt.Println(len(buff)) + buff, _ = pk.MarshalBinary() + fmt.Println(len(buff)) + err = pk.VerifySignature(msg, sig) require.NoError(t, err) } diff --git a/network/counter_encoding.go b/network/counter_encoding.go new file mode 100644 index 0000000..ee877c5 --- /dev/null +++ b/network/counter_encoding.go @@ -0,0 +1,63 @@ +package network + +import ( + "bytes" + "io" + "sync" + + "github.com/ConsenSys/handel" +) + +// CounterEncoding is a wrapper around an Encoding that can report how many +// bytes sent and received and implements the monitor.Counter interface +type CounterEncoding struct { + *sync.RWMutex + Encoding + sent int // bytes sent + rcvd int // bytes received +} + +// NewCounterEncoding returns an Encoding that implements the monitor.Counter +// interface +func NewCounterEncoding(e Encoding) *CounterEncoding { + return &CounterEncoding{Encoding: e, RWMutex: new(sync.RWMutex)} +} + +// Encode implements the Encoding interface +func (c *CounterEncoding) Encode(p *handel.Packet, w io.Writer) error { + var b bytes.Buffer + combined := io.MultiWriter(w, &b) + if err := c.Encoding.Encode(p, combined); err != nil { + return err + } + + c.Lock() + c.sent += b.Len() + c.Unlock() + return nil +} + +// Decode implements the Encoding interface +func (c *CounterEncoding) Decode(r io.Reader) (*handel.Packet, error) { + var b bytes.Buffer + var tee = io.TeeReader(r, &b) + p, err := c.Encoding.Decode(tee) + if err != nil { + return nil, err + } + + c.Lock() + c.rcvd += b.Len() + c.Unlock() + return p, nil +} + +// Values implements the monitor.Counter interface +func (c *CounterEncoding) Values() map[string]float64 { + c.RLock() + defer c.RUnlock() + return map[string]float64{ + "sentBytes": float64(c.sent), + "rcvdBytes": float64(c.rcvd), + } +} diff --git a/network/counter_test.go b/network/counter_test.go new file mode 100644 index 0000000..2d7f5e8 --- /dev/null +++ b/network/counter_test.go @@ -0,0 +1,34 @@ +package network + +import ( + "bytes" + "testing" + + "github.com/ConsenSys/handel" + "github.com/stretchr/testify/require" +) + +func TestCounterEncoding(t *testing.T) { + var medium bytes.Buffer + + actual := NewGOBEncoding() + counter := NewCounterEncoding(actual) + + require.True(t, counter.Values()["sentBytes"] == 0.0) + require.True(t, counter.Values()["rcvdBytes"] == 0.0) + + toSend := &handel.Packet{ + Origin: 156, + Level: 8, + MultiSig: []byte("History repeats itself, first as tragedy, second as farce."), + } + + require.NoError(t, counter.Encode(toSend, &medium)) + require.True(t, counter.Values()["sentBytes"] > 0.0) + + read, err := counter.Decode(&medium) + require.NoError(t, err) + + require.Equal(t, toSend, read) + require.True(t, counter.Values()["rcvdBytes"] > 0.0) +} diff --git a/network/udp/net.go b/network/udp/net.go index ec25a4d..afe7434 100644 --- a/network/udp/net.go +++ b/network/udp/net.go @@ -27,6 +27,8 @@ type Network struct { ready chan bool done chan bool buff []*handel.Packet + sent int + rcvd int } // NewNetwork creates Network baked by udp protocol @@ -69,6 +71,7 @@ func (udpNet *Network) Stop() { if udpNet.quit { return } + udpNet.udpSock.Close() udpNet.quit = true close(udpNet.done) } @@ -82,6 +85,9 @@ func (udpNet *Network) RegisterListener(listener h.Listener) { //Send sends a packet to supplied identities func (udpNet *Network) Send(identities []h.Identity, packet *h.Packet) { + udpNet.Lock() + udpNet.sent += len(identities) + udpNet.Unlock() for _, id := range identities { udpNet.send(id, packet) } @@ -176,6 +182,7 @@ func (udpNet *Network) loop() { func (udpNet *Network) getListeners() []handel.Listener { udpNet.RLock() defer udpNet.RUnlock() + udpNet.rcvd++ return udpNet.listeners } @@ -200,3 +207,20 @@ func (udpNet *Network) dispatchLoop() { } } } + +// Values implements the monitor.CounterMeasure interface +func (udpNet *Network) Values() map[string]float64 { + udpNet.RLock() + defer udpNet.RUnlock() + toSend := map[string]float64{ + "sent": float64(udpNet.sent), + "rcvd": float64(udpNet.rcvd), + } + counter, ok := udpNet.enc.(*network.CounterEncoding) + if ok { + for k, v := range counter.Values() { + toSend[k] = v + } + } + return toSend +} diff --git a/report.go b/report.go index 0560953..0d8c850 100644 --- a/report.go +++ b/report.go @@ -6,8 +6,8 @@ type ReportHandel struct { *Handel } -// Reporter is a generic interface that can report different data about its -// internal state +// Reporter is simply a copy of monitor.Counter interface to avoid importint +// monitor in handel. type Reporter interface { Values() map[string]float64 } @@ -15,14 +15,13 @@ type Reporter interface { // NewReportHandel returns a Handel that can report some statistis about its // internals func NewReportHandel(h *Handel) *ReportHandel { - h.net = NewReportNetwork(h.net) h.store = newReportStore(h.store) return &ReportHandel{h} } // Values returns the values of ALL internal components of Handel merged together. func (r *ReportHandel) Values() map[string]float64 { - net := r.Handel.net.(*ReportNetwork) + net := r.Network() netValues := net.Values() store := r.Handel.store.(*ReportStore) storeValues := store.Values() @@ -38,7 +37,7 @@ func (r *ReportHandel) Values() map[string]float64 { // Network returns the Network reporter interface func (r *ReportHandel) Network() Reporter { - return r.Handel.net.(*ReportNetwork) + return r.Handel.net.(Reporter) } // Store returns the Store reporter interface @@ -51,62 +50,6 @@ func (r *ReportHandel) Processing() Reporter { return r.Handel.proc.(Reporter) } -// ReportNetwork is a struct that implements the Network interface by augmenting -// the Network's method with accountability. How many packets received and send -// can be logged. -type ReportNetwork struct { - Network - sentPackets uint32 - rcvdPackets uint32 - lis []Listener -} - -// NewReportNetwork returns a Network with reporting capabilities. -func NewReportNetwork(n Network) Network { - r := &ReportNetwork{ - Network: n, - } - n.RegisterListener(r) - return r -} - -// Send implements the Network interface -func (r *ReportNetwork) Send(ids []Identity, p *Packet) { - r.sentPackets += uint32(len(ids)) - r.Network.Send(ids, p) -} - -// RegisterListener implements the Network interface -func (r *ReportNetwork) RegisterListener(l Listener) { - r.lis = append(r.lis, l) -} - -// NewPacket implements the Listener interface -func (r *ReportNetwork) NewPacket(p *Packet) { - r.rcvdPackets++ - for _, l := range r.lis { - l.NewPacket(p) - } -} - -// Sent returns the number of sent packets -func (r *ReportNetwork) Sent() uint32 { - return r.sentPackets -} - -// Received returns the number of received packets -func (r *ReportNetwork) Received() uint32 { - return r.rcvdPackets -} - -// Values implements the simul/monitor/CounterIO interface -func (r *ReportNetwork) Values() map[string]float64 { - return map[string]float64{ - "sent": float64(r.Sent()), - "rcvd": float64(r.Received()), - } -} - // ReportStore is a Store that can report some statistics about the storage type ReportStore struct { signatureStore @@ -123,7 +66,7 @@ func newReportStore(s signatureStore) signatureStore { } // Store implements the signatureStore interface -func (r *ReportStore) Store(sp *incomingSig) *MultiSignature{ +func (r *ReportStore) Store(sp *incomingSig) *MultiSignature { ms := r.signatureStore.Store(sp) if ms != nil { r.sucessReplaced++ @@ -137,6 +80,6 @@ func (r *ReportStore) Store(sp *incomingSig) *MultiSignature{ func (r *ReportStore) Values() map[string]float64 { return map[string]float64{ "successReplace": float64(r.sucessReplaced), - "replaceTrial": float64(r.replacedTrial), + "replaceTrial": float64(r.replacedTrial), } } diff --git a/simul/aws_config_example.toml b/simul/aws_config_example.toml index 550418f..a643079 100644 --- a/simul/aws_config_example.toml +++ b/simul/aws_config_example.toml @@ -4,5 +4,5 @@ MasterTimeOut = 10 SSHUser = "ubuntu" TargetSystem = "linux" TargetArch = "amd64" -ConfTimeout = 10 -CopyBinFiles = true +ConfTimeout = 5 +CopyBinFiles = false diff --git a/simul/confgenerator/confgenerator.go b/simul/confgenerator/confgenerator.go index 71fafc9..ce86c24 100644 --- a/simul/confgenerator/confgenerator.go +++ b/simul/confgenerator/confgenerator.go @@ -23,13 +23,13 @@ func main() { MonitorPort: 10000, MaxTimeout: "5m", Retrials: 1, - Allocator: "round", + Allocator: "random", Simulation: "handel", Debug: 0, } handel := &lib.HandelConfig{ - Period: "10ms", + Period: "50ms", UpdateCount: 1, NodeCount: 10, Timeout: "50ms", @@ -42,26 +42,128 @@ func main() { configDir := filepath.Join(dir, "generated_configs") os.MkdirAll(configDir, 0777) - // 4 instance per proc - procF := getProcessF(2) + // 2 handel per instance + fixedProcesses := getProcessF(2) + // 1 handel per instance up until 2000 where we go with 2 + //adaptiveProcesses := adaptiveGetProcessF(2, 2000) + // some scenario can add higher nodes + //baseNodes := []int{100, 300, 500, 1000, 1500, 2000, 2500,4000 3000, 4000} + baseNodes := []int{100, 300, 500, 1000, 1500, 2000} - thresholdIncScenario(configDir, defaultConf, handel) - nsquareScenario(configDir, defaultConf, handel, procF) - libp2pScenario(configDir, defaultConf, handel, procF) - //failingIncScenario(configDir, defaultConf, handel, procF) - //timeoutIncScenario(configDir, defaultConf, handel, procF) - //periodIncScenario(configDir, defaultConf, handel, procF) + nodeCountScenario(configDir, defaultConf, handel, baseNodes, getProcessF(1)) + updateCountScenario(configDir, defaultConf, handel, baseNodes, getProcessF(1)) + practicalScenario(configDir, defaultConf, handel, baseNodes, thresholdProcessF(2000)) + // one threshold increase with fixed + thresholdIncScenario2(configDir, defaultConf, handel, baseNodes, fixedProcesses) + failingIncScenario(configDir, defaultConf, handel, baseNodes, fixedProcesses) + /* // one threshold increase with adaptive process ->*/ + //thresholdIncScenario2(configDir, defaultConf, handel, baseNodes, adaptiveProcesses) + //// we can go to 2000 hopefully with failing nodes + //// since we go high, we need adaptive + nsquareScenario(configDir, defaultConf, handel, baseNodes, fixedProcesses) + libp2pScenario(configDir, defaultConf, handel, baseNodes, fixedProcesses) + timeoutIncScenario(configDir, defaultConf, handel, baseNodes, fixedProcesses) + periodIncScenario(configDir, defaultConf, handel, baseNodes, fixedProcesses) } +func nodeCountScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig, baseNodes []int, procF func(int) int) { + nodes := baseNodes + thr := 0.99 + failing := 0 + counts := []int{1, 10, 20} -func libp2pScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig, procF func(int) int) { + for _, count := range counts { + var runs []lib.RunConfig + for _, node := range nodes { + handelConf := &lib.HandelConfig{ + Period: handel.Period, + UpdateCount: handel.UpdateCount, + NodeCount: count, + Timeout: handel.Timeout, + UnsafeSleepTimeOnSigVerify: handel.UnsafeSleepTimeOnSigVerify, + } + + run := lib.RunConfig{ + Nodes: node, + Threshold: thrF(thr)(node), + Failing: failing, + Processes: procF(node), + Handel: handelConf, + } + runs = append(runs, run) + } + defaultConf.Runs = runs + fileName := fmt.Sprintf("2000node_count%d.toml", count) + if err := defaultConf.WriteTo(filepath.Join(dir, fileName)); err != nil { + panic(err) + } + } +} +func updateCountScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig, baseNodes []int, procF func(int) int) { + nodes := baseNodes + thr := 0.99 + failing := 0 + updates := []int{1, 10, 20} + + for _, update := range updates { + var runs []lib.RunConfig + for _, node := range nodes { + handelConf := &lib.HandelConfig{ + Period: handel.Period, + UpdateCount: update, + NodeCount: handel.NodeCount, + Timeout: handel.Timeout, + UnsafeSleepTimeOnSigVerify: handel.UnsafeSleepTimeOnSigVerify, + } + + run := lib.RunConfig{ + Nodes: node, + Threshold: thrF(thr)(node), + Failing: failing, + Processes: procF(node), + Handel: handelConf, + } + runs = append(runs, run) + } + defaultConf.Runs = runs + fileName := fmt.Sprintf("2000node_update%d.toml", update) + if err := defaultConf.WriteTo(filepath.Join(dir, fileName)); err != nil { + panic(err) + } + } +} +func practicalScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig, baseNodes []int, procF func(int) int) { + nodes := append(baseNodes, 2500, 3000, 3500, 4000) + thr := 0.66 + failing := 0.25 + + var runs []lib.RunConfig + for _, node := range nodes { + run := lib.RunConfig{ + Nodes: node, + Threshold: thrF(thr)(node), + Failing: thrF(failing)(node), + Processes: procF(node), + Handel: handel, + } + runs = append(runs, run) + } + defaultConf.Runs = runs + fileName := fmt.Sprintf("4000node_handel_real.toml") + if err := defaultConf.WriteTo(filepath.Join(dir, fileName)); err != nil { + panic(err) + } + +} +func libp2pScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig, baseNodes []int, procF func(int) int) { oldSimul := defaultConf.Simulation defer func() { defaultConf.Simulation = oldSimul }() defaultConf.Simulation = "p2p/libp2p" - nodes := []int{100, 1000, 2000} + //nodes := append(baseNodes, 3000, 4000) + nodes := baseNodes thresholds := []float64{0.51, 0.75, 0.99} for _, thr := range thresholds { - for _, verify := range []string{"0", "1"} { + for _, verify := range []string{"1"} { var runs []lib.RunConfig for _, n := range nodes { run := lib.RunConfig{ @@ -74,10 +176,11 @@ func libp2pScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig "AggAndVerify": verify, }, } + //fmt.Println(" n = ", n, " => process = ", procF(n)) runs = append(runs, run) } defaultConf.Runs = runs - fileName := fmt.Sprintf("2000node_Libp2pInc_%dthr_agg%s.toml", int(thr*100), verify) + fileName := fmt.Sprintf("4000node_Libp2pInc_%dthr_agg%s.toml", int(thr*100), verify) if err := defaultConf.WriteTo(filepath.Join(dir, fileName)); err != nil { panic(err) } @@ -86,14 +189,16 @@ func libp2pScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig } } -func nsquareScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig, procF func(int) int) { +func nsquareScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig, baseNodes []int, procF func(int) int) { oldSimul := defaultConf.Simulation defer func() { defaultConf.Simulation = oldSimul }() + defaultConf.Simulation = "p2p/udp" - nodes := []int{100, 1000, 2000} + //nodes := append(baseNodes, 3000, 4000) + nodes := baseNodes thresholds := []float64{0.51, 0.75, 0.99} for _, thr := range thresholds { - for _, verify := range []string{"0", "1"} { + for _, verify := range []string{"1"} { var runs []lib.RunConfig for _, n := range nodes { run := lib.RunConfig{ @@ -109,7 +214,7 @@ func nsquareScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfi runs = append(runs, run) } defaultConf.Runs = runs - fileName := fmt.Sprintf("2000node_nsquareInc_%dthr_agg%s.toml", int(thr*100), verify) + fileName := fmt.Sprintf("4000node_nsquareInc_%dthr_agg%s.toml", int(thr*100), verify) if err := defaultConf.WriteTo(filepath.Join(dir, fileName)); err != nil { panic(err) } @@ -119,20 +224,20 @@ func nsquareScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfi } // periodIncScenario increases the "update" period -func periodIncScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig, procF func(int) int) { - // just two failings scenario to see the effect of timeout on different - // threshold - failings := []float64{0.01, 0.25, 0.49} +func periodIncScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig, baseNodes []int, procF func(int) int) { periods := []time.Duration{ 10 * time.Millisecond, + 20 * time.Millisecond, + 50 * time.Millisecond, + 100 * time.Millisecond, } - n := 2001 + failing := 0.25 thr := 0.99 // 99% of the ALIVE nodes - var runs []lib.RunConfig - for _, f := range failings { - failing := thrF(f)(n) - threshold := thrF(thr)(n - failing) // we want all alive nodes - for _, p := range periods { + for _, p := range periods { + var runs []lib.RunConfig + for _, nodes := range baseNodes { + failing := thrF(failing)(nodes) + threshold := thrF(thr)(nodes - failing) // we want all alive nodes handelConf := &lib.HandelConfig{ Period: p.String(), UpdateCount: handel.UpdateCount, @@ -141,138 +246,190 @@ func periodIncScenario(dir string, defaultConf lib.Config, handel *lib.HandelCon UnsafeSleepTimeOnSigVerify: handel.UnsafeSleepTimeOnSigVerify, } run := lib.RunConfig{ - Nodes: n, + Nodes: nodes, Threshold: threshold, Failing: failing, - Processes: procF(n), + Processes: procF(nodes), Handel: handelConf, } runs = append(runs, run) } - } + defaultConf.Runs = runs + fileName := fmt.Sprintf("2000node_%dperiod_%dfail_%dthr.toml", toMilli(p), int(failing*100), int(thr*100)) + if err := defaultConf.WriteTo(filepath.Join(dir, fileName)); err != nil { + panic(err) + } - defaultConf.Runs = runs - fileName := "2000nodePeriodInc.toml" - if err := defaultConf.WriteTo(filepath.Join(dir, fileName)); err != nil { - panic(err) } + } // scenario that increases the timeout with different failing number of nodes - // threshold is fixed to 0.99 * alive node -func timeoutIncScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig, procF func(int) int) { - // just two failings scenario to see the effect of timeout on different - // threshold - failings := []float64{0.01, 0.25, 0.49} +func timeoutIncScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig, baseNodes []int, procF func(int) int) { + failings := []float64{0.25} timeouts := []time.Duration{ 50 * time.Millisecond, 100 * time.Millisecond, + 200 * time.Millisecond, } - n := 2001 thr := 0.99 // 99% of the ALIVE nodes - var runs []lib.RunConfig - for _, f := range failings { - failing := thrF(f)(n) - threshold := thrF(thr)(n - failing) // we want all alive nodes - for _, t := range timeouts { - handelConf := &lib.HandelConfig{ - Period: handel.Period, - UpdateCount: handel.UpdateCount, - NodeCount: handel.NodeCount, - Timeout: t.String(), - UnsafeSleepTimeOnSigVerify: handel.UnsafeSleepTimeOnSigVerify, - } - run := lib.RunConfig{ - Nodes: n, - Threshold: threshold, - Failing: failing, - Processes: procF(n), - Handel: handelConf, + for _, t := range timeouts { + var runs []lib.RunConfig + for _, node := range baseNodes { + for _, f := range failings { + failing := thrF(f)(node) + threshold := thrF(thr)(node - failing) // we want all alive nodes + handelConf := &lib.HandelConfig{ + Period: handel.Period, + UpdateCount: handel.UpdateCount, + NodeCount: handel.NodeCount, + Timeout: t.String(), + UnsafeSleepTimeOnSigVerify: handel.UnsafeSleepTimeOnSigVerify, + } + run := lib.RunConfig{ + Nodes: node, + Threshold: threshold, + Failing: failing, + Processes: procF(node), + Handel: handelConf, + } + runs = append(runs, run) } - runs = append(runs, run) } - } + defaultConf.Runs = runs + fileName := fmt.Sprintf("2000nodes_%dtimeout_%dthr.toml", toMilli(t), int(thr*100)) + if err := defaultConf.WriteTo(filepath.Join(dir, fileName)); err != nil { + panic(err) + } - defaultConf.Runs = runs - fileName := "2000nodesTimeoutInc.toml" - if err := defaultConf.WriteTo(filepath.Join(dir, fileName)); err != nil { - panic(err) } } // failingIncScenario increases the number of failing nodes with two different // threshold. -func failingIncScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig, procF func(int) int) { - // just to see we dont have side effects when only waiting on 51% - since - // it's the last step of handel - thrs := []float64{0.51, 0.75} +func failingIncScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig, baseNodes []int, procF func(int) int) { + thr := 0.50 + //nodes := append(baseNodes,3000,4000) + baseNodes = []int{2000, 3000, 4000} // various percentages of failing nodes - failings := []float64{0.01, 0.25, 0.49, 0.75} - n := 2001 - var runs []lib.RunConfig - for _, thr := range thrs { - threshold := thrF(thr)(n) - for _, fail := range failings { - failing := thrF(fail)(n) + failings := []float64{0.01, 0.25, 0.49} + for _, fail := range failings { + var runs []lib.RunConfig + for _, nodes := range baseNodes { + failing := thrF(fail)(nodes) + threshold := thrF(thr)(nodes) + fmt.Printf("failing %d ,thr %d for %d nodes\n", failing, threshold, nodes) run := lib.RunConfig{ - Nodes: n, + Nodes: nodes, Threshold: threshold, Failing: failing, - Processes: procF(n), + Processes: procF(nodes), Handel: handel, } runs = append(runs, run) } - } - defaultConf.Runs = runs - fileName := "2000nodesFailingInc.toml" - if err := defaultConf.WriteTo(filepath.Join(dir, fileName)); err != nil { - panic(err) + defaultConf.Runs = runs + fileName := fmt.Sprintf("4000nodes_%dfail_%dthr.toml", int(fail*100), int(thr*100)) + if err := defaultConf.WriteTo(filepath.Join(dir, fileName)); err != nil { + panic(err) + } } } -// thresholdIncScenario tries different number of nodes with a list of different -// threshold to use -func thresholdIncScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig) { - - // do we want to output in one file or not - oneFile := false - // various threshold to use - thrs := []float64{0.99, 0.75, 0.51} +func thresholdIncScenario2(dir string, defaultConf lib.Config, handel *lib.HandelConfig, baseNodes []int, procF func(int) int) { + // just to see we dont have side effects when only waiting on 51% - since + // it's the last step of handel + thrs := []float64{0.51, 0.75, 0.99} + nodeList := baseNodes // append(baseNodes, []int{3000, 4000}...) + baseNodes = append(baseNodes, 5000, 6000) for _, thr := range thrs { - //nodeIncScenario(defaultConf, handel, "2000Nodes200Inst80.toml") - nodesInc := scenarios.NewNodeInc(defaultConf, handel, 3001, 4, 0, thrF(thr)) - conf := nodesInc.Generate(2, []int{100, 1000, 2000, 4000}) - if oneFile { - defaultConf.Runs = append(defaultConf.Runs, conf.Runs...) - } else { - fileName := fmt.Sprintf("test_0failing_%dthr.toml", int(thr*100)) - full := filepath.Join(dir, fileName) - if err := conf.WriteTo(full); err != nil { - panic(err) + var runs []lib.RunConfig + for _, nodes := range nodeList { + threshold := thrF(thr)(nodes) + run := lib.RunConfig{ + Nodes: nodes, + Threshold: threshold, + Failing: 0, + Processes: procF(nodes), + Handel: handel, } + runs = append(runs, run) } - } - - if oneFile { - fileName := fmt.Sprintf("2000nodes200ThresholdInc.toml") - full := filepath.Join(dir, fileName) - if err := defaultConf.WriteTo(full); err != nil { + defaultConf.Runs = runs + fileName := fmt.Sprintf("4000nodes_%dthr.toml", int(thr*100)) + if err := defaultConf.WriteTo(filepath.Join(dir, fileName)); err != nil { panic(err) } } + } +// thresholdIncScenario tries different number of nodes with a list of different +// threshold to use +/*func thresholdIncScenario(dir string, defaultConf lib.Config, handel *lib.HandelConfig, baseNodes []int) {*/ + +//// do we want to output in one file or not +//oneFile := false +//// various threshold to use +//thrs := []float64{0.99, 0.75, 0.51} +//for _, thr := range thrs { +////nodeIncScenario(defaultConf, handel, "2000Nodes200Inst80.toml") +//nodesInc := scenarios.NewNodeInc(defaultConf, handel, 3001, 4, 0, thrF(thr)) +//conf := nodesInc.Generate(2, append(baseNodes, []int{3000, 4000})) +//if oneFile { +//defaultConf.Runs = append(defaultConf.Runs, conf.Runs...) +//} else { +//fileName := fmt.Sprintf("test_0failing_%dthr.toml", int(thr*100)) +//full := filepath.Join(dir, fileName) +//if err := conf.WriteTo(full); err != nil { +//panic(err) +//} +//} +//} + +//if oneFile { +//fileName := fmt.Sprintf("2000nodes200ThresholdInc.toml") +//full := filepath.Join(dir, fileName) +//if err := defaultConf.WriteTo(full); err != nil { +//panic(err) +//} +//} +//} + func thrF(t float64) func(int) int { return func(n int) int { return scenarios.CalcThreshold(n, t) } } +func thresholdProcessF(threshold int) func(int) int { + return func(nodes int) int { + if nodes < threshold { + return nodes + } + return threshold + } +} + +func adaptiveGetProcessF(instancePerProc, threshold int) func(int) int { + return func(nodes int) int { + if nodes >= threshold { + nbProc := float64(nodes) / float64(instancePerProc) + return int(math.Ceil(nbProc)) + } + return nodes + } +} + func getProcessF(instancePerProc int) func(int) int { return func(nodes int) int { nbProc := float64(nodes) / float64(instancePerProc) return int(math.Ceil(nbProc)) } } + +func toMilli(t time.Duration) int64 { + return t.Nanoseconds() / 1e6 +} diff --git a/simul/confgenerator/final_configs/2000node_100period_25fail_99thr.toml b/simul/confgenerator/final_configs/2000node_100period_25fail_99thr.toml new file mode 100644 index 0000000..0eca57f --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_100period_25fail_99thr.toml @@ -0,0 +1,82 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 75 + Failing = 25 + Processes = 50 + [Runs.Handel] + Period = "100ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 223 + Failing = 75 + Processes = 150 + [Runs.Handel] + Period = "100ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 372 + Failing = 125 + Processes = 250 + [Runs.Handel] + Period = "100ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1000 + Threshold = 743 + Failing = 250 + Processes = 500 + [Runs.Handel] + Period = "100ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 1114 + Failing = 375 + Processes = 750 + [Runs.Handel] + Period = "100ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2000 + Threshold = 1485 + Failing = 500 + Processes = 1000 + [Runs.Handel] + Period = "100ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/2000node_10period_25fail_99thr.toml b/simul/confgenerator/final_configs/2000node_10period_25fail_99thr.toml new file mode 100644 index 0000000..266ba00 --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_10period_25fail_99thr.toml @@ -0,0 +1,82 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 75 + Failing = 25 + Processes = 50 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 223 + Failing = 75 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 372 + Failing = 125 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1000 + Threshold = 743 + Failing = 250 + Processes = 500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 1114 + Failing = 375 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2000 + Threshold = 1485 + Failing = 500 + Processes = 1000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/2000node_20period_25fail_99thr.toml b/simul/confgenerator/final_configs/2000node_20period_25fail_99thr.toml new file mode 100644 index 0000000..bf02268 --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_20period_25fail_99thr.toml @@ -0,0 +1,82 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 75 + Failing = 25 + Processes = 50 + [Runs.Handel] + Period = "20ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 223 + Failing = 75 + Processes = 150 + [Runs.Handel] + Period = "20ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 372 + Failing = 125 + Processes = 250 + [Runs.Handel] + Period = "20ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1000 + Threshold = 743 + Failing = 250 + Processes = 500 + [Runs.Handel] + Period = "20ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 1114 + Failing = 375 + Processes = 750 + [Runs.Handel] + Period = "20ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2000 + Threshold = 1485 + Failing = 500 + Processes = 1000 + [Runs.Handel] + Period = "20ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/2000node_50period_25fail_99thr.toml b/simul/confgenerator/final_configs/2000node_50period_25fail_99thr.toml new file mode 100644 index 0000000..7362c87 --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_50period_25fail_99thr.toml @@ -0,0 +1,82 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 75 + Failing = 25 + Processes = 50 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 223 + Failing = 75 + Processes = 150 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 372 + Failing = 125 + Processes = 250 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1000 + Threshold = 743 + Failing = 250 + Processes = 500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 1114 + Failing = 375 + Processes = 750 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2000 + Threshold = 1485 + Failing = 500 + Processes = 1000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/2000node_Libp2pInc_51thr_agg1_gossip.toml b/simul/confgenerator/final_configs/2000node_Libp2pInc_51thr_agg1_gossip.toml new file mode 100644 index 0000000..1da7ea2 --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_Libp2pInc_51thr_agg1_gossip.toml @@ -0,0 +1,100 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "p2p/libp2p" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 51 + Failing = 0 + Processes = 50 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 300 + Threshold = 153 + Failing = 0 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 500 + Threshold = 255 + Failing = 0 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 1000 + Threshold = 510 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 1500 + Threshold = 765 + Failing = 0 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 2000 + Threshold = 1020 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" diff --git a/simul/confgenerator/final_configs/2000node_Libp2pInc_75thr_agg1.toml b/simul/confgenerator/final_configs/2000node_Libp2pInc_75thr_agg1.toml new file mode 100644 index 0000000..cfb8d22 --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_Libp2pInc_75thr_agg1.toml @@ -0,0 +1,101 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "p2p/libp2p" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 75 + Failing = 0 + Processes = 50 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "20" + +[[Runs]] + Nodes = 300 + Threshold = 225 + Failing = 0 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "30" + +[[Runs]] + Nodes = 500 + Threshold = 375 + Failing = 0 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "35" + + +[[Runs]] + Nodes = 1000 + Threshold = 750 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "40" + +[[Runs]] + Nodes = 1500 + Threshold = 1125 + Failing = 0 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "45" + +[[Runs]] + Nodes = 2000 + Threshold = 1500 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "50" diff --git a/simul/confgenerator/final_configs/2000node_Libp2pInc_75thr_agg1_gossip.toml b/simul/confgenerator/final_configs/2000node_Libp2pInc_75thr_agg1_gossip.toml new file mode 100644 index 0000000..cb66253 --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_Libp2pInc_75thr_agg1_gossip.toml @@ -0,0 +1,100 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "p2p/libp2p" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 75 + Failing = 0 + Processes = 50 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 300 + Threshold = 225 + Failing = 0 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 500 + Threshold = 375 + Failing = 0 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 1000 + Threshold = 750 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 1500 + Threshold = 1125 + Failing = 0 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 2000 + Threshold = 1500 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" diff --git a/simul/confgenerator/final_configs/2000node_Libp2pInc_99thr_agg1.toml b/simul/confgenerator/final_configs/2000node_Libp2pInc_99thr_agg1.toml new file mode 100644 index 0000000..4a9cfa2 --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_Libp2pInc_99thr_agg1.toml @@ -0,0 +1,100 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "p2p/libp2p" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 99 + Failing = 0 + Processes = 50 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "20" + +[[Runs]] + Nodes = 300 + Threshold = 297 + Failing = 0 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "30" + +[[Runs]] + Nodes = 500 + Threshold = 495 + Failing = 0 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "35" + +[[Runs]] + Nodes = 1000 + Threshold = 990 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "40" + +[[Runs]] + Nodes = 1500 + Threshold = 1485 + Failing = 0 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "45" + +[[Runs]] + Nodes = 2000 + Threshold = 1980 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "45" diff --git a/simul/confgenerator/final_configs/2000node_Libp2pInc_99thr_agg1_gossip.toml b/simul/confgenerator/final_configs/2000node_Libp2pInc_99thr_agg1_gossip.toml new file mode 100644 index 0000000..530bc17 --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_Libp2pInc_99thr_agg1_gossip.toml @@ -0,0 +1,100 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "p2p/libp2p" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 99 + Failing = 0 + Processes = 50 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 300 + Threshold = 297 + Failing = 0 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 500 + Threshold = 495 + Failing = 0 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 1000 + Threshold = 990 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 1500 + Threshold = 1485 + Failing = 0 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" + +[[Runs]] + Nodes = 2000 + Threshold = 1980 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Router = "gossip" diff --git a/simul/confgenerator/final_configs/2000node_count1.toml b/simul/confgenerator/final_configs/2000node_count1.toml new file mode 100644 index 0000000..31273f3 --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_count1.toml @@ -0,0 +1,82 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 99 + Failing = 0 + Processes = 100 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 1 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 297 + Failing = 0 + Processes = 300 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 1 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 495 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 1 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1000 + Threshold = 990 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 1 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 1485 + Failing = 0 + Processes = 1500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 1 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2000 + Threshold = 1980 + Failing = 0 + Processes = 2000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 1 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/2000node_count10.toml b/simul/confgenerator/final_configs/2000node_count10.toml new file mode 100644 index 0000000..343fe3d --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_count10.toml @@ -0,0 +1,82 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 99 + Failing = 0 + Processes = 100 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 297 + Failing = 0 + Processes = 300 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 495 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1000 + Threshold = 990 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 1485 + Failing = 0 + Processes = 1500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2000 + Threshold = 1980 + Failing = 0 + Processes = 2000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/2000node_count20.toml b/simul/confgenerator/final_configs/2000node_count20.toml new file mode 100644 index 0000000..52b43f9 --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_count20.toml @@ -0,0 +1,82 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 99 + Failing = 0 + Processes = 100 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 20 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 297 + Failing = 0 + Processes = 300 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 20 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 495 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 20 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1000 + Threshold = 990 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 20 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 1485 + Failing = 0 + Processes = 1500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 20 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2000 + Threshold = 1980 + Failing = 0 + Processes = 2000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 20 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/2000node_nsquareInc_51thr_agg1.toml b/simul/confgenerator/final_configs/2000node_nsquareInc_51thr_agg1.toml deleted file mode 100644 index 67cf60d..0000000 --- a/simul/confgenerator/final_configs/2000node_nsquareInc_51thr_agg1.toml +++ /dev/null @@ -1,52 +0,0 @@ -Network = "udp" -Curve = "bn256" -Encoding = "gob" -Allocator = "round" -MonitorPort = 10000 -Debug = 0 -Simulation = "p2p/udp" -MaxTimeout = "5m" -Retrials = 1 -ResultFile = "" - -[[Runs]] - Nodes = 100 - Threshold = 51 - Failing = 0 - Processes = 50 - [Runs.Handel] - Period = "10ms" - UpdateCount = 1 - NodeCount = 10 - Timeout = "50ms" - UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "1" - -[[Runs]] - Nodes = 1000 - Threshold = 510 - Failing = 0 - Processes = 500 - [Runs.Handel] - Period = "10ms" - UpdateCount = 1 - NodeCount = 10 - Timeout = "50ms" - UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "1" - -[[Runs]] - Nodes = 2000 - Threshold = 1020 - Failing = 0 - Processes = 1000 - [Runs.Handel] - Period = "10ms" - UpdateCount = 1 - NodeCount = 10 - Timeout = "50ms" - UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "1" diff --git a/simul/confgenerator/final_configs/2000node_nsquareInc_99thr_agg0.toml b/simul/confgenerator/final_configs/2000node_nsquareInc_99thr_agg0.toml deleted file mode 100644 index 73f7b84..0000000 --- a/simul/confgenerator/final_configs/2000node_nsquareInc_99thr_agg0.toml +++ /dev/null @@ -1,52 +0,0 @@ -Network = "udp" -Curve = "bn256" -Encoding = "gob" -Allocator = "round" -MonitorPort = 10000 -Debug = 0 -Simulation = "p2p/udp" -MaxTimeout = "5m" -Retrials = 1 -ResultFile = "" - -[[Runs]] - Nodes = 100 - Threshold = 99 - Failing = 0 - Processes = 50 - [Runs.Handel] - Period = "10ms" - UpdateCount = 1 - NodeCount = 10 - Timeout = "50ms" - UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "0" - -[[Runs]] - Nodes = 1000 - Threshold = 990 - Failing = 0 - Processes = 500 - [Runs.Handel] - Period = "10ms" - UpdateCount = 1 - NodeCount = 10 - Timeout = "50ms" - UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "0" - -[[Runs]] - Nodes = 2000 - Threshold = 1980 - Failing = 0 - Processes = 1000 - [Runs.Handel] - Period = "10ms" - UpdateCount = 1 - NodeCount = 10 - Timeout = "50ms" - UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "0" diff --git a/simul/confgenerator/final_configs/2000node_nsquareInc_99thr_agg1.toml b/simul/confgenerator/final_configs/2000node_nsquareInc_99thr_agg1.toml deleted file mode 100644 index 67f03cc..0000000 --- a/simul/confgenerator/final_configs/2000node_nsquareInc_99thr_agg1.toml +++ /dev/null @@ -1,52 +0,0 @@ -Network = "udp" -Curve = "bn256" -Encoding = "gob" -Allocator = "round" -MonitorPort = 10000 -Debug = 0 -Simulation = "p2p/udp" -MaxTimeout = "5m" -Retrials = 1 -ResultFile = "" - -[[Runs]] - Nodes = 100 - Threshold = 99 - Failing = 0 - Processes = 50 - [Runs.Handel] - Period = "10ms" - UpdateCount = 1 - NodeCount = 10 - Timeout = "50ms" - UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "1" - -[[Runs]] - Nodes = 1000 - Threshold = 990 - Failing = 0 - Processes = 500 - [Runs.Handel] - Period = "10ms" - UpdateCount = 1 - NodeCount = 10 - Timeout = "50ms" - UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "1" - -[[Runs]] - Nodes = 2000 - Threshold = 1980 - Failing = 0 - Processes = 1000 - [Runs.Handel] - Period = "10ms" - UpdateCount = 1 - NodeCount = 10 - Timeout = "50ms" - UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "1" diff --git a/simul/confgenerator/final_configs/2000node_update1.toml b/simul/confgenerator/final_configs/2000node_update1.toml new file mode 100644 index 0000000..343fe3d --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_update1.toml @@ -0,0 +1,82 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 99 + Failing = 0 + Processes = 100 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 297 + Failing = 0 + Processes = 300 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 495 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1000 + Threshold = 990 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 1485 + Failing = 0 + Processes = 1500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2000 + Threshold = 1980 + Failing = 0 + Processes = 2000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/2000node_update10.toml b/simul/confgenerator/final_configs/2000node_update10.toml new file mode 100644 index 0000000..2c21a6d --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_update10.toml @@ -0,0 +1,82 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 99 + Failing = 0 + Processes = 100 + [Runs.Handel] + Period = "50ms" + UpdateCount = 10 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 297 + Failing = 0 + Processes = 300 + [Runs.Handel] + Period = "50ms" + UpdateCount = 10 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 495 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 10 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1000 + Threshold = 990 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 10 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 1485 + Failing = 0 + Processes = 1500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 10 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2000 + Threshold = 1980 + Failing = 0 + Processes = 2000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 10 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/2000node_update20.toml b/simul/confgenerator/final_configs/2000node_update20.toml new file mode 100644 index 0000000..42cda4d --- /dev/null +++ b/simul/confgenerator/final_configs/2000node_update20.toml @@ -0,0 +1,82 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 99 + Failing = 0 + Processes = 100 + [Runs.Handel] + Period = "50ms" + UpdateCount = 20 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 297 + Failing = 0 + Processes = 300 + [Runs.Handel] + Period = "50ms" + UpdateCount = 20 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 495 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 20 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1000 + Threshold = 990 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 20 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 1485 + Failing = 0 + Processes = 1500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 20 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2000 + Threshold = 1980 + Failing = 0 + Processes = 2000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 20 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/2000nodes_100timeout_99thr.toml b/simul/confgenerator/final_configs/2000nodes_100timeout_99thr.toml new file mode 100644 index 0000000..5f3fc18 --- /dev/null +++ b/simul/confgenerator/final_configs/2000nodes_100timeout_99thr.toml @@ -0,0 +1,82 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 75 + Failing = 25 + Processes = 50 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "100ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 223 + Failing = 75 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "100ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 372 + Failing = 125 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "100ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1000 + Threshold = 743 + Failing = 250 + Processes = 500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "100ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 1114 + Failing = 375 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "100ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2000 + Threshold = 1485 + Failing = 500 + Processes = 1000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "100ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/2000nodes_200timeout_99thr.toml b/simul/confgenerator/final_configs/2000nodes_200timeout_99thr.toml new file mode 100644 index 0000000..904de31 --- /dev/null +++ b/simul/confgenerator/final_configs/2000nodes_200timeout_99thr.toml @@ -0,0 +1,82 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 75 + Failing = 25 + Processes = 50 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "200ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 223 + Failing = 75 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "200ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 372 + Failing = 125 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "200ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1000 + Threshold = 743 + Failing = 250 + Processes = 500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "200ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 1114 + Failing = 375 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "200ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2000 + Threshold = 1485 + Failing = 500 + Processes = 1000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "200ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/2000nodes_50timeout_99thr.toml b/simul/confgenerator/final_configs/2000nodes_50timeout_99thr.toml new file mode 100644 index 0000000..266ba00 --- /dev/null +++ b/simul/confgenerator/final_configs/2000nodes_50timeout_99thr.toml @@ -0,0 +1,82 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 75 + Failing = 25 + Processes = 50 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 223 + Failing = 75 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 372 + Failing = 125 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1000 + Threshold = 743 + Failing = 250 + Processes = 500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 1114 + Failing = 375 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2000 + Threshold = 1485 + Failing = 500 + Processes = 1000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/4000node_Libp2pInc_51thr_agg1.toml b/simul/confgenerator/final_configs/4000node_Libp2pInc_51thr_agg1.toml new file mode 100644 index 0000000..427be78 --- /dev/null +++ b/simul/confgenerator/final_configs/4000node_Libp2pInc_51thr_agg1.toml @@ -0,0 +1,145 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "p2p/libp2p" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 51 + Failing = 0 + Processes = 50 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "20" + +[[Runs]] + Nodes = 300 + Threshold = 153 + Failing = 0 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "20" + +[[Runs]] + Nodes = 500 + Threshold = 255 + Failing = 0 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "20" + +[[Runs]] + Nodes = 1000 + Threshold = 510 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "25" + +[[Runs]] + Nodes = 1500 + Threshold = 765 + Failing = 0 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "30" + +[[Runs]] + Nodes = 2000 + Threshold = 1020 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "30" + +[[Runs]] + Nodes = 2500 + Threshold = 1275 + Failing = 0 + Processes = 1250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "35" + +[[Runs]] + Nodes = 3000 + Threshold = 1530 + Failing = 0 + Processes = 1500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "35" + +[[Runs]] + Nodes = 4000 + Threshold = 2040 + Failing = 0 + Processes = 2000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + Count = "35" diff --git a/simul/confgenerator/final_configs/4000node_handel_real.toml b/simul/confgenerator/final_configs/4000node_handel_real.toml new file mode 100644 index 0000000..0eb3a81 --- /dev/null +++ b/simul/confgenerator/final_configs/4000node_handel_real.toml @@ -0,0 +1,130 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 66 + Failing = 25 + Processes = 100 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 198 + Failing = 75 + Processes = 300 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 330 + Failing = 125 + Processes = 500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1000 + Threshold = 660 + Failing = 250 + Processes = 1000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 990 + Failing = 375 + Processes = 1500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2000 + Threshold = 1320 + Failing = 500 + Processes = 2000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2500 + Threshold = 1650 + Failing = 625 + Processes = 2000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 3000 + Threshold = 1980 + Failing = 750 + Processes = 2000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 3500 + Threshold = 2310 + Failing = 875 + Processes = 2000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 4000 + Threshold = 2640 + Failing = 1000 + Processes = 2000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/4000node_nsquareInc_51thr_agg1.toml b/simul/confgenerator/final_configs/4000node_nsquareInc_51thr_agg1.toml new file mode 100644 index 0000000..444af18 --- /dev/null +++ b/simul/confgenerator/final_configs/4000node_nsquareInc_51thr_agg1.toml @@ -0,0 +1,136 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "p2p/udp" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 51 + Failing = 0 + Processes = 50 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 300 + Threshold = 153 + Failing = 0 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 500 + Threshold = 255 + Failing = 0 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 1000 + Threshold = 510 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 1500 + Threshold = 765 + Failing = 0 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 2000 + Threshold = 1020 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 2500 + Threshold = 1275 + Failing = 0 + Processes = 1250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 3000 + Threshold = 1530 + Failing = 0 + Processes = 1500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 4000 + Threshold = 2040 + Failing = 0 + Processes = 2000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" diff --git a/simul/confgenerator/final_configs/4000node_nsquareInc_75thr_agg1.toml b/simul/confgenerator/final_configs/4000node_nsquareInc_75thr_agg1.toml new file mode 100644 index 0000000..da74fca --- /dev/null +++ b/simul/confgenerator/final_configs/4000node_nsquareInc_75thr_agg1.toml @@ -0,0 +1,136 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "p2p/udp" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 75 + Failing = 0 + Processes = 50 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 300 + Threshold = 225 + Failing = 0 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 500 + Threshold = 375 + Failing = 0 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 1000 + Threshold = 750 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 1500 + Threshold = 1125 + Failing = 0 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 2000 + Threshold = 1500 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 2500 + Threshold = 1875 + Failing = 0 + Processes = 1250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 3000 + Threshold = 2250 + Failing = 0 + Processes = 1500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 4000 + Threshold = 3000 + Failing = 0 + Processes = 2000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" diff --git a/simul/confgenerator/final_configs/4000node_nsquareInc_99thr_agg1.toml b/simul/confgenerator/final_configs/4000node_nsquareInc_99thr_agg1.toml new file mode 100644 index 0000000..0a662f9 --- /dev/null +++ b/simul/confgenerator/final_configs/4000node_nsquareInc_99thr_agg1.toml @@ -0,0 +1,136 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "random" +MonitorPort = 10000 +Debug = 0 +Simulation = "p2p/udp" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 99 + Failing = 0 + Processes = 50 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 300 + Threshold = 297 + Failing = 0 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 500 + Threshold = 495 + Failing = 0 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 1000 + Threshold = 990 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 1500 + Threshold = 1485 + Failing = 0 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 2000 + Threshold = 1980 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 2500 + Threshold = 2475 + Failing = 0 + Processes = 1250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 3000 + Threshold = 2970 + Failing = 0 + Processes = 1500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" + +[[Runs]] + Nodes = 4000 + Threshold = 3960 + Failing = 0 + Processes = 2000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [Runs.Extra] + AggAndVerify = "1" diff --git a/simul/confgenerator/final_configs/2000node_nsquareInc_75thr_agg0.toml b/simul/confgenerator/final_configs/4000nodes_1fail_50thr.toml similarity index 60% rename from simul/confgenerator/final_configs/2000node_nsquareInc_75thr_agg0.toml rename to simul/confgenerator/final_configs/4000nodes_1fail_50thr.toml index ed4e892..79af166 100644 --- a/simul/confgenerator/final_configs/2000node_nsquareInc_75thr_agg0.toml +++ b/simul/confgenerator/final_configs/4000nodes_1fail_50thr.toml @@ -1,52 +1,46 @@ Network = "udp" Curve = "bn256" Encoding = "gob" -Allocator = "round" +Allocator = "random" MonitorPort = 10000 Debug = 0 -Simulation = "p2p/udp" +Simulation = "handel" MaxTimeout = "5m" Retrials = 1 ResultFile = "" [[Runs]] - Nodes = 100 - Threshold = 75 - Failing = 0 - Processes = 50 + Nodes = 2000 + Threshold = 1000 + Failing = 20 + Processes = 1000 [Runs.Handel] - Period = "10ms" + Period = "50ms" UpdateCount = 1 NodeCount = 10 Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "0" [[Runs]] - Nodes = 1000 - Threshold = 750 - Failing = 0 - Processes = 500 + Nodes = 3000 + Threshold = 1500 + Failing = 30 + Processes = 1500 [Runs.Handel] - Period = "10ms" + Period = "50ms" UpdateCount = 1 NodeCount = 10 Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "0" [[Runs]] - Nodes = 2000 - Threshold = 1500 - Failing = 0 - Processes = 1000 + Nodes = 4000 + Threshold = 2000 + Failing = 40 + Processes = 2000 [Runs.Handel] - Period = "10ms" + Period = "50ms" UpdateCount = 1 NodeCount = 10 Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "0" diff --git a/simul/confgenerator/final_configs/2000node_nsquareInc_75thr_agg1.toml b/simul/confgenerator/final_configs/4000nodes_25fail_50thr.toml similarity index 60% rename from simul/confgenerator/final_configs/2000node_nsquareInc_75thr_agg1.toml rename to simul/confgenerator/final_configs/4000nodes_25fail_50thr.toml index b079c36..84da570 100644 --- a/simul/confgenerator/final_configs/2000node_nsquareInc_75thr_agg1.toml +++ b/simul/confgenerator/final_configs/4000nodes_25fail_50thr.toml @@ -1,52 +1,46 @@ Network = "udp" Curve = "bn256" Encoding = "gob" -Allocator = "round" +Allocator = "random" MonitorPort = 10000 Debug = 0 -Simulation = "p2p/udp" +Simulation = "handel" MaxTimeout = "5m" Retrials = 1 ResultFile = "" [[Runs]] - Nodes = 100 - Threshold = 75 - Failing = 0 - Processes = 50 + Nodes = 2000 + Threshold = 1000 + Failing = 500 + Processes = 1000 [Runs.Handel] - Period = "10ms" + Period = "50ms" UpdateCount = 1 NodeCount = 10 Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "1" [[Runs]] - Nodes = 1000 - Threshold = 750 - Failing = 0 - Processes = 500 + Nodes = 3000 + Threshold = 1500 + Failing = 750 + Processes = 1500 [Runs.Handel] - Period = "10ms" + Period = "50ms" UpdateCount = 1 NodeCount = 10 Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "1" [[Runs]] - Nodes = 2000 - Threshold = 1500 - Failing = 0 - Processes = 1000 + Nodes = 4000 + Threshold = 2000 + Failing = 1000 + Processes = 2000 [Runs.Handel] - Period = "10ms" + Period = "50ms" UpdateCount = 1 NodeCount = 10 Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "1" diff --git a/simul/confgenerator/final_configs/2000node_nsquareInc_51thr_agg0.toml b/simul/confgenerator/final_configs/4000nodes_49fail_50thr.toml similarity index 58% rename from simul/confgenerator/final_configs/2000node_nsquareInc_51thr_agg0.toml rename to simul/confgenerator/final_configs/4000nodes_49fail_50thr.toml index 7a4c4cf..29e6bce 100644 --- a/simul/confgenerator/final_configs/2000node_nsquareInc_51thr_agg0.toml +++ b/simul/confgenerator/final_configs/4000nodes_49fail_50thr.toml @@ -1,52 +1,46 @@ Network = "udp" Curve = "bn256" Encoding = "gob" -Allocator = "round" +Allocator = "random" MonitorPort = 10000 Debug = 0 -Simulation = "p2p/udp" +Simulation = "handel" MaxTimeout = "5m" Retrials = 1 ResultFile = "" [[Runs]] - Nodes = 100 - Threshold = 51 - Failing = 0 - Processes = 50 + Nodes = 2000 + Threshold = 1000 + Failing = 980 + Processes = 1000 [Runs.Handel] - Period = "10ms" + Period = "50ms" UpdateCount = 1 NodeCount = 10 Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "0" [[Runs]] - Nodes = 1000 - Threshold = 510 - Failing = 0 - Processes = 500 + Nodes = 3000 + Threshold = 1500 + Failing = 1470 + Processes = 1500 [Runs.Handel] - Period = "10ms" + Period = "50ms" UpdateCount = 1 NodeCount = 10 Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "0" [[Runs]] - Nodes = 2000 - Threshold = 1020 - Failing = 0 - Processes = 1000 + Nodes = 4000 + Threshold = 2000 + Failing = 1960 + Processes = 2000 [Runs.Handel] - Period = "10ms" + Period = "50ms" UpdateCount = 1 NodeCount = 10 Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 - [Runs.Extra] - AggAndVerify = "0" diff --git a/simul/confgenerator/final_configs/6000nodes_tests.toml b/simul/confgenerator/final_configs/6000nodes_tests.toml new file mode 100644 index 0000000..5525a53 --- /dev/null +++ b/simul/confgenerator/final_configs/6000nodes_tests.toml @@ -0,0 +1,83 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "round" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + + +[[Runs]] + Nodes = 5000 + Threshold = 2550 + Failing = 0 + Processes = 2500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 6000 + Threshold = 3060 + Failing = 0 + Processes = 3000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 5000 + Threshold = 4950 + Failing = 0 + Processes = 2500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 6000 + Threshold = 5940 + Failing = 0 + Processes = 3000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 5000 + Threshold = 2550 + Failing = 0 + Processes = 2500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 6000 + Threshold = 3060 + Failing = 0 + Processes = 3000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/test_0failing_51thr.toml b/simul/confgenerator/final_configs/test_0failing_51thr.toml index 5d4d201..3d04249 100644 --- a/simul/confgenerator/final_configs/test_0failing_51thr.toml +++ b/simul/confgenerator/final_configs/test_0failing_51thr.toml @@ -21,6 +21,30 @@ ResultFile = "" Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 +[[Runs]] + Nodes = 300 + Threshold = 153 + Failing = 0 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 255 + Failing = 0 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [[Runs]] Nodes = 1000 Threshold = 510 @@ -33,6 +57,18 @@ ResultFile = "" Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 +[[Runs]] + Nodes = 1500 + Threshold = 765 + Failing = 0 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [[Runs]] Nodes = 2000 Threshold = 1020 @@ -45,6 +81,30 @@ ResultFile = "" Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 +[[Runs]] + Nodes = 2500 + Threshold = 1275 + Failing = 0 + Processes = 1250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 3000 + Threshold = 1530 + Failing = 0 + Processes = 1500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [[Runs]] Nodes = 4000 Threshold = 2040 @@ -56,3 +116,4 @@ ResultFile = "" NodeCount = 10 Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 + diff --git a/simul/confgenerator/final_configs/test_0failing_75thr.toml b/simul/confgenerator/final_configs/test_0failing_75thr.toml index cb6920b..b33be44 100644 --- a/simul/confgenerator/final_configs/test_0failing_75thr.toml +++ b/simul/confgenerator/final_configs/test_0failing_75thr.toml @@ -21,6 +21,30 @@ ResultFile = "" Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 +[[Runs]] + Nodes = 300 + Threshold = 225 + Failing = 0 + Processes = 150 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 375 + Failing = 0 + Processes = 250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [[Runs]] Nodes = 1000 Threshold = 750 @@ -33,6 +57,18 @@ ResultFile = "" Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 +[[Runs]] + Nodes = 1500 + Threshold = 1125 + Failing = 0 + Processes = 750 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [[Runs]] Nodes = 2000 Threshold = 1500 @@ -45,6 +81,30 @@ ResultFile = "" Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 +[[Runs]] + Nodes = 2500 + Threshold = 1875 + Failing = 0 + Processes = 1250 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 3000 + Threshold = 2250 + Failing = 0 + Processes = 1500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + [[Runs]] Nodes = 4000 Threshold = 3000 @@ -56,3 +116,27 @@ ResultFile = "" NodeCount = 10 Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 5000 + Threshold = 3750 + Failing = 0 + Processes = 2500 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 6000 + Threshold = 4500 + Failing = 0 + Processes = 3000 + [Runs.Handel] + Period = "10ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/confgenerator/final_configs/test_0failing_99thr.toml b/simul/confgenerator/final_configs/test_0failing_99thr.toml index abfb9b1..5ac637a 100644 --- a/simul/confgenerator/final_configs/test_0failing_99thr.toml +++ b/simul/confgenerator/final_configs/test_0failing_99thr.toml @@ -15,7 +15,31 @@ ResultFile = "" Failing = 0 Processes = 50 [Runs.Handel] - Period = "10ms" + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 300 + Threshold = 297 + Failing = 0 + Processes = 150 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 500 + Threshold = 495 + Failing = 0 + Processes = 250 + [Runs.Handel] + Period = "50ms" UpdateCount = 1 NodeCount = 10 Timeout = "50ms" @@ -27,7 +51,19 @@ ResultFile = "" Failing = 0 Processes = 500 [Runs.Handel] - Period = "10ms" + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 1500 + Threshold = 1485 + Failing = 0 + Processes = 750 + [Runs.Handel] + Period = "50ms" UpdateCount = 1 NodeCount = 10 Timeout = "50ms" @@ -39,7 +75,31 @@ ResultFile = "" Failing = 0 Processes = 1000 [Runs.Handel] - Period = "10ms" + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 2500 + Threshold = 2475 + Failing = 0 + Processes = 1250 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 0 + +[[Runs]] + Nodes = 3000 + Threshold = 2970 + Failing = 0 + Processes = 1500 + [Runs.Handel] + Period = "50ms" UpdateCount = 1 NodeCount = 10 Timeout = "50ms" @@ -51,8 +111,9 @@ ResultFile = "" Failing = 0 Processes = 2000 [Runs.Handel] - Period = "10ms" + Period = "50ms" UpdateCount = 1 NodeCount = 10 Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 + diff --git a/simul/confgenerator/final_configs/test_0failing_99thr_sleep.toml b/simul/confgenerator/final_configs/test_0failing_99thr_sleep.toml new file mode 100644 index 0000000..3795659 --- /dev/null +++ b/simul/confgenerator/final_configs/test_0failing_99thr_sleep.toml @@ -0,0 +1,142 @@ +Network = "udp" +Curve = "bn256" +Encoding = "gob" +Allocator = "round" +MonitorPort = 10000 +Debug = 0 +Simulation = "handel" +MaxTimeout = "5m" +Retrials = 1 +ResultFile = "" + +[[Runs]] + Nodes = 100 + Threshold = 99 + Failing = 0 + Processes = 50 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 3 + +[[Runs]] + Nodes = 300 + Threshold = 297 + Failing = 0 + Processes = 150 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 3 + +[[Runs]] + Nodes = 500 + Threshold = 495 + Failing = 0 + Processes = 250 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 3 + +[[Runs]] + Nodes = 1000 + Threshold = 990 + Failing = 0 + Processes = 500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 3 + +[[Runs]] + Nodes = 1500 + Threshold = 1485 + Failing = 0 + Processes = 750 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 3 + +[[Runs]] + Nodes = 2000 + Threshold = 1980 + Failing = 0 + Processes = 1000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 3 + +[[Runs]] + Nodes = 2500 + Threshold = 2475 + Failing = 0 + Processes = 1250 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 3 + +[[Runs]] + Nodes = 3000 + Threshold = 2970 + Failing = 0 + Processes = 1500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 3 + +[[Runs]] + Nodes = 4000 + Threshold = 3960 + Failing = 0 + Processes = 2000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 3 + +[[Runs]] + Nodes = 5000 + Threshold = 4950 + Failing = 0 + Processes = 2500 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 3 + +[[Runs]] + Nodes = 6000 + Threshold = 5940 + Failing = 0 + Processes = 3000 + [Runs.Handel] + Period = "50ms" + UpdateCount = 1 + NodeCount = 10 + Timeout = "50ms" + UnsafeSleepTimeOnSigVerify = 3 diff --git a/simul/confgenerator/final_configs/test_with_failing.toml b/simul/confgenerator/final_configs/test_with_failing.toml index 3b85f44..5b29370 100644 --- a/simul/confgenerator/final_configs/test_with_failing.toml +++ b/simul/confgenerator/final_configs/test_with_failing.toml @@ -12,7 +12,7 @@ ResultFile = "" [[Runs]] Nodes = 4000 - Threshold = 3960 + Threshold = 3940 Failing = 40 Processes = 2000 [Runs.Handel] @@ -21,6 +21,7 @@ ResultFile = "" NodeCount = 10 Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 + [[Runs]] Nodes = 4000 Threshold = 3000 @@ -32,6 +33,7 @@ ResultFile = "" NodeCount = 10 Timeout = "50ms" UnsafeSleepTimeOnSigVerify = 0 + [[Runs]] Nodes = 4000 Threshold = 2040 @@ -69,7 +71,7 @@ ResultFile = "" [[Runs]] Nodes = 4000 - Threshold = 2040 + Threshold = 2000 Failing = 1960 Processes = 2000 [Runs.Handel] @@ -77,4 +79,4 @@ ResultFile = "" UpdateCount = 1 NodeCount = 10 Timeout = "50ms" - UnsafeSleepTimeOnSigVerify = 0 \ No newline at end of file + UnsafeSleepTimeOnSigVerify = 0 diff --git a/simul/lib/allocator.go b/simul/lib/allocator.go index 372726b..c71c67e 100644 --- a/simul/lib/allocator.go +++ b/simul/lib/allocator.go @@ -1,6 +1,9 @@ package lib -import "fmt" +import ( + "fmt" + "math/rand" +) // Platform represents the platform where multiple Handel nodes can run. It can // be a process for localhost platform's or EC2 instance for aws. @@ -53,7 +56,7 @@ func (r *RoundRobin) Allocate(plats []Platform, total, offline int) map[string][ i := 0 nextOffline := 0 // allocate all ids - for i < total { + for i < total || offline > 0 { // put one ID in one platform at a time, round robin fashion for _, plat := range plats { s := plat.String() @@ -61,17 +64,17 @@ func (r *RoundRobin) Allocate(plats []Platform, total, offline int) map[string][ list := out[s] for idx, ni := range list { if ni.ID != -1 { - // already allocated - continue + continue // already allocated } list[idx].ID = i if i == nextOffline && offline > 0 { list[idx].Active = false nextOffline += bucketOffline offline-- - if nextOffline <= i || nextOffline >= total { - fmt.Printf("i %d - nextOffline %d\n", i, nextOffline) - panic("internal error") + if offline > 0 && (nextOffline <= i || nextOffline >= total) { + err := fmt.Errorf("allocator error: offline=%d, i=%d, nextOffline %d\n", + offline, i, nextOffline) + panic(err) } } else { list[idx].Active = true @@ -82,30 +85,113 @@ func (r *RoundRobin) Allocate(plats []Platform, total, offline int) map[string][ } } + verifyAllocation(out, total, poffline) + return out +} + +// RoundRandomOffline uses RoundRobin allocator to setups the alive nodes but chooses +// randomly offline nodes in a round robin way for each platforms +type RoundRandomOffline struct { + Allocator +} + +// NewRoundRandomOffline returns a RoundRandomOffline allocator +func NewRoundRandomOffline() Allocator { + return &RoundRandomOffline{ + Allocator: new(RoundRobin), + } +} + +// Allocate implements the Allocator interface +func (r *RoundRandomOffline) Allocate(plats []Platform, total, offline int) map[string][]*NodeInfo { + + poffline := offline + n := len(plats) + out := make(map[string][]*NodeInfo) + instPerPlat, rem := Divmod(total, n) + for i := 0; i < n; i++ { + // add instPerPlat instances to the i-th platform + s := plats[i].String() + for j := 0; j < instPerPlat; j++ { + out[s] = append(out[s], &NodeInfo{ID: -1}) + } + if rem > 0 { + out[s] = append(out[s], &NodeInfo{ID: -1}) + rem-- + } + } + + // dispatch the IDs online then offline by round robin + i := 0 + // allocate all ids + for i < total { + // put one ID in one platform at a time, round robin fashion + for _, plat := range plats { + s := plat.String() + // find the first non allocated node + list := out[s] + for idx, ni := range list { + if ni.ID != -1 { + // already allocated + continue + } + list[idx].ID = i + list[idx].Active = true + i++ + break + } + } + } + + for offline > 0 { + // put one offline per platform randomly at a time + for _, plat := range plats { + s := plat.String() + list := out[s] + n := len(list) + var i int + // search first index where we have an active one randomly + for i = rand.Intn(n); list[i].Active == false; i = rand.Intn(n) { + } + list[i].Active = false + offline-- + if offline == 0 { + break + } + } + } + verifyAllocation(out, total, poffline) + return out +} + +func verifyAllocation(allocation map[string][]*NodeInfo, total, offline int) { dead := 0 live := 0 - for k, list := range out { + for k, list := range allocation { fmt.Printf("\t[+] plat %s: ", k) + localDead, localLive := 0, 0 for _, node := range list { - fmt.Printf("%d (%v)- ", node.ID, node.Active) + //fmt.Printf("%d (%v)- ", node.ID, node.Active) if node.ID < 0 { panic("id not allocated") } if !node.Active { - dead++ + localDead++ } else { - live++ + localLive++ } } + fmt.Printf(" %d alive %d dead", localLive, localDead) fmt.Printf("\n") + dead += localDead + live += localLive } - if dead != poffline { - fmt.Printf("DEAD %d - WANTED %d\n", dead, poffline) + if dead != offline { + fmt.Printf("DEAD %d - WANTED %d\n", dead, offline) panic("wrong number of dead nodes") } - if dead + live != total { + if dead+live != total { panic("wrong number of total nodes") } - return out } diff --git a/simul/lib/allocator_test.go b/simul/lib/allocator_test.go index c6d95bb..be71305 100644 --- a/simul/lib/allocator_test.go +++ b/simul/lib/allocator_test.go @@ -13,14 +13,18 @@ func (p *PlatString) String() string { return string(*p) } -func TestAllocatorRoundRobin(t *testing.T) { +func TestAllocator(t *testing.T) { type allocTest struct { - plats int - total int - offline int - expected map[string][]*NodeInfo + allocator Allocator + plats int + total int + offline int + expected map[string][]*NodeInfo } + robin := new(RoundRobin) + random := NewRoundRandomOffline() + // create one platform from the integer p := func(n int) Platform { plat := PlatString(fmt.Sprintf("plat-%d", n)) @@ -65,27 +69,34 @@ func TestAllocatorRoundRobin(t *testing.T) { // golint not complaining of unused variable in this case var tests = []allocTest{ - // everything on the same platform - {1, 5, 0, fp(p(0), ni(0, true), ni(1, true), ni(2, true), ni(3, true), ni(4, true))}, + // everything on the same platfor/*m*/ + {robin, 1, 5, 0, fp(p(0), ni(0, true), ni(1, true), ni(2, true), ni(3, true), ni(4, true))}, // everything on two platform - {2, 5, 0, fps(fp(p(0), ni(0, true), ni(2, true), ni(4, true)), fp(p(1), ni(1, true), ni(3, true)))}, + {robin, 2, 5, 0, fps(fp(p(0), ni(0, true), ni(2, true), ni(4, true)), fp(p(1), ni(1, true), ni(3, true)))}, // 2 failing nodes on the same platform - {1, 5, 2, fp( + {robin, 1, 5, 2, fp( p(0), ni(0, false), ni(1, true), ni(2, false), ni(3, true), ni(4, true))}, // 3 failing nodes on two different platform // 0-f, 1-t, 2-t, 3-f, 4-t, 5-t, 6-f // -> plat 0 => 0,2,4,6 // -> plat 1 => 1,3,5 - {2, 7, 3, fps(fp( + {robin, 2, 7, 3, fps(fp( p(0), ni(0, false), ni(2, false), ni(4, false), ni(6, true)), fp(p(1), ni(1, true), ni(3, true), ni(5, true)))}, + {robin, 2000, 4000, 40, nil}, + {robin, 2000, 4000, 1000, nil}, + {robin, 2000, 4000, 1960, nil}, + {random, 2000, 4000, 1000, nil}, + {random, 2000, 4000, 1960, nil}, } - allocator := new(RoundRobin) for i, test := range tests { t.Logf(" -- test %d --", i) fmt.Printf(" -- test %d -- \n", i) plats := ps(test.plats) - res := allocator.Allocate(plats, test.total, test.offline) + res := test.allocator.Allocate(plats, test.total, test.offline) + if test.expected == nil { + continue + } require.Equal(t, test.expected, res) } } diff --git a/simul/lib/config.go b/simul/lib/config.go index 6e50a45..0981650 100644 --- a/simul/lib/config.go +++ b/simul/lib/config.go @@ -51,7 +51,7 @@ type Config struct { // valid value: "gob" (default) Encoding string // which allocator to use when experimenting failing nodes - // valid value: "linear" (default) + // valid value: "round" (default) or "random" Allocator string // which is the port to send measurements to MonitorPort int @@ -187,15 +187,20 @@ func (c *Config) selectNetwork(id handel.Identity) (handel.Network, error) { // NewEncoding returns the corresponding network encoding func (c *Config) NewEncoding() network.Encoding { - if c.Encoding == "" { - c.Encoding = "gob" - } - switch c.Encoding { - case "gob": - return network.NewGOBEncoding() - default: - panic("not implemented yet") + newEnc := func() network.Encoding { + + if c.Encoding == "" { + c.Encoding = "gob" + } + switch c.Encoding { + case "gob": + return network.NewGOBEncoding() + default: + panic("not implemented yet") + } } + encoding := newEnc() + return network.NewCounterEncoding(encoding) } // NewConstructor returns a Constructor that is using the curve denoted by the @@ -222,6 +227,8 @@ func (c *Config) NewAllocator() Allocator { switch c.Allocator { case "round": return new(RoundRobin) + case "random": + return NewRoundRandomOffline() default: return new(RoundRobin) } diff --git a/simul/lib/sync.go b/simul/lib/sync.go index da8ce0a..df440ce 100644 --- a/simul/lib/sync.go +++ b/simul/lib/sync.go @@ -45,6 +45,9 @@ type state struct { addresses map[string]bool finished chan bool done bool + fullDone bool // true only when exp received - to stop sending out + ticker *time.Ticker + doneCh chan bool } func newState(net handel.Network, id, total, exp, probExp int) *state { @@ -57,6 +60,8 @@ func newState(net handel.Network, id, total, exp, probExp int) *state { readys: make(map[int]bool), addresses: make(map[string]bool), finished: make(chan bool, 1), + ticker: time.NewTicker(wait), + doneCh: make(chan bool, 1), } } @@ -92,47 +97,61 @@ func (s *state) newMessage(msg *syncMessage) { } } - // send the messagesssss - outgoing := &syncMessage{State: s.id} - buff, err := outgoing.ToBytes() - if err != nil { - panic(err) + // start sending if we were not before + if !s.done { + s.done = true + s.finished <- true + go s.sendLoop() } - packet := &handel.Packet{MultiSig: buff} - ids := make([]handel.Identity, 0, len(s.addresses)) - for address := range s.addresses { - id := handel.NewStaticIdentity(0, address, nil) - ids = append(ids, id) + + // only stop when we got all signature, after 5 sec + if len(s.readys) >= s.exp && !s.fullDone { + s.fullDone = true + go func() { + time.Sleep(5 * time.Minute) + s.ticker.Stop() + s.doneCh <- true + }() } - go func() { - if len(s.readys) >= s.probExp { - if len(s.finished) == 0 { - s.finished <- true - } - s.done = true - } - for i := 0; i < retrials; i++ { - s.n.Send(ids, packet) - time.Sleep(1 * time.Second) +} + +func (s *state) sendLoop() { + for { + select { + case <-s.doneCh: + return + case <-s.ticker.C: } - }() + outgoing := &syncMessage{State: s.id} + buff, err := outgoing.ToBytes() + if err != nil { + panic(err) + } + packet := &handel.Packet{MultiSig: buff} + ids := make([]handel.Identity, 0, len(s.addresses)) + for address := range s.addresses { + id := handel.NewStaticIdentity(0, address, nil) + ids = append(ids, id) + } + s.n.Send(ids, packet) + } } func (s *state) String() string { var b bytes.Buffer - fmt.Fprintf(&b, "Sync Master ID %d received %d/%d status\n", s.id, len(s.readys), s.exp) + fmt.Fprintf(&b, "Sync Master ID %d received %d/%d (prob. %d) status\n", s.id, len(s.readys), s.exp, s.probExp) for id := 0; id < s.total; id++ { _, ok := s.readys[id] if !ok { - fmt.Fprintf(&b, "\t- %03d -absent- ", id) + //fmt.Fprintf(&b, "\t- %03d -absent- ", id) } else { //for id, msg := range s.readys { //_, port, _ := net.SplitHostPort(msg.Address) - fmt.Fprintf(&b, "\t- %03d +finished+", id) + //fmt.Fprintf(&b, "\t- %03d +finished+", id) } if (id+1)%4 == 0 { - fmt.Fprintf(&b, "\n") + //fmt.Fprintf(&b, "\n") } } fmt.Fprintf(&b, "\n") @@ -207,6 +226,8 @@ type slaveState struct { sent bool finished chan bool done bool + ticker *time.Ticker + doneCh chan bool } func newSlaveState(n handel.Network, master, addr string, id int) *slaveState { @@ -216,6 +237,8 @@ func newSlaveState(n handel.Network, master, addr string, id int) *slaveState { master: master, addr: addr, finished: make(chan bool, 1), + ticker: time.NewTicker(wait), + doneCh: make(chan bool, 1), } } @@ -224,7 +247,7 @@ func (s *slaveState) WaitFinish() chan bool { } func (s *slaveState) signal(ids []int) { - for i := 0; i < retrials; i++ { + send := func() { msg := &syncMessage{State: s.id, IDs: ids, Address: s.addr} buff, err := msg.ToBytes() if err != nil { @@ -233,24 +256,22 @@ func (s *slaveState) signal(ids []int) { packet := &handel.Packet{MultiSig: buff} id := handel.NewStaticIdentity(0, s.master, nil) s.n.Send([]handel.Identity{id}, packet) - time.Sleep(wait) - if s.isDone() { + } + send() + for { + select { + case <-s.doneCh: return + case <-s.ticker.C: } + send() } } -func (s *slaveState) isDone() bool { - s.Lock() - defer s.Unlock() - return s.done -} - func (s *slaveState) newMessage(msg *syncMessage) { if msg.State != s.id { panic("this is not normal") } - s.Lock() defer s.Unlock() if s.done { @@ -258,6 +279,7 @@ func (s *slaveState) newMessage(msg *syncMessage) { } s.done = true s.finished <- true + close(s.doneCh) } // NewSyncSlave returns a Sync to use as a node in the system to synchronize @@ -277,8 +299,7 @@ func NewSyncSlave(own, master string, ids []int) *SyncSlave { return slave } -const retrials = 5 -const wait = 1 * time.Second +const wait = 500 * time.Millisecond // WaitMaster first signals the master node for this state and returns the channel // that gets signaled when the master sends back a message with the same id. @@ -332,6 +353,8 @@ const ( START = iota // END id END + // P2P id + P2P ) // syncMessage is what is sent between a SyncMaster and a SyncSlave diff --git a/simul/lib/sync_test.go b/simul/lib/sync_test.go index 8392646..d28fa8c 100644 --- a/simul/lib/sync_test.go +++ b/simul/lib/sync_test.go @@ -14,13 +14,13 @@ func TestSyncer(t *testing.T) { } n := len(slaveAddrs) * 2 // 2 nodes per instances master := NewSyncMaster(masterAddr, n, n) - defer master.Stop() + //defer master.Stop() var slaves = make([]*SyncSlave, len(slaveAddrs)) doneSlave := make(chan bool, len(slaveAddrs)) for i, addr := range slaveAddrs { slaves[i] = NewSyncSlave(addr, masterAddr, []int{i * 2, i*2 + 1}) - defer slaves[i].Stop() + //defer slaves[i].Stop() } tryWait := func(stateID int, m *SyncMaster, slaves []*SyncSlave) { @@ -50,7 +50,7 @@ func TestSyncer(t *testing.T) { } } } - tryWait(START, master, slaves) - time.Sleep(50 * time.Millisecond) + go tryWait(START, master, slaves) tryWait(END, master, slaves) + tryWait(5, master, slaves) } diff --git a/simul/main_test.go b/simul/main_test.go index 7dd109d..6827f72 100644 --- a/simul/main_test.go +++ b/simul/main_test.go @@ -17,8 +17,8 @@ import ( func TestMainLocalHost(t *testing.T) { resultsDir := "results" baseDir := "tests" - //configs := []string{"handel", "gossip", "udp"} configs := []string{"handel", "gossip", "udp"} + //configs := []string{"gossip"} for _, c := range configs { diff --git a/simul/master/main.go b/simul/master/main.go index 0e975a4..2ccf0a3 100644 --- a/simul/master/main.go +++ b/simul/master/main.go @@ -7,6 +7,7 @@ import ( "path" "path/filepath" "strconv" + "strings" "time" "github.com/ConsenSys/handel/simul/lib" @@ -59,6 +60,19 @@ func main() { mon := monitor.NewMonitor(10000, stats) go mon.Listen() + if strings.Contains(config.Simulation, "libp2p") { + fmt.Println(" MASTER --->> SYNCING P2P ") + select { + case <-master.WaitAll(lib.P2P): + fmt.Printf("[+] Master full synchronization done.\n") + + case <-time.After(time.Duration(*timeOut) * time.Minute): + msg := fmt.Sprintf("timeout after %d mn", *timeOut) + fmt.Println(msg) + } + fmt.Println(" MASTER --->> SYNCING P2P DONE ") + } + select { case <-master.WaitAll(lib.START): fmt.Printf("[+] Master full synchronization done.\n") @@ -66,18 +80,18 @@ func main() { case <-time.After(time.Duration(*timeOut) * time.Minute): msg := fmt.Sprintf("timeout after %d mn", *timeOut) fmt.Println(msg) - panic(fmt.Sprintf("timeout after %d mn", *timeOut)) } select { case <-master.WaitAll(lib.END): fmt.Printf("[+] Master - finished synchronization done.\n") - case <-time.After(time.Duration(*timeOut) * time.Minute): - msg := fmt.Sprintf("timeout after %d mn", *timeOut) + case <-time.After(time.Duration(25) * time.Second): + msg := fmt.Sprintf("timeout after %d sec", 25) fmt.Println(msg) - panic(msg) } + fmt.Println("Writting to", csvName) + if *run == 0 { stats.WriteHeader(csvFile) } diff --git a/simul/p2p/aggregator.go b/simul/p2p/aggregator.go index 94e50b4..8d2307b 100644 --- a/simul/p2p/aggregator.go +++ b/simul/p2p/aggregator.go @@ -10,10 +10,12 @@ import ( "github.com/ConsenSys/handel" "github.com/ConsenSys/handel/simul/lib" + "github.com/ConsenSys/handel/simul/monitor" ) // Node is an interface to be used by an Aggregator type Node interface { + monitor.Counter Identity() handel.Identity SecretKey() lib.SecretKey Diffuse(*handel.Packet) @@ -95,13 +97,13 @@ func (a *Aggregator) Start() { a.tick = time.NewTicker(a.resendP) go func() { // diffuse it right away once - fmt.Printf("%d gossips signature %s - pk = %s\n", a.Node.Identity().ID(), hex.EncodeToString(msBuff[len(msBuff)-1-16:len(msBuff)-1]), a.Identity().PublicKey().String()) + //fmt.Printf("%d gossips signature %s - pk = %s\n", a.Node.Identity().ID(), hex.EncodeToString(msBuff[len(msBuff)-1-16:len(msBuff)-1]), a.Identity().PublicKey().String()) a.Diffuse(packet) for { select { case <-a.tick.C: a.Diffuse(packet) - fmt.Printf("%d gossips signature %s\n", a.Node.Identity().ID(), hex.EncodeToString(msBuff[len(msBuff)-1-16:len(msBuff)-1])) + //fmt.Printf("%d gossips signature %s\n", a.Node.Identity().ID(), hex.EncodeToString(msBuff[len(msBuff)-1-16:len(msBuff)-1])) case <-a.ctx.Done(): return case <-a.done: @@ -165,7 +167,7 @@ func (a *Aggregator) handleIncoming() { func (a *Aggregator) aggregate(packet handel.Packet) { defer func() { a.procReady <- true }() if a.accBs.Get(int(packet.Origin)) { - fmt.Println("already received - continue") + //fmt.Println("already received - continue") return } @@ -182,9 +184,10 @@ func (a *Aggregator) aggregate(packet handel.Packet) { a.accSig = a.accSig.Combine(ms.Signature) a.accBs.Set(int(packet.Origin), true) a.rcvd++ - fmt.Println(a.Node.Identity().ID(), "got sig from", packet.Origin, " -> ", a.rcvd, "/", a.total) + //fmt.Println(a.Node.Identity().ID(), "got sig from", packet.Origin, " -> ", a.rcvd, "/", a.total) // are we done if a.rcvd >= a.threshold { + //fmt.Printf("%d got ENOUGH SIGS %d/%d\n", a.Node.Identity().ID(), a.rcvd, a.threshold) go a.verifyAndDispatch() } } @@ -204,7 +207,7 @@ func (a *Aggregator) verifyAndDispatch() { // TODO BINARY SEARCH return } - fmt.Println(a.Identity().ID(), " -- Dispatched Signature -- ") + //fmt.Println(a.Identity().ID(), " -- Dispatched Signature -- ") copySig := a.c.Signature() buff, _ := a.accSig.MarshalBinary() if err := copySig.UnmarshalBinary(buff); err != nil { @@ -223,7 +226,7 @@ func (a *Aggregator) verifyPacket(packet handel.Packet) { //fmt.Printf("aggregator %d received packet from %d\n", a.P2PNode.handelID, packet.Origin) // check if already received if a.accBs.Get(int(packet.Origin)) { - fmt.Println("already received - continue") + //fmt.Println("already received - continue") return } @@ -250,7 +253,7 @@ func (a *Aggregator) verifyPacket(packet handel.Packet) { a.accSig = a.accSig.Combine(ms.Signature) a.accBs.Set(int(packet.Origin), true) a.rcvd++ - fmt.Println(a.Node.Identity().ID(), " got sig from", packet.Origin, " -> ", a.rcvd, "/", a.total) + //fmt.Println(a.Node.Identity().ID(), " got sig from", packet.Origin, " -> ", a.rcvd, "/", a.total) // are we done ? if a.rcvd >= a.threshold { //fmt.Println("looping OUUUTTTT") diff --git a/simul/p2p/connector.go b/simul/p2p/connector.go index 2135514..e64b094 100644 --- a/simul/p2p/connector.go +++ b/simul/p2p/connector.go @@ -24,7 +24,6 @@ func NewNeighborConnector() Connector { } func (*neighbor) Connect(node Node, reg handel.Registry, max int) error { - nodeID := int(node.Identity().ID()) baseID := nodeID n := reg.Size() @@ -47,9 +46,10 @@ func (*neighbor) Connect(node Node, reg handel.Registry, max int) error { return errors.New("h-- identity not found") } if err := node.Connect(id); err != nil { - return err + fmt.Println(nodeID, " error connecting to ", id, ":", err) + continue } - fmt.Printf("node %d connected to %d\n", nodeID, baseID) + //fmt.Printf("node %d connected to %d\n", nodeID, baseID) baseID++ } return nil @@ -63,26 +63,40 @@ func NewRandomConnector() Connector { return &random{} } func (*random) Connect(node Node, reg handel.Registry, max int) error { n := reg.Size() own := node.Identity().ID() - //fmt.Printf("- node %d connects to...", node.handelID) - for chosen := 0; chosen < max; chosen++ { + var ids []int32 + fmt.Println("connection of ", own) + for len(ids) < max { identity, ok := reg.Identity(rand.Intn(n)) if !ok { return errors.New("invalid index") } if identity.ID() == own { - chosen-- continue } + var toContinue bool + for _, i := range ids { + if i == identity.ID() { + toContinue = true + break + } + } + fmt.Println(own, "new list") + if toContinue { + continue + } + + fmt.Printf(" %d connects to %d", own, identity.ID()) if err := node.Connect(identity); err != nil { - return err + fmt.Println(node.Identity().ID(), "error connecting to ", identity.ID(), ":", err) + continue } - //fmt.Printf(" %d -", identity.Identity.ID()) } //fmt.Printf("\n") return nil } +// ExtractConnector returns connector func ExtractConnector(opts Opts) (Connector, int) { c, exists := opts.String("Connector") if !exists { diff --git a/simul/p2p/libp2p/adaptor.go b/simul/p2p/libp2p/adaptor.go index 0756a9b..8a5442c 100644 --- a/simul/p2p/libp2p/adaptor.go +++ b/simul/p2p/libp2p/adaptor.go @@ -14,9 +14,9 @@ import ( // MakeP2P returns the constructor for the libp2p node func MakeP2P(ctx context.Context, nodes lib.NodeList, ids []int, threshold int, opts p2p.Opts) (handel.Registry, []p2p.Node) { total := len(nodes) - pubsub.GossipSubHistoryLength = total - pubsub.GossipSubHistoryGossip = total - pubsub.GossipSubHeartbeatInterval = 500 * time.Millisecond + pubsub.GossipSubHistoryLength = total * 2 + pubsub.GossipSubHistoryGossip = total * 2 + pubsub.GossipSubHeartbeatInterval = 700 * time.Millisecond cons := ctx.Value(p2p.CtxKey("Constructor")).(lib.Constructor) var router = getRouter(opts) var registry = P2PRegistry(make([]*P2PIdentity, total)) @@ -41,5 +41,9 @@ func MakeP2P(ctx context.Context, nodes lib.NodeList, ids []int, threshold int, ns = append(ns, p2pNode) } } + + for _, node := range ns { + node.(*P2PNode).SubscribeToAll() + } return ®istry, ns } diff --git a/simul/p2p/libp2p/main.go b/simul/p2p/libp2p/main.go index 8c1455f..e1e3841 100644 --- a/simul/p2p/libp2p/main.go +++ b/simul/p2p/libp2p/main.go @@ -1,14 +1,39 @@ package main import ( + "flag" + "fmt" "sync" + "time" "github.com/ConsenSys/handel" + "github.com/ConsenSys/handel/simul/lib" "github.com/ConsenSys/handel/simul/p2p" ) func main() { + flag.Parse() maker := p2p.AdaptorFunc(MakeP2P) + maker = p2p.WithPostFunc(maker, func(r handel.Registry, nodes []p2p.Node) { + config := lib.LoadConfig(*p2p.ConfigFile) + fmt.Println(" libp2pBINARY --->> SYNCING P2P on", *p2p.SyncAddr) + syncer := lib.NewSyncSlave(*p2p.SyncAddr, *p2p.Master, p2p.Ids) + syncer.SignalAll(lib.P2P) + select { + case <-syncer.WaitMaster(lib.P2P): + now := time.Now() + formatted := fmt.Sprintf("%02d:%02d:%02d:%03d", now.Hour(), + now.Minute(), + now.Second(), + now.Nanosecond()) + + fmt.Printf("\n%s [+] %s synced - starting\n", formatted, p2p.Ids.String()) + case <-time.After(config.GetMaxTimeout()): + panic("Haven't received beacon in time!") + } + fmt.Println(" libp2pBINARY --->> SYNCING P2P DONE") + syncer.Stop() + }) maker = p2p.WithConnector(maker) maker = p2p.WithPostFunc(maker, func(r handel.Registry, nodes []p2p.Node) { var wg sync.WaitGroup diff --git a/simul/p2p/libp2p/node.go b/simul/p2p/libp2p/node.go index 39da1da..453f35c 100644 --- a/simul/p2p/libp2p/node.go +++ b/simul/p2p/libp2p/node.go @@ -10,6 +10,7 @@ import ( "log" "net" "strings" + "sync" "time" "github.com/ConsenSys/handel" @@ -18,6 +19,7 @@ import ( "github.com/ConsenSys/handel/simul/lib" libp2p "github.com/libp2p/go-libp2p" host "github.com/libp2p/go-libp2p-host" + metrics "github.com/libp2p/go-libp2p-metrics" p2pnet "github.com/libp2p/go-libp2p-net" peer "github.com/libp2p/go-libp2p-peer" pstore "github.com/libp2p/go-libp2p-peerstore" @@ -28,6 +30,25 @@ import ( const topicName = "handel" const ping = "/echo/1.0.0" +func topicsFromRegistry(reg handel.Registry) []string { + var topics = make([]string, reg.Size()) + for i := 0; i < reg.Size(); i++ { + id, ok := reg.Identity(i) + if !ok { + panic("this should never happen") + } + if id == nil { + panic("thatshould noooooooooo") + } + topics[i] = topicFromID(id) + } + return topics +} + +func topicFromID(i handel.Identity) string { + return fmt.Sprintf("%s-%d", topicName, i.ID()) +} + // NewRouter is a type to designate router creation factory type NewRouter func(context.Context, host.Host, ...pubsub.Option) (*pubsub.PubSub, error) @@ -66,6 +87,7 @@ func NewP2PIdentity(id h.Identity, c lib.Constructor) (*P2PIdentity, error) { // P2PNode represents the libp2p version of a node - with a host.Host and // pubsub.PubSub structure. type P2PNode struct { + sync.Mutex ctx context.Context id handel.Identity handelID int32 @@ -73,7 +95,8 @@ type P2PNode struct { priv *bn256Priv h host.Host g *pubsub.PubSub - s *pubsub.Subscription + subs []*pubsub.Subscription + myTopic string reg P2PRegistry ch chan handel.Packet resendPeriod time.Duration @@ -82,6 +105,7 @@ type P2PNode struct { setupDoneCh chan bool setupDone bool threshold int + reporter *proxyReporter } // NewP2PNode transforms a lib.Node to a p2p node. @@ -93,15 +117,17 @@ func NewP2PNode(ctx context.Context, handelNode *lib.Node, n NewRouter, reg P2PR pub: &bn256Pub{PublicKey: pub, newSig: cons.Signature}, } fullAddr := handelNode.Address() - ip, port, err := net.SplitHostPort(fullAddr) + _, port, err := net.SplitHostPort(fullAddr) if err != nil { return nil, err } + reporter := newProxyReporter() opts := []libp2p.Option{ - libp2p.ListenAddrStrings(fmt.Sprintf("/ip4/%s/tcp/%s", ip, port)), + libp2p.ListenAddrStrings(fmt.Sprintf("/ip4/%s/tcp/%s", "0.0.0.0", port)), libp2p.DisableRelay(), libp2p.Identity(priv), libp2p.NoSecurity, + libp2p.BandwidthReporter(reporter), } basicHost, err := libp2p.New(ctx, opts...) if err != nil { @@ -132,8 +158,9 @@ func NewP2PNode(ctx context.Context, handelNode *lib.Node, n NewRouter, reg P2PR if err != nil { return nil, err } + myTopic := topicFromID(handelNode.Identity) - subscription, err := router.Subscribe(topicName) + //subscription, err := router.Subscribe(topicName) node := &P2PNode{ ctx: ctx, enc: network.NewGOBEncoding(), @@ -142,21 +169,37 @@ func NewP2PNode(ctx context.Context, handelNode *lib.Node, n NewRouter, reg P2PR priv: priv, h: basicHost, g: router, - s: subscription, reg: reg, ch: make(chan handel.Packet, reg.Size()), setup: handel.NewWilffBitset(reg.Size()), resendPeriod: 500 * time.Millisecond, setupDoneCh: make(chan bool, 1), threshold: threshold, + reporter: reporter, + myTopic: myTopic, } node.setup.Set(int(node.id.ID()), true) - go node.readNexts() return node, err } var setupPacket = &handel.Packet{Level: 255} +// SubscribeToAll subscribes to all the topics +func (p *P2PNode) SubscribeToAll() { + topics := topicsFromRegistry(&p.reg) + subscriptions := make([]*pubsub.Subscription, len(topics)) + for i, topic := range topics { + //fmt.Println("subscribing to topic", topic) + subscription, err := p.g.Subscribe(topic) + if err != nil { + panic(err) + } + subscriptions[i] = subscription + } + p.subs = subscriptions + p.launchReadRoutines() +} + // WaitAllSetup periodically do the following: // - sends out its setup message on the topic // Until the node received all setup message from everybody expected @@ -200,7 +243,7 @@ func (p *P2PNode) Diffuse(packet *handel.Packet) { fmt.Println(err) panic(err) } - if err := p.g.Publish(topicName, b.Bytes()); err != nil { + if err := p.g.Publish(p.myTopic, b.Bytes()); err != nil { fmt.Println(err) panic(err) } @@ -221,11 +264,18 @@ func (p *P2PNode) SecretKey() lib.SecretKey { return p.priv.SecretKey } -func (p *P2PNode) readNexts() { +func (p *P2PNode) launchReadRoutines() { + for _, sub := range p.subs { + //fmt.Println(p.Identity().ID(), " - subscribing / listening to topic ", sub.Topic()) + go p.readNexts(sub) + } +} + +func (p *P2PNode) readNexts(s *pubsub.Subscription) { for { - pbMsg, err := p.s.Next(context.Background()) + pbMsg, err := s.Next(p.ctx) if err != nil { - fmt.Println(" -- err:", err) + //fmt.Println(" -- err:", err) return } packet, err := p.enc.Decode(bytes.NewBuffer(pbMsg.Data)) @@ -242,6 +292,8 @@ func (p *P2PNode) readNexts() { } func (p *P2PNode) incomingSetup(packet *handel.Packet) { + p.Lock() + defer p.Unlock() p.setup.Set(int(packet.Origin), true) if p.setup.Cardinality() >= p.threshold && !p.setupDone { p.setupDone = true @@ -249,6 +301,12 @@ func (p *P2PNode) incomingSetup(packet *handel.Packet) { } } +// Values implements the monitor.Counter interface +// TODO +func (p *P2PNode) Values() map[string]float64 { + return p.reporter.Values() +} + func (p *P2PNode) ping(p2 *P2PIdentity) error { s, err := p.h.NewStream(context.Background(), p2.id, ping) if err != nil { @@ -327,7 +385,7 @@ func getRouter(opts map[string]string) NewRouter { var n NewRouter switch strings.ToLower(str) { case "flood": - fmt.Println("using flood router") + //fmt.Println("using flood router") n = pubsub.NewFloodSub case "gossip": n = pubsub.NewGossipSub @@ -336,3 +394,41 @@ func getRouter(opts map[string]string) NewRouter { } return n } + +type proxyReporter struct { + sync.Mutex + metrics.Reporter + bytesSent int64 + bytesRcvd int64 +} + +func newProxyReporter() *proxyReporter { + return &proxyReporter{Reporter: metrics.NewBandwidthCounter()} +} + +func (p *proxyReporter) LogRecvMessage(i int64) { + p.Lock() + p.bytesRcvd += i + p.Unlock() + p.Reporter.LogRecvMessage(i) +} + +func (p *proxyReporter) LogSentMessage(i int64) { + p.Lock() + p.bytesSent += i + p.Unlock() + p.Reporter.LogRecvMessage(i) +} + +// Values implement the monitor.Counter interface +func (p *proxyReporter) Values() map[string]float64 { + p.Lock() + defer p.Unlock() + return map[string]float64{ + // XXX round up here might be problem + "sent": 0.0, + "rcvd": 0.0, + "sentBytes": float64(p.bytesSent), + "rcvdBytes": float64(p.bytesRcvd), + } +} diff --git a/simul/p2p/libp2p/node_test.go b/simul/p2p/libp2p/node_test.go index c686a3e..c11e838 100644 --- a/simul/p2p/libp2p/node_test.go +++ b/simul/p2p/libp2p/node_test.go @@ -18,14 +18,19 @@ import ( ) func TestGossipMeshy(t *testing.T) { - n := 50 - thr := 48 - nbOutgoing := 3 + n := 40 + thr := 30 + nbOutgoing := 10 ctx, cancel := context.WithCancel(context.Background()) defer cancel() + pubsub.GossipSubHistoryLength = n * 2 + pubsub.GossipSubHistoryGossip = n * 2 + pubsub.GossipSubHeartbeatInterval = 700 * time.Millisecond + connector := p2p.NewNeighborConnector() - //connector := NewRandomConnector() - r := pubsub.NewGossipSub + //connector := p2p.NewRandomConnector() + //r := pubsub.NewGossipSub + r := pubsub.NewFloodSub _, nodes := FakeSetup(ctx, n, thr, nbOutgoing, connector, r) var wg sync.WaitGroup @@ -80,10 +85,14 @@ func FakeSetup(ctx context.Context, n, thr, max int, c p2p.Connector, r NewRoute if err != nil { panic(err) } + } + for i := 0; i < n; i++ { + node := nodes[i] p2pNodes[i], err = NewP2PNode(ctx, node, r, p2pIDs, cons, thr) if err != nil { panic(err) } + p2pNodes[i].SubscribeToAll() } registry := P2PRegistry(p2pIDs) diff --git a/simul/p2p/main.go b/simul/p2p/main.go index dafbd1b..8f6bfe0 100644 --- a/simul/p2p/main.go +++ b/simul/p2p/main.go @@ -24,17 +24,17 @@ type CtxKey string // make const MaxCount = 10 -var configFile = flag.String("config", "", "config file created for the exp.") +var ConfigFile = flag.String("config", "", "config file created for the exp.") var registryFile = flag.String("registry", "", "registry file based - array registry") -var ids arrayFlags +var Ids arrayFlags var run = flag.Int("run", -1, "which RunConfig should we run") -var master = flag.String("master", "", "master address to synchronize") -var syncAddr = flag.String("sync", "", "address to listen for master START") +var Master = flag.String("master", "", "master address to synchronize") +var SyncAddr = flag.String("sync", "", "address to listen for master START") var monitorAddr = flag.String("monitor", "", "address to send measurements") func init() { - flag.Var(&ids, "id", "ID to run on this node - can specify multiple -id flags") + flag.Var(&Ids, "id", "ID to run on this node - can specify multiple -id flags") } var isMonitoring bool @@ -42,11 +42,11 @@ var isMonitoring bool // Run starts the simulation func Run(a Adaptor) { + defer func() { fmt.Println("binary exit") }() if true { golog.SetAllLoggers(gologging.INFO) } - flag.Parse() // // SETUP PHASE // @@ -65,7 +65,7 @@ func Run(a Adaptor) { // load all needed structures // XXX maybe try with a database-backed registry if loading file in memory is // too much when overloading - config := lib.LoadConfig(*configFile) + config := lib.LoadConfig(*ConfigFile) runConf := config.Runs[*run] cons := config.NewConstructor() @@ -76,11 +76,11 @@ func Run(a Adaptor) { requireNil(err) // transform into lib.Node libNodes, err := toLibNodes(cons, records) - registry, p2pNodes := a.Make(ctx, libNodes, ids, runConf.GetThreshold(), runConf.Extra) + registry, p2pNodes := a.Make(ctx, libNodes, Ids, runConf.GetThreshold(), runConf.Extra) aggregators := MakeAggregators(ctx, cons, p2pNodes, registry, runConf.GetThreshold(), runConf.Extra) // Sync with master - wait for the START signal - syncer := lib.NewSyncSlave(*syncAddr, *master, ids) + syncer := lib.NewSyncSlave(*SyncAddr, *Master, Ids) syncer.SignalAll(lib.START) select { case <-syncer.WaitMaster(lib.START): @@ -90,7 +90,7 @@ func Run(a Adaptor) { now.Second(), now.Nanosecond()) - fmt.Printf("\n%s [+] %s synced - starting\n", formatted, ids.String()) + fmt.Printf("\n%s [+] %s synced - starting\n", formatted, Ids.String()) case <-time.After(config.GetMaxTimeout()): panic("Haven't received beacon in time!") } @@ -105,6 +105,7 @@ func Run(a Adaptor) { id := agg.Identity().ID() //fmt.Println(" --- LAUNCHING agg j = ", j, " vs pk = ", agg.Identity().PublicKey().String()) signatureGen := monitor.NewTimeMeasure("sigen") + netMeasure := monitor.NewCounterMeasure("net", agg.Node) go agg.Start() // Wait for final signatures ! enough := false @@ -124,6 +125,7 @@ func Run(a Adaptor) { } } signatureGen.Record() + netMeasure.Record() if err := h.VerifyMultiSignature(lib.Message, sig, registry, cons.Handel()); err != nil { panic("signature invalid !!") } @@ -152,7 +154,7 @@ func Run(a Adaptor) { now.Second(), now.Nanosecond()) - fmt.Printf("\n%s [+] %s synced - closing shop\n", formatted, ids.String()) + fmt.Printf("\n%s [+] %s synced - closing shop\n", formatted, Ids.String()) case <-time.After(config.GetMaxTimeout()): panic("Haven't received beacon in time!") } @@ -231,7 +233,7 @@ func requireNil(err error) { func extractResendPeriod(opts Opts) time.Duration { str, ok := opts.String("ResendPeriod") if !ok { - str = "1s" + str = "500ms" } t, err := time.ParseDuration(str) if err != nil { diff --git a/simul/p2p/udp/main.go b/simul/p2p/udp/main.go index 4acf3fb..b6ae789 100644 --- a/simul/p2p/udp/main.go +++ b/simul/p2p/udp/main.go @@ -1,9 +1,14 @@ // package udp enforces each node broadcasts to everybody package main -import "github.com/ConsenSys/handel/simul/p2p" +import ( + "flag" + + "github.com/ConsenSys/handel/simul/p2p" +) func main() { + flag.Parse() maker := p2p.AdaptorFunc(MakeUDP) p2p.Run(maker) } diff --git a/simul/p2p/udp/node.go b/simul/p2p/udp/node.go index dadc071..f40ca5d 100644 --- a/simul/p2p/udp/node.go +++ b/simul/p2p/udp/node.go @@ -7,6 +7,7 @@ import ( "github.com/ConsenSys/handel/network" "github.com/ConsenSys/handel/network/udp" "github.com/ConsenSys/handel/simul/lib" + "github.com/ConsenSys/handel/simul/monitor" "github.com/ConsenSys/handel/simul/p2p" ) @@ -15,25 +16,28 @@ var _ p2p.Node = (*Node)(nil) // Node implements the p2p.Node interface using UDP type Node struct { handel.Network - sec lib.SecretKey - id handel.Identity - reg handel.Registry - out chan handel.Packet + counterEnc *network.CounterEncoding + sec lib.SecretKey + id handel.Identity + reg handel.Registry + out chan handel.Packet } // NewNode returns a UDP based node func NewNode(sec lib.SecretKey, id handel.Identity, reg handel.Registry, enc network.Encoding) *Node { - net, err := udp.NewNetwork(id.Address(), enc) + counter := network.NewCounterEncoding(enc) + net, err := udp.NewNetwork(id.Address(), counter) if err != nil { fmt.Println(err) panic(err) } n := &Node{ - sec: sec, - id: id, - reg: reg, - Network: net, - out: make(chan handel.Packet, reg.Size()), + sec: sec, + id: id, + reg: reg, + Network: net, + out: make(chan handel.Packet, reg.Size()), + counterEnc: counter, } n.Network.RegisterListener(n) return n @@ -75,3 +79,13 @@ func (n *Node) Connect(id handel.Identity) error { // no connection with UDP return nil } + +// Values implement the monitor.Counter interface +func (n *Node) Values() map[string]float64 { + ret := n.Network.(monitor.Counter).Values() + for k, v := range n.counterEnc.Values() { + ret[k] = v + } + return ret + +} diff --git a/simul/platform/aws.go b/simul/platform/aws.go index cd9ba96..8e0b0bb 100644 --- a/simul/platform/aws.go +++ b/simul/platform/aws.go @@ -36,7 +36,7 @@ type awsPlatform struct { } const s3Dir = "pegasysrndbucketvirginiav1" -const stream_logs_via_ssh = true +const stream_logs_via_ssh = false // NewAws creates AWS Platform func NewAws(aws aws.Manager, awsConfig *aws.Config) Platform { @@ -95,7 +95,8 @@ func (a *awsPlatform) Configure(c *lib.Config) error { a.c = c // Compile binaries - a.pack("github.com/ConsenSys/handel/simul/node", c, CMDS.SlaveBinPath) + a.pack(c.GetBinaryPath(), c, CMDS.SlaveBinPath) + //a.pack("github.com/ConsenSys/handel/simul/node", c, CMDS.SlaveBinPath) a.pack("github.com/ConsenSys/handel/simul/master", c, CMDS.MasterBinPath) // write config @@ -115,6 +116,7 @@ func (a *awsPlatform) Configure(c *lib.Config) error { return err } + // slaveInstances = slaveInstances[0:2005] cons := c.NewConstructor() a.cons = cons masterAddr := aws.GenRemoteAddress(*masterInstance.PublicIP, 5000) @@ -135,6 +137,7 @@ func (a *awsPlatform) Configure(c *lib.Config) error { fmt.Println() fmt.Println("[+] Avaliable Slave Instances:") + //slaveInstances = slaveInstances[0:50] for i, inst := range slaveInstances { fmt.Println(" [-] Instance ", i, *inst.ID, *inst.State, *inst.PublicIP) } @@ -169,7 +172,7 @@ func (a *awsPlatform) Configure(c *lib.Config) error { var counter int32 for _, slave := range slaveInstances { // TODO This might become a problem for large number of slaves, - // limit numebr of go-routines running concurrently if this is the case + // limit number of go-routines running concurrently if this is the case go func(slave aws.Instance) { slaveNodeController, err := aws.NewSSHNodeController(*slave.PublicIP, a.pemBytes, a.awsConfig.SSHUser) if err != nil { @@ -177,7 +180,7 @@ func (a *awsPlatform) Configure(c *lib.Config) error { } fmt.Println(" - Configuring Slave", *slave.PublicIP) if err := configureSlave(slaveNodeController, slaveCmds, a.slaveCMDS.Kill()); err != nil { - fmt.Println(" Problem with Slave", *slave.PublicIP, err) + fmt.Println(" Problem with Slave", *slave.PublicIP, slave.Region, err) } else { instChan <- slave } @@ -187,12 +190,18 @@ func (a *awsPlatform) Configure(c *lib.Config) error { }(*slave) } + dt := time.Now() + fmt.Println("Waiting for instances: ", dt.String()) loop: for { select { case inst := <-instChan: a.allSlaveNodes = append(a.allSlaveNodes, &inst) + dt := time.Now() + fmt.Println("Current time: ", dt.String()) + fmt.Println("Instances len", len(a.allSlaveNodes), len(slaveInstances)) if len(a.allSlaveNodes) == len(slaveInstances) { + fmt.Println("All nodes configured") break loop } case <-time.After(a.confTimeout): @@ -200,6 +209,7 @@ loop: break loop } } + fmt.Println("Closing master") master.Close() return nil } @@ -210,6 +220,7 @@ func configureSlave(slaveNodeController aws.NodeController, slaveCmds map[int]st } defer slaveNodeController.Close() slaveNodeController.Run(kill, nil) + for idx := 0; idx < len(slaveCmds); idx++ { err := slaveNodeController.Run(slaveCmds[idx], nil) if err != nil { @@ -225,6 +236,54 @@ func (a *awsPlatform) Cleanup() error { return nil } +func (a *awsPlatform) getBalancedOnRegionNode(size int) []*aws.Instance { + if size >= len(a.allSlaveNodes) { + return a.allSlaveNodes + } + + // First, let's find how many regions we have + al := make(map[string]int) + for _, i := range a.allSlaveNodes { + _, ok := al[i.Region] + if !ok { + al[i.Region] = 0 + } + } + + var numberOfRegion = len(al) + fmt.Printf("You have %d instances in %d regions", len(a.allSlaveNodes), numberOfRegion) + + target := size / numberOfRegion + var res []*aws.Instance + var saved []*aws.Instance + for _, i := range a.allSlaveNodes { + cur := al[i.Region] + if cur < target { + al[i.Region] = cur + 1 + res = append(res, i) + } else { + saved = append(saved, i) + } + } + + // It's not well balanced, we're adding the node without any selection + if len(res) < size { + for _, i := range saved { + res = append(res, i) + if len(res) == size { + break + } + } + } + + if len(res) != size { + err := fmt.Errorf("bad size: wanted %d, done %d", size, len(res)) + panic(err) + } + + return res +} + func (a *awsPlatform) Start(idx int, r *lib.RunConfig) error { fmt.Println("Start run", idx) //Create master controller @@ -233,7 +292,7 @@ func (a *awsPlatform) Start(idx int, r *lib.RunConfig) error { panic(err) } - slaveNodes := a.allSlaveNodes[0:min(r.Processes, len(a.allSlaveNodes))] + slaveNodes := a.getBalancedOnRegionNode(min(r.Processes, len(a.allSlaveNodes))) allocator := a.c.NewAllocator() platforms := make([]lib.Platform, len(slaveNodes)) for i := 0; i < len(slaveNodes); i++ { @@ -286,7 +345,9 @@ func (a *awsPlatform) Start(idx int, r *lib.RunConfig) error { } if err := slaveController.Init(); err != nil { - panic(err) + fmt.Println(err) + return + //panic(err) } if stream_logs_via_ssh { @@ -314,7 +375,9 @@ func (a *awsPlatform) runSlave(inst aws.Instance, idx int, slaveController aws.N for i := 0; i < len(cpyFiles); i++ { fmt.Println(*inst.PublicIP, cpyFiles[i]) if err := slaveController.Run(cpyFiles[i], nil); err != nil { - panic(err) + fmt.Println("Error", *inst.PublicIP, err) + // panic(err) + return } } @@ -349,6 +412,8 @@ func (a *awsPlatform) startSlave(inst aws.Instance, idx int, slaveController aws for i := 0; i < len(cpyFiles); i++ { fmt.Println(*inst.PublicIP, cpyFiles[i]) if err := slaveController.Run(cpyFiles[i], nil); err != nil { + fmt.Println("Slave Error", inst.Region, *inst.PublicIP) + //return panic(err) } } diff --git a/simul/platform/aws/awsManager.go b/simul/platform/aws/awsManager.go index 2a7856b..50440af 100644 --- a/simul/platform/aws/awsManager.go +++ b/simul/platform/aws/awsManager.go @@ -15,7 +15,7 @@ type Instance struct { // State: running, pending, stopped State *string //EC2 Instance region - region string + Region string // EC2 Instance TAG Tag string diff --git a/simul/platform/aws/multiRegionManager_test.go b/simul/platform/aws/multiRegionManager_test.go index 5f377ba..5bf365f 100644 --- a/simul/platform/aws/multiRegionManager_test.go +++ b/simul/platform/aws/multiRegionManager_test.go @@ -46,7 +46,7 @@ func makeManager(n int, reg string) Manager { inst := Instance{ ID: aws.String(string(n) + reg), State: aws.String(stopped), - region: reg, + Region: reg, } instances = append(instances, inst) } @@ -105,7 +105,7 @@ func TestMultiRegionManager(t *testing.T) { } for _, inst := range manager.Instances() { - regMap[inst.region] = regMap[inst.region] - 1 + regMap[inst.Region] = regMap[inst.Region] - 1 } for _, v := range regMap { diff --git a/simul/platform/localhost.go b/simul/platform/localhost.go index 7ad9736..eb73fea 100644 --- a/simul/platform/localhost.go +++ b/simul/platform/localhost.go @@ -33,6 +33,7 @@ func (l *localPlatform) Configure(c *lib.Config) error { l.confPath = "/tmp/local.conf" // Compile binaries pack := c.GetBinaryPath() + //cmd := NewCommand("go", "build", "-o", l.binPath, "-race", pack) cmd := NewCommand("go", "build", "-o", l.binPath, pack) if err := cmd.Run(); err != nil { fmt.Println("command output -> " + cmd.ReadAll()) @@ -149,6 +150,17 @@ func (l *localPlatform) Start(idx int, r *lib.RunConfig) error { l.cmds = commands l.Unlock() + if strings.Contains(l.c.Simulation, "libp2p") { + fmt.Println(" LOCALHOST --->> SYNCING P2P ") + select { + case <-master.WaitAll(lib.P2P): + fmt.Printf("[+] Master full synchronization done.\n") + case <-time.After(5 * time.Minute): + panic("timeout after 2 mn") + } + fmt.Println(" LOCALHOST --->> SYNCING P2P DONE ") + } + // 4. Wait for the master to have synced up every node select { case <-master.WaitAll(lib.START): diff --git a/simul/plots/comparison_network.png b/simul/plots/comparison_network.png new file mode 100644 index 0000000..430486d Binary files /dev/null and b/simul/plots/comparison_network.png differ diff --git a/simul/plots/comparison_network.py b/simul/plots/comparison_network.py new file mode 100755 index 0000000..331448f --- /dev/null +++ b/simul/plots/comparison_network.py @@ -0,0 +1,59 @@ +#!/usr/bin/env python + +## This script generate the graphs that compares handel, nsquare +## and libp2p together on the network side +## +import sys +from lib import * + +import pandas as pd +import matplotlib.pyplot as plt + +column = "net_sentBytes_avg" + +# files = sys.argv[1:] +## mapping between files and label + # "csv/libp2p_2000_51thr_agg1.csv": "libp2p"} +files = {"csv/handel_0failing_99thr.csv": { + "label": "handel", + "xOffset": 0.15, + "yOffset": 0.09, + }, + "csv/n2_4000_99thr.csv": { + "label": "complete", + "xOffset": 0.20, + "yOffset": 0.01, + } + } + +datas = read_datafiles(files.keys()) + + +for f,v in datas.items(): + x = v["totalNbOfNodes"] + y = v[column].map(lambda x: x/1024) + xMax = x.max() + yMax = y.max() + print("file %s -> %d data points on sigen_wall_avg" % (f,len(y))) + label = files[f]["label"] + if label == "": + label = input("missing label for %s: " % f) + + print("x = ",x) + print("y = ",y) + plot(x,y,"-",label,allColors.popleft()) + xOffset = files[f]["xOffset"] + yOffset = files[f]["yOffset"] + ## 10% to the left + xCoordText = xMax - (xMax * xOffset) + ## 10% higher + yCoordText = yMax + (yMax * yOffset) + plt.annotate("%d KB" % yMax,xy=(xMax,yMax),xycoords='data', + xytext=(xCoordText,yCoordText),textcoords='data',fontsize=fs_label) + +plt.legend(fontsize=fs_label) +plt.ylabel("KBytes (log)",fontsize=fs_label) +plt.xlabel("Handel nodes",fontsize=fs_label) +# plt.title("Outgoing network consumption - comparative baseline",fontsize=fs_label) +plt.yscale('log') +plt.show() diff --git a/simul/plots/comparison_time.png b/simul/plots/comparison_time.png new file mode 100644 index 0000000..e064e88 Binary files /dev/null and b/simul/plots/comparison_time.png differ diff --git a/simul/plots/comparison_time.py b/simul/plots/comparison_time.py new file mode 100755 index 0000000..b7e43e2 --- /dev/null +++ b/simul/plots/comparison_time.py @@ -0,0 +1,59 @@ +#!/usr/bin/env python + +## This script generate the graphs that compares handel, nsquare +## and libp2p together for the signature generation time +## +import sys +from lib import * + +import pandas as pd +import matplotlib.pyplot as plt + +fs_label = 22 +column = "sigen_wall_avg" + +# files = sys.argv[1:] +## mapping between files and label +files = {"csv/handel_0failing_99thr.csv": { + "label": "handel", + "xOffset": 0.15, + "yOffset": 0.09, + }, + "csv/n2_4000_99thr.csv": { + "label": "complete", + "xOffset": 0.20, + "yOffset": 0.01, + } + } +# "csv/libp2p_2000_51thr_agg1.csv": "libp2p"} +datas = read_datafiles(files.keys()) + + +for f,v in datas.items(): + x = v["totalNbOfNodes"] + y = v[column].map(lambda x: x * 1000) + print("file %s -> %d data points on sigen_wall_avg" % (f,len(y))) + label = files[f]["label"] + if label == "": + label = input("missing label for %s: " % f) + + print("x = ",x) + print("y = ",y) + plot(x,y,"-",label,allColors.popleft()) + xMax = x.max() + yMax = y.max() + xOffset = files[f]["xOffset"] + yOffset = files[f]["yOffset"] + xCoordText = xMax - (xMax * xOffset) + ## 10% higher + yCoordText = yMax + (yMax * yOffset) + plt.annotate("%d ms" % yMax,xy=(xMax,yMax),xycoords='data', + xytext=(xCoordText,yCoordText),textcoords='data',fontsize=fs_label) + + +plt.legend(fontsize=fs_label) +plt.ylabel("signature generation (ms)",fontsize=fs_label) +plt.xlabel("Handel nodes",fontsize=fs_label) +# plt.title("Signature generation time - comparative baseline",fontsize=fs_label) +# plt.yscale('log') +plt.show() diff --git a/simul/plots/csv/handel_0failing_51thr.csv b/simul/plots/csv/handel_0failing_51thr.csv new file mode 100644 index 0000000..b4c5ee7 --- /dev/null +++ b/simul/plots/csv/handel_0failing_51thr.csv @@ -0,0 +1,9 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev,sigs_sigCheckedCt_min,sigs_sigCheckedCt_max,sigs_sigCheckedCt_avg,sigs_sigCheckedCt_sum,sigs_sigCheckedCt_dev,sigs_sigCheckingTime_min,sigs_sigCheckingTime_max,sigs_sigCheckingTime_avg,sigs_sigCheckingTime_sum,sigs_sigCheckingTime_dev,sigs_sigQueueSize_min,sigs_sigQueueSize_max,sigs_sigQueueSize_avg,sigs_sigQueueSize_sum,sigs_sigQueueSize_dev,sigs_sigSuppressed_min,sigs_sigSuppressed_max,sigs_sigSuppressed_avg,sigs_sigSuppressed_sum,sigs_sigSuppressed_dev,store_replaceTrial_min,store_replaceTrial_max,store_replaceTrial_avg,store_replaceTrial_sum,store_replaceTrial_dev,store_successReplace_min,store_successReplace_max,store_successReplace_avg,store_successReplace_sum,store_successReplace_dev +10,0,0,50,udp,10ms,0,handel,51,50ms,100,1,12,52,31.8,3180,8.256,2551,1.19E+04,7383,7.38E+05,1880,26,60,45.28,4528,5.479,6110,1.39E+04,1.05E+04,1.05E+06,1275,0,0.01704,0.004622,0.4622,0.004599,0.1044,0.2345,0.1708,17.08,0.0256,0.1179,0.3036,0.189,18.9,0.03659,8,22,16.37,1637,2.74,4.083,9.737,7.068,706.8,1.431,0.5,18.1,6.416,641.6,4.57,0,37,13.19,1319,9.569,4,14,9.28,928,2.305,4,8,6.31,631,0.6919 +10,0,0,150,udp,10ms,1,handel,153,50ms,300,1,20,100,48.09,1.44E+04,13.62,4240,2.10E+04,1.07E+04,3.19E+06,2981,15,130,70.68,2.11E+04,13.85,3525,3.04E+04,1.57E+04,4.70E+06,3246,0,0.03992,0.003598,1.076,0.006628,0.1385,0.3337,0.2164,64.72,0.04104,0.1715,0.4269,0.2609,78,0.05069,10,32,19.94,5962,4.133,4.062,10.18,6.111,1827,1.452,0.4667,30.63,4.814,1439,4.365,0,72,12.68,3791,14.31,3,21,10.94,3272,3.431,5,12,8.231,2461,1.107 +10,0,0,250,udp,10ms,2,handel,255,50ms,500,1,20,129,61.06,3.04E+04,15.97,4660,2.79E+04,1.34E+04,6.68E+06,3615,51,143,83.7,4.17E+04,11.25,1.10E+04,3.38E+04,1.85E+04,9.20E+06,2623,0,0.02985,0.003552,1.769,0.005518,0.1433,0.3775,0.2412,120.1,0.04337,0.2044,0.4931,0.3044,151.6,0.05063,13,37,21.75,1.08E+04,4.179,3.929,10.4,6.185,3080,1.342,0.4,43.42,5.094,2537,5.679,0,116,15.33,7632,18.41,4,24,11.67,5813,3.408,7,13,9.353,4658,1.176 +10,0,0,500,udp,10ms,3,handel,510,50ms,1000,1,45,150,108.2,1.02E+05,16.38,8918,3.65E+04,2.34E+04,2.19E+07,3651,44,200,129.5,1.22E+05,27.81,9848,4.43E+04,2.81E+04,2.65E+07,6254,0,0.04496,0.006155,5.693,0.008703,0.1887,0.5146,0.3396,313.4,0.06204,0.3167,0.6089,0.4632,431.7,0.049,14,46,28.69,2.64E+04,6.361,4.208,12.31,6.709,6146,1.489,0.3333,33.47,5.49,5035,5.314,0,119,28,2.57E+04,24.99,5,28,15.62,1.45E+04,4.841,9,19,12.51,1.17E+04,2.022 +10,0,0,750,udp,10ms,4,handel,765,50ms,1500,1,38,177,110.6,1.62E+05,22.63,1.01E+04,3.92E+04,2.46E+04,3.61E+07,5208,7,239,137.2,2.02E+05,31.65,1652,5.61E+04,3.07E+04,4.50E+07,7183,0,0.03842,0.005502,8.055,0.008414,0.1517,0.5478,0.3668,538.9,0.08127,0.1518,0.7011,0.4817,707.6,0.07886,13,51,30.62,4.48E+04,7.826,4.118,11.71,7.183,1.05E+04,1.644,0.3333,238.8,7.14,1.04E+04,11.98,0,172,31.53,4.61E+04,24.74,5,36,16.68,2.45E+04,5.532,5,23,13.18,1.94E+04,2.838 +10,0,0,1000,udp,10ms,5,handel,1020,50ms,2000,1,78,189,131.3,2.08E+05,18.93,1.85E+04,4.37E+04,2.97E+04,4.68E+07,4069,79,279,159.5,2.57E+05,31.58,1.85E+04,6.68E+04,3.70E+04,5.89E+07,6990,0,0.0584,0.005978,9.003,0.00982,0.2221,0.6294,0.4477,665.7,0.06974,0.4624,0.7331,0.5671,860.9,0.04526,16,59,37.19,5.48E+04,7.608,4.385,12.25,7.834,1.16E+04,1.595,0.4615,39.84,8.014,1.19E+04,5.441,0,171,39.83,5.93E+04,25.74,5,37,20.37,3.12E+04,5.616,10,25,15.96,2.49E+04,2.841 +10,0,0,1500,udp,10ms,0,handel,1530,50ms,3000,1,45,187,130.5,1.83E+05,14.65,1.28E+04,4.94E+04,3.06E+04,4.16E+07,4199,27,225,155.8,2.19E+05,25.18,5032,5.74E+04,3.82E+04,5.26E+07,7327,0,0.06956,0.005397,7.037,0.01045,0.2864,0.6845,0.5045,646.3,0.04872,0.2923,0.7685,0.6054,805.8,0.04396,23,59,42.47,5.47E+04,5.29,5.086,12.27,8.588,1.11E+04,1.334,1.323,304.2,9.033,1.16E+04,12.26,7,268,47.21,5.97E+04,21.54,10,42,23.45,3.14E+04,4.49,7,27,17.98,2.42E+04,2.831 +10,0,0,2000,udp,10ms,1,handel,2040,50ms,4000,1,0,199,143,3.08E+05,18.36,0,5.26E+04,3.48E+04,7.62E+07,5040,1,239,170.3,3.82E+05,28.94,236,6.14E+04,4.34E+04,9.27E+07,8205,0,0.0655,0.004541,9.395,0.01018,0.04914,0.7311,0.5571,1131,0.04991,0.04924,0.8038,0.6502,1362,0.05162,4,66,46.06,8.94E+04,5.036,5.343,26.24,9.567,1.87E+04,1.318,1.475,279.5,12.98,2.66E+04,12.24,5,249,58.76,1.17E+05,21.7,1,39,23.73,4.78E+04,4.1,2,33,21.41,4.47E+04,2.936 diff --git a/simul/plots/csv/handel_0failing_75thr.csv b/simul/plots/csv/handel_0failing_75thr.csv new file mode 100644 index 0000000..8de09bd --- /dev/null +++ b/simul/plots/csv/handel_0failing_75thr.csv @@ -0,0 +1,10 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev,sigs_sigCheckedCt_min,sigs_sigCheckedCt_max,sigs_sigCheckedCt_avg,sigs_sigCheckedCt_sum,sigs_sigCheckedCt_dev,sigs_sigCheckingTime_min,sigs_sigCheckingTime_max,sigs_sigCheckingTime_avg,sigs_sigCheckingTime_sum,sigs_sigCheckingTime_dev,sigs_sigQueueSize_min,sigs_sigQueueSize_max,sigs_sigQueueSize_avg,sigs_sigQueueSize_sum,sigs_sigQueueSize_dev,sigs_sigSuppressed_min,sigs_sigSuppressed_max,sigs_sigSuppressed_avg,sigs_sigSuppressed_sum,sigs_sigSuppressed_dev,store_replaceTrial_min,store_replaceTrial_max,store_replaceTrial_avg,store_replaceTrial_sum,store_replaceTrial_dev,store_successReplace_min,store_successReplace_max,store_successReplace_avg,store_successReplace_sum,store_successReplace_dev +10,0,0,50,udp,10ms,0,handel,75,50ms,100,1,16,56,32.75,3275,9.311,3745,1.20E+04,7263,7.26E+05,1935,7,69,43.66,4366,11.99,1624,1.57E+04,9580,9.58E+05,2566,0,0.01336,0.003067,0.3067,0.003807,0.1051,0.2455,0.1801,18.01,0.03402,0.1457,0.3383,0.205,20.5,0.03731,7,24,17.27,1727,3.771,3.812,9.947,6.157,615.7,1.429,0.5714,23.24,4.131,413.1,3.74,0,50,9.82,982,10.7,3,16,9.73,973,3.152,4,8,6.83,683,0.7661 +10,0,0,150,udp,10ms,1,handel,225,50ms,300,1,33,94,53.47,1.59E+04,11.45,6475,2.13E+04,1.17E+04,3.48E+06,2678,37,116,73,2.18E+04,12.97,8092,2.45E+04,1.60E+04,4.76E+06,3000,0,0.02823,0.003885,1.158,0.00598,0.1202,0.3154,0.2273,67.74,0.03612,0.1937,0.4187,0.2673,79.67,0.04059,7,31,20.85,6213,4.026,4.304,9.64,6.272,1869,1.244,0.2857,29.82,5.416,1614,4.84,0,66,16.02,4774,14,2,21,11.56,3444,3.383,5,11,8.503,2534,1.036 +10,0,0,250,udp,10ms,2,handel,375,50ms,500,1,66,128,100,4.97E+04,10.99,1.31E+04,3.01E+04,2.10E+04,1.05E+07,3121,57,162,114.2,5.68E+04,17.09,1.19E+04,3.62E+04,2.41E+04,1.20E+07,3869,0,0.03673,0.006044,3.004,0.007535,0.1832,0.4606,0.3017,149.9,0.04851,0.363,0.5783,0.4341,215.8,0.02992,16,41,25.6,1.27E+04,5.336,4.176,10.2,6.298,3130,1.35,0.3684,33.45,5.098,2534,5.186,0,118,28.22,1.40E+04,21.45,6,29,14.22,7069,4.548,7,16,10.65,5281,1.463 +10,0,0,500,udp,10ms,3,handel,750,50ms,1000,1,83,147,116.5,1.04E+05,11.98,1.58E+04,3.56E+04,2.54E+04,2.27E+07,3136,70,204,135.7,1.24E+05,21.04,1.35E+04,4.73E+04,2.99E+04,2.67E+07,5282,0,0.04372,0.005736,4.865,0.007958,0.2512,0.5514,0.402,346.2,0.05254,0.447,0.674,0.5178,451,0.04069,16,52,34.42,2.93E+04,6.815,4.263,11.25,6.814,5860,1.478,0.4091,29.53,4.836,4130,4.012,1,112,35.42,2.97E+04,20.4,5,36,20.4,1.80E+04,5.712,9,21,13.16,1.17E+04,2.143 +10,0,0,750,udp,10ms,4,handel,1125,50ms,1500,1,86,202,132.8,1.66E+05,18.2,1.77E+04,4.41E+04,2.96E+04,3.62E+07,4296,80,261,155.5,1.94E+05,27.63,1.58E+04,5.84E+04,3.49E+04,4.32E+07,6452,0,0.04988,0.006232,7.46,0.009951,0.2157,0.6579,0.4163,499.6,0.06658,0.4046,0.8067,0.5388,648.2,0.04833,18,54,34.63,4.10E+04,6.99,4.308,11.46,7.322,8633,1.6,0.3571,42.86,6.034,7168,5.212,0,189,35.33,4.15E+04,27.18,6,35,18.96,2.30E+04,5.404,9,23,14.81,1.80E+04,2.292 +10,0,0,1000,udp,10ms,5,handel,1500,50ms,2000,1,85,205,141.7,1.62E+05,18.58,2.00E+04,4.77E+04,3.28E+04,3.77E+07,4567,81,251,167.1,1.98E+05,30.99,1.73E+04,5.96E+04,3.96E+04,4.60E+07,7798,0,0.04854,0.005555,6.06,0.008372,0.3075,0.7033,0.4976,514,0.05725,0.4965,0.802,0.6044,650.9,0.04756,22,58,41.47,4.31E+04,6.007,4.417,12.27,8.191,8461,1.55,0.5357,37.96,8.07,8385,5.608,2,169,46.57,4.81E+04,23.96,9,41,23,2.52E+04,4.829,10,27,17.5,1.97E+04,2.65 +10,0,0,1250,udp,10ms,6,handel,1875,50ms,2500,1,92,206,144,2.30E+05,18.26,2.08E+04,5.72E+04,3.35E+04,5.33E+07,4387,81,269,168.3,2.74E+05,30.96,1.71E+04,6.80E+04,4.04E+04,6.39E+07,8270,0,0.07494,0.006285,9.252,0.01092,0.2796,0.6664,0.504,741.4,0.05986,0.4919,0.7627,0.6165,942.1,0.04693,21,63,41.37,5.95E+04,6.164,4.517,12.31,8.265,1.19E+04,1.57,0.3478,35.55,8.038,1.19E+04,5.246,0,148,43.24,6.23E+04,22.79,7,36,22.43,3.50E+04,4.721,8,31,17.96,2.76E+04,2.979 +10,0,0,1500,udp,10ms,7,handel,2250,50ms,3000,1,103,230,150.3,1.93E+05,18.63,2.39E+04,5.47E+04,3.58E+04,4.62E+07,4742,95,263,173.7,2.32E+05,24.79,2.11E+04,6.62E+04,4.30E+04,5.50E+07,6969,0,0.08458,0.005632,6.764,0.01085,0.2926,1.063,0.5485,651.1,0.06293,0.535,1.157,0.655,789.3,0.0544,26,78,44.79,5.32E+04,5.866,4.919,12.91,9.012,1.03E+04,1.47,1.038,47.09,10,1.15E+04,5.969,9,156,54.79,6.26E+04,21.69,10,58,24.11,2.92E+04,4.782,13,32,19.54,2.44E+04,2.933 +10,0,0,2000,udp,10ms,0,handel,3000,50ms,4000,1,36,222,160,4.11E+05,16.49,1.26E+04,5.53E+04,4.01E+04,1.02E+08,4741,7,254,183.5,4.80E+05,26.9,1638,6.51E+04,4.75E+04,1.19E+08,7123,0,0.06718,0.005894,13.79,0.01169,0.1936,0.7931,0.6145,1427,0.05381,0.1938,0.9021,0.7093,1697,0.05614,13,69,49.46,1.15E+05,5.002,6.386,14.33,10.12,2.31E+04,1.228,3.415,153.6,15.58,3.51E+04,6.857,15,157,68.74,1.54E+05,20.83,7,44,24.84,5.87E+04,4.174,5,34,23.65,5.69E+04,3.168 \ No newline at end of file diff --git a/simul/plots/csv/handel_0failing_99thr.csv b/simul/plots/csv/handel_0failing_99thr.csv new file mode 100644 index 0000000..d35e73b --- /dev/null +++ b/simul/plots/csv/handel_0failing_99thr.csv @@ -0,0 +1,10 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev,sigs_sigCheckedCt_min,sigs_sigCheckedCt_max,sigs_sigCheckedCt_avg,sigs_sigCheckedCt_sum,sigs_sigCheckedCt_dev,sigs_sigCheckingTime_min,sigs_sigCheckingTime_max,sigs_sigCheckingTime_avg,sigs_sigCheckingTime_sum,sigs_sigCheckingTime_dev,sigs_sigQueueSize_min,sigs_sigQueueSize_max,sigs_sigQueueSize_avg,sigs_sigQueueSize_sum,sigs_sigQueueSize_dev,sigs_sigSuppressed_min,sigs_sigSuppressed_max,sigs_sigSuppressed_avg,sigs_sigSuppressed_sum,sigs_sigSuppressed_dev,store_replaceTrial_min,store_replaceTrial_max,store_replaceTrial_avg,store_replaceTrial_sum,store_replaceTrial_dev,store_successReplace_min,store_successReplace_max,store_successReplace_avg,store_successReplace_sum,store_successReplace_dev +10,0,0,50,udp,10ms,0,handel,99,50ms,100,1,13,66,38.7,3870,10.72,3044,1.51E+04,8363,8.36E+05,2347,39,93,57.96,5796,11.86,8227,1.94E+04,1.23E+04,1.23E+06,2264,0,0.009297,0.002052,0.2052,0.003159,0.1237,0.2949,0.2023,20.23,0.03777,0.1582,0.375,0.2717,27.17,0.05144,6,29,18.87,1887,4.644,3.944,9.048,5.511,551.1,0.9795,0.3333,14.74,3.32,332,3.017,0,39,9.73,973,9.814,2,19,9.86,986,3.393,4,12,8.37,837,1.555 +10,0,0,150,udp,10ms,1,handel,297,50ms,300,1,20,109,62.82,1.87E+04,18.06,4609,2.48E+04,1.37E+04,4.08E+06,3951,39,152,85.91,2.56E+04,17.91,9204,3.18E+04,1.88E+04,5.61E+06,3877,0,0.03911,0.005565,1.658,0.005615,0.1491,0.4037,0.249,74.21,0.04907,0.2166,0.4818,0.3219,95.92,0.06106,9,40,22.88,6817,5.313,4.095,10.54,6.033,1798,1.369,0.4167,35.15,4.666,1390,5.131,0,103,17.01,5068,19.2,4,27,12.34,3678,4.213,5,15,9.886,2946,1.559 +10,0,0,250,udp,10ms,2,handel,495,50ms,500,1,61,125,95.77,4.76E+04,9.334,1.41E+04,2.94E+04,2.05E+04,1.02E+07,2573,57,164,113.2,5.62E+04,17.81,1.14E+04,3.53E+04,2.42E+04,1.20E+07,4046,0,0.03402,0.005909,2.937,0.007699,0.204,0.4993,0.3184,158.3,0.05643,0.3479,0.6021,0.4498,223.6,0.03365,15,46,27.52,1.37E+04,6.114,4.111,10.59,6.188,3075,1.454,0.3333,36.42,4.206,2091,4.72,0,108,23.28,1.16E+04,19.2,5,30,15.25,7581,4.959,7,17,11.57,5750,1.781 +10,0,0,500,udp,10ms,3,handel,990,50ms,1000,1,86,158,119.4,1.14E+05,11.26,1.85E+04,3.71E+04,2.66E+04,2.54E+07,3098,77,205,135.9,1.30E+05,21.78,1.60E+04,4.67E+04,3.06E+04,2.93E+07,5268,0,0.0403,0.005981,5.7,0.008326,0.288,0.5987,0.448,423.8,0.06074,0.4543,0.7317,0.5617,533.6,0.04962,20,57,38.69,3.67E+04,6.622,4.267,11.26,7.375,6970,1.543,0.3333,31.72,6.447,6131,4.923,5,130,38.67,3.67E+04,21.45,7,42,22.92,2.17E+04,5.289,10,24,14.68,1.40E+04,2.47 +10,0,0,750,udp,10ms,4,handel,1485,50ms,1500,1,85,197,138.9,1.88E+05,17.79,1.90E+04,4.43E+04,3.14E+04,4.27E+07,4151,85,262,157.4,2.16E+05,27.45,1.84E+04,5.94E+04,3.62E+04,4.88E+07,6662,0,0.04607,0.005532,7.235,0.008818,0.2646,0.7932,0.4952,647.3,0.07396,0.4533,0.8523,0.6114,807.1,0.06235,18,68,41.9,5.40E+04,7.487,4.167,12.2,7.774,9935,1.526,0.5,35.48,6.753,8772,4.946,2,170,41.99,5.39E+04,23.91,6,49,24.24,3.22E+04,5.853,10,25,16.63,2.23E+04,2.834 +10,0,0,1000,udp,10ms,5,handel,1980,50ms,2000,1,102,205,145.2,2.31E+05,15.9,2.14E+04,4.78E+04,3.40E+04,5.29E+07,4209,79,237,164.7,2.66E+05,26.82,1.64E+04,5.79E+04,3.92E+04,6.16E+07,7065,0,0.04123,0.005709,8.399,0.008615,0.3767,0.7917,0.5438,790.6,0.06102,0.5056,0.8804,0.6484,975.1,0.06092,24,68,45.2,6.54E+04,6.489,4.486,12.55,8.703,1.23E+04,1.37,1.312,29.49,8.329,1.18E+04,4.338,7,148,52.38,7.44E+04,22.43,11,47,26.01,3.90E+04,5.005,11,29,18.21,2.77E+04,3.205 +10,0,0,1250,udp,10ms,6,handel,2475,50ms,2500,1,52,267,164.1,3.22E+05,24.55,1.40E+04,7.06E+04,4.07E+04,7.85E+07,8008,27,331,182.5,3.65E+05,30.83,5568,8.77E+04,4.56E+04,8.84E+07,8627,0,0.0543,0.006437,11.9,0.01088,0.3131,1.173,0.6209,1149,0.08979,0.3142,1.321,0.7215,1358,0.09023,24,106,49.71,9.02E+04,8.594,4.895,13.5,9.293,1.70E+04,1.387,1.707,232.4,12.99,2.37E+04,11.69,5,257,67.21,1.23E+05,24.52,11,80,27.65,5.24E+04,6.842,8,32,21.07,4.01E+04,3.549 +10,0,0,1500,udp,10ms,7,handel,2970,50ms,3000,1,112,281,184.9,3.82E+05,22.44,2.72E+04,6.64E+04,4.62E+04,9.14E+07,6302,115,345,202.3,4.20E+05,31.83,2.59E+04,9.09E+04,5.10E+04,1.01E+08,8755,0,0.08219,0.006593,12.23,0.01207,0.4502,1.283,0.7078,1301,0.1032,0.5852,1.373,0.811,1544,0.1008,29,102,55.11,9.83E+04,8.916,5.469,14.68,10.08,1.77E+04,1.398,1.575,54.17,14.85,2.65E+04,8.076,6,202,74.53,1.31E+05,25.05,13,73,30.81,5.85E+04,7.379,13,35,23.16,4.45E+04,3.437 +10,0,0,2000,udp,10ms,8,handel,3960,50ms,4000,1,139,305,202.7,5.07E+05,19.07,3.65E+04,8.08E+04,5.29E+04,1.29E+08,5410,138,316,220.1,5.63E+05,27.29,3.56E+04,8.22E+04,5.76E+04,1.42E+08,7140,0,0.06709,0.007,15.95,0.01312,0.5316,1.166,0.8354,1881,0.09606,0.6396,1.449,0.9316,2137,0.09527,36,94,61.83,1.37E+05,7.721,6.857,33.85,11.22,2.48E+04,1.46,6.283,74.71,25.01,5.60E+04,8.324,37,214,96.06,2.12E+05,23.77,14,60,33.1,7.71E+04,6.728,17,40,27.73,6.52E+04,3.452 \ No newline at end of file diff --git a/simul/plots/csv/handel_2000_100period_25fail_99thr.csv b/simul/plots/csv/handel_2000_100period_25fail_99thr.csv new file mode 100644 index 0000000..4566a1b --- /dev/null +++ b/simul/plots/csv/handel_2000_100period_25fail_99thr.csv @@ -0,0 +1,7 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev,sigs_sigCheckedCt_min,sigs_sigCheckedCt_max,sigs_sigCheckedCt_avg,sigs_sigCheckedCt_sum,sigs_sigCheckedCt_dev,sigs_sigCheckingTime_min,sigs_sigCheckingTime_max,sigs_sigCheckingTime_avg,sigs_sigCheckingTime_sum,sigs_sigCheckingTime_dev,sigs_sigQueueSize_min,sigs_sigQueueSize_max,sigs_sigQueueSize_avg,sigs_sigQueueSize_sum,sigs_sigQueueSize_dev,sigs_sigSuppressed_min,sigs_sigSuppressed_max,sigs_sigSuppressed_avg,sigs_sigSuppressed_sum,sigs_sigSuppressed_dev,store_replaceTrial_min,store_replaceTrial_max,store_replaceTrial_avg,store_replaceTrial_sum,store_replaceTrial_dev,store_successReplace_min,store_successReplace_max,store_successReplace_avg,store_successReplace_sum,store_successReplace_dev +10,0,25,50,udp,100ms,0,handel,75,50ms,100,1,17,53,34.01,2551,7.522,3844,1.12E+04,7581,5.69E+05,1465,28,75,50.48,3786,9.453,6580,1.65E+04,1.14E+04,8.57E+05,2222,0,0.01675,0.004453,0.334,0.003848,0.1084,0.4788,0.2829,21.22,0.1037,0.3172,1.095,0.5129,38.47,0.1693,19,48,31.72,2379,6.773,4.079,8.879,5.578,418.3,1.107,0.2105,6.132,1.978,148.3,1.155,2,36,11.92,894,6.627,12,37,20.75,1556,5.838,6,16,10.39,779,2.059 +10,0,75,150,udp,100ms,1,handel,223,50ms,300,1,21,90,46.17,9234,11.75,4968,1.88E+04,1.03E+04,2.06E+06,2373,38,113,66.67,1.33E+04,12.72,8668,2.61E+04,1.51E+04,3.01E+06,2871,0,0.02917,0.005301,1.06,0.005567,0.1277,0.467,0.2867,57.33,0.06845,0.3698,0.6524,0.4853,97.06,0.06214,15,61,32.84,6569,8.419,4.167,8.448,5.388,1078,0.842,0.2632,8.103,2.125,425,1.538,2,47,17.2,3440,8.097,6,45,20.93,4185,7.66,6,18,11.23,2247,2.23 +10,0,125,250,udp,100ms,2,handel,372,50ms,500,1,22,78,51.36,1.60E+04,14.14,5078,1.82E+04,1.15E+04,3.58E+06,2827,58,99,75.96,2.37E+04,5.619,1.22E+04,2.20E+04,1.74E+04,5.42E+06,1334,0,0.0294,0.005139,1.603,0.005785,0.1482,0.4707,0.2746,85.68,0.04878,0.4086,0.603,0.5035,157.1,0.03952,18,67,33.9,1.06E+04,10.17,4.109,9.158,5.194,1621,0.7536,0.3125,18.58,2.01,627,1.968,1,52,16.85,5256,7.714,8,45,21.13,6591,8.883,7,16,11.04,3445,1.462 +10,0,250,500,udp,100ms,3,handel,743,50ms,1000,1,27,107,72.48,4.28E+04,19.27,6474,2.48E+04,1.66E+04,9.79E+06,3884,35,145,97.72,5.78E+04,12.5,6116,3.42E+04,2.28E+04,1.35E+07,2557,0,0.03593,0.006473,3.819,0.005831,0.1839,0.603,0.3935,232.6,0.07423,0.312,0.7368,0.5944,350.7,0.04985,21,96,46.09,2.72E+04,14.77,4.175,11.25,5.879,3469,1.162,0.36,36.68,3.148,1858,3.191,2,97,25.53,1.51E+04,12.31,9,62,29.29,1.73E+04,11.48,9,22,14.56,8603,2.039 +10,0,375,750,udp,100ms,4,handel,1114,50ms,1500,1,26,132,79.43,7.09E+04,21.63,6620,3.05E+04,1.87E+04,1.67E+07,4740,25,166,110.4,9.85E+04,16.09,4694,4.07E+04,2.66E+04,2.37E+07,3293,0,0.03843,0.006767,6.029,0.006433,0.2357,0.6648,0.4493,399.9,0.07917,0.273,0.7855,0.6347,565.5,0.0492,24,106,52.04,4.63E+04,16.51,4.127,10.32,6.241,5561,1.305,0.2692,37.48,3.895,3467,2.937,4,83,34.04,3.03E+04,12.12,10,67,33.44,2.98E+04,12.62,9,24,15.41,1.38E+04,2.129 +10,0,500,1000,udp,100ms,5,handel,1485,50ms,2000,1,34,153,88.68,9.39E+04,27.38,8413,3.63E+04,2.14E+04,2.26E+07,5877,36,184,121,1.31E+05,21.47,6151,4.39E+04,2.98E+04,3.15E+07,4697,0,0.05197,0.007779,7.911,0.007114,0.2521,0.7796,0.498,498.5,0.09082,0.3123,0.9105,0.6827,698.4,0.06188,26,113,57.57,5.69E+04,17.65,4.301,11.15,6.729,6669,1.665,0.2963,75.32,5.404,5345,5.299,8,140,42.02,4.15E+04,16.37,11,79,37.2,3.81E+04,14.44,11,28,17.9,1.86E+04,2.578 \ No newline at end of file diff --git a/simul/plots/csv/handel_2000_100timeout_99thr.csv b/simul/plots/csv/handel_2000_100timeout_99thr.csv new file mode 100644 index 0000000..edb7d00 --- /dev/null +++ b/simul/plots/csv/handel_2000_100timeout_99thr.csv @@ -0,0 +1,7 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev,sigs_sigCheckedCt_min,sigs_sigCheckedCt_max,sigs_sigCheckedCt_avg,sigs_sigCheckedCt_sum,sigs_sigCheckedCt_dev,sigs_sigCheckingTime_min,sigs_sigCheckingTime_max,sigs_sigCheckingTime_avg,sigs_sigCheckingTime_sum,sigs_sigCheckingTime_dev,sigs_sigQueueSize_min,sigs_sigQueueSize_max,sigs_sigQueueSize_avg,sigs_sigQueueSize_sum,sigs_sigQueueSize_dev,sigs_sigSuppressed_min,sigs_sigSuppressed_max,sigs_sigSuppressed_avg,sigs_sigSuppressed_sum,sigs_sigSuppressed_dev,store_replaceTrial_min,store_replaceTrial_max,store_replaceTrial_avg,store_replaceTrial_sum,store_replaceTrial_dev,store_successReplace_min,store_successReplace_max,store_successReplace_avg,store_successReplace_sum,store_successReplace_dev +10,0,25,50,udp,10ms,0,handel,75,100ms,100,1,22,41,31.37,2353,4.251,3963,9597,6874,5.16E+05,1143,35,92,55.49,4162,12.56,6885,1.96E+04,1.25E+04,9.36E+05,3065,0,0.02069,0.003885,0.2913,0.004864,0.08828,0.3631,0.2027,15.21,0.05987,0.5808,0.7238,0.6314,47.35,0.02717,8,45,23.17,1738,8.507,4.083,7.278,4.765,357.4,0.5261,0.25,3.611,1.012,75.93,0.6376,3,28,13.92,1044,5.706,4,36,15.21,1141,7.899,4,10,7.613,571,1.479 +10,0,75,150,udp,10ms,1,handel,223,100ms,300,1,31,89,58.12,1.22E+04,12.37,7322,2.07E+04,1.30E+04,2.71E+06,2735,67,117,95.5,2.00E+04,11.69,1.43E+04,2.72E+04,2.18E+04,4.56E+06,2736,0,0.02785,0.005988,1.251,0.005819,0.1269,0.3935,0.2733,57.11,0.05704,0.7081,0.8519,0.7631,159.5,0.03931,9,58,31.31,6543,12.02,4.045,7.656,5.177,1082,0.7431,0.2581,8.303,1.832,382.8,1.568,0,62,24.49,5119,13.48,4,48,22.11,4622,11.55,5,11,8.593,1796,1.268 +10,0,125,250,udp,10ms,2,handel,372,100ms,500,1,39,134,99.9,2.91E+04,28.35,9176,3.13E+04,2.15E+04,6.25E+06,5835,103,216,148.7,4.33E+04,32.16,2.04E+04,4.82E+04,3.30E+04,9.61E+06,6611,0,0.03998,0.007312,2.128,0.008518,0.1157,0.3972,0.2961,86.17,0.03591,0.8057,0.9287,0.8386,244,0.02419,14,73,36.25,1.06E+04,17.76,4.115,8.385,5.168,1504,0.7843,0.2609,10.61,1.799,523.6,1.667,0,61,29.38,8551,14.98,5,64,26.86,7817,17.93,7,11,8.921,2596,0.7816 +10,0,250,500,udp,10ms,3,handel,743,100ms,1000,1,55,215,123.9,8.36E+04,42.67,1.32E+04,4.95E+04,2.76E+04,1.86E+07,9305,94,251,171.8,1.16E+05,23.8,2.26E+04,5.82E+04,3.95E+04,2.67E+07,6030,0,0.0394,0.007722,5.212,0.007958,0.2651,0.6451,0.4547,306.9,0.05061,0.9066,1.091,0.976,658.8,0.03561,17,107,53.35,3.60E+04,22.33,4.126,9.194,5.697,3846,1.06,0.3623,14.29,2.833,1912,2.25,4,126,58.97,3.98E+04,16.95,8,97,42.19,2.85E+04,22.29,8,13,10.25,6920,0.8017 +10,0,375,750,udp,10ms,4,handel,1114,100ms,1500,1,55,249,143.5,1.42E+05,43.55,1.31E+04,5.38E+04,3.11E+04,3.06E+07,8621,7,291,205.1,2.02E+05,34.68,1250,6.78E+04,4.65E+04,4.60E+07,6778,0,0.04561,0.008316,8.183,0.008934,0.1983,0.7136,0.4493,442.1,0.07866,0.3644,1.116,1,984.3,0.05594,16,108,51.13,5.01E+04,25.44,4.293,9.625,5.721,5618,0.9994,0.1667,139.6,2.952,2896,6.064,9,301,53.49,5.24E+04,22.45,5,96,39.07,3.84E+04,25.55,7,15,11.23,1.11E+04,1.334 +10,0,500,1000,udp,10ms,5,handel,1485,100ms,2000,1,64,371,191.6,1.85E+05,81.8,1.53E+04,9.01E+04,4.17E+04,4.03E+07,1.66E+04,7,382,256.2,2.51E+05,62.34,1652,8.66E+04,5.87E+04,5.69E+07,1.17E+04,0,0.07601,0.01446,13.42,0.01338,0.2656,0.7657,0.5153,473,0.07428,0.3164,1.217,1.065,992.4,0.05245,13,121,57.89,5.29E+04,28.71,4.117,10.8,6.142,5608,1.386,0.2329,124.8,3.802,3456,5.646,10,367,64.94,5.90E+04,28.42,7,108,44.46,4.18E+04,29.81,5,16,12.49,1.18E+04,1.475 \ No newline at end of file diff --git a/simul/plots/csv/handel_2000_10period_25fail_99thr.csv b/simul/plots/csv/handel_2000_10period_25fail_99thr.csv new file mode 100644 index 0000000..22fcc3d --- /dev/null +++ b/simul/plots/csv/handel_2000_10period_25fail_99thr.csv @@ -0,0 +1,7 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev,sigs_sigCheckedCt_min,sigs_sigCheckedCt_max,sigs_sigCheckedCt_avg,sigs_sigCheckedCt_sum,sigs_sigCheckedCt_dev,sigs_sigCheckingTime_min,sigs_sigCheckingTime_max,sigs_sigCheckingTime_avg,sigs_sigCheckingTime_sum,sigs_sigCheckingTime_dev,sigs_sigQueueSize_min,sigs_sigQueueSize_max,sigs_sigQueueSize_avg,sigs_sigQueueSize_sum,sigs_sigQueueSize_dev,sigs_sigSuppressed_min,sigs_sigSuppressed_max,sigs_sigSuppressed_avg,sigs_sigSuppressed_sum,sigs_sigSuppressed_dev,store_replaceTrial_min,store_replaceTrial_max,store_replaceTrial_avg,store_replaceTrial_sum,store_replaceTrial_dev,store_successReplace_min,store_successReplace_max,store_successReplace_avg,store_successReplace_sum,store_successReplace_dev +10,0,25,50,udp,10ms,0,handel,75,50ms,100,1,19,73,39.57,2968,10.27,4446,1.36E+04,8846,6.64E+05,1867,45,116,63.11,4733,11.89,8900,2.71E+04,1.43E+04,1.07E+06,2856,0,0.02139,0.004293,0.322,0.005373,0.105,0.3968,0.2635,19.76,0.08657,0.3171,0.5485,0.4263,31.97,0.0594,18,48,30.17,2263,6.068,4.083,7.667,5.496,412.2,1.078,0.3889,11.17,3.073,230.4,2.379,3,58,15.45,1159,10.65,10,36,19.35,1451,5.221,7,13,9.987,749,1.52 +10,0,75,150,udp,10ms,1,handel,223,50ms,300,1,17,96,59.87,1.22E+04,14.7,3951,2.18E+04,1.33E+04,2.72E+06,3140,57,172,97.39,1.99E+04,20.32,1.32E+04,3.71E+04,2.20E+04,4.50E+06,4472,0,0.02526,0.004829,0.9851,0.005801,0.1341,0.4776,0.3067,62.57,0.07218,0.3627,0.6148,0.4844,98.82,0.05557,14,74,35.64,7270,11.57,4.2,8.583,5.457,1113,0.8957,0.3462,10.45,2.691,549,1.73,5,56,25.49,5199,10.59,7,59,24.01,4898,10.9,7,17,10.83,2209,2.006 +10,0,125,250,udp,10ms,2,handel,372,50ms,500,1,31,122,81.29,2.47E+04,23.45,7293,2.68E+04,1.78E+04,5.41E+06,4511,73,169,125.5,3.82E+04,16.63,1.66E+04,3.74E+04,2.82E+04,8.58E+06,3398,0,0.03099,0.006194,1.883,0.007143,0.154,0.4493,0.3238,98.43,0.04608,0.422,0.6312,0.5095,154.9,0.03698,20,76,40.18,1.22E+04,13.12,4.174,8.862,5.455,1658,1.029,0.2821,13.61,2.82,857.4,2.292,2,75,30.38,9237,11.93,10,63,28.23,8581,13.99,7,16,11.17,3396,1.79 +10,0,250,500,udp,10ms,3,handel,743,50ms,1000,1,36,164,103.5,6.26E+04,36.15,8542,3.68E+04,2.27E+04,1.37E+07,6848,62,202,151.3,9.19E+04,23.31,1.40E+04,4.47E+04,3.45E+04,2.09E+07,4634,0,0.03637,0.006237,3.767,0.007334,0.1632,0.5423,0.3882,234.1,0.06437,0.3325,0.6799,0.5585,337.3,0.04917,20,82,46.01,2.77E+04,14.1,4.177,11.29,5.793,3493,1.151,0.2941,76.42,3.677,2217,4.971,4,183,38.2,2.30E+04,16.62,9,71,32.92,1.99E+04,15.1,7,19,12.19,7362,2.107 +10,0,375,750,udp,10ms,4,handel,1114,50ms,1500,1,56,176,113.3,1.12E+05,26.11,1.38E+04,4.43E+04,2.62E+04,2.57E+07,5431,97,248,162.5,1.60E+05,21.48,1.99E+04,6.22E+04,3.89E+04,3.83E+07,5970,0,0.03793,0.006353,6.258,0.007079,0.2621,0.6646,0.4776,470.9,0.06246,0.5024,0.7857,0.638,627.8,0.04937,23,102,55.07,5.42E+04,18.34,4.261,10.5,6.676,6576,1.515,0.4324,21.18,5.811,5724,3.3,10,136,55.73,5.50E+04,16.93,10,86,40.38,3.98E+04,18.26,9,21,13.69,1.35E+04,1.755 +10,0,500,1000,udp,10ms,5,handel,1485,50ms,2000,1,68,228,146.2,1.67E+05,41.21,1.73E+04,5.76E+04,3.45E+04,3.92E+07,8249,72,285,199.2,2.27E+05,26.43,1.43E+04,7.19E+04,4.84E+04,5.51E+07,6622,0,0.0434,0.008232,9.368,0.008679,0.3378,0.9086,0.6326,719.3,0.08298,0.4445,0.9305,0.7655,870.4,0.07885,31,158,73.03,8.27E+04,26.94,4.336,12.59,7.192,8127,1.709,1.087,169.3,20.53,2.33E+04,34.71,21,242,68.87,7.78E+04,21.32,8,119,44.72,5.08E+04,23.17,11,39,18.42,2.09E+04,3.71 \ No newline at end of file diff --git a/simul/plots/csv/handel_2000_200timeout_99thr.csv b/simul/plots/csv/handel_2000_200timeout_99thr.csv new file mode 100644 index 0000000..cea3237 --- /dev/null +++ b/simul/plots/csv/handel_2000_200timeout_99thr.csv @@ -0,0 +1,7 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev,sigs_sigCheckedCt_min,sigs_sigCheckedCt_max,sigs_sigCheckedCt_avg,sigs_sigCheckedCt_sum,sigs_sigCheckedCt_dev,sigs_sigCheckingTime_min,sigs_sigCheckingTime_max,sigs_sigCheckingTime_avg,sigs_sigCheckingTime_sum,sigs_sigCheckingTime_dev,sigs_sigQueueSize_min,sigs_sigQueueSize_max,sigs_sigQueueSize_avg,sigs_sigQueueSize_sum,sigs_sigQueueSize_dev,sigs_sigSuppressed_min,sigs_sigSuppressed_max,sigs_sigSuppressed_avg,sigs_sigSuppressed_sum,sigs_sigSuppressed_dev,store_replaceTrial_min,store_replaceTrial_max,store_replaceTrial_avg,store_replaceTrial_sum,store_replaceTrial_dev,store_successReplace_min,store_successReplace_max,store_successReplace_avg,store_successReplace_sum,store_successReplace_dev +10,0,25,50,udp,10ms,0,handel,75,200ms,100,1,27,46,35.08,2631,5.007,5240,1.08E+04,7762,5.82E+05,1416,35,109,57.45,4309,16.14,6885,2.56E+04,1.30E+04,9.75E+05,3969,0,0.01771,0.004263,0.3197,0.005219,0.09255,0.3866,0.2375,17.81,0.0653,1.088,1.3,1.207,90.56,0.04141,7,50,26.13,1960,11.74,4.105,6.688,4.808,360.6,0.4683,0.25,2.412,0.8091,60.68,0.5494,3,36,18.09,1357,7.898,3,43,18.65,1399,11.23,4,8,7.147,536,1.009 +10,0,75,150,udp,10ms,1,handel,223,200ms,300,1,43,106,77.49,1.61E+04,15.64,8296,2.47E+04,1.75E+04,3.63E+06,3701,80,197,112.2,2.33E+04,31.58,1.70E+04,4.51E+04,2.57E+04,5.35E+06,7458,0,0.06142,0.007242,1.506,0.008578,0.1652,0.532,0.3463,72.03,0.06957,1.403,1.62,1.458,303.4,0.06272,9,71,39.54,8224,16.52,4.154,7.722,5.057,1052,0.6662,0.193,10.55,1.365,283.9,1.297,0,72,33.39,6945,15.37,4,63,30.82,6410,16.24,5,9,8.38,1743,0.9656 +10,0,125,250,udp,10ms,2,handel,372,200ms,500,1,59,183,126.9,3.69E+04,35.23,1.37E+04,4.41E+04,2.78E+04,8.10E+06,9069,119,295,179.2,5.22E+04,46.12,2.35E+04,6.77E+04,4.01E+04,1.17E+07,1.04E+04,0,0.06039,0.008759,2.549,0.01052,0.172,0.4877,0.3662,106.6,0.0514,1.507,1.706,1.629,474.1,0.02534,12,86,45.15,1.31E+04,24.31,4.162,7.955,5.158,1501,0.7336,0.1538,7.125,1.512,440.1,1.395,3,89,43.58,1.27E+04,19.02,5,77,35.76,1.04E+04,24.57,7,10,8.883,2585,0.7612 +10,0,250,500,udp,10ms,3,handel,743,200ms,1000,1,85,254,155.1,1.02E+05,48.74,2.04E+04,5.93E+04,3.46E+04,2.28E+07,1.07E+04,126,343,211.3,1.39E+05,28.98,3.02E+04,8.20E+04,4.85E+04,3.18E+07,7777,0,0.08385,0.009349,6.124,0.01009,0.3506,0.9826,0.6082,398.4,0.05862,1.716,1.942,1.855,1215,0.03126,19,123,71.17,4.66E+04,30.99,4.102,8.895,5.548,3634,0.942,0.2427,15.7,2.154,1409,1.943,10,159,83.02,5.43E+04,24.42,11,115,60.38,3.96E+04,31.04,7,12,10.04,6577,0.7272 +10,0,375,750,udp,10ms,4,handel,1114,200ms,1500,1,88,310,194.7,1.70E+05,63.46,2.13E+04,7.68E+04,4.27E+04,3.74E+07,1.45E+04,119,407,271.9,2.38E+05,53.42,2.25E+04,9.54E+04,6.18E+04,5.40E+07,1.13E+04,0,0.07307,0.01297,11.31,0.01187,0.22,0.9295,0.5268,459.4,0.1131,1.484,2.095,1.91,1661,0.08326,13,145,60.74,5.27E+04,38.91,4.153,10.38,5.478,4765,0.9325,0.1648,113.9,2.412,2093,5.203,10,234,70.18,6.08E+04,26.3,4,133,49.27,4.29E+04,38.67,7,13,10.65,9289,0.9339 +10,0,500,1000,udp,10ms,5,handel,1485,200ms,2000,1,110,436,290.3,3.14E+05,91.38,2.69E+04,9.71E+04,6.39E+04,6.72E+07,1.67E+04,153,553,372.9,4.12E+05,106.7,3.59E+04,1.32E+05,8.56E+04,9.21E+07,2.27E+04,0,0.0801,0.01926,19.26,0.01701,0.2877,1.155,0.6019,601.3,0.1596,1.727,2.165,2.034,2075,0.03819,15,156,64.85,6.41E+04,48.59,4.144,10.59,5.861,5797,1.166,0.1759,102.6,3.277,3224,5.796,3,285,75.27,7.45E+04,39.2,5,144,53.09,5.39E+04,49.03,8,14,11,1.13E+04,0.7555 \ No newline at end of file diff --git a/simul/plots/csv/handel_2000_20period_25fail_99thr.csv b/simul/plots/csv/handel_2000_20period_25fail_99thr.csv new file mode 100644 index 0000000..da34f0f --- /dev/null +++ b/simul/plots/csv/handel_2000_20period_25fail_99thr.csv @@ -0,0 +1,7 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev,sigs_sigCheckedCt_min,sigs_sigCheckedCt_max,sigs_sigCheckedCt_avg,sigs_sigCheckedCt_sum,sigs_sigCheckedCt_dev,sigs_sigCheckingTime_min,sigs_sigCheckingTime_max,sigs_sigCheckingTime_avg,sigs_sigCheckingTime_sum,sigs_sigCheckingTime_dev,sigs_sigQueueSize_min,sigs_sigQueueSize_max,sigs_sigQueueSize_avg,sigs_sigQueueSize_sum,sigs_sigQueueSize_dev,sigs_sigSuppressed_min,sigs_sigSuppressed_max,sigs_sigSuppressed_avg,sigs_sigSuppressed_sum,sigs_sigSuppressed_dev,store_replaceTrial_min,store_replaceTrial_max,store_replaceTrial_avg,store_replaceTrial_sum,store_replaceTrial_dev,store_successReplace_min,store_successReplace_max,store_successReplace_avg,store_successReplace_sum,store_successReplace_dev +10,0,25,50,udp,20ms,0,handel,75,50ms,100,1,18,65,37.97,2848,8.733,4212,1.23E+04,8534,6.40E+05,1598,33,84,59.4,4455,8.713,6549,1.97E+04,1.35E+04,1.01E+06,2198,0,0.0132,0.003933,0.295,0.004489,0.115,0.499,0.272,20.4,0.08975,0.3264,0.6149,0.4427,33.2,0.05896,21,51,31.16,2337,6.838,4.095,7.679,5.441,408.1,1.017,0.4167,8.043,2.705,202.8,1.916,4,54,15.89,1192,9.49,13,40,20.37,1528,5.966,7,14,10.05,754,1.822 +10,0,75,150,udp,20ms,1,handel,223,50ms,300,1,21,85,57.81,1.18E+04,13.07,4907,1.92E+04,1.29E+04,2.62E+06,2590,55,126,89.58,1.83E+04,16.38,1.20E+04,2.81E+04,2.03E+04,4.13E+06,3806,0,0.03002,0.005881,1.2,0.00542,0.1336,0.4667,0.3127,63.79,0.07309,0.3784,0.6205,0.5031,102.6,0.0566,16,80,37,7549,11.77,4.074,7.946,5.374,1096,0.8879,0.3,9.636,2.616,533.7,1.622,7,52,24.9,5079,9.332,7,66,24.89,5077,11.23,6,17,11.32,2310,2.109 +10,0,125,250,udp,20ms,2,handel,372,50ms,500,1,27,103,68.8,2.11E+04,19.64,6355,2.20E+04,1.52E+04,4.66E+06,3822,64,134,105.6,3.24E+04,11.75,1.45E+04,2.98E+04,2.38E+04,7.32E+06,2477,0,0.02667,0.006243,1.917,0.005913,0.1331,0.4311,0.3087,94.76,0.0515,0.4024,0.619,0.5083,156.1,0.0435,21,73,37.75,1.16E+04,11.22,4.13,9.32,5.535,1699,1.078,0.2857,13.44,2.531,777,2.2,2,63,25.77,7910,10.84,9,63,25.87,7942,11.94,7,17,11.15,3422,1.792 +10,0,250,500,udp,20ms,3,handel,743,50ms,1000,1,40,140,91.95,6.05E+04,25.8,9577,3.32E+04,2.07E+04,1.36E+07,5119,82,179,132.2,8.70E+04,14.03,1.96E+04,4.20E+04,3.07E+04,2.02E+07,3370,0,0.03562,0.006468,4.256,0.006844,0.2248,0.6025,0.4074,268.1,0.06162,0.481,0.7321,0.593,390.2,0.04712,23,102,48.24,3.17E+04,16.14,4.17,10.09,6.157,4051,1.386,0.4182,18.82,3.89,2560,2.883,5,103,41.17,2.71E+04,15.29,9,85,34.25,2.25E+04,16.75,8,18,13.04,8578,1.836 +10,0,375,750,udp,20ms,4,handel,1114,50ms,1500,1,50,155,100.2,1.04E+05,22.17,1.21E+04,3.97E+04,2.35E+04,2.44E+07,4863,97,219,143.5,1.49E+05,16.91,2.20E+04,5.48E+04,3.46E+04,3.60E+07,5147,0,0.03709,0.007431,7.728,0.006789,0.2872,0.6158,0.4569,474.8,0.06109,0.4965,0.7948,0.6408,666.4,0.05024,27,99,53.05,5.51E+04,17.49,4.174,10.29,6.716,6978,1.57,0.3333,24.54,5.813,6028,3.89,10,111,50.55,5.25E+04,15.75,13,83,38.42,4.00E+04,17.58,9,23,13.63,1.42E+04,1.569 +10,0,500,1000,udp,20ms,5,handel,1485,50ms,2000,1,45,176,112.6,1.39E+05,33.6,1.09E+04,4.33E+04,2.60E+04,3.16E+07,6855,96,217,157.6,1.97E+05,17.42,2.36E+04,5.45E+04,3.80E+04,4.71E+07,4405,0,0.03846,0.007774,9.243,0.007706,0.2933,0.6896,0.4777,558.4,0.07365,0.5108,0.8138,0.6571,785.9,0.05829,20,116,55.05,6.35E+04,19.11,4.273,10.31,6.618,7578,1.527,0.3571,39.78,4.622,5357,3.452,2,130,51.08,5.89E+04,17.92,7,95,39.81,4.73E+04,19.2,8,22,13.98,1.68E+04,1.861 \ No newline at end of file diff --git a/simul/plots/csv/handel_2000_50period_25fail_99thr.csv b/simul/plots/csv/handel_2000_50period_25fail_99thr.csv new file mode 100644 index 0000000..3a4ed1a --- /dev/null +++ b/simul/plots/csv/handel_2000_50period_25fail_99thr.csv @@ -0,0 +1,7 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev,sigs_sigCheckedCt_min,sigs_sigCheckedCt_max,sigs_sigCheckedCt_avg,sigs_sigCheckedCt_sum,sigs_sigCheckedCt_dev,sigs_sigCheckingTime_min,sigs_sigCheckingTime_max,sigs_sigCheckingTime_avg,sigs_sigCheckingTime_sum,sigs_sigCheckingTime_dev,sigs_sigQueueSize_min,sigs_sigQueueSize_max,sigs_sigQueueSize_avg,sigs_sigQueueSize_sum,sigs_sigQueueSize_dev,sigs_sigSuppressed_min,sigs_sigSuppressed_max,sigs_sigSuppressed_avg,sigs_sigSuppressed_sum,sigs_sigSuppressed_dev,store_replaceTrial_min,store_replaceTrial_max,store_replaceTrial_avg,store_replaceTrial_sum,store_replaceTrial_dev,store_successReplace_min,store_successReplace_max,store_successReplace_avg,store_successReplace_sum,store_successReplace_dev +10,0,25,50,udp,50ms,0,handel,75,50ms,100,1,18,57,33.88,2541,6.83,4078,1.08E+04,7657,5.74E+05,1319,31,76,52.55,3941,8.623,5811,1.78E+04,1.20E+04,8.99E+05,2160,0,0.01673,0.00403,0.3022,0.00434,0.1025,0.5064,0.2703,20.27,0.09661,0.3146,0.6868,0.4563,34.22,0.07309,21,49,31.07,2330,7.049,4,9.087,5.309,398.1,1.044,0.3448,10.88,2.402,180.1,2.018,4,41,12.83,962,7.491,9,37,20.47,1535,6.285,7,13,9.947,746,1.659 +10,0,75,150,udp,50ms,1,handel,223,50ms,300,1,18,88,51.52,1.03E+04,13.51,4254,1.86E+04,1.14E+04,2.27E+06,2610,43,120,75.36,1.50E+04,13.76,9781,2.70E+04,1.70E+04,3.38E+06,3207,0,0.02463,0.005341,1.063,0.00529,0.1181,0.4768,0.3104,61.78,0.07712,0.3631,0.6654,0.5037,100.2,0.06471,12,76,35.76,7117,10.12,4.062,8.775,5.477,1090,0.8397,0.3158,12.9,2.122,422.3,1.504,1,53,21.67,4312,9.618,6,62,23.84,4745,9.377,6,18,11.22,2232,1.977 +10,0,125,250,udp,50ms,2,handel,372,50ms,500,1,25,85,58.02,1.75E+04,15.59,5891,1.84E+04,1.30E+04,3.92E+06,3080,62,110,85.99,2.60E+04,6.03,1.40E+04,2.32E+04,1.96E+04,5.93E+06,1289,0,0.02471,0.00537,1.622,0.005481,0.1456,0.437,0.2971,89.71,0.05702,0.4098,0.6308,0.512,154.6,0.04199,21,62,36.13,1.09E+04,9.298,4.115,9,5.489,1658,1.001,0.25,12.64,2.368,715.2,2.116,0,65,22.37,6757,11.82,8,49,24.18,7303,9.898,8,16,11.26,3402,1.6 +10,0,250,500,udp,50ms,3,handel,743,50ms,1000,1,32,118,75.03,4.70E+04,19.09,7785,2.63E+04,1.72E+04,1.08E+07,3868,82,170,108.5,6.81E+04,13.31,1.83E+04,3.28E+04,2.54E+04,1.59E+07,2434,0,0.04461,0.006843,4.291,0.006683,0.2111,0.5674,0.3991,250.3,0.06667,0.4873,0.7351,0.6036,378.5,0.04834,21,88,47.75,2.99E+04,14.63,4.158,9.162,6.019,3774,1.253,0.3226,13.19,3.391,2126,2.555,7,77,36.67,2.30E+04,11.93,9,71,33.53,2.10E+04,14.19,9,20,13.15,8244,1.869 +10,0,375,750,udp,50ms,4,handel,1114,50ms,1500,1,30,126,77.63,7.44E+04,21.51,7248,2.93E+04,1.78E+04,1.70E+07,4377,72,149,112.3,1.07E+05,10.1,1.57E+04,3.52E+04,2.68E+04,2.56E+07,2791,0,0.04094,0.007193,6.863,0.006806,0.155,0.6603,0.3928,375.1,0.07046,0.3931,0.7376,0.5927,566,0.05436,20,119,47.89,4.57E+04,19.66,4.333,10.32,5.777,5517,1.112,0.2826,47,3.744,3572,3.638,4,126,31.54,3.01E+04,14.52,7,65,29.97,2.87E+04,13.6,9,18,13.04,1.25E+04,1.814 +10,0,500,1000,udp,50ms,5,handel,1485,50ms,2000,1,38,160,90.63,1.05E+05,23.48,9575,3.63E+04,2.15E+04,2.46E+07,4935,68,183,124.9,1.47E+05,9.958,1.44E+04,4.13E+04,3.08E+04,3.59E+07,2680,0,0.0342,0.007442,7.837,0.006337,0.276,0.7299,0.488,514.3,0.08124,0.4537,0.8857,0.675,730.4,0.06332,28,122,56.75,5.65E+04,19.59,4.233,10.37,6.7,6633,1.529,0.3243,42.44,4.47,4568,3.301,6,113,46.35,4.66E+04,16.16,13,90,39.16,4.30E+04,16.4,10,22,14.4,1.58E+04,1.771 \ No newline at end of file diff --git a/simul/plots/csv/handel_2000_50timeout_99thr.csv b/simul/plots/csv/handel_2000_50timeout_99thr.csv new file mode 100644 index 0000000..8b5065b --- /dev/null +++ b/simul/plots/csv/handel_2000_50timeout_99thr.csv @@ -0,0 +1,7 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev,sigs_sigCheckedCt_min,sigs_sigCheckedCt_max,sigs_sigCheckedCt_avg,sigs_sigCheckedCt_sum,sigs_sigCheckedCt_dev,sigs_sigCheckingTime_min,sigs_sigCheckingTime_max,sigs_sigCheckingTime_avg,sigs_sigCheckingTime_sum,sigs_sigCheckingTime_dev,sigs_sigQueueSize_min,sigs_sigQueueSize_max,sigs_sigQueueSize_avg,sigs_sigQueueSize_sum,sigs_sigQueueSize_dev,sigs_sigSuppressed_min,sigs_sigSuppressed_max,sigs_sigSuppressed_avg,sigs_sigSuppressed_sum,sigs_sigSuppressed_dev,store_replaceTrial_min,store_replaceTrial_max,store_replaceTrial_avg,store_replaceTrial_sum,store_replaceTrial_dev,store_successReplace_min,store_successReplace_max,store_successReplace_avg,store_successReplace_sum,store_successReplace_dev +10,0,25,50,udp,10ms,0,handel,75,50ms,100,1,22,74,39.69,2977,9.772,4947,1.38E+04,8851,6.64E+05,1839,44,103,63.69,4777,11.57,8900,2.41E+04,1.44E+04,1.08E+06,2850,0,0.01727,0.005022,0.3767,0.005399,0.1169,0.3907,0.2599,19.49,0.08066,0.326,0.5431,0.4272,32.04,0.05477,16,48,30.44,2283,7.155,4.188,8,5.391,404.4,0.9701,0.3667,9.792,3.168,237.6,2.252,4,57,16.48,1236,9.804,8,36,19.56,1467,6.185,7,15,10.05,754,1.8 +10,0,75,150,udp,10ms,1,handel,223,50ms,300,1,26,97,62.81,1.26E+04,14.46,6148,2.24E+04,1.40E+04,2.80E+06,3025,66,161,100.9,2.02E+04,20.67,1.49E+04,3.57E+04,2.29E+04,4.57E+06,4543,0,0.02846,0.005723,1.145,0.005801,0.1426,0.4656,0.32,64.01,0.07309,0.3732,0.6263,0.5015,100.3,0.05391,15,76,38.34,7669,12.91,4.062,8.038,5.477,1095,1.001,0.3529,8.344,2.678,535.7,1.598,1,65,28.11,5621,10.93,7,62,26.38,5276,12.37,7,17,11.19,2238,2.065 +10,0,125,250,udp,10ms,2,handel,372,50ms,500,1,33,122,81.12,2.40E+04,24.14,7699,2.76E+04,1.77E+04,5.25E+06,4601,79,175,124.9,3.70E+04,16.51,1.78E+04,4.20E+04,2.81E+04,8.30E+06,3345,0,0.0375,0.006065,1.795,0.006916,0.1041,0.4481,0.3236,95.78,0.04889,0.4153,0.6284,0.5088,150.6,0.04216,17,72,39.89,1.18E+04,12.5,4.133,8.586,5.573,1650,1.062,0.3478,16.55,2.838,840,2.491,2,84,30.62,9063,13.25,9,59,27.91,8260,13.24,7,15,11.14,3296,1.708 +10,0,250,500,udp,10ms,3,handel,743,50ms,1000,1,46,155,104.6,6.26E+04,28.36,1.11E+04,3.53E+04,2.36E+04,1.41E+07,5673,87,221,149.4,8.92E+04,16.92,2.09E+04,5.52E+04,3.48E+04,2.08E+07,4663,0,0.04384,0.007577,4.508,0.007411,0.2522,0.5664,0.4279,253.8,0.05261,0.4709,0.7458,0.5971,355.9,0.04574,23,107,51.62,3.06E+04,18.88,4.232,10.37,6.065,3584,1.236,0.52,14.92,4.465,2648,2.624,12,107,52.65,3.11E+04,15.55,10,89,38.08,2.26E+04,18.67,9,18,12.56,7472,1.578 +10,0,375,750,udp,10ms,4,handel,1114,50ms,1500,1,57,168,112.9,1.13E+05,25.07,1.40E+04,4.29E+04,2.61E+04,2.61E+07,5207,98,260,162,1.62E+05,23.4,2.22E+04,6.54E+04,3.88E+04,3.87E+07,6492,0,0.03447,0.006651,6.631,0.00703,0.2567,0.6516,0.4789,477.4,0.05883,0.5093,0.7917,0.6387,636.8,0.04882,24,102,55.72,5.56E+04,18.68,4.266,10.06,6.611,6591,1.445,0.3662,22.29,5.865,5847,3.511,6,132,56.3,5.61E+04,17.27,9,86,41.04,4.09E+04,18.64,10,20,13.69,1.37E+04,1.628 +10,0,500,1000,udp,10ms,5,handel,1485,50ms,2000,1,56,193,124.6,1.22E+05,30.66,1.39E+04,4.68E+04,2.92E+04,2.79E+07,6453,95,290,170.9,1.68E+05,22.05,2.34E+04,7.68E+04,4.17E+04,4.03E+07,6408,0,0.03979,0.007238,6.797,0.008069,0.2894,0.7506,0.5259,488,0.06705,0.5371,0.8688,0.6791,640.4,0.0569,30,121,58.94,5.46E+04,20.75,4.308,10.7,7.043,6473,1.631,0.6,31.25,7.441,6853,4.446,20,150,68.37,6.24E+04,18.71,14,107,43.57,4.15E+04,20.78,10,22,14.12,1.35E+04,1.603 \ No newline at end of file diff --git a/simul/plots/csv/handel_2000_failing.csv b/simul/plots/csv/handel_2000_failing.csv new file mode 100644 index 0000000..8ba8e89 --- /dev/null +++ b/simul/plots/csv/handel_2000_failing.csv @@ -0,0 +1,6 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev,sigs_sigCheckedCt_min,sigs_sigCheckedCt_max,sigs_sigCheckedCt_avg,sigs_sigCheckedCt_sum,sigs_sigCheckedCt_dev,sigs_sigCheckingTime_min,sigs_sigCheckingTime_max,sigs_sigCheckingTime_avg,sigs_sigCheckingTime_sum,sigs_sigCheckingTime_dev,sigs_sigQueueSize_min,sigs_sigQueueSize_max,sigs_sigQueueSize_avg,sigs_sigQueueSize_sum,sigs_sigQueueSize_dev,sigs_sigSuppressed_min,sigs_sigSuppressed_max,sigs_sigSuppressed_avg,sigs_sigSuppressed_sum,sigs_sigSuppressed_dev,store_replaceTrial_min,store_replaceTrial_max,store_replaceTrial_avg,store_replaceTrial_sum,store_replaceTrial_dev,store_successReplace_min,store_successReplace_max,store_successReplace_avg,store_successReplace_sum,store_successReplace_dev +10,0,20,1000,udp,10ms,0,handel,1010,50ms,2000,1,5,173,124.3,1.22E+05,16.8,1562,4.06E+04,2.87E+04,2.74E+07,4230,1,212,150.6,1.52E+05,23.71,236,5.02E+04,3.59E+04,3.51E+07,6165,0,0.06013,0.005778,5.166,0.009047,0.06965,0.6234,0.4835,433.7,0.05453,0.06981,0.7187,0.59,543.4,0.04682,4,78,41.82,3.68E+04,6.928,4.4,11.4,7.959,6884,1.417,0.52,212.5,7.63,6738,9.81,4,121,44.14,3.83E+04,20.81,1,63,24.38,2.24E+04,5.907,2,27,16.51,1.52E+04,2.74 +10,0,250,1000,udp,10ms,1,handel,1010,50ms,2000,1,48,163,111.8,1.59E+05,22.72,1.19E+04,3.86E+04,2.62E+04,3.71E+07,5268,7,218,151.7,2.19E+05,23.69,1652,5.50E+04,3.67E+04,5.19E+07,6142,0,0.07871,0.005309,7.066,0.008671,0.1753,0.6574,0.486,645.9,0.06541,0.1754,0.7618,0.5973,813.5,0.04614,23,85,47.33,6.19E+04,10.08,4.382,12.1,7.993,1.05E+04,1.686,0.7,115.9,9.233,1.23E+04,7.225,10,182,46.7,6.10E+04,17.28,11,64,27.92,3.86E+04,9.929,9,27,18.35,2.54E+04,2.67 +10,0,500,1000,udp,10ms,0,handel,1010,50ms,2000,1,42,156,101.4,1.08E+05,26.48,1.05E+04,3.68E+04,2.35E+04,2.47E+07,5623,86,237,153.2,1.68E+05,23.29,1.93E+04,6.08E+04,3.74E+04,3.92E+07,6436,0,0.08001,0.004882,4.75,0.008845,0.2354,0.6462,0.452,432.5,0.06467,0.4804,0.7615,0.5921,595.7,0.0387,23,105,51.6,4.88E+04,14.74,4.182,11.78,6.914,6486,1.748,0.6286,30.64,6.422,6204,4.606,8,123,42.97,4.04E+04,13.68,10,79,33.36,3.31E+04,13.98,9,29,17.09,1.70E+04,2.907 +10,0,750,1000,udp,10ms,3,handel,1010,50ms,2000,1,25,153,95.47,1.16E+05,24.73,6718,3.69E+04,2.27E+04,2.73E+07,5443,3,289,152.7,1.87E+05,26.84,708,7.69E+04,3.78E+04,4.60E+07,7265,0,0.07036,0.004733,5.595,0.008227,0.1113,0.7677,0.4663,544.7,0.07921,0.1114,0.8924,0.6104,722.2,0.04872,19,92,51.24,5.91E+04,13.62,4.219,20.85,7.498,8623,2.212,0.4909,83.21,10.91,1.25E+04,8.487,9,123,43.49,4.98E+04,14.21,7,76,30.47,3.64E+04,12.42,8,31,19.62,2.37E+04,3.268 +10,0,990,1000,udp,10ms,4,handel,1010,50ms,2000,1,34,554,124,1.24E+05,89.79,9454,1.65E+05,3.24E+04,3.24E+07,2.79E+04,15,9448,620.1,6.23E+05,1575,3540,2.81E+06,1.82E+05,1.82E+08,4.82E+05,0,0.8216,0.01821,18,0.06368,0.1974,3.896,0.7649,760.3,0.5406,0.1977,45.43,3.625,3596,9.852,28,433,97.27,9.62E+04,61.31,4.315,22.29,7.661,7584,2.973,0.3415,123.6,22.03,2.18E+04,18,16,392,87.8,8.67E+04,73.99,13,203,61.8,6.14E+04,42.4,14,116,32.83,3.27E+04,16.23 \ No newline at end of file diff --git a/simul/plots/csv/handel_4000_real.csv b/simul/plots/csv/handel_4000_real.csv new file mode 100644 index 0000000..d6453c0 --- /dev/null +++ b/simul/plots/csv/handel_4000_real.csv @@ -0,0 +1,9 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev,sigs_sigCheckedCt_min,sigs_sigCheckedCt_max,sigs_sigCheckedCt_avg,sigs_sigCheckedCt_sum,sigs_sigCheckedCt_dev,sigs_sigCheckingTime_min,sigs_sigCheckingTime_max,sigs_sigCheckingTime_avg,sigs_sigCheckingTime_sum,sigs_sigCheckingTime_dev,sigs_sigQueueSize_min,sigs_sigQueueSize_max,sigs_sigQueueSize_avg,sigs_sigQueueSize_sum,sigs_sigQueueSize_dev,sigs_sigSuppressed_min,sigs_sigSuppressed_max,sigs_sigSuppressed_avg,sigs_sigSuppressed_sum,sigs_sigSuppressed_dev,store_replaceTrial_min,store_replaceTrial_max,store_replaceTrial_avg,store_replaceTrial_sum,store_replaceTrial_dev,store_successReplace_min,store_successReplace_max,store_successReplace_avg,store_successReplace_sum,store_successReplace_dev +10,0,25,100,udp,50ms,0,handel,66,50ms,100,1,8,43,27.72,2079,8.556,1672,9429,5858,4.39E+05,1772,15,71,48.08,3606,9.526,3242,1.51E+04,1.05E+04,7.84E+05,2057,0,0.01752,0.003791,0.2843,0.004527,0.03397,0.1424,0.07938,5.954,0.02152,0.1318,0.3971,0.3107,23.3,0.06631,6,28,14.29,1072,4.023,4.071,5.176,4.831,362.3,0.2713,0.3333,7.643,1.322,99.14,1.39,0,30,3.413,256,5.716,2,19,6.693,502,2.968,4,11,7.387,554,1.413 +10,0,75,300,udp,50ms,1,handel,198,50ms,300,1,35,89,54.07,1.03E+04,11.14,7700,2.06E+04,1.16E+04,2.21E+06,2662,42,104,74.55,1.42E+04,13.25,9210,2.32E+04,1.62E+04,3.08E+06,2851,0,0.03079,0.004331,0.8229,0.004856,0.04965,0.2017,0.1159,22.03,0.02865,0.3559,0.5039,0.421,80,0.03437,8,40,20.41,3878,5.525,4.182,5.389,4.841,919.8,0.2094,0.25,13.36,1.639,311.3,1.761,0,58,12.57,2388,8.644,2,27,10.25,1948,4.448,5,13,9.742,1851,1.578 +10,0,125,500,udp,50ms,2,handel,330,50ms,500,1,4,99,69.93,2.55E+04,14.68,907,2.28E+04,1.49E+04,5.44E+06,3161,3,125,84.28,3.08E+04,17.32,708,2.72E+04,1.83E+04,6.70E+06,3757,0,0.03228,0.004148,1.514,0.004884,0.03107,0.1931,0.1194,43.58,0.02327,0.11,0.5012,0.4213,153.8,0.0565,7,35,20.47,7472,4.379,4.174,5.444,4.95,1807,0.238,0.3478,92.2,2.471,901.7,5.161,0,104,12.25,4471,11.57,2,23,10.41,3798,3.451,3,14,9.751,3559,1.46 +10,0,250,1000,udp,50ms,3,handel,660,50ms,1000,1,11,118,87.76,5.96E+04,11.74,2572,2.71E+04,1.88E+04,1.27E+07,2770,75,146,106.8,7.23E+04,11.62,1.47E+04,3.36E+04,2.36E+04,1.60E+07,2858,0,0.02711,0.005206,3.493,0.005306,0.07396,0.2892,0.1527,102.9,0.03583,0.4255,0.5979,0.5032,340.2,0.03566,13,52,25.9,1.74E+04,6.829,4.158,5.423,4.904,3271,0.2227,0.2632,17.28,1.778,1187,1.669,0,78,19.01,1.28E+04,11.06,4,35,13.23,8919,5.825,4,19,11.8,7966,1.93 +10,0,375,1500,udp,50ms,4,handel,990,50ms,1500,1,30,139,98.05,6.48E+04,13.93,7637,3.12E+04,2.13E+04,1.40E+07,3071,77,193,119.2,8.20E+04,19.24,1.61E+04,4.44E+04,2.70E+04,1.79E+07,4794,0,0.03591,0.004485,2.911,0.005169,0.06666,0.4528,0.1944,122.9,0.0475,0.414,0.7268,0.55,352,0.04049,10,63,32.69,2.00E+04,8.579,4.242,12.97,5.031,3074,0.377,0.225,27,1.335,817.1,1.591,0,107,19.88,1.22E+04,14.02,4,49,18.5,1.17E+04,8.071,5,24,13.2,8499,2.876 +10,0,500,2000,udp,50ms,5,handel,1320,50ms,2000,1,23,143,104.5,1.22E+05,12.86,5801,3.05E+04,2.30E+04,2.69E+07,2893,15,187,126.4,1.52E+05,18.82,3540,4.45E+04,2.92E+04,3.44E+07,4866,0,0.03704,0.004672,5.219,0.005316,0.08852,0.349,0.2173,239.3,0.04412,0.1507,0.7617,0.548,624.8,0.04405,16,61,36.68,4.00E+04,8.135,4.208,5.483,5.041,5479,0.1933,0.2424,133,1.404,1531,4.125,0,144,21.32,2.30E+04,14.13,5,46,21.25,2.44E+04,7.867,7,24,14.76,1.70E+04,2.813 +10,0,750,2000,udp,50ms,6,handel,1980,50ms,3000,1,26,179,99.54,1.70E+05,33.34,7621,4.31E+04,2.40E+04,4.08E+07,7516,15,228,141.6,2.48E+05,25.67,2602,5.85E+04,3.63E+04,6.19E+07,6872,0,0.04974,0.007015,11.31,0.006683,0.1906,0.8446,0.4264,689.5,0.1004,0.1919,0.9971,0.6345,1046,0.0682,31,125,62.64,1.00E+05,14.05,4.102,12.61,6.079,9733,1.835,0.2712,116.7,3.757,6031,5.021,7,136,40.8,6.50E+04,14.47,16,98,41.5,6.80E+04,13.14,11,34,19.52,3.19E+04,3.52 +10,0,1000,2000,udp,50ms,7,handel,2640,50ms,4000,1,44,176,108.3,1.72E+05,32.5,1.14E+04,4.39E+04,2.72E+04,4.22E+07,7484,106,230,151.9,2.47E+05,21.09,2.26E+04,6.03E+04,4.04E+04,6.29E+07,5517,0,0.05406,0.009185,13.43,0.007923,0.3259,0.9119,0.5605,804.4,0.0939,0.5734,1.059,0.7123,1040,0.06646,29,130,61.23,8.70E+04,17.74,4.397,12.65,7.733,1.06E+04,2.102,0.4146,64.24,7.835,1.13E+04,5.717,11,135,46.96,6.59E+04,17.48,12,99,36.98,5.54E+04,14.37,13,38,21.68,3.23E+04,4.251 \ No newline at end of file diff --git a/simul/plots/csv/libp2p_2000_51thr_agg1.csv b/simul/plots/csv/libp2p_2000_51thr_agg1.csv new file mode 100644 index 0000000..6865175 --- /dev/null +++ b/simul/plots/csv/libp2p_2000_51thr_agg1.csv @@ -0,0 +1,7 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev +10,0,0,50,udp,10ms,0,p2p/libp2p,51,50ms,100,1,0,0,0,0,0,1.07E+04,1.48E+04,1.24E+04,1.24E+06,1047,0,0,0,0,0,231,1.20E+05,1.30E+04,1.30E+06,2.06E+04,0,0.01287,0.002485,0.2485,0.003601,0.01055,0.06465,0.03495,3.495,0.01506,0.3015,0.6447,0.4865,48.65,0.07735 +10,0,0,150,udp,10ms,1,p2p/libp2p,153,50ms,300,1,0,0,0,0,0,3.67E+04,6.80E+04,5.40E+04,1.53E+07,6991,0,0,0,0,0,462,4.91E+05,5.49E+04,1.55E+07,7.72E+04,0,0.1121,0.01015,2.874,0.0127,0.02576,0.2068,0.09345,26.45,0.04436,0.5233,1.584,0.9517,269.3,0.2979 +10,0,0,250,udp,10ms,2,p2p/libp2p,255,50ms,500,1,0,0,0,0,0,6.48E+04,1.92E+05,1.10E+05,5.50E+07,2.86E+04,0,0,0,0,0,470,8.72E+05,1.12E+05,5.56E+07,1.31E+05,0,0.267,0.02736,13.62,0.03339,0.04589,0.5372,0.1845,91.9,0.1168,0.5464,2.893,1.384,689.4,0.6711 +10,0,0,500,udp,10ms,3,p2p/libp2p,510,50ms,1000,1,0,0,0,0,0,8192,6.48E+05,3.69E+05,3.69E+08,1.05E+05,0,0,0,0,0,235,3.13E+06,3.72E+05,3.72E+08,4.52E+05,0,0.761,0.08707,87.07,0.08885,0.1323,1.684,0.5095,509.5,0.3116,0.2939,5.549,2.75,2750,1.232 +10,0,0,750,udp,10ms,4,p2p/libp2p,765,50ms,1500,1,0,0,0,0,0,8192,1.17E+06,6.90E+05,8.22E+08,1.63E+05,0,0,0,0,0,236,6.81E+06,6.94E+05,8.26E+08,1.03E+06,0,0.9027,0.1284,152.8,0.1125,0.2492,2.252,0.7327,871.9,0.3818,0.2847,6.688,3.357,3995,1.235 +10,0,0,1000,udp,10ms,5,p2p/libp2p,1020,50ms,2000,1,0,0,0,0,0,4.62E+05,2.55E+06,1.76E+06,2.49E+09,3.41E+05,0,0,0,0,0,705,1.80E+07,1.76E+06,2.49E+09,2.59E+06,0.00546,1.348,0.2984,423.1,0.1697,0.6356,3.752,1.732,2455,0.5143,1.232,9.049,5.484,7777,1.36 \ No newline at end of file diff --git a/simul/plots/csv/n2_4000_51thr.csv b/simul/plots/csv/n2_4000_51thr.csv new file mode 100644 index 0000000..065ecfd --- /dev/null +++ b/simul/plots/csv/n2_4000_51thr.csv @@ -0,0 +1,10 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev +10,0,0,50,udp,10ms,0,p2p/udp,51,50ms,100,1,33,100,59.11,5911,13.38,5521,1.67E+04,9889,9.89E+05,2239,100,100,100,1.00E+04,0,1.65E+04,1.68E+04,1.67E+04,1.67E+06,53.6,0,0.02326,0.008637,0.8637,0.004363,0.004273,0.05741,0.02523,2.523,0.01101,0.02887,0.1278,0.09661,9.661,0.02312 +10,0,0,150,udp,10ms,1,p2p/udp,153,50ms,300,1,120,297,171.3,4.11E+04,34.32,2.02E+04,5.00E+04,2.88E+04,6.92E+06,5780,300,300,300,7.20E+04,0,4.78E+04,5.07E+04,5.05E+04,1.21E+07,283.6,0.005255,0.04458,0.02337,5.609,0.007514,0.02236,0.0918,0.05075,12.18,0.01661,0.05182,0.1589,0.1108,26.59,0.02031 +10,0,0,250,udp,10ms,2,p2p/udp,255,50ms,500,1,0,493,282.1,8.80E+04,50.21,0,8.31E+04,4.76E+04,1.48E+07,8468,500,1000,504.8,1.58E+05,48.87,3.04E+04,1.69E+05,8.49E+04,2.65E+07,9014,0.00774,0.06424,0.03099,9.67,0.01101,0.02362,0.1552,0.0766,23.9,0.02361,0.03891,0.5775,0.1321,41.23,0.05017 +10,0,0,500,udp,10ms,3,p2p/udp,510,50ms,1000,1,0,845,560.6,2.83E+05,84.02,0,1.43E+05,9.47E+04,4.77E+07,1.43E+04,1000,2000,1048,5.28E+05,213.2,3.82E+04,3.38E+05,1.75E+05,8.84E+07,3.63E+04,0.01035,0.1345,0.05607,28.26,0.01629,0.0165,0.2737,0.1408,70.98,0.03713,0.03475,0.8975,0.2164,109.1,0.1038 +10,0,0,750,udp,10ms,4,p2p/udp,765,50ms,1500,1,0,1604,809.2,4.13E+05,100.1,0,2.71E+05,1.37E+05,6.97E+07,1.69E+04,1500,4500,1718,8.76E+05,537.1,4.16E+04,7.61E+05,2.84E+05,1.45E+08,8.48E+04,0.02287,0.221,0.08072,41.17,0.0298,0.03248,0.4444,0.2,102,0.05421,0.05583,1.39,0.3196,163,0.1522 +10,0,0,1000,udp,10ms,5,p2p/udp,1020,50ms,2000,1,0,2274,1074,5.50E+05,132.5,0,3.84E+05,1.82E+05,9.29E+07,2.24E+04,2000,8000,2422,1.24E+06,890.1,1.08E+05,1.35E+06,4.01E+05,2.05E+08,1.40E+05,0.0287,0.3812,0.1128,57.75,0.04274,0.0458,0.7932,0.2683,137.4,0.07699,0.07508,1.853,0.4222,216.1,0.1794 +10,0,0,1250,udp,10ms,6,p2p/udp,1275,50ms,2500,1,111,1830,1350,6.80E+05,200.4,1.88E+04,3.09E+05,2.28E+05,1.15E+08,3.39E+04,2500,5000,3244,1.64E+06,1144,7.64E+04,8.45E+05,5.27E+05,2.66E+08,1.81E+05,0.02512,0.3116,0.1454,73.28,0.05258,0.05483,0.5666,0.3399,171.3,0.09598,0.09165,0.932,0.5115,257.8,0.1658 +10,0,0,1500,udp,10ms,7,p2p/udp,1530,50ms,3000,1,0,2547,1651,8.52E+05,247.1,0,4.30E+05,2.79E+05,1.44E+08,4.26E+04,3000,6000,4506,2.33E+06,1501,3.96E+04,1.01E+06,6.54E+05,3.38E+08,1.94E+05,0.03079,0.3593,0.1755,90.58,0.05818,0.04968,0.7129,0.4173,215.3,0.1056,0.08087,0.9814,0.6048,312.1,0.1594 +10,0,0,2000,udp,10ms,8,p2p/udp,2040,50ms,4000,1,0,3288,2385,2.54E+06,315.7,0,5.56E+05,4.03E+05,4.28E+08,5.34E+04,4000,1.20E+04,8938,9.49E+06,1975,4.39E+04,2.03E+06,1.23E+06,1.31E+09,2.66E+05,0.02354,0.5643,0.3177,338.1,0.08458,0.05251,1.047,0.6715,714.5,0.1398,0.07643,1.54,0.9997,1063,0.2102 \ No newline at end of file diff --git a/simul/plots/csv/n2_4000_75thr.csv b/simul/plots/csv/n2_4000_75thr.csv new file mode 100644 index 0000000..7c41a94 --- /dev/null +++ b/simul/plots/csv/n2_4000_75thr.csv @@ -0,0 +1,10 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev +10,0,0,50,udp,10ms,0,p2p/udp,75,50ms,100,1,56,100,77.52,7752,7.956,9373,1.67E+04,1.30E+04,1.30E+06,1331,100,100,100,1.00E+04,0,1.65E+04,1.68E+04,1.67E+04,1.67E+06,53.6,0,0.02473,0.01055,1.055,0.006184,0.001453,0.06045,0.02982,2.982,0.01422,0.03792,0.1869,0.127,12.7,0.03536 +10,0,0,150,udp,10ms,1,p2p/udp,225,50ms,300,1,183,393,238.5,5.72E+04,28.01,3.08E+04,6.62E+04,4.01E+04,9.63E+06,4719,300,600,307.5,7.38E+04,46.94,5.01E+04,1.01E+05,5.18E+04,1.24E+07,7867,0.006707,0.06566,0.02532,6.076,0.008773,0.02649,0.1322,0.06047,14.51,0.01865,0.06344,0.5632,0.1581,37.94,0.07483 +10,0,0,250,udp,10ms,2,p2p/udp,375,50ms,500,1,1,593,390.8,1.18E+05,49.15,0,1.00E+05,6.59E+04,1.99E+07,8345,500,1500,514.9,1.56E+05,94.41,5.27E+04,2.52E+05,8.68E+04,2.62E+07,1.60E+04,0.009396,0.0729,0.03333,10.07,0.01143,0.01763,0.196,0.09349,28.23,0.02519,0.05621,1.055,0.1788,53.99,0.08977 +10,0,0,500,udp,10ms,3,p2p/udp,750,50ms,1000,1,243,1387,817.6,4.15E+05,127.2,4.10E+04,2.34E+05,1.38E+05,7.01E+07,2.15E+04,1000,3000,1303,6.62E+05,524.2,9.77E+04,5.07E+05,2.18E+05,1.11E+08,8.57E+04,0.01883,0.192,0.06913,35.12,0.02911,0.04579,0.4058,0.1879,95.43,0.05508,0.1071,1.244,0.3674,186.6,0.2396 +10,0,0,750,udp,10ms,4,p2p/udp,1125,50ms,1500,1,167,1969,1318,6.64E+05,258.6,0,3.33E+05,2.23E+05,1.12E+08,4.39E+04,1500,6000,2402,1.21E+06,1183,3.33E+04,1.01E+06,4.01E+05,2.02E+08,1.96E+05,0.004179,0.3052,0.1146,57.74,0.05794,0.0653,0.5902,0.3039,153.2,0.1082,0.06973,1.665,0.576,290.3,0.3515 +10,0,0,1000,udp,10ms,5,p2p/udp,1500,50ms,2000,1,0,2544,1805,9.46E+05,335.2,0,4.30E+05,3.05E+05,1.60E+08,5.98E+04,2000,6000,3336,1.75E+06,1355,3.23E+04,1.01E+06,5.53E+05,2.90E+08,2.25E+05,0.002717,0.3498,0.1597,83.7,0.0692,0.04384,0.7695,0.4141,217,0.1339,0.04824,1.309,0.6756,354,0.2785 +10,0,0,1250,udp,10ms,6,p2p/udp,1875,50ms,2500,1,0,3531,2365,1.34E+06,495.9,0,5.96E+05,3.99E+05,2.26E+08,8.57E+04,2500,1.00E+04,5150,2.92E+06,1852,3.19E+04,1.69E+06,8.09E+05,4.58E+08,3.23E+05,0.003484,0.516,0.2273,128.6,0.09581,0.05468,1.09,0.5593,316,0.1905,0.05837,1.765,0.8591,486.3,0.322 +10,0,0,1500,udp,10ms,7,p2p/udp,2250,50ms,3000,1,0,4260,2979,1.52E+06,637,0,7.20E+05,5.04E+05,2.57E+08,1.08E+05,3000,1.20E+04,7394,3.77E+06,1903,4.46E+04,2.03E+06,1.16E+06,5.90E+08,3.65E+05,0.02952,0.6172,0.3146,160.5,0.1057,0.0769,1.278,0.7346,374.7,0.2255,0.1069,1.871,1.078,549.8,0.3327 +10,0,0,2000,udp,10ms,8,p2p/udp,3000,50ms,4000,1,0,5496,4669,4.71E+06,480.8,0,9.29E+05,7.89E+05,7.95E+08,8.12E+04,4000,2.00E+04,1.52E+04,1.53E+07,2424,9.70E+04,3.21E+06,2.24E+06,2.26E+09,3.46E+05,0.02265,0.9498,0.5754,579.4,0.1188,0.06684,1.755,1.238,1248,0.1877,0.08994,3.742,1.835,1850,0.2951 \ No newline at end of file diff --git a/simul/plots/csv/n2_4000_99thr.csv b/simul/plots/csv/n2_4000_99thr.csv new file mode 100644 index 0000000..647f872 --- /dev/null +++ b/simul/plots/csv/n2_4000_99thr.csv @@ -0,0 +1,10 @@ +NodeCount,UnsafeSleepTimeOnSigVerify,failing,nbOfInstances,network,period,run,simulation,threshold,timeout,totalNbOfNodes,updateCount,net_rcvd_min,net_rcvd_max,net_rcvd_avg,net_rcvd_sum,net_rcvd_dev,net_rcvdBytes_min,net_rcvdBytes_max,net_rcvdBytes_avg,net_rcvdBytes_sum,net_rcvdBytes_dev,net_sent_min,net_sent_max,net_sent_avg,net_sent_sum,net_sent_dev,net_sentBytes_min,net_sentBytes_max,net_sentBytes_avg,net_sentBytes_sum,net_sentBytes_dev,sigen_system_min,sigen_system_max,sigen_system_avg,sigen_system_sum,sigen_system_dev,sigen_user_min,sigen_user_max,sigen_user_avg,sigen_user_sum,sigen_user_dev,sigen_wall_min,sigen_wall_max,sigen_wall_avg,sigen_wall_sum,sigen_wall_dev +10,0,0,50,udp,10ms,0,p2p/udp,99,50ms,100,1,79,100,98.12,9812,3.663,1.32E+04,1.67E+04,1.64E+04,1.64E+06,611.4,100,100,100,1.00E+04,0,1.65E+04,1.68E+04,1.67E+04,1.67E+06,53.6,0,0.02874,0.01099,1.099,0.007111,0.008231,0.04938,0.03142,3.142,0.009485,0.08268,0.2031,0.1576,15.76,0.03358 +10,0,0,150,udp,10ms,1,p2p/udp,297,50ms,300,1,253,1837,325.7,7.88E+04,123.8,4.27E+04,3.10E+05,5.48E+04,1.33E+07,2.09E+04,300,2700,350.8,8.49E+04,195.2,5.01E+04,4.54E+05,5.91E+04,1.43E+07,3.27E+04,0.003531,0.1425,0.02837,6.867,0.0127,0.03773,0.419,0.07643,18.5,0.03209,0.1085,4.049,0.2496,60.41,0.2992 +10,0,0,250,udp,10ms,2,p2p/udp,495,50ms,500,1,0,7777,911.2,2.83E+05,1295,0,1.31E+06,1.54E+05,4.76E+07,2.18E+05,500,1.25E+04,1103,3.42E+05,1786,5.31E+04,2.06E+06,1.85E+05,5.74E+07,2.99E+05,0.005534,0.626,0.06983,21.65,0.1012,0.03454,1.764,0.1934,59.95,0.2677,0.04466,12.05,0.7879,244.3,1.75 +10,0,0,500,udp,10ms,3,p2p/udp,990,50ms,1000,1,0,3.52E+04,3015,1.52E+06,3785,0,5.94E+06,5.09E+05,2.57E+08,6.39E+05,1000,4.90E+04,4560,2.30E+06,6173,5.00E+04,8.23E+06,7.63E+05,3.85E+08,1.03E+06,0.01995,2.309,0.2379,119.9,0.306,0.04891,7.083,0.6232,314.1,0.8372,0.06948,24.1,1.98,998.2,3.044 +10,0,0,750,udp,10ms,4,p2p/udp,1485,50ms,1500,1,0,4.81E+04,4431,2.24E+06,2861,0,8.12E+06,7.49E+05,3.78E+08,4.83E+05,1500,7.50E+04,7545,3.81E+06,5900,3.52E+04,1.26E+07,1.27E+06,6.39E+08,9.91E+05,0.03521,3.559,0.3729,188.3,0.2824,0.03674,11.05,0.9456,477.5,0.7086,0.1014,37.08,2.299,1161,2.258 +10,0,0,1000,udp,10ms,5,p2p/udp,1980,50ms,2000,1,0,1.56E+04,6739,3.43E+06,2801,0,2.64E+06,1.14E+06,5.80E+08,4.72E+05,2000,4.40E+04,1.30E+04,6.62E+06,7214,4.36E+04,7.23E+06,2.17E+06,1.10E+09,1.23E+06,0.03411,1.886,0.6253,318.3,0.3585,0.075,4.272,1.51,768.4,0.784,0.1143,10.61,3.005,1530,1.798 +10,0,0,1250,udp,10ms,6,p2p/udp,2475,50ms,2500,1,0,1.81E+04,8764,4.98E+06,2850,0,3.05E+06,1.48E+06,8.41E+08,4.81E+05,2500,4.50E+04,1.79E+04,1.02E+07,8700,5.29E+04,7.61E+06,2.97E+06,1.69E+09,1.47E+06,0.006627,2.33,0.8296,471.2,0.4232,0.06164,4.348,2.019,1147,0.9411,0.06855,8.809,3.386,1923,1.723 +10,0,0,1500,udp,10ms,7,p2p/udp,2970,50ms,3000,1,20,1.82E+04,1.13E+04,5.76E+06,2048,0,3.07E+06,1.91E+06,9.73E+08,3.48E+05,3000,4.20E+04,2.32E+04,1.18E+07,8405,4.24E+04,7.10E+06,3.84E+06,1.96E+09,1.45E+06,0.02508,2.063,1.023,522.7,0.4129,0.13,4.52,2.531,1294,0.9334,0.156,6.926,3.722,1902,1.415 +10,0,0,2000,udp,10ms,8,p2p/udp,3960,50ms,4000,1,5927,1.99E+04,1.67E+04,1.68E+07,1111,9.76E+05,3.37E+06,2.82E+06,2.85E+09,1.88E+05,1.60E+04,6.00E+04,4.68E+04,4.72E+07,5025,2.39E+06,9.94E+06,7.57E+06,7.65E+09,8.12E+05,0.6009,2.589,1.91,1929,0.3392,1.457,5.033,4.113,4158,0.3869,2.108,9.909,6.098,6165,0.7011 \ No newline at end of file diff --git a/simul/plots/failing_network.png b/simul/plots/failing_network.png new file mode 100644 index 0000000..284b43d Binary files /dev/null and b/simul/plots/failing_network.png differ diff --git a/simul/plots/failing_network.py b/simul/plots/failing_network.py new file mode 100755 index 0000000..8e08769 --- /dev/null +++ b/simul/plots/failing_network.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +## This script generate the graphs that compares handel signature +## generation with different number of failing nodes for a fixed +## number of total nodes, and a fixed threshold 51% +## +import sys +from lib import * + +import pandas as pd +import matplotlib.pyplot as plt + +netColumn = "net_sentBytes_avg" +nodeColumn = "totalNbOfNodes" +failingColumn = "failing" + +## threshold of signatures required +threshold = "51" +expectedNodes = 4000 +nodes = None + +files = {"csv/handel_4000_failing.csv": "handel"} +datas = read_datafiles(files) + +for f,v in datas.items(): + nodes = v[nodeColumn].max() # should be 2000 + if int(v[nodeColumn].mean()) != expectedNodes: + print("error : nodes should be " + str(expectedNodes)) + sys.exit(1) + + x = v[failingColumn].map(lambda x: int((x/nodes) * 100)) + y = v[netColumn].map(lambda x: x/1024) + print("file %s -> %d data points on %s" % (f,len(y),netColumn)) + label = files[f] + if label == "": + label = input("Label for file %s: " % f) + + plot(x,y,"-",label,allColors.popleft()) + +plt.legend(fontsize=fs_label) +plt.ylabel("KBytes ",fontsize=fs_label) +plt.xlabel("failing nodes in %",fontsize=fs_label) +# plt.yscale('log') +# plt.title("Outgoing network consumption for 51% signature threshold over 4000 nodes") +plt.show() diff --git a/simul/plots/failing_time.png b/simul/plots/failing_time.png new file mode 100644 index 0000000..99fa8fd Binary files /dev/null and b/simul/plots/failing_time.png differ diff --git a/simul/plots/failing_time.py b/simul/plots/failing_time.py new file mode 100755 index 0000000..1fde12e --- /dev/null +++ b/simul/plots/failing_time.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python + +## This script generate the graphs that compares handel signature +## generation with different number of failing nodes for a fixed +## number of total nodes, and a fixed threshold 51% +## +import sys +from lib import * + +import pandas as pd +import matplotlib.pyplot as plt + +sigColumn = "sigen_wall_avg" +nodeColumn = "totalNbOfNodes" +failingColumn = "failing" + +yColumns = {"sigen_wall_min": "Minimum", + "sigen_wall_avg": "Average", + "sigen_wall_max": "Maximum"} + + +## threshold of signatures required +threshold = "51" +expectedNodes = 4000 +nodes = None + +files = {"csv/handel_4000_failing.csv": "handel"} +datas = read_datafiles(files) + +for f,v in datas.items(): + nodes = v[nodeColumn].max() # should be 2000 + if int(v[nodeColumn].mean()) != expectedNodes: + print("error : nodes should be " + str(expectedNodes)) + sys.exit(1) + + x = v[failingColumn].map(lambda x: int((x/nodes) * 100)) + for c,name in yColumns.items(): + y = v[c] + print("file %s -> %d data points on %s" % (f,len(y),sigColumn)) + # label = files[f] + label = name + if label == "": + label = input("Label for file %s: " % f) + + plot(x,y,"-",label,allColors.popleft()) + +plt.legend(fontsize=18) +plt.ylabel("signature generation (ms)",fontsize=fs_label) +plt.xlabel("failing nodes in %",fontsize=fs_label) +# plt.yscale('log') +# plt.title("Time for 51% signature threshold over 4000 nodes") +# plt.axis('square') +plt.show() diff --git a/simul/plots/handel_reallike.png b/simul/plots/handel_reallike.png new file mode 100644 index 0000000..5be1e51 Binary files /dev/null and b/simul/plots/handel_reallike.png differ diff --git a/simul/plots/install.sh b/simul/plots/install.sh new file mode 100755 index 0000000..261165b --- /dev/null +++ b/simul/plots/install.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + + +## REQUIREMENTS: +## python3, conda +## +## This script setups the python environment for the plots using conda +## It setups a "handel" envorionement, switch to it and install the required +## libraries + +conda create --name handel +conda activate handel +## install the local conda version of pip +conda install --yes pip +pip install -r requirements.txt diff --git a/simul/plots/lib.py b/simul/plots/lib.py new file mode 100644 index 0000000..a1ff4f8 --- /dev/null +++ b/simul/plots/lib.py @@ -0,0 +1,58 @@ +import matplotlib.pyplot as plt +from numpy import genfromtxt +import pandas as pd +import os +import sys +from collections import deque + +destination = "../figures/" +show = True + +os.environ["LC_ALL"] = "en_US.UTF-8" +os.environ["LANG"] = "en_US.UTF-8" + +green = ["#557555", "#C5E1C5", "s", 10] +yellow = ["#8f8a5a", "#fffaca", "v", 11] +red = ["#8f5252", "#ffc2c2", "D", 9] +purple = ["#52528f", "#c2c2ff", "o", 10] + +allColors = deque([green,red,purple,yellow]) + +fs_label = 22 +fs_axis = 18 + +ax = plt.subplot() +for label in (ax.get_xticklabels() + ax.get_yticklabels()): + label.set_fontsize(fs_axis) + +def plot(x, y, linestyle, label, color): + plt.plot(x,y,linestyle,label= label, color=color[0], mfc=color[1], + marker=color[2], markersize=color[3]) + +def save(name): + plt.savefig(destination + name, format='eps', dpi=1000) + if show: + plt.show() + +def save_pdf(name): + plt.savefig(destination + name, format='pdf', bbox_inches='tight', dpi=1000) + if show: + plt.show() + +def read_datafiles(files): + if len(files) < 1: + print("expect csv file arguments") + sys.exit(1) + + # datas will contain all data to read organized by + # filename : + datas = {} + for fileName in files: + datas[fileName] = pd.read_csv(fileName) + print("read %s : %d columns" % (fileName, len(datas[fileName].columns))) + + return datas + +if len(sys.argv) > 1 and sys.argv[1] == "noshow": + show = False + diff --git a/simul/plots/period_network.png b/simul/plots/period_network.png new file mode 100644 index 0000000..6baa817 Binary files /dev/null and b/simul/plots/period_network.png differ diff --git a/simul/plots/period_network.py b/simul/plots/period_network.py new file mode 100755 index 0000000..62f4eb9 --- /dev/null +++ b/simul/plots/period_network.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +## This script generate the graphs that compares handel bandwidth consumption with different periods +## +import sys +from lib import * + +import pandas as pd +import matplotlib.pyplot as plt + +column = "net_sentBytes_avg" + +files = {} +for p in [10,20,50,100]: + f = "csv/handel_2000_%dperiod_25fail_99thr.csv" % p + files[f] = "%dms period" % p + +datas = read_datafiles(files) + + +for f,v in datas.items(): + x = v["totalNbOfNodes"] + y = v[column].map(lambda x: x/1024) + print("file %s -> %d data points on %s" % (f,len(y),column)) + label = files[f] + if label == "": + label = input("Label for file %s: " % f) + + plot(x,y,"-",label,allColors.popleft()) + +plt.legend(fontsize=fs_label) +plt.ylabel("KBytes",fontsize=fs_label) +plt.xlabel("nodes",fontsize=fs_label) +plt.title("Outgoing network consumption with various periods",fontsize=fs_label) +# plt.yscale('log') +plt.show() diff --git a/simul/plots/period_time.png b/simul/plots/period_time.png new file mode 100644 index 0000000..6f8bd1a Binary files /dev/null and b/simul/plots/period_time.png differ diff --git a/simul/plots/period_time.py b/simul/plots/period_time.py new file mode 100755 index 0000000..22e3894 --- /dev/null +++ b/simul/plots/period_time.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +## This script generate the graphs that compares handel signature generation with different periods +## +import sys +from lib import * + +import pandas as pd +import matplotlib.pyplot as plt + +column = "sigen_wall_avg" + +files = {} +for p in [10,20,50,100]: + f = "csv/handel_2000_%dperiod_25fail_99thr.csv" % p + files[f] = "%dms period" % p + +datas = read_datafiles(files) + + +for f,v in datas.items(): + x = v["totalNbOfNodes"] + y = v[column].map(lambda x: x * 1000) + print("file %s -> %d data points on %s" % (f,len(y),column)) + label = files[f] + if label == "": + label = input("Label for file %s: " % f) + + plot(x,y,"-",label,allColors.popleft()) + +plt.legend(fontsize=fs_label) +plt.ylabel("signature generation",fontsize=fs_label) +plt.xlabel("nodes",fontsize=fs_label) +plt.title("Signature generation time with various periods",fontsize=fs_label) +# plt.yscale('log') +plt.show() diff --git a/simul/plots/reallike.py b/simul/plots/reallike.py new file mode 100755 index 0000000..03356ea --- /dev/null +++ b/simul/plots/reallike.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python + +## This script generate the graphs that shows performance of handel on +## a "real like" situation +## +import sys +from lib import * + +import pandas as pd +import matplotlib.pyplot as plt +import numpy as np + +# columns = {""average", + # "sigs_sigCheckedCt_min": "minimum", + # "sigs_sigCheckedCt_max": "maximum"} +column = "sigen_wall_avg" +#column = "net_sentBytes_avg" +# column = "sigs_sigCheckedCt_min" +# column = "sigs_sigQueueSize_avg" +# files = {"csv/handel_4000_real.csv"} +files = {"csv/handel_4000_real_2019.csv"} + +datas = read_datafiles(files) + +for f,v in datas.items(): + x = v["totalNbOfNodes"] + y = v[column].map(lambda x: x*1000) + print("file %s -> %d data points on %s" % (f,len(y),column)) + # label = files[c] + label = "handel" + if label == "": + label = input("Label for file %s: " % f) + + # plot(y,y,"-",label,allColors.popleft()) + plot(x,y,"-",label,allColors.popleft()) + +# x = np.arange(0., 4000., 500) +# unit = 425 # for 500 +# y = np.arange(0., unit * 4000 / 500, unit) +# plot(x,y,"-","linear",allColors.popleft()) + +plt.legend(fontsize=fs_label) +plt.ylabel("signature generation (ms)",fontsize=fs_label) +# plt.ylabel("sig queue size",fontsize=fs_label) +plt.xlabel("nodes",fontsize=fs_label) +plt.title("Handel: 75% threshold signature with 25% failings",fontsize=fs_label) +# plt.yscale('log') +plt.show() diff --git a/simul/plots/requirements.txt b/simul/plots/requirements.txt new file mode 100644 index 0000000..1a8987e --- /dev/null +++ b/simul/plots/requirements.txt @@ -0,0 +1,3 @@ +matplotlib +pandas +scipy diff --git a/simul/plots/sigchecked.py b/simul/plots/sigchecked.py new file mode 100755 index 0000000..d6da9b5 --- /dev/null +++ b/simul/plots/sigchecked.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +## This script generate the graphs that compares how many signatures +## handel checked according to different size of nodes +## +import sys +from lib import * + +import pandas as pd +import matplotlib.pyplot as plt + +columns = {"sigs_sigCheckedCt_avg": "average", + "sigs_sigCheckedCt_min": "minimum", + "sigs_sigCheckedCt_max": "maximum"} +files = {"csv/handel_0failing_99thr.csv": "handel"} + +datas = read_datafiles(files) + + +for f,v in datas.items(): + x = v["totalNbOfNodes"] + for c in columns: + y = v[c] + print("file %s -> %d data points on %s" % (f,len(y),c)) + label = columns[c] + if label == "": + label = input("Label for file %s: " % f) + + plot(x,y,"-",label,allColors.popleft()) + +plt.legend(fontsize=18) +plt.ylabel("signatures checked",fontsize=fs_label) +plt.xlabel("nodes",fontsize=fs_label) +# plt.title("Number of signatures checked",fontsize=fs_label) +# plt.yscale('log') +plt.show() diff --git a/simul/plots/signatures_checked.png b/simul/plots/signatures_checked.png new file mode 100644 index 0000000..46eefe5 Binary files /dev/null and b/simul/plots/signatures_checked.png differ diff --git a/simul/plots/threshold_network.png b/simul/plots/threshold_network.png new file mode 100644 index 0000000..6d91172 Binary files /dev/null and b/simul/plots/threshold_network.png differ diff --git a/simul/plots/threshold_network.py b/simul/plots/threshold_network.py new file mode 100755 index 0000000..b548078 --- /dev/null +++ b/simul/plots/threshold_network.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +## This script generates the graph that compares handel +## bandwidth consumption with different thresholds +## +import sys +from lib import * + +import pandas as pd +import matplotlib.pyplot as plt + +column = "net_sentBytes_avg" + +files = { + "csv/handel_0failing_51thr.csv":"51% threshold", + "csv/handel_0failing_75thr.csv":"75% threshold", + "csv/handel_0failing_99thr.csv":"99% threshold", + } +datas = read_datafiles(files) + +for f,v in datas.items(): + x = v["totalNbOfNodes"] + y = v[column].map(lambda x: x/1024) + print("file %s -> %d data points on sigen_wall_avg" % (f,len(y))) + label = files[f] + if label == "": + label = input("Label for file %s: " % f) + + plot(x,y,"-",label,allColors.popleft()) + +plt.legend(fontsize=fs_label) +plt.ylabel("KBytes",fontsize=fs_label) +plt.xlabel("nodes",fontsize=fs_label) +plt.title("Outgoing network consumption with various thresholds",fontsize=fs_label) +# plt.yscale('log') +plt.show() diff --git a/simul/plots/threshold_time.png b/simul/plots/threshold_time.png new file mode 100644 index 0000000..2cc395d Binary files /dev/null and b/simul/plots/threshold_time.png differ diff --git a/simul/plots/threshold_time.py b/simul/plots/threshold_time.py new file mode 100755 index 0000000..8831062 --- /dev/null +++ b/simul/plots/threshold_time.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +## This script generates the graph that compares handel signature +## generation time with different thresholds +## +import sys +from lib import * + +import pandas as pd +import matplotlib.pyplot as plt + +column = "sigen_wall_avg" + +files = { + "csv/handel_0failing_51thr.csv":"51% threshold", + "csv/handel_0failing_75thr.csv":"75% threshold", + "csv/handel_0failing_99thr.csv":"99% threshold", + } +datas = read_datafiles(files) + +for f,v in datas.items(): + x = v["totalNbOfNodes"] + y = v[column].map(lambda x: x * 1000) + print("file %s -> %d data points on sigen_wall_avg" % (f,len(y))) + label = files[f] + if label == "": + label = input("Label for file %s: " % f) + + plot(x,y,"-",label,allColors.popleft()) + +plt.legend(fontsize=fs_label) +plt.ylabel("signature generation (ms)",fontsize=fs_label) +plt.xlabel("nodes",fontsize=fs_label) +# plt.title("signature generation time with various thresholds",fontsize=fs_label) +# plt.yscale('log') +plt.show() diff --git a/simul/plots/timeout_network.png b/simul/plots/timeout_network.png new file mode 100644 index 0000000..b9fd4ca Binary files /dev/null and b/simul/plots/timeout_network.png differ diff --git a/simul/plots/timeout_network.py b/simul/plots/timeout_network.py new file mode 100755 index 0000000..e8b8200 --- /dev/null +++ b/simul/plots/timeout_network.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +## This script generates the graph that compares handel +## bandwidth consumption with different timeouts +## +import sys +from lib import * + +import pandas as pd +import matplotlib.pyplot as plt + +column = "net_sentBytes_avg" + +files = { + "csv/handel_2000_50timeout_99thr.csv":"50ms timeout", + "csv/handel_2000_100timeout_99thr.csv":"100ms timeout", + "csv/handel_2000_200timeout_99thr.csv":"200ms timeout", + } +datas = read_datafiles(files) + +for f,v in datas.items(): + x = v["totalNbOfNodes"] + y = v[column].map(lambda x: x/1024) + print("file %s -> %d data points on sigen_wall_avg" % (f,len(y))) + label = files[f] + if label == "": + label = input("Label for file %s: " % f) + + plot(x,y,"-",label,allColors.popleft()) + +plt.legend(fontsize=18) +plt.ylabel("KBytes",fontsize=fs_label) +plt.xlabel("nodes",fontsize=fs_label) +# plt.yscale('log') +# plt.title("Outgoing network consumption with various timeouts",fontsize=fs_label) +plt.show() diff --git a/simul/plots/timeout_time.png b/simul/plots/timeout_time.png new file mode 100644 index 0000000..6f6f760 Binary files /dev/null and b/simul/plots/timeout_time.png differ diff --git a/simul/plots/timeout_time.py b/simul/plots/timeout_time.py new file mode 100755 index 0000000..71532f1 --- /dev/null +++ b/simul/plots/timeout_time.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +## This script generates the graph that compares handel signature +## generation time with different timeouts +## +import sys +from lib import * + +import pandas as pd +import matplotlib.pyplot as plt + +column = "sigen_wall_avg" + +files = { + "csv/handel_2000_50timeout_99thr.csv":"50ms timeout", + "csv/handel_2000_100timeout_99thr.csv":"100ms timeout", + "csv/handel_2000_200timeout_99thr.csv":"200ms timeout", + } +datas = read_datafiles(files) + +for f,v in datas.items(): + x = v["totalNbOfNodes"] + y = v[column].map(lambda x: x * 1000) + print("file %s -> %d data points on sigen_wall_avg" % (f,len(y))) + label = files[f] + if label == "": + label = input("Label for file %s: " % f) + + plot(x,y,"-",label,allColors.popleft()) + +plt.legend(fontsize=18) +plt.ylabel("signature generation (ms)",fontsize=fs_label) +plt.xlabel("nodes",fontsize=fs_label) +# plt.title("signature generation time with various timeouts",fontsize=fs_label) +# plt.yscale('log') +plt.show() diff --git a/simul/plots/whatwewant.md b/simul/plots/whatwewant.md new file mode 100644 index 0000000..1d2f242 --- /dev/null +++ b/simul/plots/whatwewant.md @@ -0,0 +1,25 @@ +Graph: +For 99% threshold: +Time to reach objective for various number of nodes <= that’s imprecise but right +On the same graph: min max avg +Same for 75% threshold +Same for 51% threshold + +Then same data organized by threshold + +Same configuration, but packet received + +Number of dead nodes: + For 3000 nodes, time to reach a threshold 51% with +99% live nodes: time when all nodes have 51% of the signatures +75% live nodes: time when all nodes have 51% of the signatures +51% live nodes: time when all nodes have 51% of the signatures + + +Number of signatures checked on avg per node +For 500 nodes, then 1000, then 3000 <= that’s precise but wrong + +Settings: +Timeout: 50ms +Period: 10ms +nodeNumber: 10 diff --git a/simul/terraform/aws/main.tf b/simul/terraform/aws/main.tf index b96044b..962bb21 100644 --- a/simul/terraform/aws/main.tf +++ b/simul/terraform/aws/main.tf @@ -19,6 +19,20 @@ resource "aws_security_group" "eu-west-1" { cidr_blocks = ["0.0.0.0/0"] } + ingress { + from_port = 0 + to_port = 0 + protocol = -1 + cidr_blocks = ["0.0.0.0/0"] + } + + ingress { + from_port = 22 + to_port = 22 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + } + ingress { from_port = 0 to_port = 65535 @@ -72,6 +86,13 @@ resource "aws_security_group" "ap-south-1" { cidr_blocks = ["0.0.0.0/0"] } + ingress { + from_port = 0 + to_port = 0 + protocol = -1 + cidr_blocks = ["0.0.0.0/0"] + } + ingress { from_port = 0 to_port = 65535 @@ -131,6 +152,13 @@ resource "aws_security_group" "us-east-1" { cidr_blocks = ["0.0.0.0/0"] } + ingress { + from_port = 0 + to_port = 0 + protocol = -1 + cidr_blocks = ["0.0.0.0/0"] + } + egress { from_port = 0 to_port = 0 @@ -182,6 +210,13 @@ resource "aws_security_group" "ap-northeast-2" { cidr_blocks = ["0.0.0.0/0"] } + ingress { + from_port = 0 + to_port = 0 + protocol = -1 + cidr_blocks = ["0.0.0.0/0"] + } + egress { from_port = 0 to_port = 0 @@ -235,6 +270,13 @@ resource "aws_security_group" "ap-southeast-1" { cidr_blocks = ["0.0.0.0/0"] } + ingress { + from_port = 0 + to_port = 0 + protocol = -1 + cidr_blocks = ["0.0.0.0/0"] + } + egress { from_port = 0 to_port = 0 @@ -286,6 +328,13 @@ resource "aws_security_group" "ap-southeast-2" { cidr_blocks = ["0.0.0.0/0"] } + ingress { + from_port = 0 + to_port = 0 + protocol = -1 + cidr_blocks = ["0.0.0.0/0"] + } + egress { from_port = 0 to_port = 0 @@ -337,6 +386,13 @@ resource "aws_security_group" "ap-northeast-1" { cidr_blocks = ["0.0.0.0/0"] } + ingress { + from_port = 0 + to_port = 0 + protocol = -1 + cidr_blocks = ["0.0.0.0/0"] + } + egress { from_port = 0 to_port = 0 @@ -389,6 +445,13 @@ resource "aws_security_group" "ca-central-1" { cidr_blocks = ["0.0.0.0/0"] } + ingress { + from_port = 0 + to_port = 0 + protocol = -1 + cidr_blocks = ["0.0.0.0/0"] + } + egress { from_port = 0 to_port = 0 @@ -441,6 +504,13 @@ resource "aws_security_group" "eu-central-1" { cidr_blocks = ["0.0.0.0/0"] } + ingress { + from_port = 0 + to_port = 0 + protocol = -1 + cidr_blocks = ["0.0.0.0/0"] + } + egress { from_port = 0 to_port = 0 @@ -493,6 +563,13 @@ resource "aws_security_group" "eu-west-2" { cidr_blocks = ["0.0.0.0/0"] } + ingress { + from_port = 0 + to_port = 0 + protocol = -1 + cidr_blocks = ["0.0.0.0/0"] + } + egress { from_port = 0 to_port = 0 diff --git a/simul/terraform/aws/vars.tf b/simul/terraform/aws/vars.tf index fd2d246..9778396 100644 --- a/simul/terraform/aws/vars.tf +++ b/simul/terraform/aws/vars.tf @@ -19,7 +19,7 @@ variable "instance_type" { variable "number_of_instances_per_region" { description = "number of EC2 instances per region" - default = 2 + default = 1 } variable "ami" { diff --git a/simul/tests/gossip.toml b/simul/tests/gossip.toml index 5c7cef3..7c7e027 100644 --- a/simul/tests/gossip.toml +++ b/simul/tests/gossip.toml @@ -7,18 +7,18 @@ Retrials = 1 Simulation = "p2p/libp2p" [[Runs]] - Nodes = 40 - Threshold = 30 + Nodes = 20 + Threshold = 18 Processes = 2 [Runs.Extra] Connector = "neighbor" - Count = "8" + Count = "10" [[Runs]] - Nodes = 40 - Threshold = 30 + Nodes = 20 + Threshold = 18 Processes = 2 [Runs.Extra] Connector = "neighbor" - Count = "8" + Count = "5" AggAndVerify = "1"