Exemplo n.º 1
0
def run_witness(slot_num):
    from cilantro.logger import get_logger
    from cilantro.nodes import NodeFactory
    import os

    log = get_logger(__name__)

    w_info = witnesses[slot_num]
    w_info['ip'] = os.getenv('HOST_IP')

    NodeFactory.run_witness(ip=w_info['ip'], signing_key=w_info['sk'])
Exemplo n.º 2
0
def run_witness(slot_num):
    from cilantro.logger import get_logger
    from cilantro.nodes import NodeFactory
    import os

    log = get_logger("WITNESS FACTORY")

    w_info = TESTNET_WITNESSES[slot_num]
    w_info['ip'] = os.getenv('HOST_IP')

    NodeFactory.run_witness(ip=w_info['ip'], signing_key=w_info['sk'])
Exemplo n.º 3
0
def run_witness(slot_num):
    from cilantro.logger import get_logger
    from cilantro import Constants
    from cilantro.nodes import NodeFactory
    import os

    log = get_logger("WITNESS FACTORY")

    w_info = Constants.Testnet.Witnesses[slot_num]
    w_info['ip'] = os.getenv('HOST_IP')

    NodeFactory.run_witness(ip=w_info['ip'], signing_key=w_info['sk'])
Exemplo n.º 4
0
def run_witness(slot_num):
    from cilantro.logger import get_logger
    from cilantro import Constants
    from cilantro.nodes import NodeFactory
    import os
    log = get_logger("WITNESS FACTORY")

    w_info = Constants.Testnet.Witnesses[slot_num]
    w_info['ip'] = os.getenv('HOST_IP')

    log.critical("Building witness on slot {} with info {}".format(
        slot_num, w_info))
    NodeFactory.run_witness(ip=w_info['ip'], signing_key=w_info['sk'])
Exemplo n.º 5
0
def run_witness(slot_num):
    from cilantro.logger import get_logger
    from cilantro import Constants
    from cilantro.nodes import NodeFactory
    from cilantro.db import DB, DB_NAME
    import os

    log = get_logger(__name__)

    w_info = Constants.Testnet.Witnesses[slot_num]
    w_info['ip'] = os.getenv('HOST_IP')

    NodeFactory.run_witness(ip=w_info['ip'], signing_key=w_info['sk'])
Exemplo n.º 6
0
def run_witness(slot_num):
    from cilantro.logger import get_logger, overwrite_logger_level
    from cilantro.nodes import NodeFactory
    import os
    import logging

    # overwrite_logger_level(logging.WARNING)
    overwrite_logger_level(15)

    w_info = witnesses[slot_num]
    w_info['ip'] = os.getenv('HOST_IP')

    NodeFactory.run_witness(ip=w_info['ip'], signing_key=w_info['sk'], should_reset=True)
Exemplo n.º 7
0
def run_witness(slot_num):
    from cilantro.logger import get_logger, overwrite_logger_level
    from cilantro import Constants
    from cilantro.nodes import NodeFactory
    import os
    import logging

    overwrite_logger_level(logging.WARNING)

    w_info = Constants.Testnet.Witnesses[slot_num]
    w_info['ip'] = os.getenv('HOST_IP')

    NodeFactory.run_witness(ip=w_info['ip'], signing_key=w_info['sk'])
Exemplo n.º 8
0
def start_witness(i):
    log = get_logger("WitnessFactory")

    DB.set_context('{}_witness_{}'.format(DB_NAME, i))
    with DB(should_reset=True) as db:
        pass

    w_info = Constants.Testnet.Witnesses[i]
    log.critical("\n\nStarting witness on slot {} with info {}\n\n".format(
        i, w_info))
    NodeFactory.run_witness(signing_key=w_info['sk'],
                            ip=w_info['url'],
                            name="Witness_{}".format(i + 1))
Exemplo n.º 9
0
def run_witness(slot_num):
    from cilantro.logger import get_logger, overwrite_logger_level
    from cilantro.nodes import NodeFactory
    from cilantro.constants.testnet import TESTNET_WITNESSES
    import os
    import logging

    # overwrite_logger_level(logging.WARNING)
    # overwrite_logger_level(21)

    w_info = TESTNET_WITNESSES[slot_num]
    w_info['ip'] = os.getenv('HOST_IP')

    NodeFactory.run_witness(ip=w_info['ip'], signing_key=w_info['sk'], reset_db=True)
Exemplo n.º 10
0
def run_witness(slot_num):
    from cilantro.logger import get_logger, overwrite_logger_level
    from cilantro.constants.testnet import witnesses
    from cilantro.nodes import NodeFactory
    import os
    import logging
    from cilantro.logger.base import get_logger
    log = get_logger('W')

    # overwrite_logger_level(logging.WARNING)
    # overwrite_logger_level(21)
    log.critical(slot_num)
    w_info = witnesses[slot_num]
    w_info['ip'] = os.getenv('HOST_IP')

    NodeFactory.run_witness(ip=w_info['ip'],
                            signing_key=w_info['sk'],
                            should_reset=True)
Exemplo n.º 11
0
def run_witness(slot_num):
    from cilantro.logger import get_logger
    from cilantro import Constants
    from cilantro.nodes import NodeFactory
    from cilantro.db import DB, DB_NAME
    import os

    log = get_logger("WITNESS FACTORY")

    with DB('{}_witness_{}'.format(DB_NAME, slot_num),
            should_reset=True) as db:
        pass

    w_info = Constants.Testnet.Witnesses[slot_num]
    w_info['ip'] = os.getenv('HOST_IP')

    log.critical("Building witness on slot {} with info {}".format(
        slot_num, w_info))
    NodeFactory.run_witness(ip=w_info['ip'], signing_key=w_info['sk'])