Skip to content

bug: [Nano] PoW source fallback URL requires auth'n #220

@cbrunnkvist

Description

@cbrunnkvist

Problem

Nano requires a small proof of work when submitting a new transaction. On GPU enabled platforms this is usually not a big deal, but as a fallback, wallets rely on remote/peer PoW generating services. In OWS this work peer URL can be set in config, or overridden using the NANO_WORK_URL env var.

However, the current Rust module lacks local GPU support, and default fallback Proof-of-Work URL hardcoded in the codebase is https://rpc.nano.to during refactoring (it should have been a PoW-capable node from the start). This endpoint does not support the work_generate RPC action for clients without using an API-key, causing PoW generation to fail when all other endpoints are exhausted / when NANO_WORK_URL env is unset.

Impact

If no NANO_WORK_URL env var is configured, PoW will fail with "no PoW endpoints available". This breaks send/receive transactions for users relying on the default configuration...

Root Cause

The value of FALLBACK_WORK_URL const was inadvertently set to a node that requires a (free) API key to work...

Proposed Fix

Replace https://rpc.nano.to with a public RPC server that supports work_generate for unauthenticated clients. Consider maintaining a list of multiple fallback URLs rather than a single hardcoded one, since the implementation already supports semicolon-separated env var values.

Workaround

In the meantime, users can set the NANO_WORK_URL environment variable with a (optionally semicolon-separated list of) working PoW-capable RPC endpoint; see for example https://publicnodes.somenano.com/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions