Skip to content

UX: Add the ability to provide progress during NuCypher contract deployments#1170

Merged
cygnusv merged 6 commits intonucypher:sekanjabinfrom
derekpierre:progressbar
Jul 30, 2019
Merged

UX: Add the ability to provide progress during NuCypher contract deployments#1170
cygnusv merged 6 commits intonucypher:sekanjabinfrom
derekpierre:progressbar

Conversation

@derekpierre
Copy link
Member

Deploying NuCypher contracts during installation can take some time, so adding a progress bar would improve UX.

Note: deploying to a local blockchain will be much faster.

Example output from my testing

Press any key to continue
Deploying Contracts  [##----------------------------------]    7%  00:00:38
NuCypherToken (0x1e31e55280412d033E817a4eC04d07b34a006c21)
**********************************************************
OK | txhash | 0x4b6d009c2ec2b3f29571bb25c2e5126a4ae1857d1a785b78c20e8a12b2d5f73c (782882 gas)
Block #14 | 0xa5d1732c412b66ab8d3640ca62a8d3aa4b29d095142c84fd648df2a7f1580187


Press any key to continue
Deploying Contracts  [#############-----------------------]   38%  00:00:29
StakingEscrow (0x1E3452C1708fd8246D63a1119E866C52580deaA2)
**********************************************************
OK | deploy | 0x23858278a717d1b2fc8ffc689d67e6740984e93759f145a28ac48501c2890bad (6155118 gas)
Block #15 | 0xb7d471ba979ee0c314ce23f82b391821d760bffaf1b8438bc5e8bbe5e982029f

OK | dispatcher_deploy | 0x6e2a5329c063feb6dec6caa14d39e8fa6200587a9d71ea91581aac8062dd4004 (1290319 gas)
Block #16 | 0x94a29086694cb02e70f273950bd12a5b42d333e1194961f0631919182fe6eaaa

OK | reward_transfer | 0xea63b61e99ed9ada0797bb896b356f75911faca230838909774d53135008cebc (51692 gas)
Block #17 | 0x55a1a4fdac39a9982cee707c0e37b1198ec1f37d846aea92769d90a1043e24f7

OK | initialize | 0xefbdbd80b72f703359202cf0d2c1b7865247dede82cb0725bc01637d4dfff77f (96002 gas)
Block #18 | 0xa3fc6e902136d664c13188cb5807d310491ab7b087b7d62aa6f9d4ef3dea5eff


Press any key to continue
Deploying Contracts  [######################--------------]   61%  00:00:18
PolicyManager (0xD84fFc5B60cc5039D110a54F6595D9a4e73DBF55)
**********************************************************
OK | deployment | 0xa6a031079bfb38bf56fc05f52e521b1bbf3ae9bc802fa701d1ddfc3f97aa7f8e (2728132 gas)
Block #19 | 0x7f0917441c360612b3dac7a95eedd631bd9ddc2b3f82ce529cbfca544071bbe0

OK | dispatcher_deployment | 0x3bb85694a1fb139675a8b6ffa5f0076eead4dc4a0322bea3e70a7eba9dad0248 (1340963 gas)
Block #20 | 0x8ddfa99e7be0ae4bac217e9097a3ea3cc19320b6aebb8d08c54ff2d6c739d1b4

OK | set_policy_manager | 0x5de9d182a83623f7401ca6b0b319357a9678cdaf642d91795aa4d0fa6b7f7a64 (50586 gas)
Block #21 | 0xec56935f16d7a1e678bee25ebe5818f37ffad19b0b0acc2cd926c4982d9b1876


Press any key to continue
Deploying Contracts  [###########################---------]   76%  00:00:10
UserEscrowProxy (0xeB6292e2beDcd7B6E354df567F1605b39e216906)
************************************************************
OK | deployment | 0x860eb8395c1ebdd73812c1559953554605e91d56ec192d0d9b80ac787e402f75 (1224443 gas)
Block #22 | 0xd1a3319d64b09cea419a01001be811c249cc6184be9730722a58e35c38e1961e

OK | linker_deployment | 0x4fc2421a4e942207c27b58a0cba02386d6bd9a166c6c02a41ccd18d4993d6627 (377996 gas)
Block #23 | 0xf0774febd661cbdc5cd2ef088ebe4088033407259d735fb07dc5639f3944e592


Press any key to continue
Deploying Contracts  [####################################]  100%
Adjudicator (0x90B9dAd3B1FA74Fd16b11ef006cFd52d10a70149)
********************************************************
OK | deployment | 0x565ac99ba62332108a16af25d4d298c9ce6c0881fb2982da49210eb3c8c4abaa (4405759 gas)
Block #24 | 0x5e7401e42551c237500b70f9f38c3a912f063532dee48682f2531a7688ed09cf

OK | dispatcher_deployment | 0x8a2dcd3dc9ff20db14b36803207f81486376c3034eb0f32399c5f0005085855e (1222687 gas)
Block #25 | 0x32ddecdea18472d176d788d215635a7fda7a567c969b22f51551c5dc12cce135

OK | set_adjudicator | 0xb04ec9124f969cb36c87b7c76cb88e47d23ebb6e4b8c5e363256aee0eeff757b (50543 gas)
Block #26 | 0x604134852abe0d2f6b66c900ff9efebdb7ae788b81732349c2234a3bf044038f


Generated registry /Users/derek/Library/Application Support/nucypher/contract_registry.json
Saved deployment receipts to /Users/derek/Library/Application Support/nucypher/deployment-receipts-0x65E0-1564409685.json
(nucypher)

@derekpierre derekpierre added CLI This effects the nucypher CLI ux design User experience enhancements Staking labels Jul 29, 2019
@derekpierre derekpierre requested a review from KPrasch July 29, 2019 14:40
@derekpierre derekpierre changed the title [WIP] UX: Add the ability to provide progress during NuCypher contract deployments UX: Add the ability to provide progress during NuCypher contract deployments Jul 29, 2019
…dates

TODO: Possibility of doing per transaction progress
…e steps can take a long time.

It is worth noting that only progress is updated for individual steps - the printing of the receipt confirmation to the console is not done until all receipts (from the inidividual step) are received by the deployer.
Added unit tests for progress updates.
@codecov
Copy link

codecov bot commented Jul 29, 2019

Codecov Report

Merging #1170 into sekanjabin will decrease coverage by 0.58%.
The diff coverage is 95.77%.

Impacted file tree graph

@@              Coverage Diff               @@
##           sekanjabin    #1170      +/-   ##
==============================================
- Coverage       83.41%   82.83%   -0.59%     
==============================================
  Files              72       72              
  Lines            9700     9738      +38     
==============================================
- Hits             8091     8066      -25     
- Misses           1609     1672      +63
Impacted Files Coverage Δ
nucypher/blockchain/eth/actors.py 84.18% <100%> (-0.06%) ⬇️
nucypher/cli/deploy.py 75.2% <100%> (ø) ⬆️
nucypher/blockchain/eth/agents.py 90.7% <100%> (ø) ⬆️
nucypher/blockchain/eth/deployers.py 92.45% <94.23%> (ø) ⬆️
nucypher/characters/unlawful.py 0% <0%> (-46.43%) ⬇️
nucypher/utilities/sandbox/middleware.py 68.23% <0%> (-22.36%) ⬇️
nucypher/network/server.py 82.95% <0%> (-2.7%) ⬇️
nucypher/network/nodes.py 79.75% <0%> (-2.48%) ⬇️
nucypher/policy/models.py 90.44% <0%> (-1.28%) ⬇️
nucypher/characters/lawful.py 89.43% <0%> (-0.71%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 648f120...6e292b7. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI This effects the nucypher CLI ux design User experience enhancements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants