diff --git a/cmd/lazyledger_measurements_1/main.go b/cmd/lazyledger_measurements_1/main.go index a0cab51..c694df1 100644 --- a/cmd/lazyledger_measurements_1/main.go +++ b/cmd/lazyledger_measurements_1/main.go @@ -10,7 +10,7 @@ import ( const namespaceSize = 8 func main() { - txAmounts := []int{128, 256, 384, 512, 640, 1024} + txAmounts := []int{128, 256, 384, 512, 640, 768, 896, 1024} txSize := 128 for _, txes := range txAmounts { sb := generateSimpleBlock(txes, txSize) diff --git a/cmd/lazyledger_measurements_2/main.go b/cmd/lazyledger_measurements_2/main.go index 756cc4f..b927192 100644 --- a/cmd/lazyledger_measurements_2/main.go +++ b/cmd/lazyledger_measurements_2/main.go @@ -13,32 +13,43 @@ const namespaceSize = 8 func main() { currencyTxes := 10 - txAmounts := []int{128, 256, 384, 512, 640, 1024} + txAmounts := []int{128, 256, 384, 512, 640, 768, 896, 1024} txSize := 256 for _, txes := range txAmounts { - sb, ns := generateSimpleBlock(currencyTxes, txes, txSize) - _, _, proofs1, messages1, _ := sb.ApplicationProof(ns) - sbBandwidth := 0 - for _, msg := range *messages1 { - sbBandwidth += len(msg.Marshal()) - } - for _, hash := range proofs1 { - sbBandwidth += len(hash) - } + sbBandwidthMax := 0 + pbBandwidthMax := 0 + + for i := 0; i < 10; i++ { + sb, ns := generateSimpleBlock(currencyTxes, txes, txSize) + _, _, proofs1, messages1, _ := sb.ApplicationProof(ns) + sbBandwidth := 0 + for _, msg := range *messages1 { + sbBandwidth += len(msg.Marshal()) + } + for _, hash := range proofs1 { + sbBandwidth += len(hash) + } + if sbBandwidth > sbBandwidthMax { + sbBandwidthMax = sbBandwidth + } - pb, ns := generateProbabilisticBlock(currencyTxes, txes, txSize) - _, _, proofs2, messages2, _ := pb.ApplicationProof(ns) - pbBandwidth := 0 - for _, msg := range *messages2 { - pbBandwidth += len(msg.Marshal()) - } - for _, proof := range proofs2 { - for _, hash := range proof { - pbBandwidth += len(hash) + pb, ns := generateProbabilisticBlock(currencyTxes, txes, txSize) + _, _, proofs2, messages2, _ := pb.ApplicationProof(ns) + pbBandwidth := 0 + for _, msg := range *messages2 { + pbBandwidth += len(msg.Marshal()) + } + for _, proof := range proofs2 { + for _, hash := range proof { + pbBandwidth += len(hash) + } + } + if pbBandwidth > pbBandwidthMax { + pbBandwidthMax = pbBandwidth } } - fmt.Println(txes, sbBandwidth, pbBandwidth) + fmt.Println(txes, sbBandwidthMax, pbBandwidthMax) } } diff --git a/cmd/lazyledger_measurements_3/main.go b/cmd/lazyledger_measurements_3/main.go index 4a1a50d..3005dd0 100644 --- a/cmd/lazyledger_measurements_3/main.go +++ b/cmd/lazyledger_measurements_3/main.go @@ -13,7 +13,7 @@ const namespaceSize = 8 func main() { currencyTxes := 10 - txAmounts := []int{128, 256, 384, 512, 640, 1024} + txAmounts := []int{128, 256, 384, 512, 640, 768, 896, 1024} txSize := 1024 for _, txes := range txAmounts { _, c, d := generateSimpleBlock(currencyTxes, txes, txSize)