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

Propagate delegateOwnerWallet public + pkey to creator-nodes #646

Merged
merged 3 commits into from
Jul 15, 2020

Conversation

hareeshnagaraj
Copy link
Contributor

@hareeshnagaraj hareeshnagaraj commented Jul 15, 2020

Update local *.env files with correct values for creator node, required for development and progress in UserReplicaSetManager contract

Propagating address, cont.

Overriding now working

Writing file now works

Enabling all writes
@hareeshnagaraj
Copy link
Contributor Author

@hareeshnagaraj
Copy link
Contributor Author

@hareeshnagaraj hareeshnagaraj requested a review from vicky-g July 15, 2020 20:21
@@ -171,6 +193,47 @@ const _registerCnode4 = async (audiusLibs, ethAccounts) => {
await registerLocalService(audiusLibs2, spCreatorNodeType, creatorNodeEndpoint4, amountOfAuds)
}

// Account 1 - Cnode 1 Delegate Wallet Update
const _updateCnode1DelegateOwnerWallet = async (ethAccounts) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

this could be refactored as a function that takes in the ethAccounts index so you don't need to duplicate this fn 4 times

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 would still have to pass ethAccounts here though which was my reason for not doing the above already

@hareeshnagaraj hareeshnagaraj merged commit 2227a4e into master Jul 15, 2020
@hareeshnagaraj hareeshnagaraj deleted the hn_delegate_wallet_propagation branch July 15, 2020 23:29
@@ -12,7 +12,7 @@
"scripts": {
"truffle-test": "./scripts/truffle-test.sh",
"truffle-test-v": "./scripts/truffle-test.sh --verbose-rpc",
"ganache": "docker run --name audius_ganache_cli -d -p 8545:8545 trufflesuite/ganache-cli:latest -h 0.0.0.0 -l 8000000",
"ganache": "docker run --name audius_ganache_cli -d -p 8545:8545 trufflesuite/ganache-cli:latest -h 0.0.0.0 -l 8000000 --acctKeys contracts-ganache-accounts.json",
Copy link
Contributor

Choose a reason for hiding this comment

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

is this json file generated when this command is run?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is interesting, it is generated when the ganache command is run BUT that happens inside the container, which is why the utils functions below call docker exec cat and get the secret values from there

Copy link
Contributor

Choose a reason for hiding this comment

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

ahhhh yes that makes sense

break

case 'update-cnode-3-delegatewallet':
// Account 4 - Cnode 3 Delegate Wallet Update
Copy link
Contributor

Choose a reason for hiding this comment

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

just curious... where's account #3 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

its occupied by disc prov 2

@@ -192,3 +230,36 @@ const _initAllVersions = async (audiusLibs) => {
await setServiceVersion(audiusLibs, serviceType, serviceVersions[serviceType])
}
}

const _updateDelegateOwnerWalletInDockerEnv = async (readPath, writePath, delegateOwnerWallet, delegateWalletPkey) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like regardless of whether delegateOwnerWallet and delegatePrivateKey are found, you still add the respective values to the file? do we need the for loop check?

Copy link
Contributor

Choose a reason for hiding this comment

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

discussed offline - need to update current line with delegateOwnerWallet and delegatePrivateKeywith new value, and if dne, append to end of file.

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