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

contrib: Adjust output to current test format #13935

Merged
merged 1 commit into from Aug 27, 2018

Conversation

@AkioNak
Copy link
Contributor

@AkioNak AkioNak commented Aug 10, 2018

This PR makes the output of gen_base58_test_vectors.py to fit to current test format.
The test has already been changed(separated) from base58_test to key_io_test, so change the file name of this script as well.

(This will solve #13553 )

@AkioNak AkioNak force-pushed the testgen_for_key_io_tests branch from 96a6acd to c7cbd2c Aug 10, 2018
@laanwj laanwj added the Tests label Aug 10, 2018
@AkioNak
Copy link
Contributor Author

@AkioNak AkioNak commented Aug 12, 2018

This script requires segwit_addr.py known as BIP173 Reference implementations for Python.
(See https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#Reference_implementations )
Since it is included in test_framework, we can execute as follows:

$ PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py valid 50 > ../../src/test/data/key_io_keys_valid.json

@MarcoFalke MarcoFalke added this to the 0.18.0 milestone Aug 12, 2018
Copy link
Member

@kallewoof kallewoof left a comment

utACK c7cbd2cd9eb6f8df4348643f0a02d2dbc487197c

n = random.randint(0, len(val))
val = val[0:n] + random.choice(b58chars) + val[n+1:]
for template, gen_invalid_vector in [(t, g) for g, l in zip(glist, tlist) for t in l]:
val = gen_invalid_vector(template)
Copy link
Member

@kallewoof kallewoof Aug 14, 2018

A bit long, but maybe call it invalid_vector_generator, since it is very close to the function names above. I thought for a moment it was referring to the function called gen_invalid_vectors but it had an s, I realized.

@AkioNak AkioNak force-pushed the testgen_for_key_io_tests branch from c7cbd2c to 512c25f Aug 14, 2018
@AkioNak
Copy link
Contributor Author

@AkioNak AkioNak commented Aug 14, 2018

@kallewoof fixed. -- renamed as below:

  1. from gen_valid_vector to valid_vector_generator
  2. from gen_invalid_vector to invalid_vector_generator

Copy link
Member

@kallewoof kallewoof left a comment

re-utACK 512c25f2348dc01e5dc92e84698ba61c66fcfb5a

@laanwj
Copy link
Member

@laanwj laanwj commented Aug 16, 2018

utACK 512c25f2348dc01e5dc92e84698ba61c66fcfb5a after squash

@laanwj
Copy link
Member

@laanwj laanwj commented Aug 27, 2018

utACK 512c25f after squash

a reminder to squash this according to the workflow in CONTRIBUTING.md
(otherwise, this could be merged)

Ajust the outputs of gen_base58_test_vectors.py to current test format.

1. Add bech32 vector generation.
2. Add Script-fragments to hexrepr in the format expected by the test.
3. Modify the metadata.
  1) Change 'isTestnet' to 'chain' (main/test/regtest)
  2) Remove 'addrType'
  3) Add 'tryCaseFlip' (True/False on bech32)
@AkioNak AkioNak force-pushed the testgen_for_key_io_tests branch from 512c25f to a9910d8 Aug 27, 2018
@AkioNak
Copy link
Contributor Author

@AkioNak AkioNak commented Aug 27, 2018

@laanwj thanks. squashed.

MarcoFalke added a commit to MarcoFalke/bitcoin-core that referenced this issue Aug 27, 2018
a9910d8 contrib: Adjust output to current test format (Akio Nakamura)

