summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Lee <john.lee@algorand.com>2023-12-15 14:11:37 -0500
committerGitHub <noreply@github.com>2023-12-15 14:11:37 -0500
commit7a841a9847cbc6a63d114722cdb23db19ae3234d (patch)
treea640b3a36c637e82b6369fb10fb7b792d7cb4100
parent1cfb80a852bf8bb9c76921b88fe8ef12a391b047 (diff)
Debug: limit memory for testing (#5871)relbeta3.21.0-testing
Co-authored-by: Pavel Zbitskiy <65323360+algorandskiy@users.noreply.github.com>
-rw-r--r--daemon/algod/server.go3
-rwxr-xr-xtest/testdata/deployednettemplates/generate-recipe/generate_network.py1
-rw-r--r--test/testdata/deployednettemplates/recipes/custom/configs/node.json2
3 files changed, 5 insertions, 1 deletions
diff --git a/daemon/algod/server.go b/daemon/algod/server.go
index 1b40e98bf..711a4aa93 100644
--- a/daemon/algod/server.go
+++ b/daemon/algod/server.go
@@ -27,6 +27,7 @@ import (
"os"
"os/signal"
"path/filepath"
+ "runtime/debug"
"strings"
"syscall"
"time"
@@ -177,6 +178,8 @@ func (s *Server) Initialize(cfg config.Local, phonebookAddresses []string, genes
s.log.Errorf("Failed to set a new RLIMIT_NOFILE value to %d (max %d): %s", fdRequired, hard, fdErr.Error())
}
}
+
+ debug.SetMemoryLimit(7 * 1024 * 1024 * 1024) // 7GB
}
// configure the deadlock detector library
diff --git a/test/testdata/deployednettemplates/generate-recipe/generate_network.py b/test/testdata/deployednettemplates/generate-recipe/generate_network.py
index 0a92aed20..254172aa4 100755
--- a/test/testdata/deployednettemplates/generate-recipe/generate_network.py
+++ b/test/testdata/deployednettemplates/generate-recipe/generate_network.py
@@ -70,6 +70,7 @@ def build_net(template_path, netgoal_params):
def build_genesis(template_path, netgoal_params, template_dict):
args = [
'-t', 'genesis',
+ '--last-part-key-round', str(100_000),
'-o', f"{template_path}/generated/genesis.json"
]
args.extend(netgoal_params)
diff --git a/test/testdata/deployednettemplates/recipes/custom/configs/node.json b/test/testdata/deployednettemplates/recipes/custom/configs/node.json
index 547f38e19..4afe82a04 100644
--- a/test/testdata/deployednettemplates/recipes/custom/configs/node.json
+++ b/test/testdata/deployednettemplates/recipes/custom/configs/node.json
@@ -19,7 +19,7 @@
"EnableMetrics": true,
"MetricsURI": "{{MetricsURI}}",
"ConfigJSONOverride": "{ \"TxPoolExponentialIncreaseFactor\": 1, \"DNSBootstrapID\": \"<network>.algodev.network\", \"DeadlockDetection\": -1, \"PeerPingPeriodSeconds\": 30, \"EnableAgreementReporting\": true, \"EnableAgreementTimeMetrics\": true, \"EnableAssembleStats\": true, \"EnableProcessBlockStats\": true, \"BaseLoggerDebugLevel\": 4, \"EnableProfiler\": true, \"EnableRuntimeMetrics\": true, \"CadaverSizeTarget\": 0 }",
- "FractionApply": 0.01
+ "FractionApply": 0.1
}
]
}