Skip to content

Commit bbcd329

Browse files
committed
Merge remote-tracking branch 'origin/main' into nikw9944/adhoc-413
2 parents 231d9c8 + 9c7f278 commit bbcd329

38 files changed

Lines changed: 53 additions & 2217 deletions

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,30 @@ All notable changes to this project will be documented in this file.
88

99
### Changes
1010

11-
1211
- Geolocation
1312
- geoprobe-target drops LocationOffsets whose signature chain does not verify instead of caching them and writing them to `location_offsets`, which the lake explorer publishes unfiltered. Verification itself now rejects the zero authority pubkey, since `ed25519.Verify` accepts the all-zero (pubkey, signature) pair for roughly one message in four — the zero key decodes to an order-4 point, not to nothing — so an unsigned datagram would otherwise verify. The same guard is applied to the signed TWAMP `ProbePacket.Verify` and `ReplyPacket.Verify`, the other two places a wire-supplied pubkey is used as the verification key.
1413
- The geoprobe agent enforces RFC-16's replay mitigation: an inbound DZD offset is rejected unless its `MeasurementSlot` is within 15 minutes behind or 5 minutes ahead of the current ledger slot, which covers the 5-minute slot caches on both ends. An equal-RTT offset also no longer replaces the cache's best entry, because replacing it reset its expiry clock and let a replay pin the probe's reference point indefinitely.
1514
- The signed TWAMP reflector verifies a probe's signature before touching per-sender pair state. `target_pk` is public onchain, so spoofed probes could previously consume a paying sender's pair budget, repoint its source IP and clear its challenge nonce. Unverified probes still get a reply, now off throwaway state and capped at one per rate-limit window.
1615
- A completed target scan that matches nothing propagates instead of being mistaken for a skipped scan, so removing a user's last target or flipping them to Delinquent stops the probing.
1716
- ICMP echo replies are matched on source address as well as ID and sequence.
17+
18+
## [v0.39.0](https://github.com/malbeclabs/doublezero/compare/client/v0.38.0...client/v0.39.0) - 2026-09-04
19+
20+
### Breaking
21+
22+
- CLI
23+
- Remove `revenue-distribution convert-2z` and `harvest-2z` (malbeclabs/infra#2527).
24+
- Validator deposit no longer accepts `--convert-2z-limit-price`.
25+
- SDK
26+
- Remove the Go, Python, and TypeScript revenue-distribution clients that fetched `/swap-rate`.
27+
28+
### Changes
29+
30+
- Monitor
31+
- Stop polling the SOL/2Z swap oracle (malbeclabs/infra#2527).
32+
- `-twoz-oracle-interval` still parses so existing ansible extra args do not fail the process.
33+
- CLI
34+
- `revenue-distribution fetch sol-conversion` no longer requests a swap quote.
1835
- SDK
1936
- The TypeScript and Python `GlobalState` deserializers expose `ip_verifier_authority_pk`, the RFC-27 trust root the Go SDK and the Rust state already carried, so those consumers can read which key signs IP ownership proofs. The field is appended, so an account written before the upgrade decodes it as the default pubkey rather than failing. (#4231)
2037
- CI

Cargo.lock

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ exclude = [
5151
resolver = "2"
5252

5353
[workspace.package]
54-
version = "0.38.0"
54+
version = "0.39.0"
5555
authors = ["Malbec Labs <dev@malbeclabs.com>"]
5656
readme = "README.md"
5757
edition = "2021"

config/constants.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const (
77
MainnetTelemetryProgramID = "tE1exJ5VMyoC9ByZeSmgtNzJCFF74G9JAv338sJiqkC"
88
MainnetInternetLatencyCollectorPK = "8xHn4r7oQuqNZ5cLYwL5YZcDy1JjDQcpVkyoA8Dw5uXH"
99
MainnetDeviceLocalASN = 209321
10-
MainnetTwoZOracleURL = "https://sol-2z-oracle-api-v1.mainnet-beta.doublezero.xyz"
1110
MainnetSolanaRPC = "https://api.mainnet-beta.solana.com"
1211
MainnetTelemetryFlowIngestURL = "http://telemetry-flow-in.mainnet-beta.doublezero.xyz"
1312
MainnetTelemetryStateIngestURL = "https://telemetry-state-in-mainnet-beta.doublezero.xyz"
@@ -24,7 +23,6 @@ const (
2423
TestnetTelemetryProgramID = "3KogTMmVxc5eUHtjZnwm136H5P8tvPwVu4ufbGPvM7p1"
2524
TestnetInternetLatencyCollectorPK = "HWGQSTmXWMB85NY2vFLhM1nGpXA8f4VCARRyeGNbqDF1"
2625
TestnetDeviceLocalASN = 65342
27-
TestnetTwoZOracleURL = "https://sol-2z-oracle-api-v1.testnet.doublezero.xyz"
2826
TestnetSolanaRPC = "https://api.testnet.solana.com"
2927
TestnetTelemetryFlowIngestURL = "http://telemetry-flow-in.testnet.doublezero.xyz"
3028
TestnetTelemetryStateIngestURL = "https://telemetry-state-in-testnet.doublezero.xyz"
@@ -41,7 +39,6 @@ const (
4139
DevnetTelemetryProgramID = "C9xqH76NSm11pBS6maNnY163tWHT8Govww47uyEmSnoG"
4240
DevnetInternetLatencyCollectorPK = "3fXen9LP5JUAkaaDJtyLo1ohPiJ2LdzVqAnmhtGgAmwJ"
4341
DevnetDeviceLocalASN = 21682
44-
DevnetTwoZOracleURL = ""
4542
DevnetTelemetryFlowIngestURL = "http://telemetry-flow-in.devnet.doublezero.xyz"
4643
DevnetTelemetryStateIngestURL = "https://telemetry-state-in-devnet.doublezero.xyz"
4744
DevnetGeolocationProgramID = "EXUUFfAjjuXnaBtsAMLsJX18ynnNHPwtkmk33bLVVoCm"
@@ -55,7 +52,6 @@ const (
5552
LocalnetTelemetryProgramID = "C9xqH76NSm11pBS6maNnY163tWHT8Govww47uyEmSnoG"
5653
LocalnetInternetLatencyCollectorPK = "3fXen9LP5JUAkaaDJtyLo1ohPiJ2LdzVqAnmhtGgAmwJ"
5754
LocalnetDeviceLocalASN = 21682
58-
LocalnetTwoZOracleURL = ""
5955
LocalnetSolanaRPC = "http://localhost:8899"
6056
LocalnetTelemetryFlowIngestURL = "http://localhost:8911"
6157
LocalnetTelemetryStateIngestURL = "http://localhost:8911"

config/env.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ type NetworkConfig struct {
2323
RevenueDistributionProgramID solana.PublicKey
2424
InternetLatencyCollectorPK solana.PublicKey
2525
DeviceLocalASN uint32
26-
TwoZOracleURL string
2726
SolanaRPCURL string
2827
TelemetryFlowIngestURL string
2928
TelemetryStateIngestURL string
@@ -68,7 +67,6 @@ func NetworkConfigForEnv(env string) (*NetworkConfig, error) {
6867
ShredSubscriptionProgramID: MainnetShredSubscriptionProgramID,
6968
USDCMint: MainnetUSDCMint,
7069
DeviceLocalASN: MainnetDeviceLocalASN,
71-
TwoZOracleURL: MainnetTwoZOracleURL,
7270
SolanaRPCURL: MainnetSolanaRPC,
7371
TelemetryFlowIngestURL: MainnetTelemetryFlowIngestURL,
7472
TelemetryStateIngestURL: MainnetTelemetryStateIngestURL,
@@ -101,7 +99,6 @@ func NetworkConfigForEnv(env string) (*NetworkConfig, error) {
10199
ShredSubscriptionProgramID: TestnetShredSubscriptionProgramID,
102100
USDCMint: TestnetUSDCMint,
103101
DeviceLocalASN: TestnetDeviceLocalASN,
104-
TwoZOracleURL: TestnetTwoZOracleURL,
105102
SolanaRPCURL: TestnetSolanaRPC,
106103
TelemetryFlowIngestURL: TestnetTelemetryFlowIngestURL,
107104
TelemetryStateIngestURL: TestnetTelemetryStateIngestURL,
@@ -134,7 +131,6 @@ func NetworkConfigForEnv(env string) (*NetworkConfig, error) {
134131
ShredSubscriptionProgramID: DevnetShredSubscriptionProgramID,
135132
USDCMint: DevnetUSDCMint,
136133
DeviceLocalASN: DevnetDeviceLocalASN,
137-
TwoZOracleURL: DevnetTwoZOracleURL,
138134
SolanaRPCURL: TestnetSolanaRPC,
139135
TelemetryFlowIngestURL: DevnetTelemetryFlowIngestURL,
140136
TelemetryStateIngestURL: DevnetTelemetryStateIngestURL,
@@ -167,7 +163,6 @@ func NetworkConfigForEnv(env string) (*NetworkConfig, error) {
167163
ShredSubscriptionProgramID: LocalnetShredSubscriptionProgramID,
168164
USDCMint: LocalnetUSDCMint,
169165
DeviceLocalASN: LocalnetDeviceLocalASN,
170-
TwoZOracleURL: LocalnetTwoZOracleURL,
171166
SolanaRPCURL: LocalnetSolanaRPC,
172167
TelemetryFlowIngestURL: LocalnetTelemetryFlowIngestURL,
173168
TelemetryStateIngestURL: LocalnetTelemetryStateIngestURL,

config/env_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ func TestConfig_NetworkConfigForEnv(t *testing.T) {
2626
RevenueDistributionProgramID: solana.MustPublicKeyFromBase58(config.MainnetRevenueDistributionProgramID),
2727
InternetLatencyCollectorPK: solana.MustPublicKeyFromBase58(config.MainnetInternetLatencyCollectorPK),
2828
DeviceLocalASN: config.MainnetDeviceLocalASN,
29-
TwoZOracleURL: config.MainnetTwoZOracleURL,
3029
SolanaRPCURL: config.MainnetSolanaRPC,
3130
TelemetryFlowIngestURL: config.MainnetTelemetryFlowIngestURL,
3231
TelemetryStateIngestURL: config.MainnetTelemetryStateIngestURL,
@@ -46,7 +45,6 @@ func TestConfig_NetworkConfigForEnv(t *testing.T) {
4645
RevenueDistributionProgramID: solana.MustPublicKeyFromBase58(config.MainnetRevenueDistributionProgramID),
4746
InternetLatencyCollectorPK: solana.MustPublicKeyFromBase58(config.MainnetInternetLatencyCollectorPK),
4847
DeviceLocalASN: config.MainnetDeviceLocalASN,
49-
TwoZOracleURL: config.MainnetTwoZOracleURL,
5048
SolanaRPCURL: config.MainnetSolanaRPC,
5149
TelemetryFlowIngestURL: config.MainnetTelemetryFlowIngestURL,
5250
TelemetryStateIngestURL: config.MainnetTelemetryStateIngestURL,
@@ -65,7 +63,6 @@ func TestConfig_NetworkConfigForEnv(t *testing.T) {
6563
TelemetryProgramID: solana.MustPublicKeyFromBase58(config.TestnetTelemetryProgramID),
6664
InternetLatencyCollectorPK: solana.MustPublicKeyFromBase58(config.TestnetInternetLatencyCollectorPK),
6765
DeviceLocalASN: config.TestnetDeviceLocalASN,
68-
TwoZOracleURL: config.TestnetTwoZOracleURL,
6966
SolanaRPCURL: config.TestnetSolanaRPC,
7067
TelemetryFlowIngestURL: config.TestnetTelemetryFlowIngestURL,
7168
TelemetryStateIngestURL: config.TestnetTelemetryStateIngestURL,
@@ -84,7 +81,6 @@ func TestConfig_NetworkConfigForEnv(t *testing.T) {
8481
TelemetryProgramID: solana.MustPublicKeyFromBase58(config.DevnetTelemetryProgramID),
8582
InternetLatencyCollectorPK: solana.MustPublicKeyFromBase58(config.DevnetInternetLatencyCollectorPK),
8683
DeviceLocalASN: config.DevnetDeviceLocalASN,
87-
TwoZOracleURL: config.DevnetTwoZOracleURL,
8884
SolanaRPCURL: config.TestnetSolanaRPC,
8985
TelemetryFlowIngestURL: config.DevnetTelemetryFlowIngestURL,
9086
TelemetryStateIngestURL: config.DevnetTelemetryStateIngestURL,

controlplane/monitor/cmd/monitor/main.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
solanarpc "github.com/gagliardetto/solana-go/rpc"
1818
influxdb2 "github.com/influxdata/influxdb-client-go/v2"
1919
"github.com/malbeclabs/doublezero/config"
20-
twozoracle "github.com/malbeclabs/doublezero/controlplane/monitor/internal/2z-oracle"
2120
"github.com/malbeclabs/doublezero/controlplane/monitor/internal/worker"
2221
"github.com/malbeclabs/doublezero/smartcontract/sdk/go/serviceability"
2322
"github.com/malbeclabs/doublezero/smartcontract/sdk/go/telemetry"
@@ -27,7 +26,6 @@ import (
2726

2827
const (
2928
defaultInterval = 1 * time.Minute
30-
defaultTwoZOracleInterval = 5 * time.Second
3129
defaultSolBalanceInterval = 30 * time.Second
3230
defaultSolBalanceThreshold = 0.1
3331
)
@@ -44,7 +42,7 @@ var (
4442
metricsAddr = flag.String("metrics-addr", ":8080", "Address to listen on for prometheus metrics")
4543
slackWebhookURL = flag.String("slack-webhook-url", "", "The Slack webhook URL to send alerts")
4644
allowOwnUsers = flag.Bool("allow-own-users", false, "Include DoubleZero's own users instead of filtering them out")
47-
twoZOracleInterval = flag.Duration("twoz-oracle-interval", defaultTwoZOracleInterval, "interval to execute twoz oracle watcher ticks")
45+
_ = flag.Duration("twoz-oracle-interval", 5*time.Second, "ignored; ansible still passes this")
4846
solBalanceAccounts = flag.String("sol-balance-accounts", "", "comma-separated label:pubkey pairs (e.g., debt_accountant:ABC123,rewards_accountant:XYZ789)")
4947
solBalanceThreshold = flag.Float64("sol-balance-threshold", defaultSolBalanceThreshold, "SOL balance threshold for warning logs")
5048
solBalanceInterval = flag.Duration("sol-balance-interval", defaultSolBalanceInterval, "interval to check SOL balances")
@@ -154,12 +152,6 @@ func main() {
154152
}
155153
}()
156154

157-
var twoZOracleClient twozoracle.TwoZOracleClient
158-
if networkConfig.TwoZOracleURL != "" {
159-
// 2ZOracle is not configured in some environments.
160-
twoZOracleClient = twozoracle.NewTwoZOracleClient(http.DefaultClient, networkConfig.TwoZOracleURL)
161-
}
162-
163155
// Initialize InfluxDB writer
164156
var influxClient influxdb2.Client
165157
var influxWriter worker.InfluxWriter
@@ -222,8 +214,6 @@ func main() {
222214
Interval: *interval,
223215
SlackWebhookURL: *slackWebhookURL,
224216
AllowOwnUsers: *allowOwnUsers,
225-
TwoZOracleClient: twoZOracleClient,
226-
TwoZOracleInterval: *twoZOracleInterval,
227217
InfluxWriter: influxWriter,
228218
Env: *env,
229219
SolBalanceRPCClient: rpcClient,

0 commit comments

Comments
 (0)