-
Notifications
You must be signed in to change notification settings - Fork 661
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
Debugger. #28441
Debugger. #28441
Conversation
interpreter/src/cursor.rs
Outdated
integers::Integer as SvmIntegerParam, | ||
}; | ||
|
||
type SvmAddress = SvmAddressParam<TestnetV0>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want these types parameterized over the Network
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment the interpreter only works with TestnetV0
. It's not clear to me whether it's important that it works with the other Network
s. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just rolled some updates where TestnetV0
and MainnetV0
can differ in behavior depending on the block height. I could see that as being a potential case, but not much else.
We should be also allow the debugger to start in a non-Leo context. |
It would be nice for the cursor for the REPL loop to show where we are currently at
|
0a68aa4
to
b2f7fd7
Compare
e8f93b2
to
28b9324
Compare
A tutorial on how to use the Leo debugger can be found here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall! Left some minor nits.
leo/package/src/lib.rs
Outdated
@@ -31,6 +31,8 @@ use std::{fs, fs::ReadDir, path::PathBuf}; | |||
|
|||
pub static LEO_FILE_EXTENSION: &str = ".leo"; | |||
|
|||
pub static VALIDATOR_0_PRIVATE_KEY: &str = "APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub static VALIDATOR_0_PRIVATE_KEY: &str = "APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH"; | |
pub static TEST_PRIVATE_KEY: &str = "APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH"; |
leo/package/src/package.rs
Outdated
@@ -15,6 +15,7 @@ | |||
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>. | |||
|
|||
use crate::{ | |||
VALIDATOR_0_PRIVATE_KEY, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VALIDATOR_0_PRIVATE_KEY, | |
TEST_PRIVATE_KEY, |
leo/package/src/package.rs
Outdated
endpoint, | ||
)? | ||
.write_to(&path)?; | ||
Env::<N>::new(Some(PrivateKey::<N>::from_str(VALIDATOR_0_PRIVATE_KEY)?), endpoint)?.write_to(&path)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Env::<N>::new(Some(PrivateKey::<N>::from_str(VALIDATOR_0_PRIVATE_KEY)?), endpoint)?.write_to(&path)?; | |
Env::<N>::new(Some(PrivateKey::<N>::from_str(TEST_PRIVATE_KEY)?), endpoint)?.write_to(&path)?; |
e589128
to
c74e8b1
Compare
c74e8b1
to
4f45f42
Compare
No description provided.