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

Set EAM permissions for genesis #828

Merged
merged 5 commits into from
Mar 27, 2024
Merged

Set EAM permissions for genesis #828

merged 5 commits into from
Mar 27, 2024

Conversation

mb1896
Copy link
Contributor

@mb1896 mb1896 commented Mar 20, 2024

This closes ENG-743

We want to set EAM permission when creating the subnet.

Example usage:

To set allowed address:

cargo make --makefile infra/fendermint/Makefile.toml -e ALLOWED_ADDR_LIST=<addr1>,<addr2> subnet-genesis-set-eam-permissions

If allowed address are not provided, will proceed with unrestricted EAM permission.

cargo make --makefile infra/fendermint/Makefile.toml subnet-genesis-set-eam-permissions

It can also be executed as a dependency step for a bigger step, such as tasks.child-validator, using the same way of providing input -e ALLOWED_ADDR_LIST.

Copy link

linear bot commented Mar 20, 2024

@@ -122,6 +123,10 @@ script.pre = "mkdir -p ${BASE_DIR}/${NODE_NAME}/${KEYS_SUBDIR}; cp ${PRIVATE_KEY
extend = "fendermint-tool"
env = { "CMD" = "genesis --genesis-file /data/genesis.json ipc from-parent --subnet-id ${SUBNET_ID} -p ${PARENT_ENDPOINT} --parent-gateway ${PARENT_GATEWAY} --parent-registry ${PARENT_REGISTRY} --base-fee ${BASE_FEE} --power-scale ${POWER_SCALE}" }

[tasks.subnet-genesis-set-eam-permissions]
extend = "fendermint-tool"
env = { "CMD" = "genesis --genesis-file /data/genesis.json set-eam-permissions --mode unrestricted" }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@raulk Should we set to allowlist or unrestricted by default?

Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this exactly what genesis --genesis-file /data/genesis.json ipc from-parent did by default ?

Copy link
Contributor Author

@mb1896 mb1896 Mar 20, 2024

Choose a reason for hiding this comment

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

That's right. So what does this Linear issue ask for? Which addresses should be allowed to deploy contracts in this subnet? @aakoshh @raulk

Copy link
Contributor

Choose a reason for hiding this comment

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

from @raulk in sync: pass permission mode as an env variable to cargo make child-validator

@mb1896 mb1896 marked this pull request as ready for review March 20, 2024 09:10
@aakoshh
Copy link
Contributor

aakoshh commented Mar 20, 2024

I'd just like to point out that the linear link requires login, so if all we say in the description that it closes that issue without describing the change, then it would be nice if the URL was public, or if any issue ready to be worked on would be synced to Github. I usually include some description of what I did and why, just in case.

@mb1896
Copy link
Contributor Author

mb1896 commented Mar 20, 2024

I'd just like to point out that the linear link requires login, so if all we say in the description that it closes that issue without describing the change, then it would be nice if the URL was public, or if any issue ready to be worked on would be synced to Github. I usually include some description of what I did and why, just in case.

Good point! Updated the PR description.

@jsoares
Copy link
Contributor

jsoares commented Mar 20, 2024

We currently have a number of Linear tasks that are not synced to github issues but I think that should be an exceptional event (e.g. security issues). We'll need to discuss & revisit our processes, agreed we don't want opaque changes.

@mb1896 mb1896 requested review from aakoshh and raulk March 24, 2024 10:38
Copy link
Contributor

@aakoshh aakoshh left a comment

Choose a reason for hiding this comment

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

Nice, I didn't know script.pre can be used this way 👏

@mb1896 mb1896 merged commit fbe598d into main Mar 27, 2024
14 checks passed
@mb1896 mb1896 deleted the eng-743 branch March 27, 2024 18:13
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