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

behavior of getblocktemplate regarding segwit #1738

Open
BrannonKing opened this issue Jul 30, 2021 · 5 comments
Open

behavior of getblocktemplate regarding segwit #1738

BrannonKing opened this issue Jul 30, 2021 · 5 comments

Comments

@BrannonKing
Copy link

It seems that the present implementation of getblocktemplate ignores the "rules" input completely. How does that affect its output? Does it produce segwit'd output if segwit is active, regardless of the rules? Should it return an error if there is no segwit rule passed in but segwit is active?

@BrannonKing
Copy link
Author

BrannonKing commented Jul 30, 2021

It should at least output a !segwit rule if it generates segwit data (aka, hits the code to include the witness portion), true? It looks like no rules are output at present.

@Roasbeef
Copy link
Member

Does it produce segwit'd output if segwit is active, regardless of the rules? Should it return an error if there is no segwit rule passed in but segwit is active?

Atm, yes, we'll instead rly on our version bits state to decide if the segwit commitment should be added or not: https://github.com/btcsuite/btcd/blob/master/mining/mining.go#L605

The rules field is present, but not currently observed. PRs accepted to update the logic here

@SulaimanAminuBarkindo
Copy link
Contributor

Hi @Roasbeef,
I've been following the getblocktemplate implementation issue. Is there still a need for a PR to update the logic? If so, are there any additional details needed for implementation? I would like to contribute

@BrannonKing
Copy link
Author

btcd was never updated to support the rules field. I had to add some support for it to lbcd, as seen here: https://github.com/lbryio/lbcd/blob/a0ff51b84acc553c9e9568e80c7873c03e24d679/rpcserver.go#L2364

@Roasbeef
Copy link
Member

Roasbeef commented May 9, 2024

There's no PR yet to fix the issue outlined here.

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

3 participants