geolocation: add program scaffolding and ProgramConfig instructions#3083
Merged
geolocation: add program scaffolding and ProgramConfig instructions#3083
Conversation
faa0ca6 to
b909d19
Compare
karl-dz
reviewed
Feb 24, 2026
smartcontract/programs/doublezero-geolocation/src/processors/program_config/update.rs
Outdated
Show resolved
Hide resolved
karl-dz
reviewed
Feb 24, 2026
smartcontract/programs/doublezero-geolocation/src/processors/mod.rs
Outdated
Show resolved
Hide resolved
karl-dz
reviewed
Feb 24, 2026
smartcontract/programs/doublezero-geolocation/src/processors/mod.rs
Outdated
Show resolved
Hide resolved
karl-dz
reviewed
Feb 24, 2026
smartcontract/programs/doublezero-geolocation/src/state/program_config.rs
Outdated
Show resolved
Hide resolved
karl-dz
reviewed
Feb 24, 2026
smartcontract/programs/doublezero-geolocation/src/state/program_config.rs
Outdated
Show resolved
Hide resolved
karl-dz
reviewed
Feb 24, 2026
smartcontract/programs/doublezero-geolocation/src/state/program_config.rs
Outdated
Show resolved
Hide resolved
karl-dz
reviewed
Feb 24, 2026
smartcontract/programs/doublezero-geolocation/src/state/program_config.rs
Outdated
Show resolved
Hide resolved
karl-dz
reviewed
Feb 24, 2026
smartcontract/programs/doublezero-geolocation/src/instructions.rs
Outdated
Show resolved
Hide resolved
karl-dz
reviewed
Feb 24, 2026
karl-dz
reviewed
Feb 24, 2026
smartcontract/programs/doublezero-geolocation/tests/update_program_config_test.rs
Outdated
Show resolved
Hide resolved
karl-dz
reviewed
Feb 24, 2026
smartcontract/programs/doublezero-geolocation/tests/update_program_config_test.rs
Show resolved
Hide resolved
karl-dz
reviewed
Feb 24, 2026
smartcontract/programs/doublezero-geolocation/tests/update_program_config_test.rs
Outdated
Show resolved
Hide resolved
karl-dz
reviewed
Feb 24, 2026
smartcontract/programs/doublezero-geolocation/tests/update_program_config_test.rs
Outdated
Show resolved
Hide resolved
karl-dz
reviewed
Feb 24, 2026
6917536 to
7176113
Compare
karl-dz
approved these changes
Feb 26, 2026
Add the doublezero-geolocation onchain program with InitProgramConfig and UpdateProgramConfig instructions, foundation allowlist integration via serviceability CPI, and build/lint/test integration. Part 1 of 3 for RFC16 geolocation verification.
…heck Move the min_compatible_version > version invariant check to run after both fields are applied, so a version-only downgrade cannot silently create an inconsistent state where min_compatible_version > version.
7176113 to
07dd419
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
doublezero-geolocationonchain program withInitProgramConfigandUpdateProgramConfiginstructionsDiff Breakdown
Part 1 of 3 for RFC16 geolocation verification — program scaffolding and ProgramConfig management only; GeoProbe CRUD and parent device instructions follow in subsequent PRs.
Key files (click to expand)
smartcontract/programs/doublezero-geolocation/src/state/program_config.rs— ProgramConfig account state with Borsh serialization, field-by-field deserialization, and validationsmartcontract/programs/doublezero-geolocation/src/processors/program_config/update.rs— UpdateProgramConfig processor with upgrade authority verification and partial field updatessmartcontract/programs/doublezero-geolocation/src/processors/program_config/init.rs— InitProgramConfig processor with PDA creation and upgrade authority checksmartcontract/programs/doublezero-geolocation/src/serializer.rs— Generic account create/write helpers using doublezero-program-common utilitiessmartcontract/programs/doublezero-geolocation/src/instructions.rs— Borsh-derived GeolocationInstruction enum with 2 variantssmartcontract/programs/doublezero-geolocation/src/error.rs— GeolocationError enum with thiserror derives and ProgramError conversionsmartcontract/programs/doublezero-geolocation/src/processors/mod.rs—check_foundation_allowlistshared validation via serviceability CPITesting Verification
-Dclippy::all -Dwarnings