Skip to content

Commit

Permalink
Merge branch 'develop' into dev-tools/build-mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
DaughterOfMars authored Jan 10, 2025
2 parents 145b5a7 + 5026687 commit 7f473f9
Show file tree
Hide file tree
Showing 52 changed files with 362 additions and 487 deletions.
517 changes: 241 additions & 276 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ pretty_assertions = "1.3.0"
proc-macro2 = "1.0.47"
prometheus = "0.13.3"
proptest = "1.1.0"
proptest-derive = "0.3.0"
proptest-derive = "0.5.1"
prost = "0.13"
protobuf = { version = "2.28", features = ["with-bytes"] }
quinn-proto = "0.11.6"
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-analytics-indexer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub struct AnalyticsIndexerConfig {
pub file_type: FileType,
#[clap(
long,
default_value = "https://checkpoints.mainnet.iota.io",
default_value = "https://checkpoints.mainnet.iota.cafe",
global = true
)]
pub remote_store_url: String,
Expand Down
26 changes: 4 additions & 22 deletions crates/iota-cluster-test/src/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,10 @@ use tracing::info;

use super::config::{ClusterTestOpt, Env};

const DEVNET_FAUCET_ADDR: &str = "https://faucet.devnet.iota.io:443";
const STAGING_FAUCET_ADDR: &str = "https://faucet.staging.iota.io:443";
const CONTINUOUS_FAUCET_ADDR: &str = "https://faucet.ci.iota.io:443";
const CONTINUOUS_NOMAD_FAUCET_ADDR: &str = "https://faucet.nomad.ci.iota.io:443";
const TESTNET_FAUCET_ADDR: &str = "https://faucet.testnet.iota.io:443";
const DEVNET_FULLNODE_ADDR: &str = "https://rpc.devnet.iota.io:443";
const STAGING_FULLNODE_ADDR: &str = "https://fullnode.staging.iota.io:443";
const CONTINUOUS_FULLNODE_ADDR: &str = "https://fullnode.ci.iota.io:443";
const CONTINUOUS_NOMAD_FULLNODE_ADDR: &str = "https://fullnode.nomad.ci.iota.io:443";
const TESTNET_FULLNODE_ADDR: &str = "https://fullnode.testnet.iota.io:443";
const DEVNET_FAUCET_ADDR: &str = "https://faucet.devnet.iota.cafe:443";
const TESTNET_FAUCET_ADDR: &str = "https://faucet.testnet.iota.cafe:443";
const DEVNET_FULLNODE_ADDR: &str = "https://api.devnet.iota.cafe:443";
const TESTNET_FULLNODE_ADDR: &str = "https://api.testnet.iota.cafe:443";

pub struct ClusterFactory;

