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

feat(testnet): test-genesis as a default, env vars for client config #5283

Merged

Conversation

s8sato
Copy link
Contributor

@s8sato s8sato commented Jan 17, 2025

Context

In testnet,

  • Admin needs to be more administrative than Alice is now
  • Client needs to be configured by env vars

@s8sato s8sato self-assigned this Jan 17, 2025
@s8sato s8sato added the config-changes Changes in configuration and start up of the Iroha label Jan 17, 2025
Comment on lines +170 to +173
"name": "CanManagePeers",
"payload": null
},
"destination": "ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland"
Copy link
Contributor Author

@s8sato s8sato Jan 17, 2025

Choose a reason for hiding this comment

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

Alice's private key is actually public for now, so this key pair needs to be replaced in secret Since Alice's private key is exposed, another admin should replace Alice. Otherwise anyone can act as admin Alice to un/register peers, reset parameters, un/register domains, update to arbitrary executor, etc. @BAStos525

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we redefine Alice's keys pair from client config as env vars? I guess so

Copy link
Contributor Author

@s8sato s8sato Jan 17, 2025

Choose a reason for hiding this comment

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

Yes, but Alice's public key should be consistent with genesis. If you share it with me I'll update genesis in this PR

Copy link
Contributor

Choose a reason for hiding this comment

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

Just ACCOUNT_PUBLIC_KEY and ACCOUNT_PRIVATE_KEY env vars export?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, and replace ed0120..8B03 with that public key in genesis.json. I can update the default genesis in another PR, if you want to. It's a simple replacement of the public key

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's think of it as replacing Alice with another administrator, not replacing Alice's keys. Done by #5284

.github/workflows/iroha2-dev.yml Outdated Show resolved Hide resolved
@s8sato s8sato force-pushed the testnet/client_config_env branch from c138915 to b291d80 Compare January 17, 2025 14:52
Copy link

@BAStos525

@s8sato s8sato force-pushed the testnet/client_config_env branch from b291d80 to e2e6581 Compare January 17, 2025 18:15
@s8sato s8sato merged commit e434186 into hyperledger-iroha:testnet/2.0.0-rc.1 Jan 17, 2025
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config-changes Changes in configuration and start up of the Iroha
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants