Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/algol 1031 #1541

Merged
merged 2 commits into from
Sep 11, 2023
Merged

Hotfix/algol 1031 #1541

merged 2 commits into from
Sep 11, 2023

Conversation

wischli
Copy link
Contributor

@wischli wischli commented Sep 11, 2023

Description

  • Adds AnyRelayNumber for Algol, i.e.testnet-runtime feature
  • Substitutes the WASM of Algol 1031 with above adjustment into the chain spec
    • This substitution overwrites the current WASM until the spec version is bumped
    • Necessary to be able to point Algol to another relaychain with a lower block number than the current stalled one
  "codeSubstitutes": {
    "209843": "$bytes_to_hex(WASM_FILE_ALTAIR_WITH_TESTNET_FEAT)"
    },

Context

Algol is stalled because the relay chain validators were offline for too long such that finalization is halted. One approach top fix this is to create a new relay and point Algol to that one. See here for details.

How was the WASM hex created?

  1. Build WASM
cargo b --release -F testnet-runtime
  1. WASM file to bytes to hex
    let mut file = match File::open(ALTAIR_WASM_FILE) {
        Ok(file) => file,
        Err(e) => {
            eprintln!("Error opening file: {}", e);
            std::process::exit(1);
        }
    };

    let mut wasm_bytes = Vec::new();
    if let Err(e) = file.read_to_end(&mut wasm_bytes) {
        eprintln!("Error reading file: {}", e);
        std::process::exit(1);
    }

    // Convert the Vec<u8> to a hexadecimal string
    let hex_string = hex::encode(&wasm_bytes);

@wischli wischli added the D0-ready Pull request can be merged without special precaution and notification. label Sep 11, 2023
@wischli wischli self-assigned this Sep 11, 2023
@NunoAlexandre
Copy link
Contributor

let mut wasm_bytes = Vec::new();
if let Err(e) = file.read_to_end(&mut wasm_bytes) {
    eprintln!("Error reading file: {}", e);
    std::process::exit(1);
}

// Convert the Vec<u8> to a hexadecimal string
let hex_string = hex::encode(&wasm_bytes);

What ALTAIR_WASM_FILE value was used btw? the compact compress?

@mustermeiszer mustermeiszer merged commit 010f50c into release-v0.10.31 Sep 11, 2023
8 of 11 checks passed
@NunoAlexandre NunoAlexandre deleted the hotfix/algol-1031 branch September 11, 2023 12:21
@wischli wischli restored the hotfix/algol-1031 branch September 12, 2023 08:34
@wischli wischli deleted the hotfix/algol-1031 branch September 12, 2023 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D0-ready Pull request can be merged without special precaution and notification.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants