Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// Go is installed directly in the Dockerfile at a pinned version to avoid
// stdlib conflicts from layering the Go feature on the base image's Go.
"ghcr.io/devcontainers/features/rust:1": {
"version": "1.90.0"
"version": "1.97.1"
},
},
"initializeCommand": "mkdir -p \"${DZ_WORKTREES_DIR:-/tmp/worktrees}\"",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set env vars
run: ./scripts/env.sh >> $GITHUB_ENV
- name: Install rust for cli
uses: dtolnay/rust-toolchain@1.90.0
uses: dtolnay/rust-toolchain@1.97.1
with:
targets: x86_64-unknown-linux-musl
- name: Install dependencies for rpm packaging and musl static build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Set env vars
run: ./scripts/env.sh >> $GITHUB_ENV
- name: Install rust for cli
uses: dtolnay/rust-toolchain@1.90.0
uses: dtolnay/rust-toolchain@1.97.1
with:
targets: x86_64-unknown-linux-musl
- name: Install dependencies for rpm packaging
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.devnet.smartcontract.daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
binary: doublezero_geolocation.so
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.90.0
- uses: dtolnay/rust-toolchain@1.97.1
- uses: Swatinem/rust-cache@v2
- name: Install agave solana tools
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.pipeline.validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
target/x86_64-unknown-linux-gnu/release

