Skip to content

Commit b58fc8a

Browse files
authored
Merge branch 'feat/supernova-async-exec' into cross-shard-execution-analysis
2 parents 8a8e169 + 354c04e commit b58fc8a

61 files changed

Lines changed: 2095 additions & 1053 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cmd/node/config/config.toml

Lines changed: 170 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -60,37 +60,31 @@
6060

6161
ProcessConfigsByRound = [
6262
{
63-
EnableRound = 0,
64-
MaxRoundsWithoutNewBlockReceived = 10,
65-
MaxRoundsWithoutCommittedBlock = 10,
66-
RoundModulusTriggerWhenSyncIsStuck = 20,
67-
MaxSyncWithErrorsAllowed = 10,
68-
MaxRoundsToKeepUnprocessedMiniBlocks = 300,
69-
MaxRoundsToKeepUnprocessedTransactions = 300,
70-
NumFloodingRoundsFastReacting = 10,
71-
NumFloodingRoundsSlowReacting = 2,
72-
NumFloodingRoundsOutOfSpecs = 2,
73-
# MaxConsecutiveRoundsOfRatingDecrease represents the max number of consecutive rounds in which a block is not proposed
74-
# on a shard and the validators' rating could be decreased. If, for instance, a shard gets stuck for more rounds
75-
# than this value, then the validators rating decrease should stop so they won't get jailed
76-
MaxConsecutiveRoundsOfRatingDecrease = 600,
77-
# MaxRoundsOfInactivityAccepted defines the number of rounds missed by a main or higher level backup machine before
78-
# the current machine will take over and propose/sign blocks. Used in both single-key and multi-key modes.
79-
MaxRoundsOfInactivityAccepted = 3
63+
EnableRound = 0,
64+
MaxRoundsWithoutNewBlockReceived = 10,
65+
MaxRoundsWithoutCommittedBlock = 10,
66+
RoundModulusTriggerWhenSyncIsStuck = 20,
67+
MaxSyncWithErrorsAllowed = 10,
68+
MaxRoundsToKeepUnprocessedMiniBlocks = 300,
69+
MaxRoundsToKeepUnprocessedTransactions = 300,
70+
# MaxConsecutiveRoundsOfRatingDecrease represents the max number of consecutive rounds in which a block is not proposed
71+
# on a shard and the validators' rating could be decreased. If, for instance, a shard gets stuck for more rounds
72+
# than this value, then the validators rating decrease should stop so they won't get jailed
73+
MaxConsecutiveRoundsOfRatingDecrease = 600,
74+
# MaxRoundsOfInactivityAccepted defines the number of rounds missed by a main or higher level backup machine before
75+
# the current machine will take over and propose/sign blocks. Used in both single-key and multi-key modes.
76+
MaxRoundsOfInactivityAccepted = 3
8077
},
8178
{
82-
EnableRound = 440,
83-
MaxRoundsWithoutNewBlockReceived = 100,
84-
MaxRoundsWithoutCommittedBlock = 100,
85-
RoundModulusTriggerWhenSyncIsStuck = 200,
86-
MaxSyncWithErrorsAllowed = 100,
87-
MaxRoundsToKeepUnprocessedMiniBlocks = 3000,
88-
MaxRoundsToKeepUnprocessedTransactions = 3000,
89-
NumFloodingRoundsFastReacting = 100,
90-
NumFloodingRoundsSlowReacting = 20,
91-
NumFloodingRoundsOutOfSpecs = 20,
92-
MaxConsecutiveRoundsOfRatingDecrease = 6000,
93-
MaxRoundsOfInactivityAccepted = 30
79+
EnableRound = 440,
80+
MaxRoundsWithoutNewBlockReceived = 100,
81+
MaxRoundsWithoutCommittedBlock = 100,
82+
RoundModulusTriggerWhenSyncIsStuck = 200,
83+
MaxSyncWithErrorsAllowed = 100,
84+
MaxRoundsToKeepUnprocessedMiniBlocks = 3000,
85+
MaxRoundsToKeepUnprocessedTransactions = 3000,
86+
MaxConsecutiveRoundsOfRatingDecrease = 6000,
87+
MaxRoundsOfInactivityAccepted = 30
9488
}
9589
]
9690

