diff --git a/README.md b/README.md index b12264c17..9abe6062b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Mina Rust Node - Fast and secure implementation of the Mina protocol in Rust ![Beta][beta-badge] [![release-badge]][release-link] -![GitHub Repo stars](https://img.shields.io/github/stars/openmina/openmina?style=social) +![GitHub Repo stars](https://img.shields.io/github/stars/o1-labs/mina-rust?style=social) [![Changelog][changelog-badge]][changelog] [![Apache licensed]][Apache link] _The **Mina Rust Node** is a fast and secure implementation of the Mina protocol @@ -45,7 +45,7 @@ website: ## Release Process **This project is in beta**. We maintain a monthly release cycle, providing -[updates every month](https://github.com/openmina/openmina/releases). +[updates every month](https://github.com/o1-labs/mina-rust/releases). ## Core Features @@ -78,9 +78,9 @@ This repository contains the complete Mina Rust Node implementation: ### Get Help & Contribute -- **[GitHub Discussions](https://github.com/openmina/openmina/discussions)** - +- **[GitHub Discussions](https://github.com/o1-labs/mina-rust/discussions)** - Ask questions and share ideas -- **[Issues](https://github.com/openmina/openmina/issues)** - Report bugs or +- **[Issues](https://github.com/o1-labs/mina-rust/issues)** - Report bugs or request features - **[Discord Community](https://discord.com/channels/484437221055922177/1290662938734231552)** - Real-time support and testing @@ -99,7 +99,7 @@ This repository contains the complete Mina Rust Node implementation: [changelog]: ./CHANGELOG.md [beta-badge]: https://img.shields.io/badge/status-beta-yellow [changelog-badge]: https://img.shields.io/badge/changelog-Changelog-%23E05735 -[release-badge]: https://img.shields.io/github/v/release/openmina/openmina -[release-link]: https://github.com/openmina/openmina/releases/latest +[release-badge]: https://img.shields.io/github/v/release/o1-labs/mina-rust +[release-link]: https://github.com/o1-labs/mina-rust/releases/latest [Apache licensed]: https://img.shields.io/badge/license-Apache_2.0-blue.svg -[Apache link]: https://github.com/openmina/openmina/blob/master/LICENSE +[Apache link]: https://github.com/o1-labs/mina-rust/blob/master/LICENSE diff --git a/flake.nix b/flake.nix index 4348b2ba8..c79e43e36 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "openmina prerequisites"; + description = "Mina Rust prerequisites"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; diff --git a/node/testing/src/scenarios/solo_node/basic_connectivity_initial_joining.rs b/node/testing/src/scenarios/solo_node/basic_connectivity_initial_joining.rs index cac135ee3..4697d8ab9 100644 --- a/node/testing/src/scenarios/solo_node/basic_connectivity_initial_joining.rs +++ b/node/testing/src/scenarios/solo_node/basic_connectivity_initial_joining.rs @@ -13,8 +13,8 @@ use crate::{ scenarios::ClusterRunner, }; -/// Local test to ensure that the Openmina node can connect to an existing OCaml testnet. -/// Launch an Openmina node and connect it to seed nodes of the public (or private) OCaml testnet. +/// Local test to ensure that the Rust node can connect to an existing OCaml testnet. +/// Launch a Rust node and connect it to seed nodes of the public (or private) OCaml testnet. /// Run the simulation until: /// * Number of known peers is greater than or equal to the maximum number of peers. /// * Number of connected peers is greater than or equal to some threshold. @@ -48,7 +48,7 @@ impl SoloNodeBasicConnectivityInitialJoining { .my_id(), ) .unwrap(); - eprintln!("launch Openmina node, id: {node_id}, peer_id: {peer_id}"); + eprintln!("launch Mina Rust node, id: {node_id}, peer_id: {peer_id}"); for step in 0..STEPS { tokio::time::sleep(STEP_DELAY).await; diff --git a/tools/archive-breadcrumb-compare/src/main.rs b/tools/archive-breadcrumb-compare/src/main.rs index 66f3f02ad..38e5174ed 100644 --- a/tools/archive-breadcrumb-compare/src/main.rs +++ b/tools/archive-breadcrumb-compare/src/main.rs @@ -146,14 +146,14 @@ async fn compare_chains(ocaml_endpoint: &str, mina_rust_endpoint: &str) -> Resul ); let ocaml_chain = get_best_chain(ocaml_endpoint).await?; - let openmina_chain = get_best_chain(mina_rust_endpoint).await?; + let mina_rust_chain = get_best_chain(mina_rust_endpoint).await?; println!("Chain comparison:"); println!("OCaml chain length: {}", ocaml_chain.len()); - println!("Mina Rust chain length: {}", openmina_chain.len()); + println!("Mina Rust chain length: {}", mina_rust_chain.len()); // Try to compare chains - if let Err(e) = compare_chain_data(&ocaml_chain, &openmina_chain) { + if let Err(e) = compare_chain_data(&ocaml_chain, &mina_rust_chain) { if attempt == MAX_RETRIES { return Err(e); } @@ -169,24 +169,24 @@ async fn compare_chains(ocaml_endpoint: &str, mina_rust_endpoint: &str) -> Resul unreachable!() } -fn compare_chain_data(ocaml_chain: &[String], openmina_chain: &[String]) -> Result<()> { - if ocaml_chain.len() != openmina_chain.len() { +fn compare_chain_data(ocaml_chain: &[String], mina_rust_chain: &[String]) -> Result<()> { + if ocaml_chain.len() != mina_rust_chain.len() { anyhow::bail!( "Chain lengths don't match! OCaml: {}, Mina Rust: {}", ocaml_chain.len(), - openmina_chain.len() + mina_rust_chain.len() ); } - for (i, (ocaml_hash, openmina_hash)) in - ocaml_chain.iter().zip(openmina_chain.iter()).enumerate() + for (i, (ocaml_hash, mina_rust_hash)) in + ocaml_chain.iter().zip(mina_rust_chain.iter()).enumerate() { - if ocaml_hash != openmina_hash { + if ocaml_hash != mina_rust_hash { anyhow::bail!( "Chain mismatch at position {}: \nOCaml: {}\nMina Rust: {}", i, ocaml_hash, - openmina_hash + mina_rust_hash ); } } @@ -202,20 +202,20 @@ struct DiffMismatch { async fn compare_binary_diffs( ocaml_dir: PathBuf, - openmina_dir: PathBuf, + mina_rust_dir: PathBuf, state_hashes: &[String], ) -> Result> { let mut mismatches = Vec::new(); if state_hashes.is_empty() { println!("No state hashes provided, comparing all diffs"); - let files = openmina_dir.read_dir()?; + let files = mina_rust_dir.read_dir()?; files.for_each(|file| { let file = file.unwrap(); let file_name = file.file_name(); let file_name_str = file_name.to_str().unwrap(); let ocaml_path = ocaml_dir.join(file_name_str); - let openmina_path = openmina_dir.join(file_name_str); + let mina_rust_path = mina_rust_dir.join(file_name_str); // Load and deserialize both files let ocaml_diff = match load_and_deserialize(&ocaml_path) { @@ -229,7 +229,7 @@ async fn compare_binary_diffs( } }; - let openmina_diff = match load_and_deserialize(&openmina_path) { + let mina_rust_diff = match load_and_deserialize(&mina_rust_path) { Ok(diff) => diff, Err(e) => { mismatches.push(DiffMismatch { @@ -241,7 +241,7 @@ async fn compare_binary_diffs( }; // Compare the diffs - if let Some(reason) = compare_diffs(&ocaml_diff, &openmina_diff) { + if let Some(reason) = compare_diffs(&ocaml_diff, &mina_rust_diff) { mismatches.push(DiffMismatch { state_hash: file_name_str.to_string(), reason, @@ -252,7 +252,7 @@ async fn compare_binary_diffs( } else { for state_hash in state_hashes { let ocaml_path = ocaml_dir.join(format!("{}.bin", state_hash)); - let openmina_path = openmina_dir.join(format!("{}.bin", state_hash)); + let mina_rust_path = mina_rust_dir.join(format!("{}.bin", state_hash)); // Load and deserialize both files let ocaml_diff = match load_and_deserialize(&ocaml_path) { @@ -266,7 +266,7 @@ async fn compare_binary_diffs( } }; - let openmina_diff = match load_and_deserialize(&openmina_path) { + let mina_rust_diff = match load_and_deserialize(&mina_rust_path) { Ok(diff) => diff, Err(e) => { mismatches.push(DiffMismatch { @@ -278,7 +278,7 @@ async fn compare_binary_diffs( }; // Compare the diffs - if let Some(reason) = compare_diffs(&ocaml_diff, &openmina_diff) { + if let Some(reason) = compare_diffs(&ocaml_diff, &mina_rust_diff) { mismatches.push(DiffMismatch { state_hash: state_hash.clone(), reason, @@ -297,9 +297,9 @@ fn load_and_deserialize(path: &PathBuf) -> Result fn compare_diffs( ocaml: &ArchiveTransitionFrontierDiff, - openmina: &ArchiveTransitionFrontierDiff, + mina_rust: &ArchiveTransitionFrontierDiff, ) -> Option { - match (ocaml, openmina) { + match (ocaml, mina_rust) { ( ArchiveTransitionFrontierDiff::BreadcrumbAdded { block: (b1, (body_hash1, state_hash1)), @@ -341,77 +341,77 @@ fn compare_diffs( if &b1_with_b2_proof != b2 { let ocaml_json = serde_json::to_string_pretty(&serde_json::to_value(b1).unwrap()).unwrap(); - let openmina_json = + let mina_rust_json = serde_json::to_string_pretty(&serde_json::to_value(b2).unwrap()).unwrap(); mismatches.push(format!( "Block data mismatch:\nOCaml:\n{}\nMina Rust:\n{}", - ocaml_json, openmina_json + ocaml_json, mina_rust_json )); } } else if b1 != b2 { let ocaml_json = serde_json::to_string_pretty(&serde_json::to_value(b1).unwrap()).unwrap(); - let openmina_json = + let mina_rust_json = serde_json::to_string_pretty(&serde_json::to_value(b2).unwrap()).unwrap(); mismatches.push(format!( "Block data mismatch:\nOCaml:\n{}\nMina Rust:\n{}", - ocaml_json, openmina_json + ocaml_json, mina_rust_json )); } if a1 != a2 { let ids_ocaml = a1.iter().map(|(id, _)| id.as_u64()).collect::>(); - let ids_openmina = a2.iter().map(|(id, _)| id.as_u64()).collect::>(); + let ids_mina_rust = a2.iter().map(|(id, _)| id.as_u64()).collect::>(); - // Find missing IDs in openmina (present in ocaml but not in openmina) - let missing_in_openmina: Vec<_> = ids_ocaml.difference(&ids_openmina).collect(); - // Find extra IDs in openmina (present in openmina but not in ocaml) - let extra_in_openmina: Vec<_> = ids_openmina.difference(&ids_ocaml).collect(); + // Find missing IDs in Rust (present in ocaml but not in Rust) + let missing_in_mina_rust: Vec<_> = ids_ocaml.difference(&ids_mina_rust).collect(); + // Find extra IDs in Rust (present in Rust but not in ocaml) + let extra_in_mina_rust: Vec<_> = ids_mina_rust.difference(&ids_ocaml).collect(); - if !missing_in_openmina.is_empty() { - println!("Missing in Mina Rust: {:?}", missing_in_openmina); + if !missing_in_mina_rust.is_empty() { + println!("Missing in Mina Rust: {:?}", missing_in_mina_rust); } - if !extra_in_openmina.is_empty() { - println!("Extra in Mina Rust: {:?}", extra_in_openmina); + if !extra_in_mina_rust.is_empty() { + println!("Extra in Mina Rust: {:?}", extra_in_mina_rust); } let ocaml_json = serde_json::to_string_pretty(&serde_json::to_value(a1).unwrap()).unwrap(); - let openmina_json = + let mina_rust_json = serde_json::to_string_pretty(&serde_json::to_value(a2).unwrap()).unwrap(); mismatches.push(format!( "Accounts accessed mismatch:\nOCaml:\n{}\nMina Rust:\n{}", - ocaml_json, openmina_json + ocaml_json, mina_rust_json )); } if c1 != c2 { let ocaml_json = serde_json::to_string_pretty(&serde_json::to_value(c1).unwrap()).unwrap(); - let openmina_json = + let mina_rust_json = serde_json::to_string_pretty(&serde_json::to_value(c2).unwrap()).unwrap(); mismatches.push(format!( "Accounts created mismatch:\nOCaml:\n{}\nMina Rust:\n{}", - ocaml_json, openmina_json + ocaml_json, mina_rust_json )); } if t1 != t2 { let ocaml_json = serde_json::to_string_pretty(&serde_json::to_value(t1).unwrap()).unwrap(); - let openmina_json = + let mina_rust_json = serde_json::to_string_pretty(&serde_json::to_value(t2).unwrap()).unwrap(); mismatches.push(format!( "Tokens used mismatch:\nOCaml:\n{}\nMina Rust:\n{}", - ocaml_json, openmina_json + ocaml_json, mina_rust_json )); } if s1 != s2 { let ocaml_json = serde_json::to_string_pretty(&serde_json::to_value(s1).unwrap()).unwrap(); - let openmina_json = + let mina_rust_json = serde_json::to_string_pretty(&serde_json::to_value(s2).unwrap()).unwrap(); mismatches.push(format!( "Sender receipt chains mismatch:\nOCaml:\n{}\nMina Rust:\n{}", - ocaml_json, openmina_json + ocaml_json, mina_rust_json )); } @@ -424,11 +424,11 @@ fn compare_diffs( _ => { let ocaml_json = serde_json::to_string_pretty(&serde_json::to_value(ocaml).unwrap()).unwrap(); - let openmina_json = - serde_json::to_string_pretty(&serde_json::to_value(openmina).unwrap()).unwrap(); + let mina_rust_json = + serde_json::to_string_pretty(&serde_json::to_value(mina_rust).unwrap()).unwrap(); Some(format!( "Different diff types:\nOCaml:\n{}\nMina Rust:\n{}", - ocaml_json, openmina_json + ocaml_json, mina_rust_json )) } } diff --git a/website/docs/developers/why-openmina.md b/website/docs/developers/why-rust.md similarity index 100% rename from website/docs/developers/why-openmina.md rename to website/docs/developers/why-rust.md diff --git a/website/sidebars.ts b/website/sidebars.ts index f6e42d9c9..380fd9b13 100644 --- a/website/sidebars.ts +++ b/website/sidebars.ts @@ -70,7 +70,7 @@ const sidebars: SidebarsConfig = { type: 'category', label: 'Architecture', items: [ - 'developers/why-openmina', + 'developers/why-rust', 'developers/architecture', ], },