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

Information gap for custom ethereum node(s) name #152

Open
ntn-x2 opened this issue Nov 9, 2020 · 3 comments
Open

Information gap for custom ethereum node(s) name #152

ntn-x2 opened this issue Nov 9, 2020 · 3 comments

Comments

@ntn-x2
Copy link

ntn-x2 commented Nov 9, 2020

Hello.

I have to say that I have spent several hours trying to figure out the reason of the problem.

Basically, I was trying to configure everything in a yaml file, instead of relying on default values and Docker env variables. Anyway, I came across two main errors that are not properly documented in the README:

  1. There are examples of config files in the README, but nowhere it is mentioned how to pass those files to the eventeum container. I had to log into the container and debug the application to see that additional configuration can be passed by creating a CONF env variable pointing to the mounted yaml config file. I am no Spring expert, so I do not know if that is default behaviour for Spring applications, but it would be nice to specify HOW to pass a custom configuration file.

  2. An even bigger information gap regards the configuration of the Ethereum node(s) to listen to. If the ETHEREUM_NODE_URL is passed to the Docker container, everything seems to be working fine. As soon as I try to configure the node in the config file, by giving it a custom name, the event filters were not working anymore (at the end a listing of the not working ethereum configuration). I solved it by calling the node default, and apparently everything seems to be working again. So please also mention either that the node must be called default (in which case I do not know how eventeum would behave in case of two nodes), or what are all the steps to configure custom nodes (with custom names) in the config file.

Thanks!

Eventeum docker compose config:

volumes:
    - ./additional-conf.yaml:/conf.yaml:ro
environment:
    CONF: /conf.yaml

Not working Ethereum config:

ethereum:
  nodes:
  - name: marketplace
    url: ws://ethereum-marketplace:8545

Working Ethereum config:

ethereum:
  nodes:
  - name: default
    url: ws://ethereum-marketplace:8545
@Ferparishuertas
Copy link
Collaborator

Hi @Diiaablo95

Thanks for sharing your problem. Sorry for the late reply.

On eventeum you can bundle your docker image with your own yml file, building your docker via your own build, or overriding default config via Spring standard ways.

https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-external-config

Spring can override variables via 2 main possibilities:

  • ENV variables as detailed on eventeum , overriding the standard yaml file config
  • Defining an external config file via spring.config.location

If you define an external config on SPRING_CONFIG_LOCATION, will work.

https://www.baeldung.com/spring-properties-file-outside-jar

I hope this info helps.

@ntn-x2
Copy link
Author

ntn-x2 commented Dec 1, 2020

Hello, yes I see that this solves the first of the two issues, thanks. But what about the latter one?

@Ferparishuertas
Copy link
Collaborator

Its Strange, At io.builders we are using config files with 3 different node names with no issues. Can you share the full yml file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants