diff --git a/boot.tests/NodeSetupTests.cs b/boot.tests/NodeSetupTests.cs index d069d77..5141989 100644 --- a/boot.tests/NodeSetupTests.cs +++ b/boot.tests/NodeSetupTests.cs @@ -101,7 +101,9 @@ public void SetupModeAllowsOnlySetupAndHealthPaths() { Assert.IsTrue(NodeSetupPolicy.IsAllowedSetupPath("/setup")); Assert.IsTrue(NodeSetupPolicy.IsAllowedSetupPath("/setup.css")); + Assert.IsTrue(NodeSetupPolicy.IsAllowedSetupPath("/setup.js")); Assert.IsTrue(NodeSetupPolicy.IsAllowedSetupPath("/health/live")); + Assert.IsTrue(NodeSetupPolicy.IsAllowedSetupPath("/health/ready")); Assert.IsFalse(NodeSetupPolicy.IsAllowedSetupPath("/api/mining/share")); Assert.IsFalse(NodeSetupPolicy.IsAllowedSetupPath("/api/peer/session")); Assert.IsFalse(NodeSetupPolicy.IsAllowedSetupPath("/dashboardHub")); diff --git a/boot.tests/ShareAttributionTests.cs b/boot.tests/ShareAttributionTests.cs index bccf308..0e7f92a 100644 --- a/boot.tests/ShareAttributionTests.cs +++ b/boot.tests/ShareAttributionTests.cs @@ -1463,6 +1463,20 @@ public async Task V22SiblingBoundaryRaceConvergesWithoutBranchVotingAndV21DoesNo Assert.AreNotEqual(v21Alice.StateService.GetNetworkStatus().ActiveSnapshotId, v21Bob.StateService.GetNetworkStatus().ActiveSnapshotId); } + [TestMethod] + public void FullReserveImportAllowsOneSnapshotContextPerBoundedProof() + { + var config = new PoolConfig + { + WinnersListSize = 299, + WorkSetReserveMultiplier = 3, + MaxStateBundleHistory = 8 + }; + + Assert.AreEqual(1198, BootProtocolStateService.GetMaxImportedSnapshotContextCount(config)); + Assert.IsTrue(BootProtocolStateService.GetMaxImportedSnapshotContextCount(config) >= 396); + } + [TestMethod] public async Task RegtestSiblingImportAcceptsProofRecordedAgainstExplicitEmptyBootstrapSnapshotAsync() { diff --git a/boot_portal/Models/PoolConfig.cs b/boot_portal/Models/PoolConfig.cs index 2776ec4..5a1bfa1 100644 --- a/boot_portal/Models/PoolConfig.cs +++ b/boot_portal/Models/PoolConfig.cs @@ -23,6 +23,9 @@ public class PoolConfig [JsonPropertyName("pool_payout_script")] public string PoolPayoutScript { get; set; } = string.Empty; + [JsonPropertyName("restart_after_setup")] + public bool RestartAfterSetup { get; set; } = false; + [JsonPropertyName("winners_list_size")] public int WinnersListSize { get; set; } = 299; diff --git a/boot_portal/Pages/Setup.cshtml b/boot_portal/Pages/Setup.cshtml index 168c154..c62ea79 100644 --- a/boot_portal/Pages/Setup.cshtml +++ b/boot_portal/Pages/Setup.cshtml @@ -25,12 +25,26 @@ @if (Model.RestartRequired) { -
The payout address is stored. Restart the GridPool app to start networking and mining services with this configuration.
+ @if (Model.AutomaticRestart) + { +The payout address is stored. GridPool is restarting with mining and peer services enabled.
+ } + else + { +The payout address is stored. Restart the GridPool app to start networking and mining services with this configuration.
+ }@Model.SavedAddress
GridPool will remain in setup-only mode until it restarts. No mining work or peer relay is active yet.
+ @if (Model.AutomaticRestart) + { +Waiting for the node to become ready. This page will open the dashboard automatically.
+ } + else + { +GridPool will remain in setup-only mode until it restarts. No mining work or peer relay is active yet.
+ } } else { @@ -49,5 +63,9 @@ } + @if (Model.AutomaticRestart) + { + + }