Skip to content

fix crypto.go for 2 issues:#6

Open
pckwan wants to merge 1 commit into
bigchaindb:masterfrom
pckwan:master
Open

fix crypto.go for 2 issues:#6
pckwan wants to merge 1 commit into
bigchaindb:masterfrom
pckwan:master

Conversation

@pckwan
Copy link
Copy Markdown

@pckwan pckwan commented Jul 23, 2019

  1. add a SHA3-256 hash of the message before passing it to be signed for
    the input fulfillment
  2. use base64url encode, instead of base58 encode, to the resulting
    fulfillment string after it is signed

1) add a SHA3-256 hash of the message before passing it to be signed for
the input fulfillment
2) use base64url encode, instead of base58 encode, to the resulting
fulfillment string after it is signed
@pckwan pckwan mentioned this pull request Jul 23, 2019
@jellevdp
Copy link
Copy Markdown
Contributor

Great @pckwan - I ran the test and indeed its fixed.

@pckwan
Copy link
Copy Markdown
Author

pckwan commented Jul 24, 2019

Thanks @jellevdp for the testing and review.
Please let me know if I need to do anything else in order for you to merge my pull request?
I don't think I have the permission to merge the fix from my fork repo to your main repo.

@bspark8
Copy link
Copy Markdown

bspark8 commented Jun 22, 2020

@pckwan Thank you for making this patch! However, in my environment, "400 Bad Request response" occurs even after applying this patch.
It would be very grateful if you could see the current status!

(Example)
*** SIGNED TXN:
{"asset":{"data":{"assetID":"testID1"}},"id":"42389ed7907a53a8084704776fca6fa0c4e6b7693e681dd2b79f2a6d1ae9369f","inputs":[{"fulfillment":"pGSAIAYp4Z-T5qixw8ncCSaUYP8W1KdKrF5c8uLzB2Lp-D-3g
UB8-naUpGiielp5ZLK77oswo5DPZ5CqOAakI70DLKvqFssKEWTmZq0PdDC_p8F20brOLK0HEKSDXWr3eCjhv_IM","fulfills":null,"owners_before":["R4VCmawvk4ekcMvuUWZrmBaGmDSkfnntQb4UgVDtyQi"]}],"metadata":{"p
net":"earth"},"operation":"CREATE","outputs":[{"amount":"1","condition":{"details":{"public_key":"R4VCmawvk4ekcMvuUWZrmBaGmDSkfnntQb4UgVDtyQi","type":"ed25519-sha-256"},"uri":"ni:///sha-2
56;Binhn5PmqLHDydwJJpRg_xbUp0qsXlzy4vMHYun4P7c?cost=131072&fpt=ed25519-sha-256"},"public_keys":["R4VCmawvk4ekcMvuUWZrmBaGmDSkfnntQb4UgVDtyQi"]}],"version":"2.0"}

@dogusural
Copy link
Copy Markdown

It is probably related to the IPDB endpoint, try https://test.ipdb.io//api/v1/transactions?mode=sync

@bspark8
Copy link
Copy Markdown

bspark8 commented Jun 23, 2020

Awesome! It works!

Currently, I quickly configured Bigchain DB in the local environment based on Docker by referring to the URL below.
(https://docs.bigchaindb.com/projects/server/en/latest/appendices/all-in-one-bigchaindb.html)

I first used js-bigchaindb-driver to see if "bigchaindb/bigchaindb:all-in-one" is the problem, and that js driver worked fine.

So I knew if there were still less resolved issues in go-bigchaindb-driver.
However, as you said, I sent a transaction to this place "https://test.ipdb.io//api/v1/transactions?mode=sync", and received "202 ACCEPTED".

If so, is "bigchaindb/bigchaindb:all-in-one" a problem? I would be very grateful if you could tell me more about the IPDB endpoint.

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.

4 participants