Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
/ ursa Public archive

Ursa, a decentralized content delivery network that is censorship-resistant and trustless without compromise on throughput and latency

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

fleek-network/ursa

Archived

After months developing Fleek Network in this repository, we have realized the need to reboot the codebase, our engineers are actively working harder than ever on the upcoming new iteration of the protocol (it's gonna be cool 😎). We appreciate all of the love you have given to this repository with your stars. But since we have no activity here, we have decided to archive this repository, and let it live forever as a part of the history of Fleek Network.

Expect a new source code and a more detailed breakdown of the changes and what motivated us to do so.

Ursa

Ursa, a decentralized content delivery network.

Run a node

Run with cli

Note: Full nodes are intended to run behind a reverse proxy providing ssl and listening on 80/443. See # Run with Docker Compose for a preconfigured setup.

Dependencies

  • make
  • rust (^1.65.0)
  • build-essential
  • libclang
  • cmake
  • protoc

Instructions

Build and install the latest HEAD version:

make install

You can run the node with ursa command. This will run the node with default parameters.

CLI Flags

  • --config A toml file containing relevant configurations.
    • Default value: empty.
  • --rpc Allow rpc to be active or not.
    • Default value: true.
  • --rpc-port Port used for JSON-RPC communication.
    • Default value: 4069.

CLI Subcommands

  • rpc put Put a CAR file into the local node
  • rpc get Get content for a cid from the local node, and save to path

Configuration

The default ursa config is loaded from ~/.ursa/config.toml, but can be overridden using the --config flag.

[network_config]
mdns = false
relay_server = true
autonat = true
relay_client = true
bootstrapper = false
bootstrap_nodes = ["/ip4/127.0.0.1/tcp/6009"]
swarm_addrs = ["/ip4/0.0.0.0/tcp/6009", "/ip4/0.0.0.0/udp/4890/quic-v1"]
database_path = "~/.ursa/data/ursa_db"
keystore_path = "~/.ursa/keystore"
identity = "default"

[provider_config]
# Public IP address of the node
addresses = ["/ip4/127.0.0.1/tcp/4069"]
indexer_url = "https://dev.cid.contact"
database_path = "~/.ursa/data/index_provider_db"

[server_config]
port = 4069
addr = "0.0.0.0"

Run with Docker Compose

You can run the full node with some supporting infrastructure through docker-compose. This includes:

  • Ursa Node
  • Nginx reverse proxy
  • Let's Encrypt ssl
  • Prometheus Metrics
  • Grafana Dashboard

Dependencies

  • Docker (with Buildkit)
  • Docker Compose

Instructions

Make sure to edit nginx/app.conf with your node's domain name, and run init-letsencrypt.sh. Detailed instructions here

Build the node and fetch infra images:

make compose-build

Start up node and infra:

make compose-up

Shut down node and infra:

make compose-down

Configuration

By default, the compose will bind-mount the host folder ~/.ursa/ to the node. Any configuration/keys/database files can be located and edited on the host machine at that path. Any changes requires the node to be restarted to take effect

RPC & HTTP

To access the rpc you can do through the http JSON-RPC api. The endpoint to request is /rpc/v0. The server can be accessible in port 4069 for local development and in port 80/443 through the reverse proxy (nginx at the moment).

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT APACHE 2.0

About

Ursa, a decentralized content delivery network that is censorship-resistant and trustless without compromise on throughput and latency

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages