Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/FSLibrary/MinBlockTimeTest.fs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ let private smallNetworkSize = 10

let private searchThresholdMs = 100

let private timeoutsFor (targetMs: int) : int = max 500 (targetMs / 5)
// For the purposes of min block test, use high value to avoid noise from SCP timeouts
let private timeout = 2000

let private mixedPregenLedgerMultiplier = 15

Expand Down Expand Up @@ -333,19 +334,17 @@ let minBlockTimeTest (context: MissionContext) (baseLoadGen: LoadGen) (setupCfg:
// Apply an SCP-timing upgrade for target T; waits for the peer
// to observe the new ledger_close_time_ms before returning.
let applySCPUpgrade (targetMs: int) =
let t = timeoutsFor targetMs

formation.SetupUpgradeContract allNodes.Head

formation.DeployUpgradeEntriesAndArm
allNodes
{ LoadGen.GetDefault() with
mode = CreateSorobanUpgrade
ledgerTargetCloseTimeMilliseconds = Some targetMs
ballotTimeoutInitialMilliseconds = Some t
ballotTimeoutIncrementMilliseconds = Some t
nominationTimeoutInitialMilliseconds = Some t
nominationTimeoutIncrementMilliseconds = Some t }
ballotTimeoutInitialMilliseconds = Some timeout
ballotTimeoutIncrementMilliseconds = Some timeout
nominationTimeoutInitialMilliseconds = Some timeout
nominationTimeoutIncrementMilliseconds = Some timeout }
(System.DateTime.UtcNow.AddSeconds(20.0))

let peer = formation.NetworkCfg.GetPeer allNodes.Head 0
Expand Down
1 change: 1 addition & 0 deletions src/FSLibrary/StellarCoreCfg.fs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ type StellarCoreCfg =

if self.network.missionContext.runForMinBlockTime then
t.Add("TESTING_IGNORE_LEDGER_TIME_UPGRADE_BOUNDS", true) |> ignore
t.Add("FLOOD_DEMAND_BACKOFF_DELAY_MS", 1000) |> ignore
Comment thread
marta-lokhova marked this conversation as resolved.

match self.network.missionContext.runForMaxTps with
| Some "classic" ->
Expand Down
Loading