-
Notifications
You must be signed in to change notification settings - Fork 92
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
server/asset/firo: block parsing for median fees #2488
Conversation
I have asked @levonpetrosyan93 from 'firoorg' to comment |
// I have scanned the pre-ProgPOW sections of both testnet | ||
// and mainnet and have yet to find non-zero HashRootMTP. I am | ||
// speculating that the MTP proof data was purged in an upgrade |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is exactly correct. Later code purged unneeded MTP data.
server/asset/firo/firo.go
Outdated
r := bytes.NewReader(b) | ||
blk := NewFiroBlock(net) | ||
if err := blk.readBlockHeader(r); err != nil { | ||
return nil, fmt.Errorf("readBlocHeader error: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, fmt.Errorf("readBlocHeader error: %v", err) | |
return nil, fmt.Errorf("readBlockHeader error: %v", err) |
server/asset/firo/firo.go
Outdated
return nil, fmt.Errorf("ReadVarInt error: %v", err) | ||
} | ||
if _, err = io.CopyN(io.Discard, r, int64(sz)); err != nil { | ||
return nil, fmt.Errorf("error discaring vExtraPayload: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, fmt.Errorf("error discaring vExtraPayload: %v", err) | |
return nil, fmt.Errorf("error discarding vExtraPayload: %v", err) |
6293047
to
a9582b1
Compare
On testnet (v0.14.12.4), neither
estimatefee
norestimatesmartfee
give results, so we fall back to using median fees. Firo doesn't havegetblockstats
, so we have to doManualMedianFee
and scan blocks, but we didn't have aBlockFeeTransactions
function set, so we were using the defaultwire.MsgBlock.Deserialize
, which doesn't work for Firo. This made Firo unusable as a backend on testnet.This doesn't appear to be a problem on mainnet (v0.14.12.1) or simnet (v0.14.12.4). Note that v0.14.12.4 shouldn't be run on mainnet