Skip to content

Commit f3c8f0d

Browse files
Copilotdannywillems
andcommitted
Phase 2: Standardize existing hyperlinks to OCaml: format
Standardized 6 OCaml references in 4 files to use consistent format: - core/src/block/prevalidate.rs (2 refs) - core/src/constants.rs (2 refs) - mina-p2p-messages/src/string.rs (2 refs) - node/src/transition_frontier/sync/transition_frontier_sync_reducer.rs (1 ref) All references now use: /// OCaml: <URL> Note: mina-p2p-messages/src/v2/generated.rs is auto-generated and uses markdown link format. This will be handled by updating the code generator in a separate effort. Co-authored-by: dannywillems <6018454+dannywillems@users.noreply.github.com>
1 parent 00a084b commit f3c8f0d

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

core/src/block/prevalidate.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ pub fn prevalidate_block(
112112
validate_constants(block, genesis)?;
113113

114114
// TODO(tizoc): check for InvalidDeltaBlockChainProof
115-
// <https://github.com/MinaProtocol/mina/blob/d800da86a764d8d37ffb8964dd8d54d9f522b358/src/lib/mina_block/validation.ml#L369>
116-
// <https://github.com/MinaProtocol/mina/blob/d800da86a764d8d37ffb8964dd8d54d9f522b358/src/lib/transition_chain_verifier/transition_chain_verifier.ml>
117-
115+
/// OCaml: <https://github.com/MinaProtocol/mina/blob/d800da86a764d8d37ffb8964dd8d54d9f522b358/src/lib/mina_block/validation.ml#L369>
116+
/// OCaml: <https://github.com/MinaProtocol/mina/blob/d800da86a764d8d37ffb8964dd8d54d9f522b358/src/lib/transition_chain_verifier/transition_chain_verifier.ml>
118117
Ok(())
119118
}

core/src/constants.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ pub struct ForkConstants {
8787
/// While most constraint constants are identical across networks, some parameters
8888
/// may differ between mainnet and testnets for development purposes.
8989
///
90-
/// Related OCaml implementation: <https://github.com/MinaProtocol/mina/tree/compatible/src/config>
91-
/// Protocol specification: <https://github.com/MinaProtocol/mina/blob/compatible/docs/specs/types_and_structures/serialized_key.md>
90+
/// OCaml: <https://github.com/MinaProtocol/mina/tree/compatible/src/config>
91+
/// OCaml: <https://github.com/MinaProtocol/mina/blob/compatible/docs/specs/types_and_structures/serialized_key.md>
9292
#[derive(Clone, Debug)]
9393
pub struct ConstraintConstants {
9494
/// Number of sub-windows that make up a complete window.

mina-p2p-messages/src/string.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ const CHUNK_SIZE: usize = 5_000;
1111
pub type ByteString = BoundedByteString<MINA_STRING_MAX_LENGTH>;
1212
pub type CharString = BoundedCharString<MINA_STRING_MAX_LENGTH>;
1313

14-
// <https://github.com/MinaProtocol/mina/blob/c0c9d702b8cba34a603a28001c293ca462b1dfec/src/lib/mina_base/zkapp_account.ml#L140>
14+
/// OCaml: <https://github.com/MinaProtocol/mina/blob/c0c9d702b8cba34a603a28001c293ca462b1dfec/src/lib/mina_base/zkapp_account.ml#L140>
1515
pub const ZKAPP_URI_MAX_LENGTH: usize = 255;
16-
// <https://github.com/MinaProtocol/mina/blob/c0c9d702b8cba34a603a28001c293ca462b1dfec/src/lib/mina_base/account.ml#L92>
16+
/// OCaml: <https://github.com/MinaProtocol/mina/blob/c0c9d702b8cba34a603a28001c293ca462b1dfec/src/lib/mina_base/account.ml#L92>
1717
pub const TOKEN_SYMBOL_MAX_LENGTH: usize = 6;
1818

1919
pub type ZkAppUri = BoundedCharString<ZKAPP_URI_MAX_LENGTH>;

node/src/transition_frontier/sync/transition_frontier_sync_reducer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ impl TransitionFrontierSyncState {
451451
// it is not possible to recover this info from the staging ledger reconstruction,
452452
// so the value will not always be correct for the root block.
453453
// The `false` value is used to be compatible with:
454-
// <https://github.com/MinaProtocol/mina/blob/e975835deab303c7f48b09ec2fd0e41ec649aef6/src/lib/transition_frontier/full_frontier/full_frontier.ml#L157-L160>
454+
/// OCaml: <https://github.com/MinaProtocol/mina/blob/e975835deab303c7f48b09ec2fd0e41ec649aef6/src/lib/transition_frontier/full_frontier/full_frontier.ml#L157-L160>
455455
let root_block_just_emitted_a_proof = false;
456456

457457
if let Some(reconstructed_root_block) = root_block_updates_iter.next() {

0 commit comments

Comments
 (0)