Pull request description:

  This PR makes  the output of ```gen_base58_test_vectors.py``` to fit to current test format.
  The test has already been changed(separated) from ```base58_test``` to ```key_io_test```, so change the file name of this script as well.

  (This will solve bitcoin#13553 )

Tree-SHA512: 2986009acd734edd5b6ee0a5efed9e8d156c99b1919a0e9f6ffdd4c863f52f4d1c6bfdaca359937ea380e311dda559d96449fc6a7224092c1fb2517ee5b83369
@MarcoFalke MarcoFalke merged commit a9910d8 into bitcoin:master Aug 27, 2018
0 of 2 checks passed
@AkioNak AkioNak deleted the testgen_for_key_io_tests branch Aug 30, 2018
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jun 30, 2021
a9910d8 contrib: Adjust output to current test format (Akio Nakamura)

Pull request description:

  This PR makes  the output of ```gen_base58_test_vectors.py``` to fit to current test format.
  The test has already been changed(separated) from ```base58_test``` to ```key_io_test```, so change the file name of this script as well.

  (This will solve bitcoin#13553 )

Tree-SHA512: 2986009acd734edd5b6ee0a5efed9e8d156c99b1919a0e9f6ffdd4c863f52f4d1c6bfdaca359937ea380e311dda559d96449fc6a7224092c1fb2517ee5b83369

# Conflicts:
#	contrib/testgen/gen_base58_test_vectors.py
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 1, 2021
a9910d8 contrib: Adjust output to current test format (Akio Nakamura)

Pull request description:

  This PR makes  the output of ```gen_base58_test_vectors.py``` to fit to current test format.
  The test has already been changed(separated) from ```base58_test``` to ```key_io_test```, so change the file name of this script as well.

  (This will solve bitcoin#13553 )

Tree-SHA512: 2986009acd734edd5b6ee0a5efed9e8d156c99b1919a0e9f6ffdd4c863f52f4d1c6bfdaca359937ea380e311dda559d96449fc6a7224092c1fb2517ee5b83369

# Conflicts:
#	contrib/testgen/gen_base58_test_vectors.py
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 2, 2021
a9910d8 contrib: Adjust output to current test format (Akio Nakamura)

Pull request description:

  This PR makes  the output of ```gen_base58_test_vectors.py``` to fit to current test format.
  The test has already been changed(separated) from ```base58_test``` to ```key_io_test```, so change the file name of this script as well.

  (This will solve bitcoin#13553 )

Tree-SHA512: 2986009acd734edd5b6ee0a5efed9e8d156c99b1919a0e9f6ffdd4c863f52f4d1c6bfdaca359937ea380e311dda559d96449fc6a7224092c1fb2517ee5b83369

# Conflicts:
#	contrib/testgen/gen_base58_test_vectors.py
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 2, 2021
a9910d8 contrib: Adjust output to current test format (Akio Nakamura)

Pull request description:

  This PR makes  the output of ```gen_base58_test_vectors.py``` to fit to current test format.
  The test has already been changed(separated) from ```base58_test``` to ```key_io_test```, so change the file name of this script as well.

  (This will solve bitcoin#13553 )

Tree-SHA512: 2986009acd734edd5b6ee0a5efed9e8d156c99b1919a0e9f6ffdd4c863f52f4d1c6bfdaca359937ea380e311dda559d96449fc6a7224092c1fb2517ee5b83369

# Conflicts:
#	contrib/testgen/gen_base58_test_vectors.py
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 4, 2021
a9910d8 contrib: Adjust output to current test format (Akio Nakamura)

Pull request description:

  This PR makes  the output of ```gen_base58_test_vectors.py``` to fit to current test format.
  The test has already been changed(separated) from ```base58_test``` to ```key_io_test```, so change the file name of this script as well.

  (This will solve bitcoin#13553 )

Tree-SHA512: 2986009acd734edd5b6ee0a5efed9e8d156c99b1919a0e9f6ffdd4c863f52f4d1c6bfdaca359937ea380e311dda559d96449fc6a7224092c1fb2517ee5b83369

# Conflicts:
#	contrib/testgen/gen_base58_test_vectors.py
UdjinM6 added a commit to UdjinM6/dash that referenced this issue Jul 7, 2021
a9910d8 contrib: Adjust output to current test format (Akio Nakamura)

Pull request description:

  This PR makes  the output of ```gen_base58_test_vectors.py``` to fit to current test format.
  The test has already been changed(separated) from ```base58_test``` to ```key_io_test```, so change the file name of this script as well.

  (This will solve bitcoin#13553 )

Tree-SHA512: 2986009acd734edd5b6ee0a5efed9e8d156c99b1919a0e9f6ffdd4c863f52f4d1c6bfdaca359937ea380e311dda559d96449fc6a7224092c1fb2517ee5b83369

# Conflicts:
#	contrib/testgen/gen_base58_test_vectors.py
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 7, 2021
a9910d8 contrib: Adjust output to current test format (Akio Nakamura)

Pull request description:

  This PR makes  the output of ```gen_base58_test_vectors.py``` to fit to current test format.
  The test has already been changed(separated) from ```base58_test``` to ```key_io_test```, so change the file name of this script as well.

  (This will solve bitcoin#13553 )

Tree-SHA512: 2986009acd734edd5b6ee0a5efed9e8d156c99b1919a0e9f6ffdd4c863f52f4d1c6bfdaca359937ea380e311dda559d96449fc6a7224092c1fb2517ee5b83369

# Conflicts:
#	contrib/testgen/gen_base58_test_vectors.py
UdjinM6 added a commit to UdjinM6/dash that referenced this issue Jul 7, 2021
a9910d8 contrib: Adjust output to current test format (Akio Nakamura)

Pull request description:

  This PR makes  the output of ```gen_base58_test_vectors.py``` to fit to current test format.
  The test has already been changed(separated) from ```base58_test``` to ```key_io_test```, so change the file name of this script as well.

  (This will solve bitcoin#13553 )

Tree-SHA512: 2986009acd734edd5b6ee0a5efed9e8d156c99b1919a0e9f6ffdd4c863f52f4d1c6bfdaca359937ea380e311dda559d96449fc6a7224092c1fb2517ee5b83369

# Conflicts:
#	contrib/testgen/gen_base58_test_vectors.py
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 7, 2021
a9910d8 contrib: Adjust output to current test format (Akio Nakamura)

Pull request description:

  This PR makes  the output of ```gen_base58_test_vectors.py``` to fit to current test format.
  The test has already been changed(separated) from ```base58_test``` to ```key_io_test```, so change the file name of this script as well.

  (This will solve bitcoin#13553 )

Tree-SHA512: 2986009acd734edd5b6ee0a5efed9e8d156c99b1919a0e9f6ffdd4c863f52f4d1c6bfdaca359937ea380e311dda559d96449fc6a7224092c1fb2517ee5b83369

# Conflicts:
#	contrib/testgen/gen_base58_test_vectors.py
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 8, 2021
a9910d8 contrib: Adjust output to current test format (Akio Nakamura)

Pull request description:

  This PR makes  the output of ```gen_base58_test_vectors.py``` to fit to current test format.
  The test has already been changed(separated) from ```base58_test``` to ```key_io_test```, so change the file name of this script as well.

  (This will solve bitcoin#13553 )

Tree-SHA512: 2986009acd734edd5b6ee0a5efed9e8d156c99b1919a0e9f6ffdd4c863f52f4d1c6bfdaca359937ea380e311dda559d96449fc6a7224092c1fb2517ee5b83369

# Conflicts:
#	contrib/testgen/gen_base58_test_vectors.py
@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
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants