Skip to content

Commit 2f730ed

Browse files
helium-lib update (#997)
`helium-program-library` had to update to `anchor@>30`. That version of `anchor` broke backwards compatibility with the IDL format, so we had no choice but to move forwards. This meant, updating `helium-lib` which was a desire of ours anyway. And it finally brought with it some boons. - drop `helium-anchor-gen` as a dep, all programs can be accessed through `helium-lib` - update `sqlx`, in fact it was required. Updating `sqlx` has been a pain for us in the past because a bunch of anchor/solana dependencies wreaked havoc with very low level dependencies like `zeroize`. Now that we've updated, those dependencies are sequestered enough in `helium-lib` that we can unpin from our special version of slqx and go back to the main branch. But wait! Another dragon appears to have been hiding behind the first dragon. We udpated to `[email protected]`, but we need `[email protected]` for this dragon. There were a few bugs in the very short-lived `[email protected]`. So @jeff did the needful and pushed us through to `0.8`. Below is a truncated list of the struggles to get us to the mountain top. * update bs58 * Moved into solana workspace * anchor-client * helium-anchor-gen (just you wait) * solana-client * solana-sdk * solana-program * spl-token * helium-lib * upgrading sqlx and db connection type errors * fixup iot-packet-verifier * fixup iot-verifier * fixup mobile-config * fixup reward-index * fixup mobile-packet-verifier * fixup moile-verifier * fixup boost-manager * fixup iot-config * Go back to some updated deps that didn't need to be * back to known backon * back to known metrics * Some code cleanliness * order imports for boost-manager * Export SolPubkey as top level * Export RpcClient as top level for price * Remove solana from iot-config * reorder cargo for iot-packet-verifier * Cleanup imports for iot-verifier * update to SolPubkeyin mobile-config * Update to top level exports for mobile-verifier * export SubDao as top level * merge imports for helium-lib * format cargo.toml files * xorf-generator and helium-lib needed some more updates to work with Oracles * back to main branch for helium-lib and xorf-generator * Jeff has entered the dance and is boogying * update sqlx to 0.8 * disable default sqlx features * roll back majority of branch deps from helium-crypto * restore helium-lib to main branch --------- Co-authored-by: jeffgrunewald <[email protected]>
1 parent f378abe commit 2f730ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+5539
-3778
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ license = "Apache-2.0"
3535
edition = "2021"
3636

3737
[workspace.dependencies]
38-
anchor-client = { version = "0.29.0", features = ["async"] }
3938
anyhow = { version = "1", features = ["backtrace"] }
40-
bs58 = { version = "0.4", features = ["check"] }
39+
bs58 = { version = "0.5.1", features = ["check"] }
4140
thiserror = "1"
4241
clap = { version = "4", features = ["derive"] }
4342
serde = { version = "1", features = ["derive"] }
@@ -55,29 +54,23 @@ tokio = { version = "1", default-features = false, features = [
5554
"time",
5655
] }
5756
tokio-stream = "0"
58-
sqlx = { version = "0", features = [
57+
sqlx = { version = "0.8", default-features = false, features = [
5958
"postgres",
6059
"uuid",
61-
"decimal",
60+
"rust_decimal",
6261
"chrono",
6362
"migrate",
6463
"macros",
6564
"runtime-tokio-rustls",
6665
] }
67-
helium-anchor-gen = { git = "https://github.com/helium/helium-anchor-gen.git" }
68-
helium-crypto = { version = "0.8.4", features = ["multisig"] }
69-
helium-lib = { git = "https://github.com/helium/helium-wallet-rs.git", branch = "master" }
66+
helium-crypto = { version = "0.9.2", features = ["multisig", "sqlx-postgres"] }
7067
hextree = { git = "https://github.com/jaykickliter/HexTree", branch = "main", features = [
7168
"disktree",
7269
] }
7370
helium-proto = { git = "https://github.com/helium/proto", branch = "master", features = [
7471
"services",
7572
] }
7673
beacon = { git = "https://github.com/helium/proto", branch = "master" }
77-
solana-client = "1.18"
78-
solana-sdk = "1.18"
79-
solana-program = "1.18"
80-
spl-token = "3.5.0"
8174
reqwest = { version = "0", default-features = false, features = [
8275
"gzip",
8376
"json",
@@ -122,9 +115,7 @@ tower-http = { version = "0", features = ["trace"] }
122115
derive_builder = "0"
123116

124117
[patch.crates-io]
125-
# v0.7.0-alpha.3
126-
# https://github.com/launchbadge/sqlx/commit/42dd78fe931df651eac411316ed3eab87c2f79b2
127-
sqlx = { git = "https://github.com/launchbadge/sqlx.git", rev = "42dd78fe931df651eac411316ed3eab87c2f79b2" }
118+
anchor-lang = { git = "https://github.com/madninja/anchor.git", branch = "madninja/const_pubkey" }
128119

129120
# When attempting to test proto changes without needing to push a branch you can
130121
# patch the github url to point to your local proto repo.

boost_manager/Cargo.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ license.workspace = true
88

99

1010
[dependencies]
11-
anyhow = { workspace = true }
1211
axum = { version = "0", features = ["tracing"] }
12+
13+
anyhow = { workspace = true }
1314
bs58 = { workspace = true }
1415
config = { workspace = true }
1516
clap = { workspace = true }
@@ -25,10 +26,6 @@ futures = { workspace = true }
2526
futures-util = { workspace = true }
2627
prost = { workspace = true }
2728
once_cell = { workspace = true }
28-
mobile-config = { path = "../mobile_config" }
29-
file-store = { path = "../file_store" }
30-
db-store = { path = "../db_store" }
31-
poc-metrics = { path = "../metrics" }
3229
tokio = { workspace = true }
3330
tokio-util = { workspace = true }
3431
tracing = { workspace = true }
@@ -42,11 +39,15 @@ rust_decimal_macros = { workspace = true }
4239
tonic = { workspace = true }
4340
rand = { workspace = true }
4441
async-trait = { workspace = true }
45-
task-manager = { path = "../task_manager" }
4642
http = { workspace = true }
4743
http-serde = { workspace = true }
48-
solana = { path = "../solana" }
49-
solana-sdk = { workspace = true }
5044
humantime-serde = { workspace = true }
51-
custom-tracing = { path = "../custom_tracing" }
5245
hextree = { workspace = true }
46+
47+
custom-tracing = { path = "../custom_tracing" }
48+
db-store = { path = "../db_store" }
49+
file-store = { path = "../file_store" }
50+
mobile-config = { path = "../mobile_config" }
51+
poc-metrics = { path = "../metrics" }
52+
solana = { path = "../solana" }
53+
task-manager = { path = "../task_manager" }

boost_manager/src/db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub async fn insert_activated_hex(
5757
.bind(boosted_hex_pubkey)
5858
.bind(boost_config_pubkey)
5959
.bind(OnChainStatus::Queued)
60-
.execute(txn)
60+
.execute(&mut **txn)
6161
.await?;
6262

6363
Ok(())

boost_manager/tests/integrations/activator_tests.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use boost_manager::{activator, db, OnChainStatus};
22
use chrono::{DateTime, Duration as ChronoDuration, Duration, Timelike, Utc};
33
use mobile_config::boosted_hex_info::{BoostedHexInfo, BoostedHexes};
4-
use solana_sdk::pubkey::Pubkey;
4+
use solana::SolPubkey;
55
use sqlx::PgPool;
66
use std::{collections::HashMap, num::NonZeroU32, str::FromStr};
77

@@ -47,8 +47,8 @@ impl TestContext {
4747
end_ts: Some(end_ts_1),
4848
period_length: boost_period_length,
4949
multipliers: multipliers1,
50-
boosted_hex_pubkey: Pubkey::from_str(BOOST_HEX_PUBKEY).unwrap(),
51-
boost_config_pubkey: Pubkey::from_str(BOOST_CONFIG_PUBKEY).unwrap(),
50+
boosted_hex_pubkey: SolPubkey::from_str(BOOST_HEX_PUBKEY).unwrap(),
51+
boost_config_pubkey: SolPubkey::from_str(BOOST_CONFIG_PUBKEY).unwrap(),
5252
version: 0,
5353
},
5454
BoostedHexInfo {
@@ -57,8 +57,8 @@ impl TestContext {
5757
end_ts: Some(end_ts_2),
5858
period_length: boost_period_length,
5959
multipliers: multipliers2,
60-
boosted_hex_pubkey: Pubkey::from_str(BOOST_HEX_PUBKEY).unwrap(),
61-
boost_config_pubkey: Pubkey::from_str(BOOST_CONFIG_PUBKEY).unwrap(),
60+
boosted_hex_pubkey: SolPubkey::from_str(BOOST_HEX_PUBKEY).unwrap(),
61+
boost_config_pubkey: SolPubkey::from_str(BOOST_CONFIG_PUBKEY).unwrap(),
6262
version: 0,
6363
},
6464
BoostedHexInfo {
@@ -68,8 +68,8 @@ impl TestContext {
6868
end_ts: None,
6969
period_length: boost_period_length,
7070
multipliers: multipliers3,
71-
boosted_hex_pubkey: Pubkey::from_str(BOOST_HEX_PUBKEY).unwrap(),
72-
boost_config_pubkey: Pubkey::from_str(BOOST_CONFIG_PUBKEY).unwrap(),
71+
boosted_hex_pubkey: SolPubkey::from_str(BOOST_HEX_PUBKEY).unwrap(),
72+
boost_config_pubkey: SolPubkey::from_str(BOOST_CONFIG_PUBKEY).unwrap(),
7373
version: 0,
7474
},
7575
];

boost_manager/tests/integrations/purger_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ pub async fn insert_data(
113113
.bind(BOOST_CONFIG_PUBKEY)
114114
.bind(status)
115115
.bind(last_updated_at)
116-
.execute(txn)
116+
.execute(&mut **txn)
117117
.await?;
118118
Ok(())
119119
}

boost_manager/tests/integrations/updater_tests.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ use async_trait::async_trait;
22
use boost_manager::{db, updater::Updater, OnChainStatus};
33
use chrono::{DateTime, Utc};
44
use file_store::hex_boost::BoostedHexActivation;
5-
use solana::{start_boost::SolanaNetwork, GetSignature, SolanaRpcError};
6-
use solana_sdk::signature::Signature;
5+
use solana::{start_boost::SolanaNetwork, GetSignature, Signature, SolanaRpcError};
76
use sqlx::{PgPool, Postgres, Transaction};
87
use std::{string::ToString, sync::Mutex, time::Duration};
98

boost_manager/tests/integrations/watcher_tests.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use boost_manager::watcher::{self, Watcher};
33
use chrono::{Duration as ChronoDuration, Duration, Utc};
44
use helium_proto::BoostedHexInfoV1 as BoostedHexInfoProto;
55
use mobile_config::boosted_hex_info::BoostedHexInfo;
6-
use solana_sdk::pubkey::Pubkey;
6+
use solana::SolPubkey;
77
use sqlx::PgPool;
88
use std::{num::NonZeroU32, str::FromStr};
99

@@ -42,8 +42,8 @@ async fn test_boosted_hex_updates_to_filestore(pool: PgPool) -> anyhow::Result<(
4242
end_ts: Some(end_ts_1),
4343
period_length: boost_period_length,
4444
multipliers: multipliers1,
45-
boosted_hex_pubkey: Pubkey::from_str(BOOST_HEX_PUBKEY).unwrap(),
46-
boost_config_pubkey: Pubkey::from_str(BOOST_CONFIG_PUBKEY).unwrap(),
45+
boosted_hex_pubkey: SolPubkey::from_str(BOOST_HEX_PUBKEY).unwrap(),
46+
boost_config_pubkey: SolPubkey::from_str(BOOST_CONFIG_PUBKEY).unwrap(),
4747
version: 0,
4848
},
4949
BoostedHexInfo {
@@ -52,8 +52,8 @@ async fn test_boosted_hex_updates_to_filestore(pool: PgPool) -> anyhow::Result<(
5252
end_ts: Some(end_ts_2),
5353
period_length: boost_period_length,
5454
multipliers: multipliers2,
55-
boosted_hex_pubkey: Pubkey::from_str(BOOST_HEX_PUBKEY).unwrap(),
56-
boost_config_pubkey: Pubkey::from_str(BOOST_CONFIG_PUBKEY).unwrap(),
55+
boosted_hex_pubkey: SolPubkey::from_str(BOOST_HEX_PUBKEY).unwrap(),
56+
boost_config_pubkey: SolPubkey::from_str(BOOST_CONFIG_PUBKEY).unwrap(),
5757
version: 0,
5858
},
5959
];
@@ -74,13 +74,13 @@ async fn test_boosted_hex_updates_to_filestore(pool: PgPool) -> anyhow::Result<(
7474

7575
if let Ok(boosted_hexes) = boosted_hexes_result {
7676
let res_boosted_hex_pubkey1 =
77-
Pubkey::try_from(boosted_hexes[0].boosted_hex_pubkey.as_slice())?.to_string();
77+
SolPubkey::try_from(boosted_hexes[0].boosted_hex_pubkey.as_slice())?.to_string();
7878
let res_boost_config_pubkey1 =
79-
Pubkey::try_from(boosted_hexes[0].boost_config_pubkey.as_slice())?.to_string();
79+
SolPubkey::try_from(boosted_hexes[0].boost_config_pubkey.as_slice())?.to_string();
8080
let res_boosted_hex_pubkey2 =
81-
Pubkey::try_from(boosted_hexes[1].boosted_hex_pubkey.as_slice())?.to_string();
81+
SolPubkey::try_from(boosted_hexes[1].boosted_hex_pubkey.as_slice())?.to_string();
8282
let res_boost_config_pubkey2 =
83-
Pubkey::try_from(boosted_hexes[1].boost_config_pubkey.as_slice())?.to_string();
83+
SolPubkey::try_from(boosted_hexes[1].boost_config_pubkey.as_slice())?.to_string();
8484

8585
// assert the boosted hexes outputted to filestore
8686
assert_eq!(2, boosted_hexes.len());

db_store/Cargo.toml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,18 @@ authors.workspace = true
77
license.workspace = true
88

99
[dependencies]
10-
metrics = {workspace = true }
10+
metrics = { workspace = true }
1111
poc-metrics = { path = "../metrics" }
12-
thiserror = {workspace = true}
13-
sqlx = {workspace = true}
14-
serde = {workspace = true}
15-
http = {workspace = true}
16-
tokio = {workspace = true}
17-
tracing = {workspace = true}
12+
thiserror = { workspace = true }
13+
sqlx = { workspace = true }
14+
serde = { workspace = true }
15+
http = { workspace = true }
16+
tokio = { workspace = true }
17+
tracing = { workspace = true }
1818

1919
aws-config = "0"
2020
aws-sdk-sts = "0"
2121
aws-credential-types = "0"
22-
aws-smithy-http = "0"
23-
aws-types = "0"
24-
aws-sig-auth = "0"
25-
22+
aws-smithy-http = "0.54.4"
23+
aws-types = "0.54.1"
24+
aws-sig-auth = "0.54.1"

denylist/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ serde = { workspace = true }
2121
serde_json = { workspace = true }
2222
config = { workspace = true }
2323
chrono = { workspace = true }
24-
xorf-generator = { git = "https://github.com/helium/xorf-generator", branch = "main" }
2524
humantime-serde = { workspace = true }
25+
26+
xorf-generator = { git = "https://github.com/helium/xorf-generator", branch = "main" }

0 commit comments

Comments
 (0)