- name: Install rust toolchain
uses: dtolnay/rust-toolchain@1.90.0
uses: dtolnay/rust-toolchain@1.97.1
if: contains(matrix.languages, 'rust')
with:
targets: x86_64-unknown-linux-musl
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
- uses: actions/checkout@v4
with:
token: ${{ steps.app.outputs.token }}
- uses: dtolnay/rust-toolchain@1.90.0
- uses: dtolnay/rust-toolchain@1.97.1
- name: Open doublezero version-bump PR
id: dzpr
env:
Expand Down Expand Up @@ -371,7 +371,7 @@ jobs:
- uses: actions/checkout@v4
with:
ref: main # the merged version-bump commit
- uses: dtolnay/rust-toolchain@1.90.0
- uses: dtolnay/rust-toolchain@1.97.1
- uses: Swatinem/rust-cache@v2
# Keep the agave version and --tools-version in sync with
# release.devnet.smartcontract.daily.yml (platform-tools >= v1.54 is
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-24.04-16c-64gb
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.90.0
- uses: dtolnay/rust-toolchain@1.97.1
- uses: Swatinem/rust-cache@v2
- name: Install agave solana tools
run: |
Expand All @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-24.04-16c-64gb
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.90.0
- uses: dtolnay/rust-toolchain@1.97.1
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
Expand All @@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-24.04-16c-64gb
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.90.0
- uses: dtolnay/rust-toolchain@1.97.1
- uses: Swatinem/rust-cache@v2
- name: Install agave solana tools
run: |
Expand All @@ -40,7 +40,7 @@ jobs:
runs-on: ubuntu-24.04-16c-64gb
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.90.0
- uses: dtolnay/rust-toolchain@1.97.1
- uses: Swatinem/rust-cache@v2
- name: Install agave solana tools
run: |
Expand All @@ -54,7 +54,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.90.0
- uses: dtolnay/rust-toolchain@1.97.1
with:
targets: x86_64-unknown-linux-musl
- uses: Swatinem/rust-cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.90.0
- uses: dtolnay/rust-toolchain@1.97.1
- uses: Swatinem/rust-cache@v2
- name: Check fixture drift
run: make check-fixtures
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ All notable changes to this project will be documented in this file.
- Serviceability
- New `SubscribeFeed` and `UnsubscribeFeed` instructions join or leave whole feeds on an EdgeSeat access pass in a single atomic transaction, charging one seat per feed rather than per group. A feed is all-or-nothing: the caller names feeds, the processor derives which groups change and rejects a group list that does not match, so two feeds carrying the same group stay unambiguous. `UpdateMulticastGroupRoles` now enforces the multicast-group allowlists for every access-pass type, EdgeSeat included, so purchased groups go through the feed instructions and individually comped groups through the allowlist. `CreateSubscribeUser` skips the allowlist only for the case its feed gate actually covers, closing two paths that could join a group with no check. `MAX_FEED_GROUPS` drops from 64 to 20, bounded by what one transaction can carry: because joining passes every group a feed holds, a larger feed could never be joined. No feed onchain is affected. For the same reason a user may hold at most 6 feeds, and a held feed the pass no longer carries is pruned on leave instead of blocking it. New errors: `EdgeSeatRequired` (101), `UserDeviceMismatch` (102), `UserFeedLimitExceeded` (103), `EdgeSeatIsMulticastOnly` (104). (#4109)
- `CreateUser` can now create a bare multicast user (no group, no feed) under an EdgeSeat pass: the feed gate moved to `CreateSubscribeUser`, its only caller, and feed seats are otherwise charged by `SubscribeFeed`. The pass-level `max_multicast_users` cap is enforced again (it had been vestigial under the feed-seat model) so bare users stay bounded; the oracle already provisions it as the total purchased seats. `CreateUser` is also idempotent: re-running it for an existing user matching the requested owner, device, user type, and tenant succeeds without changing state, so a client can retry safely; a mismatch still fails with `AccountAlreadyInitialized`, and a banned user with `InvalidStatus`. This applies to the current client_ip-keyed user PDA; the legacy index-keyed PDA cannot be re-run, since its index has moved on. Deploy note: `max_multicast_users` becomes load-bearing on existing EdgeSeat passes; before deploying to a cluster, confirm each pass's value covers its feed seats and backfill via `SetAccessPass` where short. Checked 2026-07-30: mainnet-beta and devnet hold no EdgeSeat pass; testnet's single one (`5x9DTsWC…`) has `max_multicast_users` 1, zero users, zero connections. (#4110)
- CI
- The Rust toolchain moves from 1.90.0 to 1.97.1, seven releases forward. 1.90.0 sat below the supported floor of the rust-analyzer builds shipping with current editors (1.94.0), so the language server warned on every workspace load; that floor tracks stable at roughly minus-three releases, so the gap widens with each Rust release rather than holding steady. `rust-toolchain.toml`, the twelve `dtolnay/rust-toolchain` CI pins across seven workflows, the devcontainer Rust feature, and the rustup pin baked into `release/Dockerfile.release` move together — **contributors must rebuild their devcontainer after this merges**. The release image needs no manual step: `scripts/build-snapshot.sh` keys its rebuild on the Dockerfile's hash, so changing the pin is what triggers it. Left stale, that image would have kept 1.90.0 while goreleaser ran against a 1.97.1 `rust-toolchain.toml`, re-downloading a full toolchain on every snapshot build (`RUSTUP_HOME` is not one of the named volumes and the container runs `--rm`). The accompanying source changes are only the clippy lints the newer toolchain adds (`useless_borrows_in_formatting`, `unnecessary_sort_by`, `iter_kv_map`, `to_string_in_format_args`, `collapsible_match`, `result_large_err`). The serviceability ones are redundant `&` removals inside `Display`/`Debug` impls, where `format_args!` auto-references, so formatted output is byte-identical; they were required rather than optional because `lint-programs` runs from `smartcontract/` and so picks up the root toolchain, not `smartcontract/programs/rust-toolchain.toml`. Onchain codegen is unaffected either way: `cargo build-sbf --tools-version v1.54` supplies its own rustc. (#4118)

## [v0.32.0](https://github.com/malbeclabs/doublezero/compare/client/v0.31.0...client/v0.32.0) - 2026-07-29

Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ cargo test -p <crate-name> <test_name>

Always run `make rust-fmt` before committing Rust changes.

Rust toolchain: 1.90.0 (via `rust-toolchain.toml`). Solana SDK: 2.2.x.
Rust toolchain: 1.97.1 (via `rust-toolchain.toml`); the onchain programs pin their own in `smartcontract/programs/rust-toolchain.toml`. Solana SDK: 3.0.

### Go

Expand Down
2 changes: 1 addition & 1 deletion client/doublezero/src/cli/sentinel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ impl FindValidatorMulticastPublishersCommand {
not_publishers: on_dz - pubs,
})
.collect();
summary_rows.sort_by(|a, b| b.validators.cmp(&a.validators));
summary_rows.sort_by_key(|r| std::cmp::Reverse(r.validators));
summary_rows.push(SummaryRow {
client: "TOTAL".to_string(),
validators: total,
Expand Down
20 changes: 8 additions & 12 deletions crates/doublezero-daemon-cli/src/disconnect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,20 +131,16 @@ impl Disconnect {
let payer = ledger.get_payer();

for (pubkey, user) in users.iter().filter(|(_, u)| u.client_ip == client_ip) {
match self.dz_mode {
let mode_mismatch = match self.dz_mode {
Some(DzMode::IBRL) => {
if user.user_type != UserType::IBRL
user.user_type != UserType::IBRL
&& user.user_type != UserType::IBRLWithAllocatedIP
{
continue;
}
}
Some(DzMode::Multicast) => {
if user.user_type != UserType::Multicast {
continue;
}
}
None => {}
Some(DzMode::Multicast) => user.user_type != UserType::Multicast,
None => false,
};
if mode_mismatch {
continue;
}

// Skip users owned by a different keypair — only the owner can delete them.
Expand Down Expand Up @@ -250,7 +246,7 @@ impl Disconnect {

let get_user = || {
match ledger.get_user(*user_pubkey) {
Ok(user) => Err(user), // User still exists, keep retrying
Ok(_) => Err(()), // User still exists, keep retrying
Err(e) => {
Ok(if e.to_string().contains("User not found") {
Ok(()) // User deleted, stop retrying
Expand Down
2 changes: 1 addition & 1 deletion crates/doublezero-geolocation-cli/src/user/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl DeleteGeolocationUserCliCommand {
if !std::io::stdin().is_terminal() {
eyre::bail!("stdin is not a terminal — pass --yes to skip confirmation");
}
write!(out, "Delete user '{}'? [y/N]: ", &code)?;
write!(out, "Delete user '{}'? [y/N]: ", code)?;
out.flush()?;
let mut input = String::new();
std::io::stdin().read_line(&mut input)?;
Expand Down
2 changes: 1 addition & 1 deletion release/Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:/go/bin:/usr/local/go/bin:$PATH
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --default-toolchain 1.90.0 \
| sh -s -- -y --default-toolchain 1.97.1 \
&& rustup target add x86_64-unknown-linux-gnu

# Cross-compiler for Rust linux builds + rpm packaging
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.90.0"
channel = "1.97.1"
2 changes: 1 addition & 1 deletion smartcontract/cli/src/accesspass/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ impl ListAccessPassCliCommand {
})
.collect();

access_pass_displays.sort_by(|a, b| a.client_ip.cmp(&b.client_ip));
access_pass_displays.sort_by_key(|a| a.client_ip);

let res = if self.json {
serde_json::to_string_pretty(&access_pass_displays)?
Expand Down
2 changes: 1 addition & 1 deletion smartcontract/cli/src/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl GetAccountCliCommand {
writeln!(
out,
"{}: {} ({})\n\t\t\tpubkey: {}, signature: {}",
&tran.time.to_string(),
tran.time,
tran.instruction.get_name(),
tran.instruction.get_args(),
tran.account,
Expand Down
2 changes: 1 addition & 1 deletion smartcontract/cli/src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ impl AddressCliCommand {
) -> eyre::Result<()> {
require!(client, RequirementCheck::KEYPAIR);

writeln!(out, "{}", &client.get_payer())?;
writeln!(out, "{}", client.get_payer())?;

Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion smartcontract/cli/src/contributor/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl ListContributorCliCommand {

let mut contributors: Vec<(Pubkey, Contributor)> = contributors.into_iter().collect();

contributors.sort_by(|(_, a), (_, b)| a.owner.cmp(&b.owner));
contributors.sort_by_key(|(_, a)| a.owner);

let contributor_displays: Vec<ContributorDisplay> = contributors
.into_iter()
Expand Down
4 changes: 2 additions & 2 deletions smartcontract/cli/src/device/interface/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ impl ListDeviceInterfaceCliCommand {
let devices = client.list_device(ListDeviceCommand {})?;

devices
.iter()
.flat_map(|(_, device)| {
.values()
.flat_map(|device| {
device
.interfaces
.iter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ impl fmt::Debug for SetGlobalConfigArgs {
"local_asn: {}, remote_asn: {}, tunnel_block: {}, user _block: {}, multicastgroup_block: {}, next_bgp_community: {:?}, multicast_publisher_block: {}",
self.local_asn,
self.remote_asn,
&self.device_tunnel_block,
&self.user_tunnel_block,
&self.multicastgroup_block,
self.device_tunnel_block,
self.user_tunnel_block,
self.multicastgroup_block,
self.next_bgp_community,
&self.multicast_publisher_block,
self.multicast_publisher_block,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ impl fmt::Debug for UserCreateArgs {
"user_type: {}, cyoa_type: {}, client_ip: {}, tunnel_endpoint: {}, dz_prefix_count: {}",
self.user_type,
self.cyoa_type,
&self.client_ip,
&self.tunnel_endpoint,
self.client_ip,
self.tunnel_endpoint,
self.dz_prefix_count,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ impl fmt::Debug for UserCreateSubscribeArgs {
"user_type: {}, cyoa_type: {}, client_ip: {}, tunnel_endpoint: {}, dz_prefix_count: {}, owner: {}",
self.user_type,
self.cyoa_type,
&self.client_ip,
&self.tunnel_endpoint,
self.client_ip,
self.tunnel_endpoint,
self.dz_prefix_count,
self.owner,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ impl fmt::Display for Device {
unicast_users_count: {}, multicast_subscribers_count: {}, max_unicast_users: {}, max_multicast_subscribers: {}, reserved_seats: {}, \
multicast_publishers_count: {}, max_multicast_publishers: {}",
self.account_type, self.owner, self.index, self.contributor_pk, self.location_pk, self.exchange_pk, self.device_type,
&self.public_ip, &self.dz_prefixes, self.status, self.code, self.metrics_publisher_pk, self.mgmt_vrf, self.interfaces,
self.public_ip, self.dz_prefixes, self.status, self.code, self.metrics_publisher_pk, self.mgmt_vrf, self.interfaces,
self.reference_count, self.users_count, self.max_users, self.device_health, self.desired_status,
self.unicast_users_count, self.multicast_subscribers_count, self.max_unicast_users, self.max_multicast_subscribers, self.reserved_seats,
self.multicast_publishers_count, self.max_multicast_publishers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ impl fmt::Display for GlobalConfig {
f,
"account_type: {}, owner: {}, local_asn: {}, remote_asn: {}, device_tunnel_block: {}, user_tunnel_block: {}, multicastgroup_block: {}, next_bgp_community: {}, multicast_publisher_block: {}",
self.account_type, self.owner, self.local_asn, self.remote_asn,
&self.device_tunnel_block,
&self.user_tunnel_block,
&self.multicastgroup_block,
self.device_tunnel_block,
self.user_tunnel_block,
self.multicastgroup_block,
self.next_bgp_community,
&self.multicast_publisher_block,
self.multicast_publisher_block,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl fmt::Display for Link {
write!(
f,
"account_type: {}, owner: {}, index: {}, side_a_pk: {}, side_z_pk: {}, tunnel_type: {}, bandwidth: {}, mtu: {}, delay_ns: {}, jitter_ns: {}, tunnel_id: {}, tunnel_net: {}, status: {}, code: {}, contributor_pk: {}, link_health: {}, desired_status: {}, link_topologies: {:?}, link_flags: {:#010x}",
self.account_type, self.owner, self.index, self.side_a_pk, self.side_z_pk, self.link_type, self.bandwidth, self.mtu, self.delay_ns, self.jitter_ns, self.tunnel_id, &self.tunnel_net, self.status, self.code, self.contributor_pk, self.link_health, self.desired_status, self.link_topologies, self.link_flags
self.account_type, self.owner, self.index, self.side_a_pk, self.side_z_pk, self.link_type, self.bandwidth, self.mtu, self.delay_ns, self.jitter_ns, self.tunnel_id, self.tunnel_net, self.status, self.code, self.contributor_pk, self.link_health, self.desired_status, self.link_topologies, self.link_flags
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,12 @@ impl fmt::Display for User {
self.user_type,
self.device_pk,
self.cyoa_type,
&self.client_ip,
&self.dz_ip,
self.client_ip,
self.dz_ip,
self.tunnel_id,
&self.tunnel_net,
self.tunnel_net,
self.status,
&self.tunnel_endpoint
self.tunnel_endpoint
)
}
}
Expand Down
Loading