hyperledger-archives / sawtooth-sdk-cxx

https://wiki.hyperledger.org/display/sawtooth
Apache License 2.0
4 stars 21 forks source link

Remove message length from messages #20

Closed wi-ry closed 3 years ago

wi-ry commented 4 years ago

This is a fix for the issue identified in https://jira.hyperledger.org/browse/STL-1707

When a transaction processor uses the C++ Sawtooth SDK, the Validator will return a python exception like the one shown below, because the validator isn't expecting the length to be in the message:

[2020-05-15 01:44:06.927 ERROR interconnect] Received a message on address tcp://127.0.0.1:4004 that caused an error: too many values to unpack (expected 2) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/sawtooth_validator/networking/interconnect.py", line 368, in _receive_message yield from self._socket.recv_multipart() ValueError: too many values to unpack (expected 2)

dcmiddle commented 4 years ago

Thanks. I'm confused how this SDK worked without that change. I don't see any related interfaces that would have required the message length in the commit history in sawtooth-core. Odd.

Anyway, thanks for the fix. Could you please sign off your commits. You can do this at commit time with the -s flag, or now after the fact by amending the commit messages in similar fashion.

wi-ry commented 4 years ago

Thanks. I'm confused how this SDK worked without that change. I don't see any related interfaces that would have required the message length in the commit history in sawtooth-core. Odd.

Anyway, thanks for the fix. Could you please sign off your commits. You can do this at commit time with the -s flag, or now after the fact by amending the commit messages in similar fashion.

I've completed sign off on the commits

gilescope commented 3 years ago

@agunde406 can this be merged in too please? ( The message length specified here isn't needed so just adds to the payload )