Skip to content

after deployment of the salad contracts, we now wait for one epoch to pass.#79

Open
reuvenpo wants to merge 15 commits into
developfrom
salad-operator-wait-one-epoch-after-delpoy
Open

after deployment of the salad contracts, we now wait for one epoch to pass.#79
reuvenpo wants to merge 15 commits into
developfrom
salad-operator-wait-one-epoch-after-delpoy

Conversation

@reuvenpo
Copy link
Copy Markdown
Contributor

@reuvenpo reuvenpo commented Jan 22, 2020

This is a workaround to a current issue where if the deployment and the first task happen in the same epoch, we hit several race conditions in the protocol implementation.


While working on this I also added the following functionality:

  • Give the operator a freshly created address with ETH and ENG requested from the faucet (only runs in test environments)
  • clear the mongodb server on startup

… pass.

This is a workaround to a current issue where if the deployment
and the first task happen in the same epoch, we hit several race
conditions in the protocol implementation
@reuvenpo reuvenpo requested review from Cashmaney and lenak25 January 22, 2020 16:34
Comment thread salad/operator/scripts/wait_for_epoch_transition.js
Comment thread salad/operator/scripts/wait_for_epoch_transition.js
Comment thread salad/operator/scripts/wait_for_epoch_transition.js Outdated
Comment thread salad/operator/scripts/wait_for_epoch_transition.js Outdated
Comment thread salad/operator/scripts/wait_for_epoch_transition.js
Comment thread salad/operator/scripts/wait_for_epoch_transition.js
addresses = sys.argv[1:]
for address in addresses:
print(f'distributing ether to {address}')
request_coins('http://contract.reuven.services.enigma.co:8001', address, 'ether')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

replace reuven with os.environ['enigma_namespace']

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I ended up implementing this by passing it in as an environment variable, which is replaced dynamically in the kubernetes environment.

Implemented in:
https://github.com/enigmampc/kubernetes/pull/26
5755845
scrtlabs/salad#53 (commit f4e726f)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ended up closing PR 26 in kubernetes and replacing commit 5755845 with 4f28dd5

Copy link
Copy Markdown
Contributor

@mdemri mdemri left a comment

Choose a reason for hiding this comment

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

see my comment

@reuvenpo reuvenpo force-pushed the salad-operator-wait-one-epoch-after-delpoy branch from 5755845 to 4f28dd5 Compare January 30, 2020 14:58
@reuvenpo reuvenpo requested review from Cashmaney and mdemri February 2, 2020 13:03
Comment thread salad/operator/scripts/distribute_funds.py Outdated
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