From 0ecd4e07c7bdc74bd44f0f060d771d599414e924 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 17:39:33 +0000 Subject: [PATCH 1/2] chore(deps): bump solana-transaction from 3.1.0 to 4.0.0 Bumps [solana-transaction](https://github.com/anza-xyz/solana-sdk) from 3.1.0 to 4.0.0. - [Release notes](https://github.com/anza-xyz/solana-sdk/releases) - [Commits](https://github.com/anza-xyz/solana-sdk/compare/msg@v3.1.0...sdk@v4.0.0) --- updated-dependencies: - dependency-name: solana-transaction dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2193a77..5482334 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4220,7 +4220,7 @@ dependencies = [ "solana-sdk", "solana-signer", "solana-system-interface 3.1.0", - "solana-transaction 3.1.0", + "solana-transaction 4.0.0", "tokio", ] @@ -4240,7 +4240,7 @@ dependencies = [ "solana-sdk", "solana-signer", "solana-system-interface 3.1.0", - "solana-transaction 3.1.0", + "solana-transaction 4.0.0", "tokio", ] diff --git a/Cargo.toml b/Cargo.toml index 0d2fbd9..faacaf0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ solana-pubkey = "4.1.0" solana-sdk = "4.0.1" solana-signer = "3.0.0" solana-system-interface = "3.1.0" -solana-transaction = "3.1.0" +solana-transaction = "4.0.0" tokio = { version = "1", features = ["full"] } [profile.release] From 76b519df483b113a81bd72d74f34ce86267515d8 Mon Sep 17 00:00:00 2001 From: Mike Odnis Date: Mon, 30 Mar 2026 08:21:21 -0400 Subject: [PATCH 2/2] fix(airspace): remove explicit enum discriminants for borsh 1.x compat borsh 1.x (pulled in by solana-transaction 4.0.0) requires #[borsh(use_discriminant=true/false)] on enums with explicit numeric discriminants. Anchor 1.0.0-rc.5's derive macros (AnchorSerialize / AnchorDeserialize) consume the helper attribute twice, causing a 'multiple borsh attributes' compile error. Fix: remove the explicit `= 0/1/2/3` assignments from AccessPolicy. The implicit discriminants are identical in value and order, so the on-chain wire format is unchanged and all existing accounts remain readable without a migration. Co-Authored-By: Claude Sonnet 4.6 --- resq-airspace/src/state/airspace_account.rs | 22 +++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/resq-airspace/src/state/airspace_account.rs b/resq-airspace/src/state/airspace_account.rs index 724fbe4..a55025b 100644 --- a/resq-airspace/src/state/airspace_account.rs +++ b/resq-airspace/src/state/airspace_account.rs @@ -17,16 +17,22 @@ use anchor_lang::prelude::*; /// Access policy for an airspace envelope. +/// +/// Variants are serialised by their implicit discriminant (Open=0, Permit=1, +/// Deny=2, Auction=3). The explicit `= N` values were removed to satisfy +/// borsh 1.x which requires `#[borsh(use_discriminant)]` for enums with +/// explicit discriminants — an annotation that Anchor 1.x derive macros do +/// not yet forward correctly. Wire format is unchanged. #[derive(AnchorSerialize, AnchorDeserialize, Clone, Copy, PartialEq, Eq, Debug)] pub enum AccessPolicy { - /// Any drone may transit without a permit or fee. - Open = 0, - /// A drone must hold a valid `Permit` account to transit. - Permit = 1, - /// No drone may transit under any circumstances. - Deny = 2, - /// Crossing fee is determined by an on-chain auction (future feature). - Auction = 3, + /// Any drone may transit without a permit or fee. (discriminant = 0) + Open, + /// A drone must hold a valid `Permit` account to transit. (discriminant = 1) + Permit, + /// No drone may transit under any circumstances. (discriminant = 2) + Deny, + /// Crossing fee is determined by an on-chain auction (future feature). (discriminant = 3) + Auction, } impl Default for AccessPolicy {