-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
I think these can live in just a top level |
Fixed. |
@adlrocha New commits fix UID/GID issues on Linux. Please test if it works for you.
Then I do not understand why we need If I understood @aakoshh's comment right, he meant the following:
The PR says
That is what PR does right now: it configures deployment using I do not mind clearing all the old stuff and improving The main question is whether testnet is useful and can be used. If you or @aakoshh believe it is incorrect and unacceptable to have UPDATE: I separated all functionality using |
I agree that it's difficult to say when I can only speak from experience that I put too much in the Makefile, trying to rely on variables declared at the top to do cute commands as dependencies but they were much harder to understand than a chain of script invocations with explicit parameter passing would have been. In retrospect I would have tried to keep the The benefit of
But I would not have attempted to do the steps I put into the init.sh to set up accounts, create keys, etc. That's where the Makefile in this PR started to break down for me: too many little steps that were chained together as dependencies, which reminded me of how I did the e2e tests for the agent. I agree with your that you want to get testing ASAP but it's also about maintainability, hopefully we don't have to go in circles forever. |
infra/scripts/examples.toml
Outdated
--secret-key-from fendermint/testing/smoke-test/test-data/fendermint/keys/emily.sk \ | ||
--secret-key-to fendermint/testing/smoke-test/test-data/fendermint/keys/eric.sk |
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.
Does this setup crate these keys at all?
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.
No. I was waiting for Alfonso's examples. Removed not to add more questions.
[tasks.testnet-config] | ||
dependencies = [ | ||
"testnet-script-new-genesis", | ||
"testnet-script-add-peers", | ||
"testnet-script-new-key", | ||
"testnet-script-new-account", | ||
"testnet-script-new-gateway", | ||
"testnet-script-share-genesis" | ||
] |
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 reckon it's these and the node equivalent steps that benefit least from being in the Makefile.toml
and chained with dependencies as individual tasks, as opposed to just one script that does it all.
But it's much better now that you have split it out into multiple .toml
files, thanks for that!
infra/scripts/testnet.toml
Outdated
"cometbft-pull", | ||
"testnet-mkdir", | ||
"testnet-cometbft-init", | ||
"testnet-mkdir", |
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.
Seems like a duplicate.
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.
fixed
infra/scripts/node.toml
Outdated
--top-down-check-period 10 \ | ||
--bottom-up-check-period 10 \ | ||
--msg-fee 10 \ | ||
--majority-percentage 66 |
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.
Minor but strictly speaking 66% is less than 2/3.
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.
fixed
I don't see any blockers. Have you given any thought to this suggestion to remove the duplicated service definitions? It would make it easier to set up networks with arbitrary number of nodes. |
I tried your suggestion. It did not work well for me when I tried it for 12 containers. The main reason is that instances are started sequentially, it took 40 seconds for me to start the testnet since we use a health check for comet-bft nodes. I also tried include - It does not work either since it requires different names for all services. In the future, we can write a simple generator and use it - https://github.com/cometbft/cometbft/blob/main/cmd/cometbft/commands/testnet.go |
Thanks for trying. Maybe some simple poor-man's templating solution with |
Hey, @dnkolegov, thank you for all the changes, amazing job. Dividing the jobs into different
Regarding this outstanding issue, my take would be to use this approach even if it takes around a minute to bootstrap the network. We can address this in a follow up PR once we have the full end-to-end deployment of subnets fleshed out. At this early stage, I personally rather have non-performant but maintainable test so we don't introduce a lot of debt too soon (as was the case in the agent). So I would say, let's introduce the approach that used loops and let's get this one merged. Once I've taken it for a spin I will open tickets with potential follow-ups. WDYT? |
Fixed |
infra/up.sh
Outdated
PORT3=$((PORT3+1)) | ||
done | ||
|
||
wait $(jobs -p) |
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.
Never seen this before, very clever 👍
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.
@dnkolegov , one last fix before merging, when running it in Linux from scratch I get: network testnet declared as external, but could not be found
This PR adds a makefile to run two local test networks: one for one node and the second for four nodes.
Closes consensus-shipyard/ipc#240
The idea is to leverage cargo-make to configure the deployment and trigger the end-to-end.