Skip to content

JS User Library#56

Closed
paulyoung wants to merge 144 commits intomasterfrom
paulyoung/js-user-library
Closed

JS User Library#56
paulyoung wants to merge 144 commits intomasterfrom
paulyoung/js-user-library

Conversation

@paulyoung
Copy link
Contributor

I forgot to open this as a draft on Friday as we discussed.

@paulyoung
Copy link
Contributor Author

The next thing I need to address here is that the HTTP handler rejects the submit call with Could not parse body: invalid type: byte array, expected u64

I thought I'd seen these requests working when sending the canister_id field as a blob, but for whatever reason it's now causing an error again. I think this probably explains why I was only ever getting an "unknown" status in response to request-status requests.

I'm pretty sure the error message is referring to the canister ID, however the spec only describes how to hash strings and blobs when calculating the request ID, so I'm not sure what to do there yet (other than it needs to be the same as what the HTTP handler is doing for now)

@nomeata
Copy link
Contributor

nomeata commented Oct 7, 2019

The implementation likely hasn't kept up with the change from u64 to blob in the spec (https://github.com/dfinity-lab/dfinity/pull/1224)

The Implementation Status section says

Still expects i64 for user ids resp. canister ids, rather than blobs.

The hasing of those 64 bit numbers was specified as “Canister IDs (canister-id, callee) are encoded as big endian 64 bit numbers.”

@hansl
Copy link
Contributor

hansl commented Oct 7, 2019

@nomeata That's not a problem as the client still treats canister IDs as u64 until create_canister is implemented.

@nomeata
Copy link
Contributor

nomeata commented Oct 7, 2019

Ah, sorry for the noise then, maybe I misunderstood the issue here.

@paulyoung
Copy link
Contributor Author

What @nomeata said was exactly what I needed to know. Thanks everyone.

@paulyoung
Copy link
Contributor Author

paulyoung commented Oct 21, 2019

This is now being tracked as SDK-511. Each subtask has been split into its own PR. There are still a few things to take from here in order to finish the task.

paulyoung added a commit that referenced this pull request Nov 5, 2019
@paulyoung paulyoung closed this Nov 21, 2019
@paulyoung paulyoung deleted the paulyoung/js-user-library branch November 21, 2019 00:37
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