Skip to content
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

feat: updates for cbor all the things #955

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

robinbryce
Copy link
Contributor

@robinbryce robinbryce commented Dec 10, 2024

  • remove use of /tmp in favour of current working directory. tmp breaks the examples for macos
  • note that indexing and retrieval for the meta map is a future release thing.
  • describe how to capture the leaf hash from registration so verification can be accomplished directly
  • purposefuly don't get into the details of computing the leaf hash
  • remove use of ${SCRIPTS} in favour of python -m which works on all platforms

* remove use of /tmp in favour of current working directory. tmp breaks the examples for macos
* note that indexing and retrieval for the meta map is a future release
  thing.
* describe how to capture the leaf hash from registration so
  verification can be accomplished directly
* purposefuly don't get into the details of computing the leaf hash
and update for the improved output format for register_statement
Copy link
Contributor

@JAG-UK JAG-UK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits, have a look

@robinbryce robinbryce requested review from JAG-UK and eccles December 11, 2024 12:04
@robinbryce
Copy link
Contributor Author

robinbryce commented Dec 11, 2024

This can merge monday 16th but not before

Copy link
Contributor

@SteveLasker SteveLasker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting a temp block untill backend changes merge, confirming the docs work with production.

python3 -m datatrails_scitt_samples.scripts.register_signed_statement   --signed-statement-file $SIGNED_STATEMENT_FILE   --output-file $TRANSPARENT_STATEMENT_FILE   --log-level INFO
INFO:register-statement:submit_statement: signed-statement.cbor
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/steve/demos/scitt-demos/datatrails-scitt-samples/datatrails_scitt_samples/scripts/register_signed_statement.py", line 154, in <module>
    main()
  File "/home/steve/demos/scitt-demos/datatrails-scitt-samples/datatrails_scitt_samples/scripts/register_signed_statement.py", line 104, in main
    op_id = submit_statement_from_file(ctx, args.signed_statement_file)
  File "/home/steve/demos/scitt-demos/datatrails-scitt-samples/datatrails_scitt_samples/statement_registration.py", line 65, in submit_statement_from_file
    return submit_statement(ctx, data_file.read())
  File "/home/steve/demos/scitt-demos/datatrails-scitt-samples/datatrails_scitt_samples/statement_registration.py", line 46, in submit_statement
    msg = decode_cbor_data(response.content)
  File "/home/steve/demos/scitt-demos/datatrails-scitt-samples/datatrails_scitt_samples/statement_registration.py", line 20, in decode_cbor_data
    return cbor2.loads(data)
_cbor2.CBORDecodeEOF: premature end of stream (expected to read 65536 bytes, got 116 instead)

@SteveLasker
Copy link
Contributor

@robinbryce, can you please verify: a67cc43

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