-
Notifications
You must be signed in to change notification settings - Fork 65
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
Fix p2p_ibd_txrelay.py Test & wallet_txn_doublespend.py (4 tests) #193
Conversation
This code is a Python test script for DigiByte. It tests the behavior of fee filters during and after the Initial Block Download (IBD) phase. Here's a breakdown of what the code is doing: The script defines two constants:
COIN is defined here:
So if we take 9936506125 and divide by 100000000 we get, 99.36506125 wich is what my log info said. So that's where the high fee is coming in, which seems right. So this makes sense now. But where in the actual core protocol is this being set during IBD? |
Line 100 in 3fd7c74
|
It appears the purpose of this test is to ensure that during IBD (initial block download), the nodes set their fee filter to a high value It looks like its may be here: Lines 99 to 104 in 3fd7c74
Coin in core protocol defined here: Line 15 in 3fd7c74
So if we do 100000000 x 100 we get: 100.00000000 DGB max fee. Is that math correct? That should be about the right fee range. So test working as expected and core protocol settings good. I am good with this test now. Cheers |
ACK Tested. nice work @JaredTate !! |
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.
utACK
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.
utACK Nice work @JaredTate !
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.
cACK. Good work @JaredTate.
This fixes the functional p2p_ibd_txrelay.py & wallet_txn_doublespend.py tests. I have been running into a lot of issues with the 20 remaining tests. Speficically around high fees, mempool and psbt issues. In this test, I had to add a bunch of log .info's to see what value for
MAX_FEE_FILTER
was looking for. No where in the core protocol isMAX_FEE_FILTER
even defined, it's specific to this test.This log.info I added is the line that gave me an answer to what
MAX_FEE_FILTER
was looking for, but not sure why it comes up with that value, or where the max fee is being set. I just moved decimal all the way to right and test passed. :)The nearest place in core I can find affecting this test and
MAX_FEE_FILTER
is here not sure:digibyte/src/policy/fees.h
Lines 173 to 174 in 3fd7c74
To test this:
Compile:
Run Specific Functional Tests
Perhaps someone else can more clearly explain whats happening here. My brain is a bit fried today.
Edit:
Just pushed fix for wallet_txn_doublespend.py as well so I can switch branches and test GTOs m1 fix.