Skip to content

Conversation

@geoff-vball
Copy link
Contributor

@geoff-vball geoff-vball commented Sep 25, 2025

Why this should be merged

Closes #4270

Copy of #4307 rebased onto master

How this works

Creates a new index for the validator diffs DB. We now key diffs by height, subnetID, nodeID in addition to the previous index of subnetID, height, nodeID. This will allow us to apply diffs for all validators of all subnets at a given height.

How this was tested

Need to be documented in RELEASES.md?

N/A

geoff-vball and others added 10 commits September 25, 2025 14:04
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
Signed-off-by: Geoff Stuart <geoff.vball@gmail.com>
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
Signed-off-by: Geoff Stuart <geoff.vball@gmail.com>
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
Signed-off-by: Geoff Stuart <geoff.vball@gmail.com>
@StephenButtolph StephenButtolph moved this to In Progress 🏗️ in avalanchego Sep 25, 2025
@StephenButtolph StephenButtolph changed the title Rebase validator diffs by height Support all validator set diffs by height Sep 25, 2025
Comment on lines +378 to +380
subnetsMap := m.cfg.Validators.GetAllMaps()
currentHeight, err := m.getCurrentHeight(ctx)
return subnetsMap, currentHeight, err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming it's impossible for the height to advance in between these calls to GetAllMaps and getCurrentHeight, but could someone confirm/explain why?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is called with the P-chain context lock held

@StephenButtolph StephenButtolph added this pull request to the merge queue Sep 26, 2025
Merged via the queue into master with commit 32806e0 Sep 26, 2025
35 checks passed
@StephenButtolph StephenButtolph deleted the rebase-validator-diffs-by-height branch September 26, 2025 20:56
@github-project-automation github-project-automation bot moved this from In Progress 🏗️ to Done 🎉 in avalanchego Sep 26, 2025
joshua-kim added a commit that referenced this pull request Sep 30, 2025
commit 47550e9
Author: Austin Larson <78000745+alarso16@users.noreply.github.com>
Date:   Mon Sep 29 11:24:22 2025 -0400

    Add generics to x/sync (#4275)

commit 8b8ac94
Author: Stephen Buttolph <stephen@avalabs.org>
Date:   Mon Sep 29 11:08:40 2025 -0400

    Use `acp226.DelayExcess` rather than `uint64` (#4358)

commit 32806e0
Author: Geoff Stuart <geoff.vball@gmail.com>
Date:   Fri Sep 26 16:40:10 2025 -0400

    Support all validator set diffs by height (#4342)

    Signed-off-by: Geoff Stuart <geoff.vball@gmail.com>
    Co-authored-by: Stephen Buttolph <stephen@avalabs.org>

commit 57a308a
Author: Jonathan Oppenheimer <jonathan.oppenheimer@avalabs.org>
Date:   Fri Sep 26 13:42:10 2025 -0400

    Set `activationTime` equal to `upgrade.InitiallyActiveTime` for `propservm` (#4351)

    Signed-off-by: Jonathan Oppenheimer <147infiniti@gmail.com>
    Co-authored-by: Stephen Buttolph <stephen@avalabs.org>

commit d57e124
Author: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Date:   Fri Sep 26 13:29:20 2025 -0400

    Remove UptimeManager#IsConnected (#4333)

    Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>

commit 0985c16
Author: Geoff Stuart <geoff.vball@gmail.com>
Date:   Fri Sep 26 11:19:34 2025 -0400

    Implement GetProposedHeight API in Proposervm (#4222)

    Signed-off-by: Michael Kaplan <55204436+michaelkaplan13@users.noreply.github.com>
    Co-authored-by: ylg <yang.linguan@avalabs.org>
    Co-authored-by: Michael Kaplan <55204436+michaelkaplan13@users.noreply.github.com>
    Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
    Co-authored-by: Michael Kaplan <michael@avalabs.org>

commit dfdd6a7
Author: aaronbuchwald <aaron.buchwald56@gmail.com>
Date:   Fri Sep 26 10:07:08 2025 -0400

    Update daily re-execution benchmark (#4340)

commit d8aa95f
Author: letreturn <letreturn@outlook.com>
Date:   Fri Sep 26 22:12:02 2025 +0800

    Typo Fixes (#4353)

    Signed-off-by: letreturn <letreturn@outlook.com>

commit dbbfa66
Author: rodrigo <77309055+RodrigoVillar@users.noreply.github.com>
Date:   Fri Sep 26 00:02:29 2025 -0400

    fix(load): only modify non-reserved slots (#4283)

commit d0bcd73
Author: Stephen Buttolph <stephen@avalabs.org>
Date:   Thu Sep 25 16:46:19 2025 -0400

    Replace `mockable.MaxTime` with `upgrade.UnscheduledActivationTime` (#4322)

commit 23c5718
Author: Stephen Buttolph <stephen@avalabs.org>
Date:   Thu Sep 25 15:20:33 2025 -0400

    Refactor Warp Verification Tests (#4335)

commit cc72910
Author: Stephen Buttolph <stephen@avalabs.org>
Date:   Thu Sep 25 15:16:19 2025 -0400

    Remove premature optimization in validator manager (#4346)

commit 36baa05
Author: Austin Larson <78000745+alarso16@users.noreply.github.com>
Date:   Thu Sep 25 14:38:53 2025 -0400

    Granite ACP-176 (#4336)

commit d74d90c
Author: rodrigo <77309055+RodrigoVillar@users.noreply.github.com>
Date:   Thu Sep 25 14:38:42 2025 -0400

    refactor(metervm): remove mockable clock (#4338)

Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add validator set diff by height index

3 participants