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

Draft: Better block SIP (not ready for review) #148

Closed
wants to merge 13 commits into from

Conversation

kantai
Copy link
Contributor

@kantai kantai commented Jul 18, 2023

This is a draft of the better blocks improvement proposal currently being put together by myself, @obycode, and @jcnelson.

This includes the commits from PR #147 (I can't build on that PR because I don't have branch commit privileges)

Use prettier's `prosewrap` setting to wrap lines at column 80.
Open these as discussions in the PR instead.
open a new DoS vector. This cap will also prevent the block-signing process from
becoming too expensive. To this end, the total amount of BTC spent in the
outputs described in "Producer Set Enrollments" is used to select the producer
set. Would-be producers are ranked by these BTC expenditures, and the top 100
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, I brought up rolling over credits for the BTC expenditures of would-be producers that do not make it into the top 100. The point behind this would be to ensure that small miners wouldn't be disadvantaged by a large miner that could push them out of the top 100, thus wasting their BTC for no rewards.

Open questions:

  • Do you think this is necessary to avoid disadvantaging small miners?
  • Does this open a DoS attack?
    • Maybe it should have some minimum amount, some maximum number of consecutive terms that credits can rollover, and/or some maximum number of producers.

Copy link
Contributor Author

@kantai kantai Jul 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think this is necessary to avoid disadvantaging small miners?

I don't think so. Looking at the history of miner contributions in Stacks 2.0, the highest number of miners is ~7-8, so I think it's probably not worth the mechanics in the protocol to support roll overs.

Does this open a DoS attack?

Depending on implementation, yes. It would need a maximum rollover lifetime and a lower limit.

However, on reflection, I wonder if setting a "top 100" rather than a threshold like 1% of the total is a bad design. A top 100 incentivizes big miners to split up their commitments to crowd out smaller miners.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. A 1% minimum is a better option.

During a term, producers in the set are eligible to receive a portion of the
coinbase rewards and transaction fees for blocks they produce. Since a term is
defined as 10 Bitcoin blocks, the coinbase reward is equal to 10 times the
coinbase as defined in **_<which SIP defines this?>_**. This amount is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the coinbase amount defined? I couldn't find it.


The producer set is then incentivized to continue producing blocks throughout
the term by the transaction fees. Transaction fees are paid only to producer set
participants who signed the blocks produced. For each block, _B_, the total BTC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this incentivize some kind of race to submit a block to the stackers to sign before all of the producers have had a chance to sign it (after 67% have signed)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it does incentivize trying to minimize the set of signers, yes. I'm not sure if this is a time-race, though.

obycode and others added 7 commits July 18, 2023 16:22
Instead of taking the top 100 would-be producers, any would-be producer
that spends more than 1% of the total BTC spent in the selection process
will be included. This prevents a large miner from spreading its spend
out across multiple different producers to try to crowd out smaller
producers.
@jferrant
Copy link

jferrant commented Aug 4, 2023

@jcnelson would you be able to add some architecture/flow diagrams? I am definitely a visual learner

@jcnelson
Copy link
Contributor

jcnelson commented Aug 8, 2023

@jferrant Yup, sure thing. Will do so as soon as I'm able, once we've had a chance to think more about how the implementation will work out.

@jcnelson
Copy link
Contributor

Superseded by #155

@jcnelson jcnelson closed this Oct 12, 2023
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

Successfully merging this pull request may close these issues.

4 participants