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

[GENESIS] Make camino part of genesis fully optional #366

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

evlekht
Copy link
Member

@evlekht evlekht commented Aug 1, 2024

Why this should be merged

In genesis json we have camino field which contains camino-specific data. Initial idea was that we'll keep all avax logic and introduce our own in addition to that, so both camino and avax tests can work with existing code. But there are still still some inconsistency in that.

If we'll try to run node with custom genesis json, which doesn't have camino field at all, like normal avax genesis, genesis parsing will fail cause of invalid initial admin address. This PR solves it by making whole camino field logic optional.

How this works

Make camino field pointer, so default value will be nil. Check for not nil before doing something with this field.

How this was tested

Existing unit-tests and e2e tests.
Manual start of local node with custom genesis without camino field.

Additional references

Original PR based on cortina-7 dev
#307

@evlekht evlekht force-pushed the dev-c0/optional-camino-genesis branch from 82212ae to 139c770 Compare August 1, 2024 14:45
@evlekht evlekht force-pushed the dev-c0/optional-camino-genesis branch from 139c770 to 5f6af3f Compare August 2, 2024 16:06
mo-c4t
mo-c4t previously approved these changes Aug 5, 2024
Noctunus
Noctunus previously approved these changes Aug 5, 2024
Copy link
Member

@Noctunus Noctunus left a comment

Choose a reason for hiding this comment

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

Looks good and pretty straightforward 👍

@evlekht evlekht changed the base branch from dev-c0/base to dev August 7, 2024 12:49
@evlekht evlekht dismissed stale reviews from Noctunus and mo-c4t August 7, 2024 12:49

The base branch was changed.

@evlekht evlekht force-pushed the dev-c0/optional-camino-genesis branch from 5f6af3f to 95f6811 Compare August 7, 2024 12:50
@evlekht evlekht marked this pull request as ready for review August 7, 2024 12:50
@evlekht evlekht merged commit f0e309b into dev Aug 7, 2024
7 checks passed
@evlekht evlekht deleted the dev-c0/optional-camino-genesis branch August 7, 2024 12:51
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.

3 participants