if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( '--local', action='store_true', help= 'If set, runs in the local version instead of auto-updatable docker. Otherwise runs locally' ) parser.add_argument('--release', action='store_true', help='If set, compiles nearcore in release mode') parser.add_argument('--verbose', action='store_true', help='If set, prints verbose logs') parser.add_argument( '--image', default='nearprotocol/nearcore', help='Image to run in docker (default: nearprotocol/nearcore)') args = parser.parse_args() print( "Starting unittest nodes with test.near account and seed key of alice.near" ) home_dir = os.path.join(os.getcwd(), 'testdir') subprocess.call(['rm', '-rf', home_dir]) setup_and_run(args.local, args.release, args.image, home_dir, [ '--chain-id=', '--test-seed=alice.near', '--account-id=test.near', '--fast' ], '', args.verbose)
#!/usr/bin/env python import argparse import os from nodelib import setup_and_run if __name__ == "__main__": print("****************************************************") print("* Running NEAR validator node for Official TestNet *") print("****************************************************") DEFAULT_BOOT_NODE = "[email protected]:24567" parser = argparse.ArgumentParser() parser.add_argument('--local', action='store_true', help='If set, runs in the local version instead of auto-updatable docker. Otherwise runs locally') parser.add_argument('--debug', action='store_true', help='If set, compiles local nearcore in debug mode') parser.add_argument('--verbose', action='store_true', help='If set, prints verbose logs') parser.add_argument('--home', default=os.path.expanduser('~/.near/'), help='Home path for storing configs, keys and chain data (Default: ~/.near)') parser.add_argument( '--image', default='nearprotocol/nearcore', help='Image to run in docker (default: nearprotocol/nearcore)') parser.add_argument( '--boot-nodes', default=DEFAULT_BOOT_NODE, help='Specify boot nodes to load from (Default: %s)' % DEFAULT_BOOT_NODE) args = parser.parse_args() setup_and_run(args.local, not args.debug, args.image, args.home, ['--chain-id=testnet'], args.boot_nodes, args.verbose)
print("* Running NEAR validator node for Local TestNet *") print("****************************************************") parser = argparse.ArgumentParser() parser.add_argument( '--local', action='store_true', help= 'If set, runs in the local version instead of auto-updatable docker. Otherwise runs locally' ) parser.add_argument('--debug', action='store_true', help='If set, compiles local nearcore in debug mode') parser.add_argument('--verbose', action='store_true', help='If set, prints verbose logs') parser.add_argument( '--home', default=os.path.expanduser('~/.near/'), help= 'Home path for storing configs, keys and chain data (Default: ~/.near)' ) parser.add_argument( '--image', default='nearprotocol/nearcore', help='Image to run in docker (default: nearprotocol/nearcore)') args = parser.parse_args() setup_and_run(args.local, not args.debug, args.image, args.home, ['--chain-id='], '', args.verbose)
) parser.add_argument('--debug', action='store_true', help='If set, compiles local nearcore in debug mode') parser.add_argument('--verbose', action='store_true', help='If set, prints verbose logs') parser.add_argument( '--home', default=os.path.expanduser('~/.near/'), help= 'Home path for storing configs, keys and chain data (Default: ~/.near)' ) parser.add_argument( '--image', default='nearprotocol/nearcore', help='Image to run in docker (default: nearprotocol/nearcore)') args = parser.parse_args() if args.local: print("Flag --local deprecated, please use --nodocker") nodocker = args.nodocker or args.local setup_and_run(nodocker, not args.debug, args.image, args.home, init_flags=[], boot_nodes='', telemetry_url='', verbose=args.verbose)
'If set, compiles and runs the node on the machine directly (not inside the docker).' ) parser.add_argument('--debug', action='store_true', help='If set, compiles local nearcore in debug mode') parser.add_argument('--verbose', action='store_true', help='If set, prints verbose logs') parser.add_argument( '--home', default=os.path.expanduser('~/.near/'), help= 'Home path for storing configs, keys and chain data (Default: ~/.near)' ) parser.add_argument( '--image', default='nearprotocol/nearcore:staging', help='Image to run in docker (default: nearprotocol/nearcore:staging)') parser.add_argument('--boot-nodes', default=DEFAULT_BOOT_NODE, help='Specify boot nodes to load from (Default: %s)' % DEFAULT_BOOT_NODE) args = parser.parse_args() if args.local: print("Flag --local deprecated, please use --nodocker") nodocker = args.nodocker or args.local setup_and_run(nodocker, not args.debug, args.image, args.home, ['--chain-id=staging'], args.boot_nodes, TELEMETRY_URL, args.verbose)
parser.add_argument('--verbose', action='store_true', help='If set, prints verbose logs') parser.add_argument( '--home', default=os.path.expanduser('~/.near/'), help= 'Home path for storing configs, keys and chain data (Default: ~/.near)' ) parser.add_argument( '--image', default='nearprotocol/nearcore', help='Image to run in docker (default: nearprotocol/nearcore)') parser.add_argument('--boot-nodes', default=DEFAULT_BOOT_NODE, help='Specify boot nodes to load from (Default: %s)' % DEFAULT_BOOT_NODE) args = parser.parse_args() if args.local: print("Flag --local deprecated, please use --nodocker") nodocker = args.nodocker or args.local setup_and_run(nodocker, not args.debug, args.image, args.home, init_flags=['--chain-id=testnet'], boot_nodes=args.boot_nodes, telemetry_url=TELEMETRY_URL, verbose=args.verbose)
) parser.add_argument('--release', action='store_true', help='If set, compiles nearcore in release mode') parser.add_argument('--verbose', action='store_true', help='If set, prints verbose logs') parser.add_argument( '--image', default='nearprotocol/nearcore', help='Image to run in docker (default: nearprotocol/nearcore)') args = parser.parse_args() print( "Starting unittest nodes with test.near account and seed key of alice.near" ) home_dir = os.path.join(os.getcwd(), 'testdir', '.near') subprocess.call(['rm', '-rf', home_dir]) subprocess.call(['mkdir', '-p', home_dir]) setup_and_run(args.local, args.release, args.image, home_dir, init_flags=[ '--chain-id=', '--test-seed=alice.near', '--account-id=test.near', '--fast' ], boot_nodes='', telemetry_url='', verbose=args.verbose)
#!/usr/bin/env python import argparse import os from nodelib import setup_and_run if __name__ == "__main__": print("****************************************************") print("* Running NEAR validator node for Local TestNet *") print("****************************************************") parser = argparse.ArgumentParser() parser.add_argument('--local', action='store_true', help='deprecated: use --nodocker') parser.add_argument('--nodocker', action='store_true', help='If set, compiles and runs the node on the machine directly (not inside the docker).') parser.add_argument('--debug', action='store_true', help='If set, compiles local nearcore in debug mode') parser.add_argument('--verbose', action='store_true', help='If set, prints verbose logs') parser.add_argument('--home', default=os.path.expanduser('~/.near/'), help='Home path for storing configs, keys and chain data (Default: ~/.near)') parser.add_argument( '--image', default='nearprotocol/nearcore', help='Image to run in docker (default: nearprotocol/nearcore)') args = parser.parse_args() if args.local: print("Flag --local deprecated, please use --nodocker") nodocker = args.nodocker or args.local setup_and_run(nodocker, not args.debug, args.image, args.home, ['--chain-id='], '', args.verbose)