gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source
https://gno.land/
Other
841 stars 342 forks source link

feat: repl against remote node #2395

Open moul opened 1 week ago

moul commented 1 week ago

Proof of Concept: REPL using maketx run (remote) instead of gno.Machine (local).

This example demonstrates a POC where the REPL executes maketx run instead of running against an in-memory local gno.Machine. While the implementation is quick and (very) dirty, it shows the potential to unify the REPL experience for local testing, remote querying, and remote transactions.

To achieve this, the repl package should be refactored to handle the majority of the parsing and verification logic locally. By default, the REPL should use maketx query q_eval, and only fall back to maketx run when the transaction needs to update the remote state by paying gas fees.

The REPL should download remote sources locally, implement auto-completion, and use readline.

Arc - 19 June 2024 - Watch Video

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 10.00000% with 54 lines in your changes missing coverage. Please review.

Project coverage is 54.67%. Comparing base (813cb0f) to head (766a9b8). Report is 1 commits behind head on master.

Files Patch % Lines
gnovm/cmd/gno/repl.go 10.00% 54 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2395 +/- ## ========================================== - Coverage 54.70% 54.67% -0.03% ========================================== Files 582 582 Lines 78386 78439 +53 ========================================== + Hits 42883 42889 +6 - Misses 32296 32343 +47 Partials 3207 3207 ``` | [Flag](https://app.codecov.io/gh/gnolang/gno/pull/2395/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | Coverage Δ | | |---|---|---| | [gno.land](https://app.codecov.io/gh/gnolang/gno/pull/2395/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `61.98% <ø> (ø)` | | | [gnovm](https://app.codecov.io/gh/gnolang/gno/pull/2395/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `59.88% <10.00%> (-0.11%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.