Skip to content
Open
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: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,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
Expand Down
60 changes: 38 additions & 22 deletions offchain/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 14 additions & 30 deletions offchain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
22 changes: 18 additions & 4 deletions offchain/crates/contributor-rewards/src/ingestor/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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()),
}
});
}
}

Expand Down
Loading