diff --git a/CHANGELOG.md b/CHANGELOG.md index 36161ed018..d68d280932 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ All notable changes to this project will be documented in this file. - CI - The new `release-bump-dry-run` job dry-runs the release version bump on every PR, so a `cargo update --workspace` dependency rebind fails on the PR that causes it instead of a week later at release time, as it did for v0.37.0 (#4213, fixed in #4219). Advisory until its context is added to the `main` ruleset. (#4220) - Add `.cursor/BUGBOT.md` to enable Cursor review. This is an experiment. (malbeclabs/infra#2387) +- Repo + - The ten git dependencies that `offchain/` carried on `malbeclabs/doublezero` and `malbeclabs/doublezero-solana` become path dependencies into this repo. All ten version pins stop existing, so the two trees can no longer disagree about which revision of a shared crate they build, and a change spanning them lands in one commit instead of a pin bump per consumer. `network-shapley-rs` stays a git dependency, since it lives in another organization. (#4245) - Repo - `doublezero-offchain` and `doublezero-solana` are imported into this repo, with their history and all 126 of their release tags, under new top-level `offchain/` and `solana/` directories. Nothing that was already here moves. Both trees stay excluded from the root Cargo workspace and keep their own `Cargo.toml`, `Cargo.lock` and `rust-toolchain.toml`, so they build exactly as they did in their own repos, and their workflows do not run yet. Imported commit messages are rewritten so that a reference that meant a pull request in a source repo now names that repo explicitly. `.github/dependabot.yml` enumerates its cargo directories instead of globbing them, so no update lands in a tree this repo does not build. The source repos are still the ones that release. (#4240) - CLI diff --git a/offchain/Cargo.lock b/offchain/Cargo.lock index 124dcdff75..d32351bf33 100644 --- a/offchain/Cargo.lock +++ b/offchain/Cargo.lock @@ -2655,8 +2655,7 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "doublezero-cli-core" -version = "0.30.0" -source = "git+https://github.com/malbeclabs/doublezero?tag=client%2Fv0.31.0#25ae6ee721991ba8d660279bcc6eec8a72e6c690" +version = "0.37.0" dependencies = [ "bitflags 2.13.0", "clap", @@ -2674,8 +2673,7 @@ dependencies = [ [[package]] name = "doublezero-config" -version = "0.30.0" -source = "git+https://github.com/malbeclabs/doublezero?tag=client%2Fv0.31.0#25ae6ee721991ba8d660279bcc6eec8a72e6c690" +version = "0.37.0" dependencies = [ "eyre", "serde", @@ -2740,8 +2738,7 @@ dependencies = [ [[package]] name = "doublezero-geolocation" -version = "0.30.0" -source = "git+https://github.com/malbeclabs/doublezero?tag=client%2Fv0.31.0#25ae6ee721991ba8d660279bcc6eec8a72e6c690" +version = "0.37.0" dependencies = [ "borsh", "borsh-incremental", @@ -2756,6 +2753,18 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "doublezero-ip-proof" +version = "0.37.0" +dependencies = [ + "borsh", + "solana-keypair", + "solana-program", + "solana-signature", + "solana-signer", + "thiserror 2.0.18", +] + [[package]] name = "doublezero-ledger-sentinel" version = "0.2.5" @@ -2804,7 +2813,6 @@ dependencies = [ [[package]] name = "doublezero-passport" version = "0.2.0" -source = "git+https://github.com/malbeclabs/doublezero-solana?tag=revenue-distribution%2Fv0.3.7#4368da2c446b799f354aecb6156fc0e77343634b" dependencies = [ "borsh", "bytemuck", @@ -2816,7 +2824,7 @@ dependencies = [ "solana-program-entrypoint", "solana-program-error", "solana-pubkey 3.0.0", - "solana-system-interface 3.2.0", + "solana-system-interface 2.0.0", "solana-sysvar", ] @@ -2857,8 +2865,7 @@ dependencies = [ [[package]] name = "doublezero-program-common" -version = "0.30.0" -source = "git+https://github.com/malbeclabs/doublezero?tag=client%2Fv0.31.0#25ae6ee721991ba8d660279bcc6eec8a72e6c690" +version = "0.37.0" dependencies = [ "borsh", "byteorder", @@ -2871,7 +2878,6 @@ dependencies = [ [[package]] name = "doublezero-program-tools" version = "0.0.0" -source = "git+https://github.com/malbeclabs/doublezero-solana?tag=revenue-distribution%2Fv0.3.7#4368da2c446b799f354aecb6156fc0e77343634b" dependencies = [ "bincode 1.3.3", "borsh", @@ -2886,15 +2892,14 @@ dependencies = [ "solana-program-error", "solana-program-pack", "solana-pubkey 3.0.0", - "solana-system-interface 3.2.0", + "solana-system-interface 2.0.0", "solana-sysvar", "spl-token-interface", ] [[package]] name = "doublezero-record" -version = "0.30.0" -source = "git+https://github.com/malbeclabs/doublezero?tag=client%2Fv0.31.0#25ae6ee721991ba8d660279bcc6eec8a72e6c690" +version = "0.37.0" dependencies = [ "bytemuck", "solana-program", @@ -2905,7 +2910,6 @@ dependencies = [ [[package]] name = "doublezero-revenue-distribution" version = "0.3.7" -source = "git+https://github.com/malbeclabs/doublezero-solana?tag=revenue-distribution%2Fv0.3.7#4368da2c446b799f354aecb6156fc0e77343634b" dependencies = [ "borsh", "bytemuck", @@ -2920,7 +2924,7 @@ dependencies = [ "solana-program-memory", "solana-program-pack", "solana-pubkey 3.0.0", - "solana-system-interface 3.2.0", + "solana-system-interface 2.0.0", "solana-sysvar", "spl-associated-token-account-interface", "spl-token-interface", @@ -2954,13 +2958,13 @@ dependencies = [ [[package]] name = "doublezero-serviceability" -version = "0.30.0" -source = "git+https://github.com/malbeclabs/doublezero?tag=client%2Fv0.31.0#25ae6ee721991ba8d660279bcc6eec8a72e6c690" +version = "0.37.0" dependencies = [ "bitflags 2.13.0", "borsh", "borsh-incremental", "bytemuck", + "doublezero-ip-proof", "doublezero-program-common", "ipnetwork", "serde", @@ -2970,6 +2974,18 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "doublezero-serviceability-instruction" +version = "0.37.0" +dependencies = [ + "doublezero-ip-proof", + "doublezero-serviceability", + "solana-compute-budget-interface", + "solana-ed25519-program", + "solana-program", + "solana-system-interface 3.2.0", +] + [[package]] name = "doublezero-sol-conversion-admin-cli" version = "0.0.1" @@ -3186,8 +3202,7 @@ dependencies = [ [[package]] name = "doublezero-telemetry" -version = "0.30.0" -source = "git+https://github.com/malbeclabs/doublezero?tag=client%2Fv0.31.0#25ae6ee721991ba8d660279bcc6eec8a72e6c690" +version = "0.37.0" dependencies = [ "borsh", "borsh-incremental", @@ -3201,8 +3216,7 @@ dependencies = [ [[package]] name = "doublezero_sdk" -version = "0.30.0" -source = "git+https://github.com/malbeclabs/doublezero?tag=client%2Fv0.31.0#25ae6ee721991ba8d660279bcc6eec8a72e6c690" +version = "0.37.0" dependencies = [ "async-trait", "backon", @@ -3215,9 +3229,11 @@ dependencies = [ "dirs-next", "doublezero-config", "doublezero-geolocation", + "doublezero-ip-proof", "doublezero-program-common", "doublezero-record", "doublezero-serviceability", + "doublezero-serviceability-instruction", "doublezero-telemetry", "eyre", "futures", diff --git a/offchain/Cargo.toml b/offchain/Cargo.toml index 2bfb99c1ff..0fcb6a708a 100644 --- a/offchain/Cargo.toml +++ b/offchain/Cargo.toml @@ -108,62 +108,46 @@ tracing = "0.1" tracing-subscriber = { version = "0.3", default-features = true, features = ["env-filter", "fmt", "registry"] } url = "2" -### Dependencies found in github.com/malbeclabs/doublezero-solana +### Dependencies from the solana tree of this repository [workspace.dependencies.doublezero-passport] features = ["offchain"] -git = "https://github.com/malbeclabs/doublezero-solana" -tag = "revenue-distribution/v0.3.7" +path = "../solana/programs/passport" [workspace.dependencies.doublezero-program-tools] -git = "https://github.com/malbeclabs/doublezero-solana" -tag = "revenue-distribution/v0.3.7" +path = "../solana/crates/program-tools" [workspace.dependencies.doublezero-revenue-distribution] -git = "https://github.com/malbeclabs/doublezero-solana" -tag = "revenue-distribution/v0.3.7" +path = "../solana/programs/revenue-distribution" -### Dependencies found in github.com/malbeclabs/doublezero +### Dependencies from the root workspace of this repository # RFC-20 CLI core: provides CliContext, OutputFormat, RequirementCheck, the -# render_* output helpers, and the eyre-based error type. The whole SDK family -# is pinned to a single monorepo revision so shared types unify across the -# boundary. client/v0.31.0 is the first released client tag on the Solana 3.0 -# line (past #3830) and carries the EdgeSeat FeedSeat schema (#3954/#4030) -# deployed on testnet, replacing the interim #4030 merge-commit pin. +# render_* output helpers, and the eyre-based error type. [workspace.dependencies.doublezero-cli-core] -git = "https://github.com/malbeclabs/doublezero" -tag = "client/v0.31.0" +path = "../crates/doublezero-cli-core" -# Source of the RFC-20 `Environment` enum consumed by `CliContext`. MUST be -# pinned to the same revision as doublezero-cli-core so the `Environment` type -# unifies across the boundary. +# Source of the RFC-20 `Environment` enum consumed by `CliContext`. [workspace.dependencies.doublezero-config] -git = "https://github.com/malbeclabs/doublezero" -tag = "client/v0.31.0" +path = "../config" [workspace.dependencies.doublezero-program-common] -git = "https://github.com/malbeclabs/doublezero" -tag = "client/v0.31.0" +path = "../smartcontract/programs/common" [workspace.dependencies.doublezero-record] features = ["no-entrypoint"] -git = "https://github.com/malbeclabs/doublezero" -tag = "client/v0.31.0" +path = "../smartcontract/programs/doublezero-record" [workspace.dependencies.doublezero_sdk] -git = "https://github.com/malbeclabs/doublezero" -tag = "client/v0.31.0" +path = "../smartcontract/sdk/rs" [workspace.dependencies.doublezero-serviceability] features = ["no-entrypoint", "serde"] -git = "https://github.com/malbeclabs/doublezero" -tag = "client/v0.31.0" +path = "../smartcontract/programs/doublezero-serviceability" [workspace.dependencies.doublezero-telemetry] features = ["no-entrypoint", "serde"] -git = "https://github.com/malbeclabs/doublezero" -tag = "client/v0.31.0" +path = "../smartcontract/programs/doublezero-telemetry" ### Other git dependencies diff --git a/offchain/crates/contributor-rewards/src/ingestor/types.rs b/offchain/crates/contributor-rewards/src/ingestor/types.rs index 975b17f2b3..6b6362abf0 100644 --- a/offchain/crates/contributor-rewards/src/ingestor/types.rs +++ b/offchain/crates/contributor-rewards/src/ingestor/types.rs @@ -130,8 +130,9 @@ fn apply_serviceability_json_compat_migrations(serviceability: &mut Value) { // doublezero-serviceability v0.20 added durable tunnel/BGP state to User; // client/v0.25.0 then appended `bgp_rtt_ns`, and #4030 (per-feed EdgeSeat - // billing) appended `feed_pk`. All default to the same values onchain/Borsh - // deserialization uses for absent tails. + // billing) appended `feed_pk`, which malbeclabs/infra#2114 replaced with the + // plural `feed_pks` so one user can hold several feeds. All default to the + // same values onchain/Borsh deserialization uses for absent tails. if let Some(users) = serviceability .get_mut("users") .and_then(|users| users.as_object_mut()) @@ -149,8 +150,21 @@ fn apply_serviceability_json_compat_migrations(serviceability: &mut Value) { .or_insert_with(|| Value::Number(0.into())); user.entry("bgp_rtt_ns") .or_insert_with(|| Value::Number(0.into())); - user.entry("feed_pk") - .or_insert_with(|| Value::String(Pubkey::default().to_string())); + // A snapshot from before infra#2114 carries the singular key, where the + // default value meant the user held no feed. Fold it into the list so + // both eras land on the shape the current struct reads. Like + // `publishers` and `subscribers`, the list serializes as one + // comma-separated string rather than a JSON array, so an absent feed + // is the empty string. + let legacy_feed_pk = user.remove("feed_pk"); + user.entry("feed_pks").or_insert_with(|| { + match legacy_feed_pk.as_ref().and_then(Value::as_str) { + Some(key) if key != Pubkey::default().to_string() => { + Value::String(key.to_string()) + } + _ => Value::String(String::new()), + } + }); } }