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

Update README with dependency notes #456

Merged
merged 10 commits into from
Sep 3, 2024
Merged

Update README with dependency notes #456

merged 10 commits into from
Sep 3, 2024

Conversation

iansuvak
Copy link
Contributor

Why this should be merged

Addresses #428

Not sure if this is the best place for it but top level README.md made more sense to me than CONTRIBUTING.md as it's too specific to this case instead of general contribution to the repo.

How this works

N/A

How this was tested

N/A

How is this documented

N/A

> [!NOTE]
> We require any commits referenced in our `main` branch to be present in the default branches of the repositories above, but during active development it might be useful to work against changes in progress that are still on feature branches.

When developing such features that require updates to one or more of the above, care must be taken to understand where the relevant code comes from. The binaries of applications built in this repo are built against versions referenced in the `go.mod` file. The E2E tests run against a simulated network running locally that is started by calling a separately compiled `avalanchego` binary as well as its plugins. These are compiled based on the values of `AVALANCHEGO_VERSION` in the local checkout of `subnet-evm` when running the tests locally and directly in this repository's `./scripts/versions.sh` when running E2E tests remotely through GitHub actions.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is currently only in a branch, but we equate the versions in go.mod and the binary installed for the e2e tests like so in teleporter: https://github.com/ava-labs/teleporter/blob/staking-contract/scripts/versions.sh#L32

We could simplify this documentation by incorporating this approach here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah but it's possible and valid to do both. At the very least this explains which code comes from where.

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.e. it might be useful to test a version of relayer code against a tmpnet running a separate version of the code. I agree that we should make the extract-commit change in this repo as well, but for development and troubleshooting I still want some version of the documentation above.

README.md Outdated Show resolved Hide resolved
README.md Outdated

`avalanchego` and `coreth` have a direct circular dependency and this repository is only indirectly dependent on `coreth` but directly on `avalanchego`. Therefore if any updates are required from the `coreth` side, a corresponding `avalanchego` commit referencing those changes is required. On the other hand `subnet-evm` just depends directly on `avalanchego`.

The most complicated example case that can arise above is that a feature depends on a new change in `coreth`. In this case, the developer needs to:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like this section is incomplete.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The cases below this actually explain the workflow that I'm introducing here. I can make them bold instead of headings to make it clearer perhaps?

Choose a reason for hiding this comment

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

I think it's just the wording, usually when using : i expect a list to follow right after

Choose a reason for hiding this comment

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

"in this case the developer would need to perform the following steps for either remote or local e2e testing cases." or similar

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, the separation between headings is confusing. Perhaps explicitly mention the headings, or mention the "following sections"

README.md Outdated
Comment on lines 39 to 40
Local testing through running `./scripts/e2e_test.sh` also requires local checkout of the `subnet-evm` repository with the commit matching the `go.mod` and `SUBNET_EVM_VERSION`.
If they do not match, tests might still run but fail with unexpected errors.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not necessary to merge this, but we should look into removing the local subnet-evm requirement for awm-relayer, to match teleporter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I considered this originally but I do find this useful to be able to work against purely local versions of subnet-evm without needing to pollute the remote with branches for local testing. We could make it optional and if not present pull subnet-evm based on go.mod/versions.sh

Copy link
Collaborator

Choose a reason for hiding this comment

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

That would be useful, though we should be consistent between repos. We should also support that more generically for all upstreams, including avalanchego and coreth.

3. [subnet-evm](https://github.com/ava-labs/subnet-evm)

> [!NOTE]
> We require any commits referenced in our `main` branch to be present in the default branches of the repositories above, but during active development it might be useful to work against changes in progress that are still on feature branches.
Copy link
Collaborator

Choose a reason for hiding this comment

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

How do we enforce this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Code review for now? I assume we could write a github action that does it as well but doesn't seem like high priority.

Choose a reason for hiding this comment

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

if this was not done correctly, would the e2e tests build correctly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah they would. E2E tests just need the commits to be reachable on the remote. They don't care if it's in a feature or default branch

Co-authored-by: cam-schultz <[email protected]>
Signed-off-by: Ian Suvak <[email protected]>
Copy link
Contributor

@bernard-avalabs bernard-avalabs left a comment

Choose a reason for hiding this comment

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

Left a few minor comments.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
iansuvak and others added 5 commits August 23, 2024 13:57
Co-authored-by: bernard-avalabs <[email protected]>
Signed-off-by: Ian Suvak <[email protected]>
Co-authored-by: bernard-avalabs <[email protected]>
Signed-off-by: Ian Suvak <[email protected]>
Co-authored-by: bernard-avalabs <[email protected]>
Signed-off-by: Ian Suvak <[email protected]>
Co-authored-by: bernard-avalabs <[email protected]>
Signed-off-by: Ian Suvak <[email protected]>
@cam-schultz cam-schultz mentioned this pull request Aug 28, 2024
@iansuvak iansuvak merged commit f7093cb into main Sep 3, 2024
8 checks passed
@iansuvak iansuvak deleted the dependency-docs branch September 3, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants