Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Apr 4, 2021

Seems odd to have an option for non-deterministic tests
when the goal should be for all tests to be deterministic.

@practicalswift
Copy link
Contributor

Concept ACK: tests should be deterministic where possible

@jamesob
Copy link
Contributor

jamesob commented Apr 5, 2021

Looks good to me - I can't figure out why the regtest assumeutxo hash changed though... any idea? Also not sure why faf96ef is in here (though I'm ACK on that as well, and don't mind including it).

@maflcko
Copy link
Member Author

maflcko commented Apr 5, 2021

The assumeutxo hash includes the blockheader hash, which again includes the merkle root, which again includes all tx hashes, which again include all scriptPubkeys, which are different when compressed pubkeys are used (see the first commit)

@jamesob
Copy link
Contributor

jamesob commented Apr 5, 2021

The assumeutxo hash includes the blockheader hash, which again includes the merkle root, which again includes all tx hashes, which again include all scriptPubkeys, which are different when compressed pubkeys are used (see the first commit)

Ah, missed the bool flip here: faab43d#diff-6a8ef76c60f30a6ca67d9f0e478fd02989c4b7fbc4c3116f80e13d873d5775e6R216

@maflcko maflcko force-pushed the 2104-testCleanup branch from faf96ef to fac9957 Compare April 6, 2021 06:32
@maflcko
Copy link
Member Author

maflcko commented Apr 6, 2021

Also not sure why faf96ef is in here

Thanks, force pushed to remove third commit.

@theStack
Copy link
Contributor

theStack commented Apr 6, 2021

Concept ACK

@maflcko
Copy link
Member Author

maflcko commented Apr 7, 2021

Force pushed to add a commit to remove even more code

Copy link
Contributor

Choose a reason for hiding this comment

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

Where else are we verifying that these values come through unmangled? I don't like the idea of removing these checks just because they're annoying every once in a while if we're not verifying this behavior elsewhere.

@jamesob
Copy link
Contributor

jamesob commented Apr 7, 2021

IMO you should stick to the spirit of the title of this PR and remove the first commit; removing the chance of non-determinism from tests is a good change, but I don't see why we should make the assumeutxo tests more permissive just because it removes a little bit more code.

MarcoFalke added 2 commits April 8, 2021 08:58
coinbaseKey.MakeNewKey(true); creates a compressed key and there is no reason
for the deterministic setup to use uncompressed ones.
Seems odd to have an option for non-deterministic tests
when the goal should be for all tests to be deterministic.

Can be reviewed with `--ignore-all-space`.
@maflcko maflcko force-pushed the 2104-testCleanup branch from fa333f8 to fa6183d Compare April 8, 2021 06:59
@maflcko
Copy link
Member Author

maflcko commented Apr 8, 2021

Reverted to initial changes for now.

@jamesob
Copy link
Contributor

jamesob commented Apr 8, 2021

ACK fa6183d

@practicalswift
Copy link
Contributor

cr ACK fa6183d: patch looks deterministic!

@maflcko maflcko merged commit 4ad83a9 into bitcoin:master Apr 9, 2021
@maflcko maflcko deleted the 2104-testCleanup branch April 9, 2021 05:52
@bitcoin bitcoin locked and limited conversation to collaborators Apr 9, 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.

5 participants