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

[rpc-tests] Check return code #6827

Merged
merged 2 commits into from Oct 20, 2015

Conversation

MarcoFalke
Copy link
Member

@MarcoFalke MarcoFalke commented Oct 14, 2015

This fixes #6826.

If this PR indeed fixes the issue, travis should fail and imo the PR should be merged nonetheless.


Update:
The original commit was 027ca44 with the corresponding failing travis build. Due to requests I force pushed a rebase onto #6828.

(This closes #6828)

@jamesob
Copy link
Member

jamesob commented Oct 14, 2015

Concept ACK

Edit: though I do think it awkward to merge something that's going to have expected build failures... should we assess how difficult it'd be to implement the fixes and attach them to this PR?

@MarcoFalke
Copy link
Member Author

MarcoFalke commented Oct 14, 2015

@jamesob I could only identify #6828. It should be safe to just merge #6828 before this one to prevent the red travis cross in the master branch.

@TheBlueMatt
Copy link
Contributor

TheBlueMatt commented Oct 14, 2015

If that's the only one, can you just do them in the same PR? It seems overkill for each to have it's own.

On October 14, 2015 11:36:42 AM PDT, MarcoFalke notifications@github.com wrote:

@jamesob I could only identify #6828. It should be safe to just merge
#6828 before this one to prevent the red travis cross in the master
branch.


Reply to this email directly or view it on GitHub:
#6827 (comment)

@jamesob
Copy link
Member

jamesob commented Oct 14, 2015

Agree with @TheBlueMatt

@MarcoFalke MarcoFalke force-pushed the MarcoFalke-2015-rpcTestsReturnCode branch from 027ca44 to 3855c7d Compare Oct 14, 2015
@MarcoFalke
Copy link
Member Author

MarcoFalke commented Oct 14, 2015

Done.

@jamesob
Copy link
Member

jamesob commented Oct 14, 2015

ACK


# if the fee's positive delta is higher than this value tests will fail, neg. delta always fail the tests
# = 2 bytes * minRelayTxFeePerByte
feeTolerance = 2 * Decimal('0.00005000')/1000
Copy link
Contributor

@TheBlueMatt TheBlueMatt Oct 14, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The right way is to fix the expected fees, not change the tolerance to nno longer catch errors.

Copy link
Contributor

@TheBlueMatt TheBlueMatt Oct 14, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The altnerative is just revert the minRelayTxFee stuff (ie #6722) and merge this afterwards.

Copy link
Member Author

@MarcoFalke MarcoFalke Oct 15, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonasschnelli @TheBlueMatt Can you elaborate? I may be missing something but the rpc tests should not fail by changing the relayFee. Right now the bitcoin coin selection can only terminate if there is a tolerance of at least 2 bytes. (I.e. the transaction fee is paying for two bytes more than the tx actually has.) Consequently the feeTolerance is 2 bytes times whatever_you_pay_per_byte.

Regardless, #6828 (or this PR, which includes #6828) should be merged independent of #6722 because reverting minRelayTxFee is not "an alternative" to replacing this outdated magic number.

@jonasschnelli
Copy link
Contributor

jonasschnelli commented Oct 15, 2015

utACK. But agree with @TheBlueMatt. The fee tolerance change might be controversial. Not sure anymore, but when i first implemented this, fees had a tiny variance because of signature sizes, etc.

It would be nice if we could fix the fee tolerance in a proper way, although, very precise fees are not the main objective to test during fundrawtransaction rpc tests.

@MarcoFalke MarcoFalke force-pushed the MarcoFalke-2015-rpcTestsReturnCode branch from 3855c7d to 6ce66fd Compare Oct 15, 2015
@MarcoFalke
Copy link
Member Author

MarcoFalke commented Oct 15, 2015

@jonasschnelli I am not changing the behavior of fundrawtransaction. The fee tolerance was already there with 2 bytes * 1 sat/byte = 2 sat and due to #6793 I changed it to 2 bytes * 5 sat/byte = 10 sat. This should be uncontroversial and be enough to get the travis rpc tests back. (If you want to get rid of the 2 bytes tolerance, you'd have to adjust wallet code but that's just really out of scope of this PR)

Also, ping @laanwj for input.

@jonasschnelli
Copy link
Contributor

jonasschnelli commented Oct 15, 2015

utACK

@morcos
Copy link
Member

morcos commented Oct 19, 2015

ACK

feeTolerance = Decimal(0.00000002) #if the fee's positive delta is higher than this value tests will fail, neg. delta always fail the tests

min_relay_tx_fee = self.nodes[0].getnetworkinfo()['relayfee']
# if the fee's positive delta is higher than this value tests will fail, neg. delta always fail the tests
Copy link
Contributor

@TheBlueMatt TheBlueMatt Oct 19, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update this comment to explain why this is picked (signatures may or may not take an extra byte or two, but never be smaller)

Copy link
Member Author

@MarcoFalke MarcoFalke Oct 20, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheBlueMatt done.

@MarcoFalke MarcoFalke force-pushed the MarcoFalke-2015-rpcTestsReturnCode branch from 6ce66fd to bd4c22e Compare Oct 20, 2015
@laanwj laanwj added the Tests label Oct 20, 2015
@laanwj
Copy link
Member

laanwj commented Oct 20, 2015

Looks good to me. This is the minimum to get the tests working again.

@laanwj laanwj merged commit bd4c22e into bitcoin:master Oct 20, 2015
laanwj added a commit that referenced this pull request Oct 20, 2015
bd4c22e [rpc-tests] Check return code (MarcoFalke)
0d8b175 [rpc-tests] fundrawtransaction: Update fee after minRelayTxFee increase (MarcoFalke)
@MarcoFalke MarcoFalke deleted the MarcoFalke-2015-rpcTestsReturnCode branch Oct 20, 2015
zkbot added a commit to zcash/zcash that referenced this pull request Nov 21, 2020
Migrate rpc-tests.sh to all-python rpc-tests.py

Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#6567
- bitcoin/bitcoin#6523
- bitcoin/bitcoin#6616
- bitcoin/bitcoin#6788
  - Only the commit fixing `rpc-tests.py`
- bitcoin/bitcoin#6791
  - Only the fix to `qa/rpc-tests/README.md`
- bitcoin/bitcoin#6827
- bitcoin/bitcoin#6930
- bitcoin/bitcoin#6804
- bitcoin/bitcoin#7029
- bitcoin/bitcoin#7028
- bitcoin/bitcoin#7027
- bitcoin/bitcoin#7135
- bitcoin/bitcoin#7209
- bitcoin/bitcoin#7635
- bitcoin/bitcoin#7778
- bitcoin/bitcoin#7851
- bitcoin/bitcoin#7814
  - Only the changes to the new .py files in this PR.
- bitcoin/bitcoin#7971
- bitcoin/bitcoin#7972
- bitcoin/bitcoin#8056
  - Only the first commit.
- bitcoin/bitcoin#8098
- bitcoin/bitcoin#8104
- bitcoin/bitcoin#8133
  - Only the `rpc-tests.py` commit.
- bitcoin/bitcoin#8066
- bitcoin/bitcoin#8216
  - Only the last two commits.
- bitcoin/bitcoin#8254
- bitcoin/bitcoin#8400
- bitcoin/bitcoin#8482
  - Excluding the first commit (only affects RPC tests we don't have).
- bitcoin/bitcoin#8551
- bitcoin/bitcoin#8607
  - Only the pull-tester commit, for conflict removal.
- bitcoin/bitcoin#8625
- bitcoin/bitcoin#8713
- bitcoin/bitcoin#8750
- bitcoin/bitcoin#8789
- bitcoin/bitcoin#9098
- bitcoin/bitcoin#9276
  - Excluding the second commit (we don't have the changes it requires).
- bitcoin/bitcoin#9657
- bitcoin/bitcoin#9807
- bitcoin/bitcoin#9766
- bitcoin/bitcoin#9823
zkbot added a commit to zcash/zcash that referenced this pull request Dec 2, 2020
Backport migration from rpc-tests.sh to rpc-tests.py

Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#6567
- bitcoin/bitcoin#6523
- bitcoin/bitcoin#6616
- bitcoin/bitcoin#6788
  - Only the commit fixing `rpc-tests.py`
- bitcoin/bitcoin#6791
  - Only the fix to `qa/rpc-tests/README.md`
- bitcoin/bitcoin#6827
- bitcoin/bitcoin#6930
- bitcoin/bitcoin#6804
- bitcoin/bitcoin#7029
- bitcoin/bitcoin#7028
- bitcoin/bitcoin#7027
- bitcoin/bitcoin#7135
- bitcoin/bitcoin#7209
- bitcoin/bitcoin#7635
- bitcoin/bitcoin#7778
- bitcoin/bitcoin#7851
- bitcoin/bitcoin#7814
  - Only the changes to the new .py files in this PR.
- bitcoin/bitcoin#7971
- bitcoin/bitcoin#7972
- bitcoin/bitcoin#8056
  - Only the first commit.
- bitcoin/bitcoin#8098
- bitcoin/bitcoin#8104
- bitcoin/bitcoin#8133
  - Only the `rpc-tests.py` commit.
- bitcoin/bitcoin#8066
- bitcoin/bitcoin#8216
  - Only the last two commits.
- bitcoin/bitcoin#8254
- bitcoin/bitcoin#8400
- bitcoin/bitcoin#8482
  - Excluding the first commit (only affects RPC tests we don't have).
- bitcoin/bitcoin#8551
- bitcoin/bitcoin#8607
  - Only the pull-tester commit, for conflict removal.
- bitcoin/bitcoin#8625
- bitcoin/bitcoin#8713
- bitcoin/bitcoin#8750
- bitcoin/bitcoin#8789
- bitcoin/bitcoin#9098
- bitcoin/bitcoin#9276
  - Excluding the second commit (we don't have the changes it requires).
- bitcoin/bitcoin#9657
- bitcoin/bitcoin#9807
- bitcoin/bitcoin#9766
- bitcoin/bitcoin#9823
zkbot added a commit to zcash/zcash that referenced this pull request Dec 2, 2020
Backport migration from rpc-tests.sh to rpc-tests.py

Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#6567
- bitcoin/bitcoin#6523
- bitcoin/bitcoin#6616
- bitcoin/bitcoin#6788
  - Only the commit fixing `rpc-tests.py`
- bitcoin/bitcoin#6791
  - Only the fix to `qa/rpc-tests/README.md`
- bitcoin/bitcoin#6827
- bitcoin/bitcoin#6930
- bitcoin/bitcoin#6804
- bitcoin/bitcoin#7029
- bitcoin/bitcoin#7028
- bitcoin/bitcoin#7027
- bitcoin/bitcoin#7135
- bitcoin/bitcoin#7209
- bitcoin/bitcoin#7635
- bitcoin/bitcoin#7778
- bitcoin/bitcoin#7851
- bitcoin/bitcoin#7814
  - Only the changes to the new .py files in this PR.
- bitcoin/bitcoin#7971
- bitcoin/bitcoin#7972
- bitcoin/bitcoin#8056
  - Only the first commit.
- bitcoin/bitcoin#8098
- bitcoin/bitcoin#8104
- bitcoin/bitcoin#8133
  - Only the `rpc-tests.py` commit.
- bitcoin/bitcoin#8066
- bitcoin/bitcoin#8216
  - Only the last two commits.
- bitcoin/bitcoin#8254
- bitcoin/bitcoin#8400
- bitcoin/bitcoin#8482
  - Excluding the first commit (only affects RPC tests we don't have).
- bitcoin/bitcoin#8551
- bitcoin/bitcoin#8607
  - Only the pull-tester commit, for conflict removal.
- bitcoin/bitcoin#8625
- bitcoin/bitcoin#8713
- bitcoin/bitcoin#8750
- bitcoin/bitcoin#8789
- bitcoin/bitcoin#9098
- bitcoin/bitcoin#9276
  - Excluding the second commit (we don't have the changes it requires).
- bitcoin/bitcoin#9657
- bitcoin/bitcoin#9807
- bitcoin/bitcoin#9766
- bitcoin/bitcoin#9823
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[tests] rpc tests and travis never fail on asserts
6 participants