-
Notifications
You must be signed in to change notification settings - Fork 70
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
feat: starting with port 0 #36
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hamdiallam
commented
Jul 9, 2024
anvil/anvil.go
Outdated
return fmt.Errorf("error writing to genesis file: %w", err) | ||
} | ||
|
||
defer os.Remove(tempFile.Name()) |
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.
After anvil starts, we don't need this tempfile. Can remove immediately when this function, Start
, returns. It's consumed in memory on anvil startup
hamdiallam
commented
Jul 9, 2024
hamdiallam
force-pushed
the
supersim.testsuite
branch
from
July 9, 2024 21:11
f152658
to
803a3de
Compare
tremarkley
approved these changes
Jul 9, 2024
hamdiallam
force-pushed
the
supersim.testsuite
branch
from
July 10, 2024 15:48
d12c18b
to
a4e7947
Compare
hamdiallam
changed the title
feat: starting anvil with port 0
feat: starting with port 0
Jul 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We dont want to have to specify both the anvil & simulator ports when the anvil port is an implementation detail.
In order to simplify config, we provide the ability to start anvil on port
0
, meaning whatever is available on the host. This way we don't need to predefine this port. Since anvil is an external process, we extract the port by waiting for theListening on
log emitted when starting anvil.Fixes
Only apply the genesis arg to anvil if present in the config