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

Update and improve smart rollup tutorial #118

Merged
merged 62 commits into from
Oct 27, 2023

Conversation

timothymcmackin
Copy link
Collaborator

@timothymcmackin timothymcmackin commented Oct 5, 2023

Here's an update to the smart rollup tutorial.

Preview:
https://docs-staging-git-feat-smart-rollup-tutorial-trili-tech.vercel.app/tutorials/smart-rollups/

Major changes:

  1. Added a diagram of rollup communication.
  2. Removed next steps section of deploying the rollup to testnet because given the complexity of the steps, I don't think that a tutorial user could do it without more specific instructions. I plan to revisit this part later.
  3. Added custom element to embed HTML so I can embed the interactive lucid diagram.
  4. Rewrote intro sections to explain how smart rollups work and what you can do with them.

Possible todos remaining:

  • Is it possible to install some of the tools such as rust and wabt in the docker container so the user doesn't have to install them locally? I managed to install rust on the alpine based container but installing wabt would require enabling the test channel in apk and I'm not sure if that's a good idea.
  • Could we add an output message? I wonder if this is doable in the sandbox by adding an output function and deploying a smart contract to receive the message. I think that would be a helpful part of the tutorial, so I'll look into it soon.
  • Is there enough info about the reveal data channel?

Update: I've investigated sending an outbox message. We can send the message by deploying a contract in the sandbox and adding a function in the kernel to send a string as a call to that contract. That adds the message to the outbox. However, it does not get run automatically. The process for executing the messages in the outbox is involved. Maybe we can expand the tutorial or provide follow-up modules later to cover this part. I think it deals with this:
https://tezos.gitlab.io/shell/smart_rollup_node.html?highlight=outbox#triggering-the-execution-of-an-outbox-message

@timothymcmackin timothymcmackin self-assigned this Oct 5, 2023
@vercel
Copy link

vercel bot commented Oct 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 26, 2023 5:23pm

@timothymcmackin
Copy link
Collaborator Author

@NicNomadic @emturner @beatalipska I think this is ready to go, so please add your review.

I've got a branch with changes to deploy a contract and use it to send messages to the rollup, but I will hold that for a future PR because we may want to change the kernel to use strings instead of bytes.

@NicNomadic
Copy link
Collaborator

I don't have time (and enough expertise) to do a full review, but I'm satisfied with the few changes that I asked.

@timothymcmackin
Copy link
Collaborator Author

@emturner Thanks, I've pulled in your suggestions.

octez-smart-rollup-wasm-debugger \
--kernel target/wasm32-unknown-unknown/debug/hello_world_kernel.wasm \
--inputs empty_input.json
```
Copy link
Contributor

Choose a reason for hiding this comment

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

an error appeared when I try this command:
/bin/sh: step: not found
~/hello-world-kernel $ octez-smart-rollup-wasm-debugger \

--kernel target/wasm32-unknown-unknown/debug/hello_world_kernel.wasm
--inputs empty_input.json
Error
Wrong value for command line option --kernel.
target/wasm32-unknown-unknown/debug/hello_world_kernel.wasm is not a valid file

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I get that error when the .wasm file is not found. Are you sure you are in the hello_world_kernel folder and the path to the wasm file is correct?

Copy link
Contributor

@beatalipska beatalipska left a comment

Choose a reason for hiding this comment

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

🚀 beautiful, great job, Tim!

@timothymcmackin timothymcmackin merged commit e59d3d6 into staging Oct 27, 2023
1 check passed
@timothymcmackin timothymcmackin deleted the feat/smart-rollup-tutorial branch October 27, 2023 12:05
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