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

Separate docker initialisation from images #22

Merged
merged 8 commits into from
Jul 30, 2024
Merged

Separate docker initialisation from images #22

merged 8 commits into from
Jul 30, 2024

Conversation

kitounliu
Copy link
Collaborator

No description provided.

@kitounliu kitounliu requested a review from jyellick July 29, 2024 13:20
Copy link

@jyellick jyellick left a comment

Choose a reason for hiding this comment

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

Overall, LGTM, a few things we might want to address, but nothing to hold the PR up

@@ -0,0 +1,31 @@
FROM node:20

Choose a reason for hiding this comment

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

Why node:20? Seems like we should possibly be simply pulling a Cargo build env? If we need Node at runtime for the ts scripts, perhaps we would be better off copying the built binary into a Node env? Presumably we do not need to build any rust at runtime?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point! will change that

@@ -277,10 +299,10 @@ export class AdminZkRandService extends BaseService<AdminZkRandOptions> {
await waitForWriteJsonToFile(obj, instancesPath)
console.log("retrieved all instances from contract")
console.log("sleeping..")
await sleep(2000)
await sleep(5000)

Choose a reason for hiding this comment

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

Can we not wait for this asynchronously?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

writing to disk takes some time to finish. The command after will fail if no wait or not enough delay

@@ -169,10 +192,10 @@ export class NodeZkRandService extends BaseService<NodeZkRandOptions> {
const obj = JSON.stringify(ppListHex)
await waitForWriteJsonToFile(obj, instancesPath)
console.log("sleeping..")
await sleep(1000)
await sleep(5000)

Choose a reason for hiding this comment

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

Same comment here with respect to async wait?

@kitounliu kitounliu merged commit 14bee5b into main Jul 30, 2024
1 check passed
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