Expand Down Expand Up @@ -94,18 +88,6 @@ impl Cluster for RemoteRunningCluster {
String::from(DEVNET_FULLNODE_ADDR),
String::from(DEVNET_FAUCET_ADDR),
),
Env::Staging => (
String::from(STAGING_FULLNODE_ADDR),
String::from(STAGING_FAUCET_ADDR),
),
Env::Ci => (
String::from(CONTINUOUS_FULLNODE_ADDR),
String::from(CONTINUOUS_FAUCET_ADDR),
),
Env::CiNomad => (
String::from(CONTINUOUS_NOMAD_FULLNODE_ADDR),
String::from(CONTINUOUS_NOMAD_FAUCET_ADDR),
),
Env::Testnet => (
String::from(TESTNET_FULLNODE_ADDR),
String::from(TESTNET_FAUCET_ADDR),
Expand Down
3 changes: 0 additions & 3 deletions crates/iota-cluster-test/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ use regex::Regex;
#[derive(Parser, Clone, ValueEnum, Debug)]
pub enum Env {
Devnet,
Staging,
Ci,
CiNomad,
Testnet,
CustomRemote,
NewLocal,
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub const IOTA_KEYSTORE_ALIASES_FILENAME: &str = "iota.aliases";
pub const IOTA_BENCHMARK_GENESIS_GAS_KEYSTORE_FILENAME: &str = "benchmark.keystore";
pub const IOTA_GENESIS_FILENAME: &str = "genesis.blob";
pub const IOTA_GENESIS_MIGRATION_TX_DATA_FILENAME: &str = "migration.blob";
pub const IOTA_DEV_NET_URL: &str = "https://fullnode.devnet.iota.io:443";
pub const IOTA_DEV_NET_URL: &str = "https://api.devnet.iota.cafe:443";

pub const AUTHORITIES_DB_NAME: &str = "authorities_db";
pub const CONSENSUS_DB_NAME: &str = "consensus_db";
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-config/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ pub fn default_zklogin_oauth_providers() -> BTreeMap<Chain, BTreeSet<String>> {

fn default_transaction_kv_store_config() -> TransactionKeyValueStoreReadConfig {
TransactionKeyValueStoreReadConfig {
base_url: "https://transactions.iota.io/".to_string(),
base_url: "https://transactions.iota.cafe/".to_string(),
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/iota-e2e-tests/tests/passkey_e2e_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async fn create_credential_and_sign_test_tx(
let store: Option<Passkey> = None;
let my_authenticator = Authenticator::new(my_aaguid, store, user_validation_method);
let mut my_client = Client::new(my_authenticator);
let origin = Url::parse("https://www.iota.io").unwrap();
let origin = Url::parse("https://www.iota.org").unwrap();

// Create credential.
let challenge_bytes_from_rp: Bytes = random_vec(32).into();
Expand Down
6 changes: 3 additions & 3 deletions crates/iota-indexer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ To run the indexer as a standalone service with an existing fullnode, follow the

```sh
# Change the RPC_CLIENT_URL to http://0.0.0.0:9000 to run indexer against local validator & fullnode
cargo run --bin iota-indexer -- --db-url "postgres://postgres:postgrespw@localhost/iota_indexer" --rpc-client-url "https://fullnode.devnet.iota.io:443" --fullnode-sync-worker --reset-db
cargo run --bin iota-indexer -- --db-url "postgres://postgres:postgrespw@localhost/iota_indexer" --rpc-client-url "https://api.devnet.iota.cafe:443" --fullnode-sync-worker --reset-db
```

- to run indexer as a reader which exposes a JSON RPC service with following [APIs](https://docs.iota.org/iota-api-ref).

```
cargo run --bin iota-indexer -- --db-url "postgres://postgres:postgrespw@localhost/iota_indexer" --rpc-client-url "https://fullnode.devnet.iota.io:443" --rpc-server-worker
cargo run --bin iota-indexer -- --db-url "postgres://postgres:postgrespw@localhost/iota_indexer" --rpc-client-url "https://api.devnet.iota.cafe:443" --rpc-server-worker
```

More available flags can be found in this [file](https://github.com/iotaledger/iota/blob/develop/crates/iota-indexer/src/lib.rs).
Expand Down Expand Up @@ -171,5 +171,5 @@ Note that you need an existing database for this to work. Using the DATABASE_URL

```sh
# Change the RPC_CLIENT_URL to http://0.0.0.0:9000 to run indexer against local validator & fullnode
cargo run --bin iota-indexer --features mysql-feature --no-default-features -- --db-url "<DATABASE_URL>" --rpc-client-url "https://fullnode.devnet.iota.io:443" --fullnode-sync-worker --reset-db
cargo run --bin iota-indexer --features mysql-feature --no-default-features -- --db-url "<DATABASE_URL>" --rpc-client-url "https://api.devnet.iota.cafe:443" --fullnode-sync-worker --reset-db
```
4 changes: 2 additions & 2 deletions crates/iota-indexer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub struct IndexerConfig {
pub db_name: Option<String>,
#[clap(long, default_value = "http://0.0.0.0:9000", global = true)]
pub rpc_client_url: String,
#[clap(long, default_value = Some("https://checkpoints.mainnet.iota.io"), global = true)]
#[clap(long, default_value = Some("https://checkpoints.mainnet.iota.cafe"), global = true)]
pub remote_store_url: Option<String>,
#[clap(long, default_value = "0.0.0.0", global = true)]
pub client_metric_host: String,
Expand Down Expand Up @@ -149,7 +149,7 @@ impl Default for IndexerConfig {
db_port: None,
db_name: None,
rpc_client_url: "http://127.0.0.1:9000".to_string(),
remote_store_url: Some("https://checkpoints.mainnet.iota.io".to_string()),
remote_store_url: Some("https://checkpoints.mainnet.iota.cafe".to_string()),
client_metric_host: "0.0.0.0".to_string(),
client_metric_port: 9184,
rpc_server_url: "0.0.0.0".to_string(),
Expand Down
4 changes: 2 additions & 2 deletions crates/iota-json-rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ pub struct JsonRpcServerBuilder {
pub fn iota_rpc_doc(version: &str) -> Project {
Project::new(
version,
"Iota JSON-RPC",
"Iota JSON-RPC API for interaction with Iota Full node. Make RPC calls using https://fullnode.NETWORK.iota.io:443, where NETWORK is the network you want to use (testnet, devnet, mainnet). By default, local networks use port 9000.",
"IOTA JSON-RPC",
"IOTA JSON-RPC API for interaction with Iota Full node. Make RPC calls using https://api.NETWORK.iota.cafe:443, where NETWORK is the network you want to use (testnet, devnet, mainnet). By default, local networks use port 9000.",
"IOTA Foundation",
"https://iota.org",
"[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-light-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The light client requires a config file and a directory to cache checkpoints, an
The config file for the light client takes a URL for a full node, a directory (that must exist) and within the directory to name of the genesis blob for the Iota network.

```
full_node_url: "http://ord-mnt-rpcbig-06.mainnet.iota.io:9000"
full_node_url: "https://api.testnet.iota.cafe:443"
checkpoint_summary_dir: "checkpoints_dir"
genesis_filename: "genesis.blob"
```
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-metric-checker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The `iota-metric-checker` crate is used for querying prometheus metrics and vali
### Example Usage

```
RUST_LOG=debug cargo run --package iota-metric-checker --bin iota-metric-checker -- --api-key xxxxxxxx --api-user xxxx_metrics --config checks.yaml --url https://xxxx.iota.io/prometheus
RUST_LOG=debug cargo run --package iota-metric-checker --bin iota-metric-checker -- --api-key xxxxxxxx --api-user xxxx_metrics --config checks.yaml --url https://xxxx.iota.cafe/prometheus
```

### Example Config
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fn main() {

drop(metrics_rt);

info!("Iota Node version: {VERSION}");
info!("IOTA Node version: {VERSION}");
info!(
"Supported protocol versions: {:?}",
config.supported_protocol_versions
Expand Down
4 changes: 2 additions & 2 deletions crates/iota-open-rpc/spec/openrpc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"openrpc": "1.2.6",
"info": {
"title": "Iota JSON-RPC",
"description": "Iota JSON-RPC API for interaction with Iota Full node. Make RPC calls using https://fullnode.NETWORK.iota.io:443, where NETWORK is the network you want to use (testnet, devnet, mainnet). By default, local networks use port 9000.",
"title": "IOTA JSON-RPC",
"description": "IOTA JSON-RPC API for interaction with Iota Full node. Make RPC calls using https://api.NETWORK.iota.cafe:443, where NETWORK is the network you want to use (testnet, devnet, mainnet). By default, local networks use port 9000.",
"contact": {
"name": "IOTA Foundation",
"url": "https://iota.org",
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-replay/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl Default for ReplayableNetworkConfigSet {
name: "mainnet".to_string(),
epoch_zero_start_timestamp: 0,
epoch_zero_rgp: 0,
public_full_node: url_from_str("https://fullnode.mainnet.iota.io:443")
public_full_node: url_from_str("https://api.mainnet.iota.cafe")
.expect("invalid socket address")
.to_string(),
};
Expand Down
8 changes: 4 additions & 4 deletions crates/iota-rosetta/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Rosetta API for Iota
# Rosetta API for IOTA

[Rosetta](https://www.rosetta-api.org/docs/welcome.html) is an open-source specification and set of tools for blockchain
integration. Rosetta’s goal is to make blockchain integration simpler, faster, and more reliable than using a native
integration.

## Overview

Iota-Rosetta is an implementation of the Rosetta API for the Iota network, the Iota-Rosetta server uses the Iota fullnode to
Iota-Rosetta is an implementation of the Rosetta API for the Iota network, the Iota-Rosetta server uses the IOTA fullnode to
read and write transactions to the Iota network.

## Local network quick start
Expand All @@ -15,12 +15,12 @@ read and write transactions to the Iota network.

#### 0. Checkout and build Iota

Checkout the [Iota source code](https://github.com/iotaledger/iota) and compile using `cargo build --release`, the binaries will be located in `target/release` directory.
Checkout the [IOTA source code](https://github.com/iotaledger/iota) and compile using `cargo build --release`, the binaries will be located in `target/release` directory.

#### 1. Genesis

`./iota genesis -f`
The Iota genesis process will create configs and coins for testing, the config files are stored in `~/.iota/iota_config` by
The IOTA genesis process will create configs and coins for testing, the config files are stored in `~/.iota/iota_config` by
default.

#### 2. Start local network
Expand Down
4 changes: 2 additions & 2 deletions crates/iota-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ See the programmable transactions [example](https://github.com/iotaledger/iota/b
1. [Connect to IOTA Devnet](https://docs.iota.org/developer/getting-started/connect).
1. [Make sure you have two addresses with gas](https://docs.iota.org/developer/getting-started/get-address) by using the `new-address` command to create new addresses:
```shell
iota client new-address ed25519
iota client new-address --key-scheme ed25519
```
You must specify the key scheme, one of `ed25519` or `secp256k1` or `secp256r1`.
You can specify the key scheme, one of `ed25519` or `secp256k1` or `secp256r1`.
You can skip this step if you are going to play with a friend. :)
1. [Request IOTA tokens](https://docs.iota.org/developer/getting-started/get-coins) for all addresses that will be used to join the game.

Expand Down
12 changes: 6 additions & 6 deletions crates/iota-source-validation-service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ pub const HOST_PORT_ENV: &str = "HOST_PORT";
pub const IOTA_SOURCE_VALIDATION_VERSION_HEADER: &str = "x-iota-source-validation-version";
pub const IOTA_SOURCE_VALIDATION_VERSION: &str = "0.1";

pub const MAINNET_URL: &str = "https://fullnode.mainnet.iota.io:443";
pub const TESTNET_URL: &str = "https://fullnode.testnet.iota.io:443";
pub const DEVNET_URL: &str = "https://fullnode.devnet.iota.io:443";
pub const MAINNET_URL: &str = "https://api.mainnet.iota.cafe:443";
pub const TESTNET_URL: &str = "https://api.testnet.iota.cafe:443";
pub const DEVNET_URL: &str = "https://api.devnet.iota.cafe:443";
pub const LOCALNET_URL: &str = "http://127.0.0.1:9000";

pub const MAINNET_WS_URL: &str = "wss://rpc.mainnet.iota.io:443";
pub const TESTNET_WS_URL: &str = "wss://rpc.testnet.iota.io:443";
pub const DEVNET_WS_URL: &str = "wss://rpc.devnet.iota.io:443";
pub const MAINNET_WS_URL: &str = "wss://api.mainnet.iota.cafe:443";
pub const TESTNET_WS_URL: &str = "wss://api.testnet.iota.cafe:443";
pub const DEVNET_WS_URL: &str = "wss://api.devnet.iota.cafe:443";
pub const LOCALNET_WS_URL: &str = "ws://127.0.0.1:9000";

pub const WS_PING_INTERVAL: Duration = Duration::from_millis(20_000);
Expand Down
4 changes: 2 additions & 2 deletions crates/iota-storage/src/bin/http_kv_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ use iota_types::{
#[derive(Parser)]
#[command(rename_all = "kebab-case")]
struct Options {
// default value of 'https://transactions.iota.io/'
#[arg(short, long, default_value = "https://transactions.iota.io/mainnet")]
// default value of 'https://transactions.iota.cafe/'
#[arg(short, long, default_value = "https://transactions.iota.cafe/mainnet")]
base_url: String,

#[arg(short, long)]
Expand Down
10 changes: 5 additions & 5 deletions crates/iota-types/src/unit_tests/passkey_authenticator_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ fn make_credential_creation_option(origin: &Url) -> CredentialCreationOptions {

#[tokio::test]
async fn test_passkey_serde() {
let origin = Url::parse("https://www.iota.io").unwrap();
let origin = Url::parse("https://www.iota.org").unwrap();
let request = make_credential_creation_option(&origin);
let response = create_credential_and_sign_test_tx(&origin, request).await;

Expand All @@ -231,7 +231,7 @@ async fn test_passkey_serde() {

#[tokio::test]
async fn test_passkey_authenticator() {
let origin = Url::parse("https://www.iota.io").unwrap();
let origin = Url::parse("https://www.iota.org").unwrap();
let request = make_credential_creation_option(&origin);
let response = create_credential_and_sign_test_tx(&origin, request).await;

Expand All @@ -256,7 +256,7 @@ async fn test_passkey_authenticator() {

#[tokio::test]
async fn test_passkey_fails_invalid_json() {
let origin = Url::parse("https://www.iota.io").unwrap();
let origin = Url::parse("https://www.iota.org").unwrap();
let request = make_credential_creation_option(&origin);
let response = create_credential_and_sign_test_tx(&origin, request).await;
let client_data_json_missing_type = r#"{"challenge":"9-fH7nX8Nb1JvUynz77mv1kXOkGkg1msZb2qhvZssGI","origin":"http://localhost:5173","crossOrigin":false}"#;
Expand Down Expand Up @@ -310,7 +310,7 @@ async fn test_passkey_fails_invalid_json() {

#[tokio::test]
async fn test_passkey_fails_invalid_challenge() {
let origin = Url::parse("https://www.iota.io").unwrap();
let origin = Url::parse("https://www.iota.org").unwrap();
let request = make_credential_creation_option(&origin);
let response = create_credential_and_sign_test_tx(&origin, request).await;
let fake_client_data_json = r#"{"type":"webauthn.get","challenge":"wrong_base64_encoding","origin":"http://localhost:5173","crossOrigin":false}"#;
Expand All @@ -328,7 +328,7 @@ async fn test_passkey_fails_invalid_challenge() {

#[tokio::test]
async fn test_passkey_fails_wrong_client_data_type() {
let origin = Url::parse("https://www.iota.io").unwrap();
let origin = Url::parse("https://www.iota.org").unwrap();
let request = make_credential_creation_option(&origin);
let response = create_credential_and_sign_test_tx(&origin, request).await;
let fake_client_data_json = r#"{"type":"webauthn.create","challenge":"9-fH7nX8Nb1JvUynz77mv1kXOkGkg1msZb2qhvZssGI","origin":"http://localhost:5173","crossOrigin":false}"#;
Expand Down
Loading

0 comments on commit 7f473f9

Please sign in to comment.