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

fix(ci): fix deploy devnet arguments #2903

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ jobs:
chmod 600 private_key.pem
sudo apt update
sudo apt install -y --no-install-recommends openssh-server
ssh -o StrictHostKeyChecking=no -i private_key.pem $USER@$HOST bash -c "'sleep 30' && docker image prune -a -f && docker ps | grep main_debug | awk '{print \$1}' | xargs -r docker stop && docker ps -a | grep main_debug | awk '{print \$1}' | xargs -r docker rm -f && docker pull 'ghcr.io/rooch-network/rooch:main_debug' && docker run --rm -v /root:/root ghcr.io/rooch-network/rooch:main_debug server clean -n dev -f && docker run -d -v /root:/root -p 6767:6767 -p 9184:9184 'ghcr.io/rooch-network/rooch:main_debug' server start -n dev --btc-rpc-url '${{secrets.BTC_REGTEST_RPC_URL}}' --btc-rpc-username rooch-regtest --btc-rpc-password '${{secrets.BTC_REGTEST_RPC_PWD}}' --da '{\"da-backend\": {\"backends\": [{\"open-da\": {\"scheme\": \"fs\"}}]}}' --traffic-burst-size 100000 --traffic-per-second 1"
ssh -o StrictHostKeyChecking=no -i private_key.pem $USER@$HOST bash -c "'sleep 30' && docker image prune -a -f && docker ps | grep main_debug | awk '{print \$1}' | xargs -r docker stop && docker ps -a | grep main_debug | awk '{print \$1}' | xargs -r docker rm -f && docker pull 'ghcr.io/rooch-network/rooch:main_debug' && docker run --rm -v /root:/root ghcr.io/rooch-network/rooch:main_debug server clean -n dev -f && docker run -d -v /root:/root -p 6767:6767 -p 9184:9184 'ghcr.io/rooch-network/rooch:main_debug' server start -n dev --btc-rpc-url '${{secrets.BTC_REGTEST_RPC_URL}}' --btc-rpc-username rooch-regtest --btc-rpc-password '${{secrets.BTC_REGTEST_RPC_PWD}}' --da '{\"da-backend\": {\"backends\": [{\"open-da\": {\"scheme\": \"fs\", \"config\": {}}}]}}' --traffic-burst-size 100000 --traffic-per-second 1"
ssh -o StrictHostKeyChecking=no -i private_key.pem $USER@$HOST "cd /root/rooch && git pull origin main && bash scripts/check_dev_deploy_status.sh main_debug '${{ secrets.TESTNET_MNEMONIC_PHRASE }}'"
28 changes: 27 additions & 1 deletion crates/rooch-config/src/da_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ mod tests {
fn da_config_from_str() {
let da_config_str = r#"{"da-backend": {"submit-strategy": "all",
"backends": [{"celestia": {"namespace": "//////////////////////////////////////8=", "conn": "test-conn", "auth-token": "test-token", "max-segment-size": 2048}},
{"open-da": {"scheme": "gcs", "config": {"bucket": "test-bucket", "credential": "test-credential"}}}]}}"#;
{"open-da": {"scheme": "gcs", "config": {"bucket": "test-bucket", "credential": "test-credential"}}},
{"open-da": {"scheme": "fs", "config": {}}}]}}"#;
let exp_celestia_config = DABackendCelestiaConfig {
namespace: Namespace::PARITY_SHARE,
conn: "test-conn".to_string(),
Expand All @@ -323,12 +324,19 @@ mod tests {
namespace: None,
max_segment_size: None,
};
let exp_fs_config = DABackendOpenDAConfig {
scheme: OpenDAScheme::Fs,
config: HashMap::new(),
namespace: None,
max_segment_size: None,
};
let exp_da_config = DAConfig {
da_backend: Some(DABackendConfig {
submit_strategy: Some(DAServerSubmitStrategy::All),
backends: vec![
DABackendConfigType::Celestia(exp_celestia_config.clone()),
DABackendConfigType::OpenDa(exp_openda_config.clone()),
DABackendConfigType::OpenDa(exp_fs_config.clone()),
],
background_submit_interval: None,
}),
Expand All @@ -342,5 +350,23 @@ mod tests {
panic!("Error parsing DA Config: {}", e)
}
}

let da_config_str = "{\"da-backend\": {\"backends\": [{\"open-da\": {\"scheme\": \"fs\", \"config\": {}}}]}}";
let exp_da_config = DAConfig {
da_backend: Some(DABackendConfig {
submit_strategy: None,
backends: vec![DABackendConfigType::OpenDa(exp_fs_config.clone())],
background_submit_interval: None,
}),
base: None,
};
match DAConfig::from_str(da_config_str) {
Ok(da_config) => {
assert_eq!(da_config, exp_da_config);
}
Err(e) => {
panic!("Error parsing DA Config: {}", e)
}
}
}
}
Loading