Unified BlockchainInterface API; Transaction Handling#1089
Unified BlockchainInterface API; Transaction Handling#1089KPrasch merged 29 commits intonucypher:alhambra-verdefrom
Conversation
Codecov Report
@@ Coverage Diff @@
## alhambra-verde #1089 +/- ##
==================================================
- Coverage 82.75% 80.64% -2.12%
==================================================
Files 68 68
Lines 8896 8777 -119
==================================================
- Hits 7362 7078 -284
- Misses 1534 1699 +165
Continue to review full report at Codecov.
|
98658df to
fcf629a
Compare
93a97ad to
430cb50
Compare
nucypher/cli/deploy.py
Outdated
| click.secho("OK", fg='green', nl=False, bold=True) | ||
| else: | ||
| click.secho("Failed", fg='red', nl=False, bold=True) | ||
| receipt = deployer.blockchain.client.w3.eth.waitForTransactionReceipt(txhash) |
There was a problem hiding this comment.
| receipt = deployer.blockchain.client.w3.eth.waitForTransactionReceipt(txhash) | |
| receipt = deployer.blockchain.w3.eth.waitForTransactionReceipt(txhash) |
There was a problem hiding this comment.
Is there a reason that w3 is exposed both in blockchain and blockchain.client?
There was a problem hiding this comment.
Is there a reason that w3 is exposed both in blockchain and blockchain.client?
It's a good question, perhaps @vepkenez can help clarify, this has to do with how we are providing compatibility across clients, wrapping thier w3 instances.
tuxxy
left a comment
There was a problem hiding this comment.
Looks great! See my comment on the substantiate_stamp call, though.
cygnusv
left a comment
There was a problem hiding this comment.
I like some of the simplifications that come with this PR, but I strongly reject the new version of BlockchainPower. This requires more discussion.
nucypher/cli/deploy.py
Outdated
| click.secho("OK", fg='green', nl=False, bold=True) | ||
| else: | ||
| click.secho("Failed", fg='red', nl=False, bold=True) | ||
| receipt = deployer.blockchain.client.w3.eth.waitForTransactionReceipt(txhash) |
There was a problem hiding this comment.
Is there a reason that w3 is exposed both in blockchain and blockchain.client?
cygnusv
left a comment
There was a problem hiding this comment.
Awesome! I was very tired of the interface.w3.eth everywhere 🙄
| __DEFAULT_MIN_SEED_STAKE = 0 | ||
|
|
||
| def __init__(self, | ||
| worker_address: str, |
There was a problem hiding this comment.
It seems this parameter is not necessary anymore.
| from decimal import Decimal | ||
| from json import JSONDecodeError | ||
| from typing import Tuple, List, Dict, Union | ||
| from eth_utils import keccak |
There was a problem hiding this comment.
What should we use, this or ours (nucypher.crypto.api.keccak_digest)?
There was a problem hiding this comment.
Oh - What's the difference?
| """ | ||
|
|
||
| _default_crypto_powerups = [SigningPower, BlockchainPower] | ||
| _default_crypto_powerups = [SigningPower] |
There was a problem hiding this comment.
Why does Felix lose his BlockchainPower?
There was a problem hiding this comment.
At the moment, I cannot determine a way for BlockchainPower to be consumed as a default powerup, it's constructed and consumed in the __init__ of the character.
Co-Author @vepkenez
Note: Calls to
BlockchainPowerorTransactingPowercan be considered concept-code, for that, see PR #1092Follow-up for: #1058
Reverts: #1067
Fixes: #1086
Anticipating: #1092
BlockchainandBlockchainInterface, removingchains.pyAgentandDeployertransactions onBlockchainInterface.send_transaction.w3.etn.sendRawTransactionAPIEthereumTesterClient(Web3Client)BlockchainInterfacerequires aTransactingPoweror else it is aREAD_ONLY_INTERFACEw3methods throughnucypher.eth.clients.Web3ClientIdeas (credit to @jMyles):
StakeHolderandDeployercharacters that consumeTransacingPower?TransactingPower.consume_power_up?