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

Add additional properties to make knots s9pk better than core #17

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

copy2018
Copy link

@copy2018 copy2018 commented Nov 5, 2024

Properties added:

  • Max Mempool Size in MB
  • Current Mempool Usage in MB and as a percentage
  • Mempool Transaction Count
  • progress to next halving
  • Current total supply of Bitcoin based on issuance schedule (may be very slightly inaccuate compared to gettxoutsetinfo but is great for monitoring at a glance without needing to wait)

I have also made and tested this to ensure it works flawlessly.
image

s9pk added in comments

Options added:
 - Max Mempool Size in MB
 - Current Mempool Usage in MB and as a percentage
 - Mempool Transaction Count
 - progress to next halving
 - Current total supply of Bitcoin based on issuance schedule (may be very slightly inaccuate compared to gettxoutsetinfo but is great for monitoring at a glance without needing to wait)

I have also made and tested this to ensure it works flawlessly.

s9pk added in comments
@copy2018
Copy link
Author

copy2018 commented Nov 5, 2024

Here is the s9pk as a release in my knots fork, feel free to use it: https://github.com/j34g/knots-startos/releases/tag/v27.0.1.1

Note that due to a bug in startos when sideloading you may get the endless 'stopping service' error and will need to restart your server due to the ~1 added in the manifest of the s9pk

@copy2018
Copy link
Author

copy2018 commented Nov 5, 2024

Reasons 'total bitcoin supply' may not be exactly the same as gettxoutinfo:

  1. Varied Inputs and Outputs: The total amount shown represents all unspent coins across all outputs, which includes not only block rewards but also many user transactions, each with its unique input and output values. These transactions may not align with exact multiples of the block reward.
  2. Fee Distribution: Transaction fees also contribute to the total amount but are not typically set to neat multiples. They are instead dynamic values determined by users and miners, so they add irregular values to the total supply.
  3. Decay in Reward Structure: If you're working within a system where block rewards decrease over time, previous block rewards might have been higher or lower than 3.125, meaning historical outputs would still affect the total.
  4. Fractional Accumulation: With every transaction and UTXO creation, there could be small rounding effects or dust amounts, which, over thousands of transactions, contribute to a value that doesn't perfectly align with any specific multiple.

However overall this is a great at a glance metric imo to keep a check on things (with a fraction of a percent difference), especially since gettxoutsetinfo is resource and time intensive.

@Retropex Retropex self-assigned this Nov 5, 2024
@Retropex Retropex added the enhancement New feature or request label Nov 5, 2024
@Retropex
Copy link
Owner

Retropex commented Nov 5, 2024

Wow, thanks for the amazing work! We will review this and merge this if it's ok.

@Retropex Retropex merged commit 3c4e2e2 into Retropex:knots Nov 5, 2024
1 check passed
@Retropex
Copy link
Owner

Retropex commented Nov 5, 2024

thanks again!

@copy2018
Copy link
Author

copy2018 commented Nov 5, 2024

Would you consider making an updated release and pushing it to the community registry?

@BitcoinMechanic
Copy link
Collaborator

Needs to be in line with the next Core release because of StartOS weirdness until 0.3.6

@Retropex
Copy link
Owner

Retropex commented Nov 5, 2024

And if we make a release with the same version number?

@BitcoinMechanic
Copy link
Collaborator

Then it won't be annoying for users getting prompted with updates, but to install the new release they will have to sideload it or eneable "dev mode" to "reinstall" Knots (rather than uninstall and install which loses service data/blockchain etc)

@copy2018
Copy link
Author

copy2018 commented Nov 5, 2024

With the same version number startOS wont update things like the instructions file and stuff because it only looks for new versions of those things with a new version number, hence why I made the version 27.0.1.1 on my fork so startos would recognise all changes

@Retropex
Copy link
Owner

Retropex commented Nov 5, 2024

which loses service data/blockchain

well lets wait for the next release then :/

@BitcoinMechanic
Copy link
Collaborator

I don't think that's a risk. I'm going to confirm what @j34g said about the version number and then maybe we can do a release.

@BitcoinMechanic
Copy link
Collaborator

27.0.1.1

This is lower than current version (27.1.0) - that'd stop StartOS from prompting for updates but also require that users downgrade. This is possible but seems like a mistake?

@copy2018
Copy link
Author

copy2018 commented Nov 5, 2024

My bad, I typed it wrong in that comment it is actually version: 27.1.0.1 in my s9pk - https://github.com/j34g/knots-startos/blob/knots/manifest.yaml#L3
image
I can make it again with a version that seems more suitable if needed?

@BitcoinMechanic
Copy link
Collaborator

Yeah, the issue just remains that it'd be higher than what's on the regular marketplace for Bitcoin Core so users that have the Community Marketplace added (I think it is by default) will be prompted to upgrade Bitcoin (and probably accidentally end up on Knots).

@BitcoinMechanic
Copy link
Collaborator

You can keep it the same version instead to avoid that problem. Until 0.3.6, Core and Knots must move in lock step version wise to avoid users upgrading without realizing they're switching from Core to Knots or the reverse.

@copy2018
Copy link
Author

copy2018 commented Nov 5, 2024

Yeah, the issue just remains that it'd be higher than what's on the regular marketplace for Bitcoin Core so users that have the Community Marketplace added (I think it is by default) will be prompted to upgrade Bitcoin (and probably accidentally end up on Knots).

Oh right because they have the same id, I see the issue now. Although I don't think you get prompted for updates that are on the community marketplace unless you switch to it manually or have Dev tools enabled (i'm not sure about this though).

@MattDHill
Copy link

The Community registry is a default registry, so you will see updates by default in the Updates tab. Dev tools only needed for Alpha/Beta registries to show there.

@copy2018
Copy link
Author

copy2018 commented Nov 8, 2024

Can you guys let me know if you like this more consolidated formatting better than the separate one above?
image

@Retropex
Copy link
Owner

Retropex commented Nov 9, 2024

Definitely the consolidated one!

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

Successfully merging this pull request may close these issues.

4 participants