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

feat(gnodev): add more configuration flags for server usage #1622

Merged
merged 10 commits into from
Mar 13, 2024

Conversation

gfanton
Copy link
Member

@gfanton gfanton commented Feb 2, 2024

partially address suggestion from #1583

add multiple flags for server usage

  • -max-gas set per block maximum gas
  • -no-replay disable replay on reload (reload have the same effect as reset)
  • -node-rpc-listener set node rpc listener
  • -chain-id set node ChainID

Update the default ChainID to dev for gnodev for better sense and convenience.

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, if any. More info here.

@gfanton gfanton self-assigned this Feb 2, 2024
@gfanton gfanton requested a review from moul as a code owner February 2, 2024 09:41
@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Feb 2, 2024
Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 47.52%. Comparing base (82a36f9) to head (2856933).

Files Patch % Lines
gno.land/pkg/gnoland/node_inmemory.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1622      +/-   ##
==========================================
+ Coverage   44.81%   47.52%   +2.71%     
==========================================
  Files         460      388      -72     
  Lines       67725    61400    -6325     
==========================================
- Hits        30353    29183    -1170     
+ Misses      34834    29775    -5059     
+ Partials     2538     2442      -96     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jefft0
Copy link
Contributor

jefft0 commented Feb 5, 2024

Flags -max-gaz, -node-rpc-listener and -web-listener work as expected. In addition to -node-rpc-listener, can you add -node-chainid?

@jefft0
Copy link
Contributor

jefft0 commented Feb 5, 2024

I ran the stress test with -no-replay=true, but it doesn't seem to save memory. (I see in the code where the NoReplay flag is set, but I don't see where it's used. Is this implemented?)

@gfanton
Copy link
Member Author

gfanton commented Feb 6, 2024

Flags -max-gaz, -node-rpc-listener and -web-listener work as expected. In addition to -node-rpc-listener, can you add -node-chainid?

unfortunately i cannot pass ChainID as it's unexposed

Sorry, it's actually doable. I've added the flag in 9da1578.

I ran the stress test with -no-replay=true, but it doesn't seem to save memory. (I see in the code where the NoReplay flag is set, but I don't see where it's used. Is this implemented?)

no-replay will only disable replay on reload, memory will still be used to store txs, I need to had a way to change db backend to store tx on disk to be able to save memory usage

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
contribs/gnodev/main.go Outdated Show resolved Hide resolved
contribs/gnodev/main.go Show resolved Hide resolved
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
contribs/gnodev/pkg/dev/node.go Show resolved Hide resolved
contribs/gnodev/main.go Show resolved Hide resolved
contribs/gnodev/main.go Show resolved Hide resolved
contribs/gnodev/main.go Show resolved Hide resolved
…dev`

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@gfanton gfanton merged commit 55db42e into gnolang:master Mar 13, 2024
182 of 183 checks passed
@gfanton gfanton deleted the feat/gnodev-server-flags branch March 13, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 ⛰️ gno.land Issues or PRs gno.land package related
Projects
Status: Done
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants