Ejemplo n.º 1
0
    parser.add_argument(
        '--image',
        default='nearprotocol/nearcore:stakewars',
        help='Image to run in docker (default: nearprotocol/nearcore:stakewars)'
    )
    parser.add_argument('--tracked-shards',
                        default='',
                        help='The shards that this node wants to track')
    args = parser.parse_args()

    TELEMETRY_URL = 'https://explorer.tatooine.nearprotocol.com/api/nodes'

    if args.local:
        print("Flag --local deprecated, please use --nodocker")

    nodocker = args.nodocker or args.local
    if args.init:
        initialize_keys(args.home, not args.debug, nodocker, args.image,
                        args.account_id, args.signer_keys)
    else:
        print("****************************************************")
        print("* Running NEAR validator node for Stake Wars *")
        print("****************************************************")
        start_stakewars(args.home,
                        not args.debug,
                        nodocker,
                        args.image,
                        telemetry_url=TELEMETRY_URL,
                        verbose=args.verbose,
                        tracked_shards=args.tracked_shards)
Ejemplo n.º 2
0
        'If set, initialize the home dir by generating validator key and node key'
    )
    parser.add_argument(
        '--signer-keys',
        action='store_true',
        help='If set, generate signer keys for account specified')
    parser.add_argument(
        '--account-id',
        default='',
        help='If set, the account id will be used for running a validator')
    parser.add_argument(
        '--image',
        default='nearprotocol/nearcore:stakewars',
        help='Image to run in docker (default: nearprotocol/nearcore:stakewars)'
    )
    args = parser.parse_args()

    if args.local:
        print("Flag --local deprecated, please use --nodocker")

    nodocker = args.nodocker or args.local
    if args.init:
        initialize_keys(args.home, not args.debug, nodocker, args.image,
                        args.account_id, args.signer_keys)
    else:
        print("****************************************************")
        print("* Running NEAR validator node for Stake Wars *")
        print("****************************************************")
        start_stakewars(args.home, not args.debug, nodocker, args.image,
                        args.verbose)