Skip to content

Commit

Permalink
Update URL pathways
Browse files Browse the repository at this point in the history
  • Loading branch information
howardwu committed Feb 11, 2024
1 parent 62bce04 commit 5ed8c53
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion console/network/src/mainnet_v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl Network for MainnetV0 {
/// The network ID.
const ID: u16 = 0;
/// The function name for the inclusion circuit.
const INCLUSION_FUNCTION_NAME: &'static str = snarkvm_parameters::mainnet::TESTNET3_INCLUSION_FUNCTION_NAME;
const INCLUSION_FUNCTION_NAME: &'static str = snarkvm_parameters::mainnet::NETWORK_INCLUSION_FUNCTION_NAME;
/// The network name.
const NAME: &'static str = "Aleo Mainnet (v0)";

Expand Down
12 changes: 6 additions & 6 deletions ledger/query/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl<N: Network, B: BlockStorage<N>> QueryTrait<N> for Query<N, B> {
match self {
Self::VM(block_store) => Ok(block_store.current_state_root()),
Self::REST(url) => match N::ID {
3 => Ok(Self::get_request(&format!("{url}/testnet3/latest/stateRoot"))?.into_json()?),
3 => Ok(Self::get_request(&format!("{url}/mainnet/latest/stateRoot"))?.into_json()?),
_ => bail!("Unsupported network ID in inclusion query"),
},
}
Expand All @@ -78,7 +78,7 @@ impl<N: Network, B: BlockStorage<N>> QueryTrait<N> for Query<N, B> {
match self {
Self::VM(block_store) => Ok(block_store.current_state_root()),
Self::REST(url) => match N::ID {
3 => Ok(Self::get_request_async(&format!("{url}/testnet3/latest/stateRoot")).await?.json().await?),
3 => Ok(Self::get_request_async(&format!("{url}/mainnet/latest/stateRoot")).await?.json().await?),
_ => bail!("Unsupported network ID in inclusion query"),
},
}
Expand All @@ -89,7 +89,7 @@ impl<N: Network, B: BlockStorage<N>> QueryTrait<N> for Query<N, B> {
match self {
Self::VM(block_store) => block_store.get_state_path_for_commitment(commitment),
Self::REST(url) => match N::ID {
3 => Ok(Self::get_request(&format!("{url}/testnet3/statePath/{commitment}"))?.into_json()?),
3 => Ok(Self::get_request(&format!("{url}/mainnet/statePath/{commitment}"))?.into_json()?),
_ => bail!("Unsupported network ID in inclusion query"),
},
}
Expand All @@ -102,7 +102,7 @@ impl<N: Network, B: BlockStorage<N>> QueryTrait<N> for Query<N, B> {
Self::VM(block_store) => block_store.get_state_path_for_commitment(commitment),
Self::REST(url) => match N::ID {
3 => {
Ok(Self::get_request_async(&format!("{url}/testnet3/statePath/{commitment}")).await?.json().await?)
Ok(Self::get_request_async(&format!("{url}/mainnet/statePath/{commitment}")).await?.json().await?)
}
_ => bail!("Unsupported network ID in inclusion query"),
},
Expand All @@ -118,7 +118,7 @@ impl<N: Network, B: BlockStorage<N>> Query<N, B> {
block_store.get_program(program_id)?.ok_or_else(|| anyhow!("Program {program_id} not found in storage"))
}
Self::REST(url) => match N::ID {
3 => Ok(Self::get_request(&format!("{url}/testnet3/program/{program_id}"))?.into_json()?),
3 => Ok(Self::get_request(&format!("{url}/mainnet/program/{program_id}"))?.into_json()?),
_ => bail!("Unsupported network ID in inclusion query"),
},
}
Expand All @@ -132,7 +132,7 @@ impl<N: Network, B: BlockStorage<N>> Query<N, B> {
block_store.get_program(program_id)?.ok_or_else(|| anyhow!("Program {program_id} not found in storage"))
}
Self::REST(url) => match N::ID {
3 => Ok(Self::get_request_async(&format!("{url}/testnet3/program/{program_id}")).await?.json().await?),
3 => Ok(Self::get_request_async(&format!("{url}/mainnet/program/{program_id}")).await?.json().await?),
_ => bail!("Unsupported network ID in inclusion query"),
},
}
Expand Down
2 changes: 1 addition & 1 deletion parameters/src/mainnet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl_remote!(InclusionProver, REMOTE_URL, "resources/", "inclusion", "prover");
impl_local!(InclusionVerifier, "resources/", "inclusion", "verifier");

/// The function name for the inclusion circuit.
pub const TESTNET3_INCLUSION_FUNCTION_NAME: &str = "inclusion";
pub const NETWORK_INCLUSION_FUNCTION_NAME: &str = "inclusion";

lazy_static! {
pub static ref INCLUSION_PROVING_KEY: Vec<u8> =
Expand Down
2 changes: 1 addition & 1 deletion vm/cli/commands/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl Build {

// package.build::<Aleo>(match self.offline {
// true => None,
// false => Some(endpoint.unwrap_or("https://vm.aleo.org/testnet3/build".to_string())),
// false => Some(endpoint.unwrap_or("https://api.explorer.aleo.org/v0/mainnet/build".to_string())),
// })?;

// Prepare the path string.
Expand Down
2 changes: 1 addition & 1 deletion vm/package/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ mod tests {

type CurrentAleo = snarkvm_circuit::network::AleoV0;

// TODO: Re-enable this test after `staging` is merged into `testnet3` for the October 18, 2023 calibration reset.
// TODO: Re-enable this test after `mainnet`.
#[test]
#[ignore]
fn test_execute() {
Expand Down

0 comments on commit 5ed8c53

Please sign in to comment.