GithubHelp home page GithubHelp logo

Comments (5)

edilmedeiros avatar edilmedeiros commented on June 2, 2024 1

Thanks for reporting.

About the 2m30s interval, see #30091.

from bitcoin.

edilmedeiros avatar edilmedeiros commented on June 2, 2024 1

Yeah, I had some difficulty understanding its behavior and I believe I grasped after studying the miner source code.

It has an internal timer whose logic is capable of doing what you want. Instead of using the calibrate feature, go straight to using --min-nbits --ongoing. It will mine a block very fast and automatically wait for 10 minutes until it mines the next. That way, it keeps difficulty at minimum but can keep the network pace.

See https://edil.com.br/blog/creating-a-custom-bitcoin-signet.

from bitcoin.

1ma avatar 1ma commented on June 2, 2024

Can reproduce. Been running a signet network whose miner stalled a few dozens of blocks after the block 10080 difficulty adjustment.

The miner (v26.1 script) is ran as a systemd service like this, and the nbits parameter was determined by running the calibrating utility set to 600s. Despite this, before block 10080 the miner used to mine a block every 2.5 min instead of 10. I don't quite understand how it works, honestly.

miner --cli="bitcoin-cli" generate --address $rewards_addy --grind-cmd="bitcoin-util grind" --nbits=1d02257e --ongoing

from bitcoin.

1ma avatar 1ma commented on June 2, 2024

Thanks for the pointer. A bit off-topic, but since there are not so many people yet who are familiar with operating a signet let me ask you a follow up question:

I'm don't really understand why the signet miner has so much logic and is so opinionated. My initial idea was to keep the difficulty as low as possible then fire a cronjob every 10 minutes to insta-mine a block at the current timestamp, so the consensus algorithm would be tricked into thinking that is the real difficulty.

I was never able to use the miner like this though, it seems to have a life of its own. No matter which nbits value I selected it mined a block every 2m30s (until it reached block 10080 and broke soon after at 10106). And if it stopped for some time it insta-mined blocks with a backdated timestamp until it catched up to the present.

Is it possible to have a signet mining setup like that, that is not constantly raising the difficulty and wasting CPU?

from bitcoin.

edilmedeiros avatar edilmedeiros commented on June 2, 2024

@1ma, since you seem to have a high difficulty signet chain running, may I ask for a review in #30130?

from bitcoin.

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.