Skip to content

Commit 114b6b0

Browse files
authored
Merge pull request #2838 from ProvableHQ/feat/query-uri
[Feature] Use http::Uri for query endpoints
2 parents d639908 + 4866d72 commit 114b6b0

File tree

10 files changed

+224
-149
lines changed

10 files changed

+224
-149
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ jobs:
559559

560560
parameters-large:
561561
executor: rust-docker
562-
resource_class: << pipeline.parameters.xlarge >>
562+
resource_class: << pipeline.parameters.twoxlarge >>
563563
steps:
564564
- run_test:
565565
workspace_member: snarkvm-parameters

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/network/src/canary_v0.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,10 @@ impl Network for CanaryV0 {
180180
(ConsensusVersion::V6, 25),
181181
(ConsensusVersion::V9, 25),
182182
];
183-
/// The network name.
183+
/// The (long) network name.
184184
const NAME: &'static str = "Aleo Canary (v0)";
185+
/// The short network name.
186+
const SHORT_NAME: &'static str = "canary";
185187
/// A list of (consensus_version, block_height) pairs indicating when each consensus version takes effect.
186188
/// Documentation for what is changed at each version can be found in `ConsensusVersion`.
187189
/// Do not read this directly outside of tests, use `N::CONSENSUS_VERSION_HEIGHTS()` instead.

console/network/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ pub trait Network:
101101
{
102102
/// The network ID.
103103
const ID: u16;
104-
/// The network name.
104+
/// The (long) network name.
105105
const NAME: &'static str;
106+
/// The short network name (used, for example, in query URLs).
107+
const SHORT_NAME: &'static str;
106108

107109
/// The function name for the inclusion circuit.
108110
const INCLUSION_FUNCTION_NAME: &'static str;

console/network/src/mainnet_v0.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,10 @@ impl Network for MainnetV0 {
185185
(ConsensusVersion::V6, 103),
186186
(ConsensusVersion::V9, 104),
187187
];
188-
/// The network name.
188+
/// The (long) network name.
189189
const NAME: &'static str = "Aleo Mainnet (v0)";
190+
/// The short network name.
191+
const SHORT_NAME: &'static str = "mainnet";
190192
/// A list of (consensus_version, block_height) pairs indicating when each consensus version takes effect.
191193
/// Documentation for what is changed at each version can be found in `ConsensusVersion`.
192194
/// Do not read this directly outside of tests, use `N::CONSENSUS_VERSION_HEIGHTS()` instead.

console/network/src/testnet_v0.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,10 @@ impl Network for TestnetV0 {
180180
(ConsensusVersion::V6, 25),
181181
(ConsensusVersion::V9, 25),
182182
];
183-
/// The network name.
183+
/// The (long) network name.
184184
const NAME: &'static str = "Aleo Testnet (v0)";
185+
/// The short network name.
186+
const SHORT_NAME: &'static str = "testnet";
185187
/// A list of (consensus_version, block_height) pairs indicating when each consensus version takes effect.
186188
/// Documentation for what is changed at each version can be found in `ConsensusVersion`.
187189
/// Do not read this directly outside of tests, use `N::CONSENSUS_VERSION_HEIGHTS()` instead.

ledger/query/Cargo.toml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ wasm = [
3030
"snarkvm-synthesizer-program/wasm"
3131
]
3232
query = [
33+
"dep:snarkvm-ledger-block",
3334
"dep:snarkvm-ledger-store",
3435
"dep:snarkvm-synthesizer-program",
3536
"dep:ureq",
@@ -39,6 +40,10 @@ query = [
3940
workspace = true
4041
features = [ "default" ]
4142

43+
[dependencies.snarkvm-ledger-block]
44+
workspace = true
45+
optional = true
46+
4247
[dependencies.snarkvm-ledger-store]
4348
workspace = true
4449
optional = true
@@ -54,18 +59,23 @@ workspace = true
5459
version = "0.1"
5560

5661
[dependencies.serde]
57-
version = "1"
62+
workspace = true
5863

5964
[dependencies.serde_json]
60-
version = "1"
65+
workspace = true
6166
features = [ "preserve_order" ]
6267

6368
[dependencies.reqwest]
6469
version = "0.12"
6570
features = [ "json" ]
6671
optional = true
6772

68-
[dependencies.ureq]
73+
[target.'cfg(target_arch="wasm32")'.dependencies.ureq]
6974
workspace = true
70-
features = [ "json" ]
75+
features = [ "json", "gzip" ]
76+
optional = true
77+
78+
[target.'cfg(not(target_arch="wasm32"))'.dependencies.ureq]
79+
workspace = true
80+
features = [ "json", "gzip", "rustls" ]
7181
optional = true

0 commit comments

Comments
 (0)