Code Monkey home page Code Monkey logo

Comments (5)

abracadaniel avatar abracadaniel commented on July 21, 2024 1

The reason why I have not put the topology_update in a cron job is because it has to restart the node for the updated topology to take effect, and those automatic restarts might collide with the production of a block, which would be unlucky, but possible. It most likely will not be a big issue for a small pool, but big pools can produce multiple blocks per day, then there is a pretty high risk of a restart colliding with a block. I'm not really sure what a good solution for this would be, as ofc its most optimal to consistently have an updated topology. A solution could be that the scheduled updates use data from the leaderlogs to try to find a timeslot where there are no blocks for the pool.

Currently the topology is only updated when the docker container is restarted, which happens for example on node updates, maintenance, etc. I have not experienced that the pool runs out of connected peers yet, as most pools are pretty stable.

from cardano-pool-docker.

robinboening avatar robinboening commented on July 21, 2024

Now that I am thinking about it a bit more, I think there is more that should be changed.

The cronjob only runs topology_submit, but we never run the topology_update again. I think running the topology_update via cron is important in order to continuously receive an up to date list of peers.

Is there a reason you keep the submit and update in separate scripts? The https://raw.githubusercontent.com/cardano-community/guild-operators/master/scripts/cnode-helper-scripts/topologyUpdater.sh script combines the submit and update part in this one file and I see no issue with that. Shall we do that as well?

I could come up with a PR and we can discuss there.

from cardano-pool-docker.

robinboening avatar robinboening commented on July 21, 2024

I am really just in the very beginning of understanding all those things, but I would have thought a graceful restart of the cardano-node in the relay node (killall -9 cardano-node) would not interfere with the block producing node.

Are you sure this is the case?

from cardano-pool-docker.

abracadaniel avatar abracadaniel commented on July 21, 2024

The relay does not directly interfere with the producing node, it just has to be up for the block producer to synchronize with the network, so in case the relay is restarting at the same time when the pool gets elected to mint a block, it might not receive the block verification from the block producer to submit it to the chain.

I am not 100% sure this is what will happen, I'll try to look into it. :)

from cardano-pool-docker.

robinboening avatar robinboening commented on July 21, 2024

Okay, got it.

Are you using the same conrjob in your pool? and is it really working for you?

One issue is the wrong path to the script (fixed in the PR) but another thing I just noticed is that the script requires some env vars and since cronjobs are not executed inside the same interactive shell the user would use it doesn't have access to the env vars.

My first thought was to just source init_node_vars in the submit script, or source .bashrc as it sources init_node_vars too, when the cronjob runs, but then I realised init_node_vars also depends on env vars and those are defined in the Dockerfile: CARDANO_NETWORK and NODE_NAME

Not sure what is the best way to fix this. Do you have an idea?

from cardano-pool-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.