-
Notifications
You must be signed in to change notification settings - Fork 4
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
Avalanche Config #253
Conversation
There was a problem hiding this 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
.github/workflows/ci.yaml
Outdated
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 |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
/// 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()); | ||
} | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
Avalanche Chain connector