Code Monkey home page Code Monkey logo

Comments (1)

rnbguy avatar rnbguy commented on July 17, 2024

Thanks for the issue, Mirel 👌 Looks like it is coming from terra.py. Somehow I couldn't reproduce this error at atomkraft chain testnet but when running atomkraft test trace.

I am adding reproducible steps on a docker for context.

Reproducible steps

Spawn a docker container using ubuntu image.

docker run --rm -it ubuntu

Then, execute the following commands in it.

apt update -y
apt install -y python3-pip golang git curl default-jre
python3 -m pip install atomkraft
atomkraft init transfer
cd transfer
git clone --depth=1 --branch=release/v0.46.x https://github.com/cosmos/cosmos-sdk
(cd cosmos-sdk; make build)
sed -i 's|simd|cosmos-sdk/build/simd|g' chain.toml
timeout 30 atomkraft chain testnet
curl -Lo models/transfer.tla https://raw.githubusercontent.com/informalsystems/atomkraft/dev/examples/cosmos-sdk/transfer/transfer.tla
atomkraft model apalache get
atomkraft model sample --model-path models/transfer.tla --traces-dir traces --examples Ex
curl -Lo reactors/reactor.py https://raw.githubusercontent.com/informalsystems/atomkraft/dev/examples/cosmos-sdk/transfer/reactor.py
atomkraft test trace --path traces/Ex/violation1.itf.json --reactor reactors/reactor.py --keypath action.tag

Error trace

/usr/local/lib/python3.10/dist-packages/atomkraft/chain/testnet.py:363: in broadcast_transaction
    MnemonicKey(
/usr/local/lib/python3.10/dist-packages/terra_sdk/key/mnemonic.py:63: in __init__
    root.ChildKey(44 + BIP32_HARDEN)
/usr/local/lib/python3.10/dist-packages/bip32utils/BIP32Key.py:241: in ChildKey
    return self.CKDpriv(i)
/usr/local/lib/python3.10/dist-packages/bip32utils/BIP32Key.py:193: in CKDpriv
    return BIP32Key(secret=secret, chain=Ir, depth=self.depth+1, index=i, fpr=self.Fingerprint(), public=False, testnet=self.testnet)
/usr/local/lib/python3.10/dist-packages/bip32utils/BIP32Key.py:283: in Fingerprint
    return self.Identifier()[:4]
/usr/local/lib/python3.10/dist-packages/bip32utils/BIP32Key.py:278: in Identifier
    return hashlib.new('ripemd160', sha256(cK).digest()).digest()
/usr/lib/python3.10/hashlib.py:166: in __hash_new
    return __get_builtin_constructor(name)(data)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = 'ripemd160'

    def __get_builtin_constructor(name):
        cache = __builtin_constructor_cache
        constructor = cache.get(name)
        if constructor is not None:
            return constructor
        try:
            if name in {'SHA1', 'sha1'}:
                import _sha1
                cache['SHA1'] = cache['sha1'] = _sha1.sha1
            elif name in {'MD5', 'md5'}:
                import _md5
                cache['MD5'] = cache['md5'] = _md5.md5
            elif name in {'SHA256', 'sha256', 'SHA224', 'sha224'}:
                import _sha256
                cache['SHA224'] = cache['sha224'] = _sha256.sha224
                cache['SHA256'] = cache['sha256'] = _sha256.sha256
            elif name in {'SHA512', 'sha512', 'SHA384', 'sha384'}:
                import _sha512
                cache['SHA384'] = cache['sha384'] = _sha512.sha384
                cache['SHA512'] = cache['sha512'] = _sha512.sha512
            elif name in {'blake2b', 'blake2s'}:
                import _blake2
                cache['blake2b'] = _blake2.blake2b
                cache['blake2s'] = _blake2.blake2s
            elif name in {'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512'}:
                import _sha3
                cache['sha3_224'] = _sha3.sha3_224
                cache['sha3_256'] = _sha3.sha3_256
                cache['sha3_384'] = _sha3.sha3_384
                cache['sha3_512'] = _sha3.sha3_512
            elif name in {'shake_128', 'shake_256'}:
                import _sha3
                cache['shake_128'] = _sha3.shake_128
                cache['shake_256'] = _sha3.shake_256
        except ImportError:
            pass  # no extension module, this hash is unsupported.
    
        constructor = cache.get(name)
        if constructor is not None:
            return constructor
    
>       raise ValueError('unsupported hash type ' + name)

from atomkraft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.