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

Update SIP-007 #1275

Merged
merged 4 commits into from Feb 28, 2020
Merged

Update SIP-007 #1275

merged 4 commits into from Feb 28, 2020

Conversation

@kantai
Copy link
Member

kantai commented Feb 17, 2020

New features:

  • Threshold adjustment based on participation-level
  • Time-windowing PoX
  • Discussion of Stacks and Bitcoin broadcast of signed Stacker messages.
…participation level adjustment
@kantai kantai requested review from diwakergupta and jcnelson Feb 17, 2020
@kantai kantai self-assigned this Feb 17, 2020
@kantai kantai added this to the 2020 Q1 SP3 milestone Feb 17, 2020
STX may include `floor(x / (0.00015*STX_LIQUID_SUPPLY))` addresses in
the reward set. (i.e., the minimum participation threshold is 3/20,000th
of the liquid supply).
* **75%** If more than `0.75 * STX_LIQUID_SUPPLY` STX participate in a

This comment has been minimized.

Copy link
@jcnelson

jcnelson Feb 18, 2020

Member

Should this be 100%?

These messages may be broadcast either on the Stacks chain or the
Bitcoin chain. If broadcast on the Stacks chain, these messages must
be included in the Stacks chain _before_ the anchor block for the
reward period. If broadcast on the Bitcoin chain, they may be

This comment has been minimized.

Copy link
@jcnelson

jcnelson Feb 18, 2020

Member

Recommend adding something like: "Moreover, if sent to the Stacks chain, the anchor block must confirm the transaction bearing the signed message."

I don't think this is true if the transaction is sent on the Bitcoin chain. Sending a transaction on the Bitcoin chain effectively registers the chain tip signal in all subsequently-mined Stacks forks on that Bitcoin fork.

This comment has been minimized.

Copy link
@jcnelson

jcnelson Feb 18, 2020

Member

The sentence "If broadcast on the Stacks chain, these messages must be included in the Stacks chain before the anchor block for the reward period" is confusing to me. Does it mean that if I signal on the Stacks chain, I have to get my transaction in before the prepare phase for the next reward cycle starts? i.e. I have to get it in during the previous reward cycle, in order to be included in the next reward cycle?

This comment has been minimized.

Copy link
@kantai

kantai Feb 18, 2020

Author Member

Yes -- the anchor block is the latest possible view of Stacks data for the current reward cycle. That means that a stacking-message on the Stacks chain would need to be confirmed before the prepare phase begins.

This comment has been minimized.

Copy link
@kantai

kantai Feb 18, 2020

Author Member

I don't think this is true if the transaction is sent on the Bitcoin chain. Sending a transaction on the Bitcoin chain effectively registers the chain tip signal in all subsequently-mined Stacks forks on that Bitcoin fork.

True, but the message still "picks" a chain tip. If a message signals support for a chain tip that ends up not being the anchor block, should they qualify for Stacking rewards?

This comment has been minimized.

Copy link
@jcnelson

jcnelson Feb 18, 2020

Member

No, they shouldn't receive rewards in that case. But, just based on the text here, I don't know whether or not it's the case that the anchor block confirms any Bitcoin-based signaling transactions.

@codecov

This comment has been minimized.

Copy link

codecov bot commented Feb 18, 2020

Codecov Report

Merging #1275 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1275      +/-   ##
==========================================
- Coverage   84.61%   84.60%   -0.02%     
==========================================
  Files         155      155              
  Lines       45545    45548       +3     
==========================================
- Hits        38539    38536       -3     
- Misses       7006     7012       +6     
Impacted Files Coverage Δ
src/chainstate/stacks/index/mod.rs 66.53% <0.00%> (-0.77%) ⬇️
src/deps/bitcoin/network/encodable.rs 83.69% <0.00%> (-0.31%) ⬇️
src/deps/bitcoin/blockdata/transaction.rs 92.22% <0.00%> (-0.18%) ⬇️
src/net/neighbors.rs 85.92% <0.00%> (-0.12%) ⬇️
src/vm/contexts.rs 86.84% <0.00%> (-0.12%) ⬇️
src/net/chat.rs 85.29% <0.00%> (-0.10%) ⬇️
src/chainstate/burn/db/burndb.rs 90.09% <0.00%> (-0.06%) ⬇️
src/chainstate/stacks/db/blocks.rs 89.01% <0.00%> (-0.06%) ⬇️
src/chainstate/stacks/transaction.rs 92.45% <0.00%> (-0.01%) ⬇️
src/vm/tests/forking.rs 96.99% <0.00%> (ø) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f07ce5...1e1e9fb. Read the comment docs.

@jcnelson

This comment has been minimized.

Copy link
Member

jcnelson commented Feb 18, 2020

Thanks for the update @kantai! LGTM

@jcnelson jcnelson self-requested a review Feb 18, 2020
Copy link
Member

jcnelson left a comment

Why are we proposing to shrink the number of levels?

@kantai

This comment has been minimized.

Copy link
Member Author

kantai commented Feb 20, 2020

Why are we proposing to shrink the number of levels?

The idea is to remove the discretization effects from the threshold levels. Reward magnification risks are highest at low participation rates, so we set a limit there, but otherwise, the discretization isn't providing much benefit, and leads to strange outcomes at the borders.

@diwakergupta diwakergupta merged commit 5b9e7c7 into master Feb 28, 2020
6 checks passed
6 checks passed
ci/circleci: cargo_tests Your tests passed on CircleCI!
Details
ci/circleci: deploy Your tests passed on CircleCI!
Details
ci/circleci: test_demo Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing 0f07ce5...1e1e9fb
Details
codecov/project 84.60% (+-0.02%) compared to 0f07ce5
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.