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

Avalanche Config #253

Merged
merged 28 commits into from
Sep 19, 2024
Merged

Avalanche Config #253

merged 28 commits into from
Sep 19, 2024

Conversation

ManojJiSharma
Copy link
Contributor

@ManojJiSharma ManojJiSharma commented Jul 25, 2024

Avalanche Chain connector

  • Chain config
  • Avalanche local setup
  • Tests
  • CI

@ManojJiSharma ManojJiSharma self-assigned this Jul 25, 2024
@ManojJiSharma
Copy link
Contributor Author

@ManojJiSharma ManojJiSharma marked this pull request as ready for review September 11, 2024 12:24
Copy link
Collaborator

@Lohann Lohann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testing locally.... give me an hour

if: ${{matrix.crate == 'rosetta-testing-avalanche'}}
run: |
docker pull manojanalog/avalanche-cli-analog
docker run -v MY_LOCAL_CLI_DIR:/root/.avalanche-cli/ manojanalog/avalanche-cli-analog blockchain create localnew --evm --evm-token SUB --genesis ./genesis.json --teleporter=false --vm-version v0.6.9
Copy link
Collaborator

@Lohann Lohann Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you include this docker image on ./script/pull_nodes.sh? btw why this cli is in your dockerhub? can't we move it to the official analog repo?
Where is the code for this avalanche-cli-analog?

Copy link
Contributor Author

@ManojJiSharma ManojJiSharma Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for puting it in analog repo let me talk to @penumbra23 for access

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, btw where is the Dockerfile for the avalance-cli-analog?

Copy link
Contributor Author

@ManojJiSharma ManojJiSharma Sep 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here you can find docker file https://github.com/Analog-Labs/avalanche-cli-analog

once @penumbra23 create image on analog repo will update it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated docker image from manojanalog to analoglabs

Comment on lines +71 to +101
/// Run the test in another thread while sending txs to force binance to mine new blocks
/// # Panic
/// Panics if the future panics
async fn run_test<Fut: Future<Output = ()> + Send + 'static>(future: Fut) {
// Guarantee that only one test is incrementing blocks at a time
static LOCK: tokio::sync::Mutex<()> = tokio::sync::Mutex::const_new(());

// Run the test in another thread
let test_handler = tokio::spawn(future);

// Acquire Lock
let guard = LOCK.lock().await;

// Check if the test is finished after acquiring the lock
if test_handler.is_finished() {
// Release lock
drop(guard);

// Now is safe to panic
if let Err(err) = test_handler.await {
std::panic::resume_unwind(err.into_panic());
}
return;
}

// Now is safe to panic
if let Err(err) = test_handler.await {
// Resume the panic on the main task
std::panic::resume_unwind(err.into_panic());
}
}
Copy link
Collaborator

@Lohann Lohann Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see we have this exact same code copied between 3 different crates now, can you create an crate to put out this shared testing logic? otherwise if we change it, we will need to change it in 3 different places, which is very error prone.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I do it in different PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix it in #257

@ManojJiSharma ManojJiSharma merged commit 680d651 into master Sep 19, 2024
10 checks passed
@ManojJiSharma ManojJiSharma deleted the Avalanche_chain_config branch September 19, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants