-
Notifications
You must be signed in to change notification settings - Fork 42
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
Sawtooth in-depth removal #380
Sawtooth in-depth removal #380
Conversation
Signed-off-by: Bruno Vavala <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM. I have a couple clarification questions, that may just be because I don't fully understand CCF.
Signed-off-by: Bruno Vavala <[email protected]>
e86274a
to
ee0a100
Compare
@@ -60,6 +57,7 @@ class TransactionKeys(object) : | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need TransactionKeys after Sawtooth removal? (the comment says " Wrapper for managing Sawtooth transaction keys").
Also, please see ContractMessage init. Channel_id is no longer TransactionKeys. The derivation of channel_id depends on the ledger type, for CCF, it's just nonce (AR: change the comment on line 30 of message.py)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need TransactionKeys after Sawtooth removal? (the comment says " Wrapper for managing Sawtooth transaction keys").
It does not seem so, I have deprecated it. Upon removal, the dependency on secp256k1 can be discarded as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please see ContractMessage init. Channel_id is no longer TransactionKeys. The derivation of channel_id depends on the ledger type, for CCF, it's just nonce (AR: change the comment on line 30 of message.py)
Committed 039e413
@@ -90,7 +90,6 @@ $(PYTHON_DIR) : | |||
. $(abspath $(DSTDIR)/bin/activate) && pip install --upgrade twisted | |||
. $(abspath $(DSTDIR)/bin/activate) && pip install --upgrade pyyaml | |||
. $(abspath $(DSTDIR)/bin/activate) && pip install --upgrade google | |||
. $(abspath $(DSTDIR)/bin/activate) && pip install --upgrade protobuf==3.19.0 | |||
. $(abspath $(DSTDIR)/bin/activate) && pip install secp256k1==0.13.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need secp256k1 after Sawtooth removal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(see #380 (comment))
pf.write(stl_private_key.pubkey.serialize().hex()) | ||
|
||
elif options.format == 'pem' : | ||
if options.format == 'pem' : | ||
import pdo.common.crypto as crypto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to retain secp256k1 after Sawtooth removal?
@@ -85,7 +85,7 @@ var_set() { | |||
env_val[PDO_DEFAULT_SIGCURVE]="${PDO_DEFAULT_SIGCURVE:-SECP384R1}" | |||
env_desc[PDO_DEFAULT_SIGCURVE]=" | |||
PDO_DEFAULT_SIGCURVE is the ECDSA curve used by PDO for generating signatures. | |||
Choose SECP384R1 for ccf. If not set, cyrpto library uses SECP256K1 as default which works for sawtooth" | |||
Choose SECP384R1 for ccf. If not set, the crypto library uses SECP256K1 by default." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps remove "If not set, the crypto library uses SECP256K1 by default"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that's still the default.
@@ -0,0 +1,47 @@ | |||
# Copyright 2018 Intel Corporation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test this image?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not an image. It's the equivalent of what we had with Sawtooth (see here https://github.com/hyperledger-labs/private-data-objects/blob/a95abcf2892c61d96b02cc2026f7137efada174b/docker/sawtooth-pdo.debugging.yaml) to enable the PDO_DEBUG_BUILD
feature in docker compose. I can't recall if used it in my tests.
@@ -301,7 +301,7 @@ def __init__(self, ledger_config, commit_id, wait_parameter_for_ledger = None): | |||
|
|||
self.ledger_config = ledger_config | |||
# add the wait parameter to the ledger config, if there is one. | |||
# Used only with Sawtooth. Defaults to 30s in Sawtooth submitter | |||
# Question: does CCF (or the submitter) use this parameter? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid I don't remember. Sawtooth showed a weird bug that @cmickeyb found out, and this was my fix. I cannot recall what the issue was.
Signed-off-by: Bruno Vavala <[email protected]>
This PR completes the removal of Sawtooth and depends on #379 for testing (at least the eservice) in HW mode.
This PR removes the following Sawtooth-related things:
Also, it updates: