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

Add simple prover and simple verifier examples. #304

Merged
merged 1 commit into from
Aug 23, 2023
Merged

Conversation

themighty1
Copy link
Member

This PR adds simple prover and simple verifier examples which will be run by those following a quick start guide tlsnotary/docs-mdbook#25

Most of the simple_prover.rs code was copied from twitter_dm.rs example.

Also fixes a bug in tlsn-core which prevented the example from running (so I included the fix in this PR)

Copy link
Member

@th4s th4s left a comment

Choose a reason for hiding this comment

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

nice 🚀

tlsn/examples/simple_prover.rs Outdated Show resolved Hide resolved
tlsn/examples/simple_verifier.rs Outdated Show resolved Hide resolved
Copy link
Member

@yuroitaki yuroitaki left a comment

Choose a reason for hiding this comment

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

Looks great! Love the extra comments added on the prover script!

Copy link
Member

@sinui0 sinui0 left a comment

Choose a reason for hiding this comment

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

nice!

tlsn/examples/simple_prover.rs Outdated Show resolved Hide resolved
tlsn/examples/simple_prover.rs Outdated Show resolved Hide resolved
tlsn/examples/simple_prover.rs Outdated Show resolved Hide resolved
tlsn/examples/simple_prover.rs Show resolved Hide resolved
tlsn/examples/simple_verifier.rs Outdated Show resolved Hide resolved
Copy link
Member

@heeckhau heeckhau left a comment

Choose a reason for hiding this comment

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

Looks really good!

It would be nice to use a different character than 'X' to indicate a redacted area. What do you think about or ?

@th4s
Copy link
Member

th4s commented Aug 22, 2023

Looks really good!

It would be nice to use a different character than 'X' to indicate a redacted area. What do you think about or ?

It looks nice, but I am afraid that this could complicate things, since these are non-ASCII characters and probably longer than one byte in UTF-8?

@heeckhau
Copy link
Member

is extended ascii.
is NULL (U+0000) in UTF-8

@themighty1
Copy link
Member Author

@heeckhau, I tried printing a square which is extended ASCII 219 but rust prints � which is a character of length > 1 byte. If a developer tries to copy-paste the console output and parse it elsewhere, he may encounter issues.

for the purposes of the upcoming hackathon, it is safer to stick with 7-bit ascii to avoid surprises.

@themighty1 themighty1 merged commit e1b27ea into dev Aug 23, 2023
11 checks passed
@themighty1 themighty1 deleted the simple_examples branch August 23, 2023 09:06
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.

5 participants