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

getblocktemplate does not show SigWit feature in Stratum #13

Closed
roylee17 opened this issue Jan 13, 2022 · 3 comments
Closed

getblocktemplate does not show SigWit feature in Stratum #13

roylee17 opened this issue Jan 13, 2022 · 3 comments
Assignees

Comments

@roylee17
Copy link
Collaborator

This might need changes on either Stratum or lbcd side, such as magic number, coin symbols, etc.

@roylee17 roylee17 self-assigned this Jan 14, 2022
@lyoshenka lyoshenka mentioned this issue Jan 14, 2022
3 tasks
@roylee17
Copy link
Collaborator Author

roylee17 commented Jan 14, 2022

Update:

Stratum tries to parse the rules field to find the segwit support, but lbcd only appends segwit to rules if the blocktemplate includes any segwit transactions.

Will update again after consulting BIP 145.

@roylee17
Copy link
Collaborator Author

roylee17 commented Feb 8, 2022

Update:

  • The "segwit" of the rules field is optional when there's no SegWit transactions (inputs) in the template.
  • The default_witness_commit field is optional when there's no SegWit transactions (inputs) in the template.

lbcd does correctly implement the above behaviors - populate both fields when SwgWit inputs are included in the template, and omit both of the fields otherwise. However, the default_witness_commit returned is raw commitment instead of the witness script. (see issue #20)

This poses 2 questions:

  1. How come lbrycrd always populates SegWit fields in getblocktemplate response?
  2. Does Stratum mandate the presence of SegWit fields?

@roylee17
Copy link
Collaborator Author

The Segwit related fields such as default_witness_commitment and rules ["segwit"] is required only when a template includes SegWit transactions.

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

No branches or pull requests

1 participant