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
842 stars 343 forks source link

feat(gnodev): txs manipulation ability #2286

Open gfanton opened 4 weeks ago

gfanton commented 4 weeks ago

This PR adds the ability to manipulate transactions:

~TODO:~

Contributors' checklist... - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
codecov[bot] commented 4 weeks ago

Codecov Report

Attention: Patch coverage is 48.42105% with 98 lines in your changes missing coverage. Please review.

Project coverage is 54.67%. Comparing base (4f16ad3) to head (3c91107).

Files Patch % Lines
contribs/gnodev/cmd/gnodev/main.go 0.00% 49 Missing :warning:
contribs/gnodev/cmd/gnodev/setup_node.go 0.00% 24 Missing :warning:
contribs/gnodev/pkg/dev/node_state.go 76.81% 9 Missing and 7 partials :warning:
contribs/gnodev/pkg/dev/node.go 84.44% 4 Missing and 3 partials :warning:
contribs/gnodev/pkg/rawterm/keypress.go 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2286 +/- ## ========================================== - Coverage 54.68% 54.67% -0.02% ========================================== Files 583 584 +1 Lines 78503 78653 +150 ========================================== + Hits 42929 43000 +71 - Misses 32365 32438 +73 - Partials 3209 3215 +6 ``` | [Flag](https://app.codecov.io/gh/gnolang/gno/pull/2286/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | Coverage Δ | | |---|---|---| | [contribs/gnodev](https://app.codecov.io/gh/gnolang/gno/pull/2286/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `26.27% <48.42%> (+2.45%)` | :arrow_up: | | [contribs/gnofaucet](https://app.codecov.io/gh/gnolang/gno/pull/2286/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `14.46% <ø> (ø)` | | | [contribs/gnokeykc](https://app.codecov.io/gh/gnolang/gno/pull/2286/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `0.00% <ø> (ø)` | | | [contribs/gnomd](https://app.codecov.io/gh/gnolang/gno/pull/2286/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `0.00% <ø> (ø)` | | 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.

gfanton commented 3 weeks ago

@deelawn Good point. I will merge your PR (#2281) and then rebase this one on it. I will then update this PR so genesis-file also loads genesis balance, and let it be overridable by txs-file and/or balances-file.

gfanton commented 3 weeks ago

Thinking more about this, I believe we should not authorize balance-file and/or txs-file along with genesis-file, as it would make things more complex and is likely not very useful. If we find a use case for this in the future, we can revisit and rework this part.

Kouteki commented 1 week ago

Waiting on @leohhhn to update the documentation

zivkovicmilos commented 1 week ago

@gfanton Just a nitpick, not all of us are fluent in Amino binary :)

Screenshot 2024-06-21 at 14 52 58
gfanton commented 1 week ago

@zivkovicmilos I will updated this in a future PR. At the moment, it doesn't take into account the type of the event and just logs it with a %v. Improving gnodev log is definitely on my to-do list :)