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

Crypto conflict #107

Closed
maksimfedin opened this Issue Aug 16, 2018 · 13 comments

Comments

5 participants
@maksimfedin

maksimfedin commented Aug 16, 2018

Please have a look at the issue on stackoverflow:

https://stackoverflow.com/questions/51814965/python-library-crypto-conflict

@maksimfedin maksimfedin changed the title from https://stackoverflow.com/questions/51814965/python-library-crypto-conflict to Crypto conflict Aug 16, 2018

@ttmc

This comment has been minimized.

Member

ttmc commented Aug 16, 2018

@maksimfedin Thanks for reporting this issue.

@maksimfedin

This comment has been minimized.

maksimfedin commented Aug 16, 2018

what will be approximate timing for that issue?

@ttmc

This comment has been minimized.

Member

ttmc commented Aug 16, 2018

We probably need to resolve issue #105 first, and we have several other things going besides. Maybe we will get to this issue next week or the week after that?

@maksimfedin

This comment has been minimized.

maksimfedin commented Aug 16, 2018

Thank you very much, would be great.

@ttmc ttmc added this to To do in BigchainDB 2.0 TODO via automation Aug 20, 2018

@maksimfedin

This comment has been minimized.

maksimfedin commented Aug 20, 2018

Hi, are timing for this issue still the same? this-next week?

@ttmc

This comment has been minimized.

Member

ttmc commented Aug 21, 2018

Yes it looks like it will be next week at the earliest.

@ttmc ttmc moved this from To do to In progress in BigchainDB 2.0 TODO Aug 23, 2018

@ttmc ttmc closed this in #108 Aug 24, 2018

BigchainDB 2.0 TODO automation moved this from In progress to Done Aug 24, 2018

@maksimfedin

This comment has been minimized.

maksimfedin commented Aug 24, 2018

Thank you. However, it still doesn't work properly.
I've updated the cryptoconditions to the latest version. If I'm trying to create an asset as in the example for https://github.com/bigchaindb/bigchaindb-driver, I get this type of error:

Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.6/site-packages/cryptoconditions/fulfillment.py", line 192, in serialize_binary
    asn1 = nat_decode(asn1_dict, asn1Spec=Asn1Fulfillment())
  File "/home/ubuntu/.local/lib/python3.6/site-packages/pyasn1/codec/native/decoder.py", line 165, in __call__
    value = valueDecoder(pyObject, asn1Spec, self, **options)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/pyasn1/codec/native/decoder.py", line 59, in __call__
    asn1Value[field] = decodeFun(pyObject[field], componentsTypes[field].asn1Object, **options)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/pyasn1/codec/native/decoder.py", line 165, in __call__
    value = valueDecoder(pyObject, asn1Spec, self, **options)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/pyasn1/codec/native/decoder.py", line 36, in __call__
    asn1Value[field] = decodeFun(pyObject[field], componentsTypes[field].asn1Object, **options)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/pyasn1/codec/native/decoder.py", line 165, in __call__
    value = valueDecoder(pyObject, asn1Spec, self, **options)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/pyasn1/codec/native/decoder.py", line 20, in __call__
    return asn1Spec.clone(pyObject)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/pyasn1/type/base.py", line 349, in clone
    return self.__class__(value, **initilaizers)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/pyasn1/type/univ.py", line 819, in __init__
    base.AbstractSimpleAsn1Item.__init__(self, value, **kwargs)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/pyasn1/type/base.py", line 240, in __init__
    value = self.prettyIn(value)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/pyasn1/type/univ.py", line 878, in prettyIn
    return bytes(value)
TypeError: cannot convert 'NoneType' object to bytes

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "test.py", line 28, in <module>
    metadata=metadata,
  File "/home/ubuntu/.local/lib/python3.6/site-packages/bigchaindb_driver/driver.py", line 248, in prepare
    inputs=inputs,
  File "/home/ubuntu/.local/lib/python3.6/site-packages/bigchaindb_driver/offchain.py", line 128, in prepare_transaction
    inputs=inputs,
  File "/usr/lib/python3.6/functools.py", line 803, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/bigchaindb_driver/offchain.py", line 41, in _prepare_create_transaction_dispatcher
    return prepare_create_transaction(**kwargs)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/bigchaindb_driver/offchain.py", line 194, in prepare_create_transaction
    return transaction.to_dict()
  File "/home/ubuntu/.local/lib/python3.6/site-packages/bigchaindb_driver/common/transaction.py", line 1058, in to_dict
    'inputs': [input_.to_dict() for input_ in self.inputs],
  File "/home/ubuntu/.local/lib/python3.6/site-packages/bigchaindb_driver/common/transaction.py", line 1058, in <listcomp>
    'inputs': [input_.to_dict() for input_ in self.inputs],
  File "/home/ubuntu/.local/lib/python3.6/site-packages/bigchaindb_driver/common/transaction.py", line 103, in to_dict
    fulfillment = self.fulfillment.serialize_uri()
  File "/home/ubuntu/.local/lib/python3.6/site-packages/cryptoconditions/fulfillment.py", line 177, in serialize_uri
    base64.urlsafe_b64encode(self.serialize_binary())).decode()
  File "/home/ubuntu/.local/lib/python3.6/site-packages/cryptoconditions/fulfillment.py", line 197, in serialize_binary
    ) from exc
cryptoconditions.exceptions.ASN1DecodeError: Internal error! Failed to transform dict "{'ed25519Sha256': {'publicKey': b'[&\xaev\x9d\xd6Y\xe0;\x10i\xf4\xd1\x1b<7L\xa5"\xaa.+\x10z\xd5\x12\xc7R=\xaa%>', 'signature': None}}" into pyasn1 schema object.

@codegeschrei

This comment has been minimized.

Contributor

codegeschrei commented Aug 27, 2018

Hey @maksimfedin we could reproduce the error and currently try to fix it :)

@maksimfedin

This comment has been minimized.

maksimfedin commented Aug 28, 2018

@codegeschrei Thank you. Can you please let me know when it is fixed.

@ttmc

This comment has been minimized.

Member

ttmc commented Aug 29, 2018

I'm reopening this issue because, as noted above, there's still a problem.

@muawiakh

This comment has been minimized.

Contributor

muawiakh commented Aug 31, 2018

@maksimfedin what version of cryptoconditions do you have?

@stefanvangastel

This comment has been minimized.

stefanvangastel commented Oct 29, 2018

What version of BigChainDB do I need to fix this error? Is this also fixed in the 1.x version?

@ttmc

This comment has been minimized.

Member

ttmc commented Oct 29, 2018

@stefanvangastel This thread is about the cryptoconditions package, which is used by BigchainDB but is also used by other things.

In any case, please don't use BigchainDB 1.x. Use the latest 2.x release. As I write this, that is BigchainDB 2.0.0b7 (Beta 7).

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