-
Notifications
You must be signed in to change notification settings - Fork 387
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: Use docker-compose for local transaction replication #1238
base: master
Are you sure you want to change the base?
Conversation
Dockerfile
Outdated
WORKDIR /opt/gno/src/gno.land/ | ||
COPY --from=build /opt/build/build/gnoland /opt/gno/bin/ | ||
RUN mkdir config | ||
#TODO: RUN echo '[rpc]\nladdr = "tcp://0.0.0.0:26657"' > config/config.toml |
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.
Having problems with the config file, really difficult to use. I had to go through the code to exactly know the needed filesystem structure. After that, I only got nil pointer exceptions. It looks like we are expecting to have a complete config file instead of patching some of the specified values on top of the ones provided by flags or defaults...
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.
Yes, there is a suggested method to simplify this using #731.
Meanwhile, I recommend checking out these existing docker-compose examples that demonstrate different ways of working with a config file:
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.
@ajnavarro
I'll open up a PR for resolving this config file nonsense so we are unblocked
EDIT: #1240
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.
@moul thanks for pointing that out. Everything is working correctly inside the docker containers and all of the containers can reach other containers. The main problem is when you want to access the API from the host. To make that possible we have to change the binding address. I think that is something we hadn't to do in the examples you mentioned.
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1238 +/- ##
==========================================
- Coverage 47.84% 47.83% -0.01%
==========================================
Files 369 369
Lines 62764 62757 -7
==========================================
- Hits 30028 30019 -9
- Misses 30308 30310 +2
Partials 2428 2428
☔ View full report in Codecov by Sentry. |
Signed-off-by: Antonio Navarro Perez <[email protected]>
Make everything work porperly adding a toml config gile Signed-off-by: Antonio Navarro <[email protected]>
c5c8db2
to
c37c7a2
Compare
## Description This PR introduces a bash script and simple Makefile to control local development. It starts a node instance, along with the appropriate backup / restore processes. Parent task: #1131 Docker equivalent: #1238 <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] 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). </details> --------- Co-authored-by: Guilhem Fanton <[email protected]>
## Description This PR introduces a bash script and simple Makefile to control local development. It starts a node instance, along with the appropriate backup / restore processes. Parent task: gnolang#1131 Docker equivalent: gnolang#1238 <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] 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). </details> --------- Co-authored-by: Guilhem Fanton <[email protected]>
also, since #1240 is merged, might want to update how you get the config (also because I have a hunch that the one you specified may not be the correct location, but I may be wrong) |
Sorry, I worked on this before the holidays but forgot to update. The full file is still needed, #1240 is not fixing that problem. Not sure if that functionality is still needed tho. Maybe we should close this PR @zivkovicmilos ? |
…1544) ## Description This PR fixes the flow of loading Gno configuration files. Previously, configuration files were loaded without applying default values, causing to funky behavior. Additionally, this PR drops the config TOML template, instead relying on the TOML package itself to marshal. Issue spotted in #1238 Note: I've tried to keep the original functionality of `LoadOrMakeConfigWithOptions`, because if this is changed or broken up in its current state, things start breaking across dimensions. Funky behavior that's fixed: The `EventStore` fields were not being saved in the original config (since we utilized a template for it, and this was not present in the template). Now, config files should properly save on disk the event store configuration. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] 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). </details>
…nolang#1544) ## Description This PR fixes the flow of loading Gno configuration files. Previously, configuration files were loaded without applying default values, causing to funky behavior. Additionally, this PR drops the config TOML template, instead relying on the TOML package itself to marshal. Issue spotted in gnolang#1238 Note: I've tried to keep the original functionality of `LoadOrMakeConfigWithOptions`, because if this is changed or broken up in its current state, things start breaking across dimensions. Funky behavior that's fixed: The `EventStore` fields were not being saved in the original config (since we utilized a template for it, and this was not present in the template). Now, config files should properly save on disk the event store configuration. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] 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). </details>
How to run it:
docker compose up --build
. Still solving some problems, like the bind address is localhost by default, so thegnoland
node cannot be accessed from the host. Working on it.It closes #1204
BREAKING CHANGE: xxx
message was included in the description