@@ -631,71 +625,153 @@
631625

632626
[Antiflood]
633627
Enabled = true
634-
NumConcurrentResolverJobs = 50
635-
NumConcurrentResolvingTrieNodesJobs = 3
636-
[Antiflood.FastReacting]
637-
IntervalInSeconds = 1
638-
ReservedPercent = 20.0
639-
[Antiflood.FastReacting.PeerMaxInput]
640-
BaseMessagesPerInterval = 280
641-
TotalSizePerInterval = 4194304 #4MB/s
642-
[Antiflood.FastReacting.PeerMaxInput.IncreaseFactor]
643-
Threshold = 10 #if consensus size will exceed this value, then
644-
Factor = 1.0 #increase the base value with [factor*consensus size]
645-
[Antiflood.FastReacting.BlackList]
646-
ThresholdNumMessagesPerInterval = 1000
647-
ThresholdSizePerInterval = 8388608 #8MB/s
648-
PeerBanDurationInSeconds = 300
649-
650-
[Antiflood.SlowReacting]
651-
IntervalInSeconds = 30
652-
ReservedPercent = 20.0
653-
[Antiflood.SlowReacting.PeerMaxInput]
654-
BaseMessagesPerInterval = 6000
655-
TotalSizePerInterval = 18874368 # 18MB/interval
656-
[Antiflood.SlowReacting.PeerMaxInput.IncreaseFactor]
657-
Threshold = 10 #if consensus size will exceed this value, then
658-
Factor = 0.0 #increase the base value with [factor*consensus size]
659-
[Antiflood.SlowReacting.BlackList]
660-
ThresholdNumMessagesPerInterval = 10000
661-
ThresholdSizePerInterval = 37748736 # 36MB/interval
662-
PeerBanDurationInSeconds = 3600
663-
664-
[Antiflood.OutOfSpecs]
665-
IntervalInSeconds = 1
666-
ReservedPercent = 0.0
667-
[Antiflood.OutOfSpecs.PeerMaxInput]
668-
BaseMessagesPerInterval = 2000
669-
TotalSizePerInterval = 10485760 # 10MB/interval
670-
[Antiflood.OutOfSpecs.PeerMaxInput.IncreaseFactor]
671-
Threshold = 0 #if consensus size will exceed this value, then
672-
Factor = 0.0 #increase the base value with [factor*consensus size]
673-
[Antiflood.OutOfSpecs.BlackList]
674-
ThresholdNumMessagesPerInterval = 3600
675-
ThresholdSizePerInterval = 12582912 # 12MB/interval
676-
PeerBanDurationInSeconds = 3600
677-
678-
[Antiflood.PeerMaxOutput]
679-
BaseMessagesPerInterval = 150
680-
TotalSizePerInterval = 2097152 #2MB/s
681-
682-
[Antiflood.Cache]
683-
Name = "Antiflood"
684-
Capacity = 7000
685-
Type = "LRU"
686-
[Antiflood.Topic]
687-
DefaultMaxMessagesPerSec = 15000
688-
MaxMessages = [{ Topic = "shardBlocks*", NumMessagesPerSec = 30 },
689-
{ Topic = "metachainBlocks", NumMessagesPerSec = 30 }]
690-
691-
[Antiflood.TxAccumulator]
692-
# MaxAllowedTimeInMilliseconds is used as a time frame in which the node gathers transactions.
693-
# After this period, collected transactions will be sent on the p2p topics
694-
MaxAllowedTimeInMilliseconds = 250
695-
# MaxDeviationTimeInMilliseconds represents the time in miliseconds that will cause the effectual time frame be
696-
# less than the specified max value. This is used to create desynchronizations between senders as to not
697-
# clutter the network exactly in the same moment
698-
MaxDeviationTimeInMilliseconds = 25
628+
629+
[[Antiflood.ConfigsByRound]]
630+
Round = 0
631+
NumConcurrentResolverJobs = 50
632+
NumConcurrentResolvingTrieNodesJobs = 3
633+
634+
[Antiflood.ConfigsByRound.FastReacting]
635+
IntervalInSeconds = 1
636+
ReservedPercent = 20.0
637+
[Antiflood.ConfigsByRound.FastReacting.PeerMaxInput]
638+
BaseMessagesPerInterval = 280
639+
TotalSizePerInterval = 4194304 #4MB/s
640+
[Antiflood.ConfigsByRound.FastReacting.PeerMaxInput.IncreaseFactor]
641+
Threshold = 10 #if consensus size will exceed this value, then
642+
Factor = 1.0 #increase the base value with [factor*consensus size]
643+
[Antiflood.ConfigsByRound.FastReacting.BlackList]
644+
ThresholdNumMessagesPerInterval = 1000
645+
ThresholdSizePerInterval = 8388608 #8MB/s
646+
NumFloodingRounds = 10
647+
PeerBanDurationInSeconds = 300
648+
649+
[Antiflood.ConfigsByRound.SlowReacting]
650+
IntervalInSeconds = 30
651+
ReservedPercent = 20.0
652+
[Antiflood.ConfigsByRound.SlowReacting.PeerMaxInput]
653+
BaseMessagesPerInterval = 6000
654+
TotalSizePerInterval = 18874368 # 18MB/interval
655+
[Antiflood.ConfigsByRound.SlowReacting.PeerMaxInput.IncreaseFactor]
656+
Threshold = 10 #if consensus size will exceed this value, then
657+
Factor = 0.0 #increase the base value with [factor*consensus size]
658+
[Antiflood.ConfigsByRound.SlowReacting.BlackList]
659+
ThresholdNumMessagesPerInterval = 10000
660+
ThresholdSizePerInterval = 37748736 # 36MB/interval
661+
NumFloodingRounds = 2
662+
PeerBanDurationInSeconds = 3600
663+
664+
[Antiflood.ConfigsByRound.OutOfSpecs]
665+
IntervalInSeconds = 1
666+
ReservedPercent = 0.0
667+
[Antiflood.ConfigsByRound.OutOfSpecs.PeerMaxInput]
668+
BaseMessagesPerInterval = 2000
669+
TotalSizePerInterval = 10485760 # 10MB/interval
670+
[Antiflood.ConfigsByRound.OutOfSpecs.PeerMaxInput.IncreaseFactor]
671+
Threshold = 0 #if consensus size will exceed this value, then
672+
Factor = 0.0 #increase the base value with [factor*consensus size]
673+
[Antiflood.ConfigsByRound.OutOfSpecs.BlackList]
674+
ThresholdNumMessagesPerInterval = 3600
675+
ThresholdSizePerInterval = 12582912 # 12MB/interval
676+
NumFloodingRounds = 2
677+
PeerBanDurationInSeconds = 3600
678+
679+
[Antiflood.ConfigsByRound.PeerMaxOutput]
680+
[Antiflood.ConfigsByRound.PeerMaxOutput.PeerMaxInput]
681+
BaseMessagesPerInterval = 150
682+
TotalSizePerInterval = 2097152 #2MB/s
683+
684+
[Antiflood.ConfigsByRound.Cache]
685+
Name = "Antiflood"
686+
Capacity = 7000
687+
Type = "LRU"
688+
[Antiflood.ConfigsByRound.Topic]
689+
DefaultMaxMessagesPerSec = 15000
690+
MaxMessages = [{ Topic = "shardBlocks*", NumMessagesPerSec = 30 },
691+
{ Topic = "metachainBlocks", NumMessagesPerSec = 30 }]
692+
693+
[Antiflood.ConfigsByRound.TxAccumulator]
694+
# MaxAllowedTimeInMilliseconds is used as a time frame in which the node gathers transactions.
695+
# After this period, collected transactions will be sent on the p2p topics
696+
MaxAllowedTimeInMilliseconds = 250
697+
# MaxDeviationTimeInMilliseconds represents the time in miliseconds that will cause the effectual time frame be
698+
# less than the specified max value. This is used to create desynchronizations between senders as to not
699+
# clutter the network exactly in the same moment
700+
MaxDeviationTimeInMilliseconds = 25
701+
702+
[[Antiflood.ConfigsByRound]]
703+
Round = 440
704+
NumConcurrentResolverJobs = 50 # TODO: analyse for meta on bootstrap there was a constant used with value 10
705+
NumConcurrentResolvingTrieNodesJobs = 3
706+
707+
[Antiflood.ConfigsByRound.FastReacting]
708+
IntervalInSeconds = 1
709+
ReservedPercent = 20.0
710+
[Antiflood.ConfigsByRound.FastReacting.PeerMaxInput]
711+
BaseMessagesPerInterval = 280
712+
TotalSizePerInterval = 4194304 #4MB/s
713+
[Antiflood.ConfigsByRound.FastReacting.PeerMaxInput.IncreaseFactor]
714+
Threshold = 10 #if consensus size will exceed this value, then
715+
Factor = 1.0 #increase the base value with [factor*consensus size]
716+
[Antiflood.ConfigsByRound.FastReacting.BlackList]
717+
ThresholdNumMessagesPerInterval = 10000
718+
ThresholdSizePerInterval = 12388608 #12MB/s
719+
NumFloodingRounds = 100
720+
PeerBanDurationInSeconds = 300
721+
722+
[Antiflood.ConfigsByRound.SlowReacting]
723+
IntervalInSeconds = 30
724+
ReservedPercent = 20.0
725+
[Antiflood.ConfigsByRound.SlowReacting.PeerMaxInput]
726+
BaseMessagesPerInterval = 6000
727+
TotalSizePerInterval = 18874368 # 18MB/interval
728+
[Antiflood.ConfigsByRound.SlowReacting.PeerMaxInput.IncreaseFactor]
729+
Threshold = 10 #if consensus size will exceed this value, then
730+
Factor = 0.0 #increase the base value with [factor*consensus size]
731+
[Antiflood.ConfigsByRound.SlowReacting.BlackList]
732+
ThresholdNumMessagesPerInterval = 100000
733+
ThresholdSizePerInterval = 60748736 # 60MB/interval
734+
NumFloodingRounds = 20
735+
PeerBanDurationInSeconds = 3600
736+
737+
[Antiflood.ConfigsByRound.OutOfSpecs]
738+
IntervalInSeconds = 1
739+
ReservedPercent = 0.0
740+
[Antiflood.ConfigsByRound.OutOfSpecs.PeerMaxInput]
741+
BaseMessagesPerInterval = 20000
742+
TotalSizePerInterval = 104857600 # 100MB/interval
743+
[Antiflood.ConfigsByRound.OutOfSpecs.PeerMaxInput.IncreaseFactor]
744+
Threshold = 0 #if consensus size will exceed this value, then
745+
Factor = 0.0 #increase the base value with [factor*consensus size]
746+
[Antiflood.ConfigsByRound.OutOfSpecs.BlackList]
747+
ThresholdNumMessagesPerInterval = 36000
748+
ThresholdSizePerInterval = 18582912 # 18MB/interval
749+
NumFloodingRounds = 20
750+
PeerBanDurationInSeconds = 3600
751+
752+
[Antiflood.ConfigsByRound.PeerMaxOutput]
753+
[Antiflood.ConfigsByRound.PeerMaxOutput.PeerMaxInput]
754+
BaseMessagesPerInterval = 150
755+
TotalSizePerInterval = 2097152 #2MB/s
756+
757+
[Antiflood.ConfigsByRound.Cache]
758+
Name = "Antiflood"
759+
Capacity = 7000
760+
Type = "LRU"
761+
[Antiflood.ConfigsByRound.Topic]
762+
DefaultMaxMessagesPerSec = 15000
763+
MaxMessages = [{ Topic = "shardBlocks*", NumMessagesPerSec = 30 },
764+
{ Topic = "metachainBlocks", NumMessagesPerSec = 30 }]
765+
766+
[Antiflood.ConfigsByRound.TxAccumulator]
767+
# MaxAllowedTimeInMilliseconds is used as a time frame in which the node gathers transactions.
768+
# After this period, collected transactions will be sent on the p2p topics
769+
MaxAllowedTimeInMilliseconds = 80
770+
# MaxDeviationTimeInMilliseconds represents the time in miliseconds that will cause the effectual time frame be
771+
# less than the specified max value. This is used to create desynchronizations between senders as to not
772+
# clutter the network exactly in the same moment
773+
MaxDeviationTimeInMilliseconds = 25
774+
# Antiflood config ends here for Supernova
699775

700776
[WebServerAntiflood]
701777
WebServerAntifloodEnabled = true

0 commit comments

Comments
 (0)