getblocktemplate does not show SigWit feature in Stratum #13

Closed
opened 2022-01-13 23:44:54 +01:00 by roylee17 · 3 comments
roylee17 commented 2022-01-13 23:44:54 +01:00 (Migrated from github.com)

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

This might need changes on either `Stratum` or `lbcd` side, such as magic number, coin symbols, etc.
roylee17 commented 2022-01-14 18:31:29 +01:00 (Migrated from github.com)

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.

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](https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki).
roylee17 commented 2022-02-08 09:14:16 +01:00 (Migrated from github.com)

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?
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 commented 2022-02-14 07:19:48 +01:00 (Migrated from github.com)

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

The Segwit related fields such as `default_witness_commitment` and rules ["segwit"] is required only when a template includes SegWit transactions.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbcd#13
No description provided.