This repository was archived by the owner on Oct 25, 2025. It is now read-only.
Open
Conversation
|
|
||
| ## Native | ||
|
|
||
| To run on your system, use the following command (kindly change [target triple](https://doc.rust-lang.org/cargo/appendix/glossary.html#target) as per your machine's architecture): |
Contributor
There was a problem hiding this comment.
This seems like copy and paste?
| examples/target/riscv32im-mozak-mozakvm-elf/release/selfcallerbin \ | ||
| --system-tape examples/selfcaller.tape.json \ | ||
| --self-prog-id \ | ||
| MZK-5b7b6135be198533f7c7ec46651216b762e6d47e69b408d1bc79d641f9ae06de; |
Contributor
There was a problem hiding this comment.
Suggested change
| MZK-5b7b6135be198533f7c7ec46651216b762e6d47e69b408d1bc79d641f9ae06de; | |
| MZK-5b7b6135be198533f7c7ec46651216b762e6d47e69b408d1bc79d641f9ae06de |
| self_prog_id: get_self_prog_id(), | ||
| extended_self_prog_id: SelfCallExtendedProgramIdentifier( | ||
| get_self_prog_id(), | ||
| SelfCallExtensionFlag::default(), |
Contributor
There was a problem hiding this comment.
Why do we need to extend this?
| not(target_os = "mozakvm"), | ||
| derive(Debug, serde::Serialize, serde::Deserialize) | ||
| )] | ||
| /// `SelfCallExtension` is a boolean value that differentiates the |
Contributor
There was a problem hiding this comment.
This sounds very weird.
| /// tuple as: `((P, 0), (P, 1))` or `((P, 1), (P, 0))`. The added digits | ||
| /// help separate the two instances of call and hold no numeric significance | ||
| /// apart from mere differentiators. | ||
| pub struct SelfCallExtensionFlag(pub u8); |
Contributor
There was a problem hiding this comment.
If you only need something that flips back and forth, use a bool, and 'not' to flip.
But I'm not convinced yet this whole design is a good idea.
matthiasgoergens
suggested changes
Apr 18, 2024
Contributor
matthiasgoergens
left a comment
There was a problem hiding this comment.
Please don't merge as is. I need to think through the design.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for programs calling themselves under the context of Cross-Program-Calls.
Relevant design discussions: https://github.com/orgs/0xmozak/discussions/1324