Git Product home page Git Product logo

go-btfs's Introduction

go-btfs

What is BTFS 2.0?

BitTorrent File System (BTFS) is a next-generation file sharing protocol in the BitTorrent ecosystem. Current mainstream public blockchains mostly focus on computational tasks but lack cost-effective, scalable, and high-performing file storage and sharing solutions.

These are exactly what BTFS aims to clear up. Besides, underpinned by BTTC, BTFS enables cross-chain connectivity and multi-channel payments, making itself a more convenient choice. The intgration of BTFS, BitTorrent, and the BTTC network will boost DApp developers' efficiency in serving a wider market.

  • The documentation walks developers through BTFS 2.0 setup, usage, and API references.
  • Please join the BTFS community at discord.

BTFS 2.0 Architecture Diagram

Architecture Diagram

Table of Contents

Faucet

In order to ensure the normal use of btfs 2.0 testnet, you need to apply for BTT at BTTC testnet, which is obtained here.

Install BTFS

The download and install instructions for BTFS are over at: https://docs.btfs.io/docs/install-run-btfs20-node.

System Requirements

BTFS can run on most Linux, macOS, and Windows systems. We recommend running it on a machine with at least 2 GB of RAM (it’ll do fine with only one CPU core), but it should run fine with as little as 1 GB of RAM. On systems with less memory, it may not be completely stable. Only support compiling from source for mac and unix-based system.

Install Pre-Built Packages

We host pre-built binaries at https://github.com/bittorrent/go-btfs/releases/latest

Initialize a BTFS Daemon

On testnet

$ btfs init -p storage-host-testnet
Generating TRON key with BIP39 seed phrase...
Master public key:  xpub661MyMwAqRbcGgHpeMqFkS5hnwoGeAcHG5KkDQwke7wFxtKqfsXTCTjWsoU2dYVXVGvV7EuGcviEzEJ143TezxxXvs2zZ9FYTtCei8iRQ66
initializing BTFS node at /Users/btfs/.btfs
generating btfs node keypair with TRON key...done
peer identity: 16Uiu2HAmKFQPM72SssFRrqcH1qwUsPwcp7vXSg3SEzfdYua1J5qc
to get started, enter:

    btfs cat /btfs/QmZjrLVdUpqVU6Pnc8pBnyQxVdpn9J8tfcsycP84W6N93C/readme

Start the Daemon

Start the BTFS Daemon

$ btfs daemon --chain-id <chainid>

Specify the chain for btfs to run by --chain-id, the chainid of the test network is 1029, and the start command becomes: btfs daemon --chain-id 1029

$ btfs daemon --chain-id 1029
Initializing daemon...
go-btfs version: 2.0
Repo version: 10
System version: amd64/darwin
Golang version: go1.16.5
Repo location: /Users/btfs/.btfs
Peer identity: 16Uiu2HAmKFQPM72SssFRrqcH1qwUsPwcp7vXSg3SEzfdYua1J5qc
the address of Bttc format is:  0x7Cf4B71017F0312037D53fe966CE625BF98FFff6
the address of Tron format is:  TMMuwwxsuQGrDrN3aanc5y5r4FbibgLYDa
cannot continue until there is sufficient (30000 Suggested) BTT (for Gas) available on 0x7cf4b71017f0312037d53fe966ce625bf98ffff6

Run the Daemon

When starting the BTFS daemon for the first time, the system will create a node account and at the same time print a string of messages: cannot continue until there is sufficient (30000 Suggested) BTT (for Gas) available on After seeing such a message, it is necessary to recharge the node account with BTT through an external account, and the system suggests a minimum of 30000 BTT, which is used as gas to deploy a node vault contract by the node account. After the recharge, the BTFS node will create the vault contract.

Get BTT on BTTC testnet reference Faucet

cannot continue until there is sufficient (30000 Suggested) BTT (for Gas) available on 0x7cf4b71017f0312037d53fe966ce625bf98ffff6 
self vault: 0x1f8b3e7e691d733f5eb17e5570c49de3e5aecef9 
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/192.168.21.149/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /p2p-circuit
Swarm announcing /ip4/127.0.0.1/tcp/4001
Swarm announcing /ip4/192.168.21.149/tcp/4001
Swarm announcing /ip6/::1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
Dashboard: http://127.0.0.1:5001/dashboard
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Remote API server listening on /ip4/127.0.0.1/tcp/5101
Daemon is ready

At this point, the BTFS node is up and running

Build from Source

Requires

  • GO
  • GNU make
  • Git
  • GCC (or some other go compatible C Compiler) (optional)

Install Go

If you need to update: Download latest version of Go.

You'll need to add Go's bin directories to your $PATH environment variable e.g., by adding these lines to your /etc/profile (for a system-wide installation) or $HOME/.profile:

export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:$GOPATH/bin

(If you run into trouble, see the Go install instructions).

Clone the go-btfs repository

$ git clone https://github.com/bittorrent/go-btfs

Navigate to the go-btfs directory and run make install.

$ cd go-btfs
$ make install

A successful make install outputs something like:

$ make install
go: downloading github.com/tron-us/go-btfs-common v0.2.28
go: extracting github.com/tron-us/go-btfs-common v0.2.28
go: finding github.com/tron-us/go-btfs-common v0.2.28
go version go1.14.1 darwin/amd64
bin/check_go_version 1.14
go install  "-asmflags=all='-trimpath='" "-gcflags=all='-trimpath='" -ldflags="-X "github.com/bittorrent/go-btfs".CurrentCommit=e4848946d" ./cmd/btfs

Afterwards, run btfs init and btfs daemon to initialize and start the daemon. To re-initialize a new pair of keys, you can shut down the daemon first via btfs shutdown. Then run rm -r .btfs and btfs init again.

Docker

Developers also have the option to build a BTFS daemon within a Docker container. After cloning the go-btfs repository, navigate into the go-btfs directory. This is where the Dockerfile is located. Build the docker image:

$ cd go-btfs
$ docker image build -t btfs_docker .   // Builds the docker image and tags "btfs_docker" as the name 

A successful build should have an output like:

Sending build context to Docker daemon  2.789MB
Step 1/37 : FROM golang:1.15
 ---> 4fe257ac564c
Step 2/37 : MAINTAINER bittorrent <[email protected]>
 ---> Using cache
 ---> 02409001f528

...

Step 37/37 : CMD ["daemon", "--migrate=true"]
 ---> Running in 3660f91dce94
Removing intermediate container 3660f91dce94
 ---> b4e1523cf264
Successfully built b4e1523cf264
Successfully tagged btfs_docker:latest

Start the container based on the new image. Starting the container also initializes and starts the BTFS daemon.

$ docker container run --publish 5001:5001 --detach --name btfs1 btfs_docker

The CLI flags are as such:

  • --publish asks Docker to forward traffic incoming on the host’s port 8080, to the container’s port 5001.
  • --detach asks Docker to run this container in the background.
  • --name specifies a name with which you can refer to your container in subsequent commands, in this case btfs1.

Configure cross-origin(CORS) You need to configure cross-origin (CORS) to access the container from the host.

(host) docker exec -it btfs1 /bin/sh // Enter the container's shell

Then configure cross-origin(CORS) with btfs

(container) btfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://$IP:$PORT"]'
(container) btfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'

E.g:

(container) btfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://localhost:5001"]'
(container) btfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'

Exit the container and restart the container

(container) exit
(host) docker restart btfs1

You can access the container from the host with http://localhost:5001/webui.

Execute commands within the docker container:

docker exec CONTAINER btfs add FILE

Notices

After upgrade to go-btfs v2.3.1, if you find that your node connectivity has deteriorated, you can execute the following command:

btfs config Swarm.ResourceMgr.Limits.System --json '{"ConnsInbound":0}'

Then restart your btfs node. This command will help you unblock the inbound connections to improve connectivity and thus increase the chances of getting a contract.

Getting Started

Some things to try

Basic proof of 'btfs working' locally:

echo "hello world" > hello
btfs add hello
# This should output a hash string that looks something like:
# QmaN4MmXMduZe7Y7XoMKFPuDFunvEZU6DWtBPg3L8kkAuS
btfs cat <that hash>

Usage

  btfs  - Global p2p merkle-dag filesystem.

  btfs [--config=<config> | -c] [--debug | -D] [--help] [-h] [--api=<api>] [--offline] [--cid-base=<base>] [--upgrade-cidv0-in-output] [--encoding=<encoding> | --enc] [--timeout=<timeout>] <command> ...

SUBCOMMANDS
  BASIC COMMANDS
    init          Initialize btfs local configuration
    add <path>    Add a file to BTFS
    cat <ref>     Show BTFS object data
    get <ref>     Download BTFS objects
    ls <ref>      List links from an object
    refs <ref>    List hashes of links from an object

  BTFS COMMANDS
    storage       Manage client and host storage features
    rm            Clean up locally stored files and objects

  DATA STRUCTURE COMMANDS
    block         Interact with raw blocks in the datastore
    object        Interact with raw dag nodes
    files         Interact with objects as if they were a unix filesystem
    dag           Interact with IPLD documents (experimental)
    metadata      Interact with metadata for BTFS files

  ADVANCED COMMANDS
    daemon        Start a long-running daemon process
    mount         Mount an BTFS read-only mount point
    resolve       Resolve any type of name
    name          Publish and resolve BTNS names
    key           Create and list BTNS name keypairs
    dns           Resolve DNS links
    pin           Pin objects to local storage
    repo          Manipulate the BTFS repository
    stats         Various operational stats
    p2p           Libp2p stream mounting
    filestore     Manage the filestore (experimental)

  NETWORK COMMANDS
    id            Show info about BTFS peers
    bootstrap     Add or remove bootstrap peers
    swarm         Manage connections to the p2p network
    dht           Query the DHT for values or peers
    ping          Measure the latency of a connection
    diag          Print diagnostics

  TOOL COMMANDS
    config        Manage configuration
    version       Show btfs version information
    commands      List all available commands
    cid           Convert and discover properties of CIDs
    log           Manage and show logs of running daemon

  Use 'btfs <command> --help' to learn more about each command.

  btfs uses a repository in the local file system. By default, the repo is
  located at ~/.btfs. To change the repo location, set the $BTFS_PATH
  environment variable:

    export BTFS_PATH=/path/to/btfsrepo

Development

Some places to get you started on the codebase:

Development Dependencies

If you make changes to the protocol buffers, you will need to install the protoc compiler.

BTFS Gateway

BTFS Gateway is a free service that allows you to retrieve files from the BTFS network in your browser directly.

How to use BTFS Gateway

License

MIT

go-btfs's People

Contributors

aschmahmann avatar chriscool avatar cryptix avatar dependabot-preview[bot] avatar elluck91 avatar hsanjuan avatar jbenet avatar kevina avatar kubuxu avatar laipogo avatar laocheng-cheng avatar magik6k avatar mappum avatar michaelmure avatar olizilla avatar overbool avatar rht avatar ribasushi avatar richardlitt avatar rockca avatar shellywei avatar stebalien avatar taiyangc avatar tv42 avatar tycm4109 avatar vyzo avatar whyrusleeping avatar wking avatar wxue avatar yrp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-btfs's Issues

Dont have transfer old config from 2.0.1 to 2.1.0

Hello. I updated my btfs from 2.0.1 to 2.1.0 strictly according to the instructions from the documentation, everything went well. I sent 100btt to my wallet and btfs rolled me back to 2.0.1, I tried to update again and now btfs stops there. And my config works well on 2.0.1 so far.
IMG_20220221_212313_774

To successfully connect to the BTFS node, you will need to enable the CORS

Hi Again,
I switched from linux to a windows machine because I couldnt connect to the node.
I am having same issue on windows. Below is what was written to solve the problem.
How do you go about doing this on a windows install?
THanks

To successfully connect to the BTFS node, you will need to enable the CORS. Follow below commands and then restart the BTFS node.

btfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
btfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT","GET","POST"]'

fails to install -

Working on previously closed issue#11. :btfs resolve -r /btns/16Uiu2HAmU9ysnuasmdyq1rRePYTwHntmyhZdfC9wm4qCPQMAh9Qq/: could not resolve
Not sure how to fix that and ticket closed doesnt look like they solved that. And the proposed solution didnt work.
Ok see the issue right before me is basically having same issues. I think I will spin up another VM in a few days and rinse repeat. Might just be too early yet. Had just started the v1 then I read about this , so was interested. Previous post almost Identical.

FYI Might be nice to have a script to copy to install all the dependencies on a clean install of a linux distro. and just everything in order in one place.

Building Go-btfs / dockerfile / image doesn't work

Hello.

When i git clone https://github.com/bittorrent/go-btfs and build the dockerfile, it seems to build successfully.
However, when i run the image, i get the following error:

I do the exact same thing for 1.6 (https://github.com/TRON-US/go-btfs) and that one works without any problem.

root@linux:/compose/btfstest# docker logs btfstest
Changing user to btfs
btfs: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
Changing user to btfs
btfs: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
Changing user to btfs
btfs: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
Changing user to btfs
btfs: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
Changing user to btfs
btfs: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory

My compose file looks like this:


version: "3.5"
services:
  btfstest:
    container_name: btfstest
    image: solipsist01/btfs2:latest
    ports:
      - 4002:4002/tcp
      - 4002:4002/udp
    environment:
      - TZ=${TZ}
      - ENABLE_WALLET_REMOTE=true
    volumes:
      - ${STORAGE}/btfs/btfstest/:/data/btfs/
      - /etc/localtime:/etc/localtime:ro
    networks:
      - ${NETWORK}
    restart: ${RESTARTPOLICY}

networks: 
  nasi:
    name: ${NETWORK}

Migrate BTFS v1 to v2

Can someone post a guide on how to migrate v1 to v2 without loosing balances or the peer ID? I don't want to start out without any contracts again. I tried downloading the windows binary but with the following issues:

  1. It is using the default folder for the repo location instead of the one I set before. I copied the whole correct repo folder from v1 and it displayed the right peer ID and address but I can't change the repo location.
  2. It is saying that I need a minimum of 100 BTTC. This is fine but I am reluctant to transfer any funds to it as I am not sure if it is the same passphrase as the BTTOLD wallet I have in Tronlink and BTFS.
  3. Is this already out of testnet?

Giving Back to BTFS Community Participants Minting 2.0 Genesis Badge NFT

Thanks to the participants who have been with the BTFS project and have submitted valuable suggestions. If you have submitted bugs or suggestions to the BTFS project, please scan the code and fill out the form below and we will offer you the opportunity to mining the BTFS 2.0 Genesis badge NFT. Badge application details are subject to final community release.
image

btfs command throws qtls.ClientHelloInfo doesn't match error

On Ubuntu 20.04 I complete setup for BTFS. After running ./btfs init, I try to

btfs cat /btfs/.../readme

In fact anything I try to do with the command btfs throws the same error and I can not proceed with setting up my node.

Error -

panic: qtls.ClientHelloInfo doesn't match

goroutine 1 [running]:
github.com/marten-seemann/qtls-go1-15.init.0()
	pkg/mod/github.com/marten-seemann/[email protected]/unsafe.go:20 +0x132

I have tried to build from source using go 1.15 / 1.16 / 1.17. All result in similar behavior.

receive cheque, swapprotocol.SwapProtocol.Handler, error: rejecting cheque: vault not deployed by factory

This is from my BTFS 2.0.1

--- upload init: start, shardSize:44631412, requestPid:16Uiu2HAmDEmbg3vqVQx2PkSa8NQXiHCqt4EL27EGz6ivKPKKbsfw, shardIndex:0 .
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid
receive handshake from peer peer_id:16Uiu2HAmDEmbg3vqVQx2PkSa8NQXiHCqt4EL27EGz6ivKPKKbsfw, chain_id:1029
receive cheque, requestPid:16Uiu2HAmDEmbg3vqVQx2PkSa8NQXiHCqt4EL27EGz6ivKPKKbsfw contractId:01a5112c-058d-4fbe-96cf-2ed1076fb17b,a8c20ba5-4aeb-453a-bbf7-cc23a99286ec
receive cheque, swapprotocol.SwapProtocol.Handler, error: rejecting cheque: vault not deployed by factory
IsPayStatus Current:contract, hshPayStatus:paid
IsPayStatus Current:contract, hshPayStatus:paid

I do not see the cheques in the dashboard!

My problems is how to deploy the vault or something like that. ( I've tried different nodes with clean repo folder and happens the same )

Host Dashboard is not started

Documentation said "Once your BTFS daemon has been launched and is running, simply paste the URL http://127.0.0.1:3000 into your browser to access the Host Dashboard", but HostUI has not started. I have tried with clean install and with upgraded. So the only way to configure host is the command line. Console output:

alex@server:~/go/bin> ./btfs daemon --chain-id 1029
Initializing daemon...
go-btfs version: 2.0.2-2970ddfd8
Repo version: 10
System version: amd64/linux
Golang version: go1.16.13
Repo location: /mnt/btfsdisk
Peer identity: 16Uiu2HAmGF9mmjdLmzhwF3TT8Nu7rGkv1Bw1fwoZJYzL6xvwANLb
the private key of wallet import format is:  XXX
the address of Bttc format is:  0x33fbaf80F25835ed216865128080C58568AaEdc3
the address of Tron format is:  TEi4yG8hcZynBX1y123jQb5V5pF6MReqiJ
self vault: 0x7226c87e83b9e798a6ca04d82447adcd9383f6cc 
approve WBTT to vault [0x7226c87e83b9e798a6ca04d82447adcd9383f6cc] at tx [0x73fe85df2cb9a096bb79572115a1c77edb66d8126c0e3fc68ff3950969875c11] 
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/172.17.0.1/tcp/4001
Swarm listening on /ip4/192.168.0.6/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /ip6/fd01::19e0:daec:6c3e:3d96/tcp/4001
Swarm listening on /ip6/fd01::8172:877d:7f2e:c3b8/tcp/4001
Swarm listening on /p2p-circuit
Swarm announcing /ip4/127.0.0.1/tcp/4001
Swarm announcing /ip4/172.17.0.1/tcp/4001
Swarm announcing /ip4/192.168.0.6/tcp/4001
Swarm announcing /ip6/::1/tcp/4001
Swarm announcing /ip6/fd01::19e0:daec:6c3e:3d96/tcp/4001
Swarm announcing /ip6/fd01::8172:877d:7f2e:c3b8/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
Dashboard: http://127.0.0.1:5001/dashboard
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Remote API server listening on /ip4/127.0.0.1/tcp/5101
Daemon is ready
Current host stats will be synced
Current host settings will be synced

File upload to BTFS says - failed to find more valid hosts, please try again later

I am able to add a file to my local node using the 'btfs add' command and when I try to upload to the btfs network using the upload command and check the status, it is saying as below

{"Status":"error","Message":"failed to find more valid hosts, please try again later","AdditionalInfo":"","FileHash":"QmNrAQFXo7RFW5xiGLmeN6XXXXXXXXXXXXXXXXXX","Shards":{"c937138a-XXXX-421e-b9fd-e667653c1a61:QmNrAQFXo7RFW5xiGLmeN6XXXXXXXXXXXXXXXXXX:0":{"ContractID":"","Price":0,"Host":"","Status":"init","Message":"","AdditionalInfo":""}}}

Below are some screenshots:

Upload screenshot:

image

Node sync & copy log:
image

Dashboard: It may take few days to show the node online and uptime % as per previous issue comments

image

RPC: rpc.bittorrentchain.io connection refused

What version of go-btfs are you using + go version)?

go version = 1.16.5
go-btfs version = 2.1.0

Does this issue reproduce with the latest release?
Yes

What operating system and processor architecture are you using?

OS = Android 
architecture = x86_64

What did you do?

btfs init
btfs daemon --chain-id 199

What did you expect to see?

$ btfs daemon --chain-id 1029
Initializing daemon...
go-btfs version: 2.0
Repo version: 10
System version: amd64/darwin
Golang version: go1.16.5
Repo location: /Users/btfs/.btfs
Peer identity: 16Uiu2HAmKFQPM72SssFRrqcH1qwUsPwcp7vXSg3SEzfdYua1J5qc
the address of Bttc format is:  0x7Cf4B71017F0312037D53fe966CE625BF98FFff6
the address of Tron format is:  TMMuwwxsuQGrDrN3aanc5y5r4FbibgLYDa
cannot continue until there is sufficient (100 Suggested) BTT (for Gas) available on 0x7cf4b71017f0312037d53fe966ce625bf98ffff6

What did you see instead?

~ $ btfs init
Generating TRON key with BIP39 seed phrase...
Master public key:  xpub661MyMw.............................kwViHgwTmkHqhAGNQEqrY8sB9ZAYbDZuG
initializing BTFS node at /data/data/com.justshare/files/home/.btfs
generating btfs node keypair with TRON key...done
peer identity: 16Uiu2HAmQnspxwcLGv5Ve88....dBY1s5TWuyU
to get started, enter:

        btfs cat /btfs/QmZjrLVdU............P84W6N93C/readme

~ $ btfs daemon --chain-id 199
Initializing daemon...
go-btfs version: 2.1.0
Repo version: 10
System version: amd64/android
Golang version: go1.16.5
Repo location: /data/data/com.justshare/files/home/.btfs
Peer identity: 16Uiu2HAmQnspxwcLGv5.....................BY1s5TWuyU
the address of Bttc format is:  0x7313453261...............F38a3
the address of Tron format is:  TLTfo3UJTU..............c4TZV9WndzdQ1

Error: is synced: Post "https://rpc.bittorrentchain.io/": dial tcp: lookup rpc.bittorrentchain.io on [::1]:53: read udp [::1]:54097->[::1]:53: read: connection refused
~ $ ping rpc.bittorrentchain.io
PING rpc.bittorrentchain.io (54.159.189.198) 56(84) bytes of data.
From 10.0.2.2: icmp_seq=1 Destination Host Unreachable
From 10.0.2.2: icmp_seq=2 Destination Host Unreachable
From 10.0.2.2: icmp_seq=3 Destination Host Unreachable

panic: qtls.ClientHelloInfo doesn't match

I am getting the error "panic: qtls.ClientHelloInfo doesn't match" whenever I try to initialize btfs. If you look at the screenshot, I am in the ~/go-btfs/cmd/btfs folder and then I try to run the command "./btfs init" but I get the error. My golang version is go1.17.6

image

Hard dependencies on github.com/karalabe/usb

Background:
While trying to compile on Android (Termux) I'm getting several errors related to karalabe/usb.

System information:

  • aarch64 (Android)
  • go 1.16.9
  • clang 13.0

Test steps:

  1. git clone bittorrent/go-btfs
  2. cd go-btfs
  3. Run make install

Expected result:
go-btfs is compiled without errors

Actual result:
go-btfs compile errors as follows:

make install                        go version go1.16.9 android/arm64
bin/check_go_version 1.15
plugin/loader/preload.sh > plugin/loader/preload.go
go fmt plugin/loader/preload.go >/dev/null
go install "-asmflags=all='-trimpath='" "-gcflags=all='-trimpath='" -ldflags="-X "github.com/bittorrent/go-btfs".CurrentCommit=79e86832b" ./cmd/btfs
# github.com/karalabe/usb
In file included from ../go/pkg/mod/github.com/karalabe/[email protected]/libs.go:48:
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:63:3: error: typedef redefinition with different types ('struct pthread_barrier' vs 'struct pthread_barrier_t')
/data/data/com.termux/files/usr/include/bits/pthread_types.h:53:3: note: previous definition is here
In file included from ../go/pkg/mod/github.com/karalabe/[email protected]/libs.go:48:
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:65:12: error: static declaration of 'pthread_barrier_init' follows non-static declaration
/data/data/com.termux/files/usr/include/pthread.h:329:5: note: previous declaration is here
In file included from ../go/pkg/mod/github.com/karalabe/[email protected]/libs.go:48:
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:72:34: error: no member named 'mutex' in 'pthread_barrier_t'
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:75:33: error: no member named 'cond' in 'pthread_barrier_t'
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:76:35: error: no member named 'mutex' in 'pthread_barrier_t'
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:79:11: error: no member named 'trip_count' in 'pthread_barrier_t'
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:80:11: error: no member named 'count' in 'pthread_barrier_t'
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:85:12: error: static declaration of 'pthread_barrier_destroy' follows non-static declaration
/data/data/com.termux/files/usr/include/pthread.h:330:5: note: previous declaration is here
In file included from ../go/pkg/mod/github.com/karalabe/[email protected]/libs.go:48:
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:87:33: error: no member named 'cond' in 'pthread_barrier_t'
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:88:34: error: no member named 'mutex' in 'pthread_barrier_t'
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:92:12: error: static declaration of 'pthread_barrier_wait' follows non-static declaration
/data/data/com.termux/files/usr/include/pthread.h:331:5: note: previous declaration is here
In file included from ../go/pkg/mod/github.com/karalabe/[email protected]/libs.go:48:
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:94:31: error: no member named 'mutex' in 'pthread_barrier_t'
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:95:14: error: no member named 'count' in 'pthread_barrier_t'
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:96:14: error: no member named 'count' in 'pthread_barrier_t'
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:96:32: error: no member named 'trip_count' in 'pthread_barrier_t'
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:98:12: error: no member named 'count' in 'pthread_barrier_t'
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:99:36: error: no member named 'cond' in 'pthread_barrier_t'
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:100:34: error: no member named 'mutex' in 'pthread_barrier_t'
../go/pkg/mod/github.com/karalabe/[email protected]/hidapi/libusb/hid.c:105:31: error: no member named 'cond' in 'pthread_barrier_t'
fatal error: too many errors emitted, stopping now [-ferror-limit=]
make: *** [cmd/btfs/Rules.mk:37: cmd/btfs-install] Error 2

Notes:
A similar issue was opened and fixed in the past in the go-ethereum repo

not work in Windows 11

btfs-windows-amd64.exe Unable to run on the windows 11 operating system. The CMD window appears after startup, and cannot be installed.

AMD Ryzen 7 2700X Eight-Core Processor 3.70 GHz
RAM 32.0 GB

Change my hosting folder error

I want to change the storage path. When I enter: btfs storage path G: \ btfs20host, it prompts me that the parameter storage size is missing. What unit does this storage size use? For example, I want to set a storage capacity of 300g or 1t
I did a test and executed the command: btfs storage path G: \ btfs20host 300g
I saw some files copied to the G: \ btfs20host folder
Daemon window prompt:
Received interrupt signal, shutting down...
PS F:\BTFS20> btfs daemon --chain-id 1029
Initializing daemon...
go-btfs version: 2.0. 0-8fbb7c2
Repo version: 10
System version: amd64/windows
Golang version: go1. fifteen point one five

Error: no BTFS repo found in C:\Users\Administrator. btfs.
please run: 'btfs init'
PS F:\BTFS20> btfs init
Generating TRON key with BIP39 seed phrase...
Master public key:
XXXXXXXXXXXXXXXXXXXXXXXXXX
Smrpunb
initializing BTFS node at G:\BtfsHost
Error: btfs configuration file already exists!
Reinitializing would overwrite your keys.

init error

[root@VM-16-14-centos btfs]# ./btfs init
panic: qtls.ClientHelloInfo doesn't match

goroutine 1 [running]:
github.com/marten-seemann/qtls-go1-15.init.0()
/root/go/pkg/mod/github.com/marten-seemann/[email protected]/unsafe.go:20 +0x132

No or zero uptime on Dashboard

Hi Team,

My node has been up for 4 days and the dashboard shows no up time.
What could be the problem?

Is it something that need to be fixed at client side or with a code fix?

I executed only 2 commands

/btfs init -p storage-host-testnet
/btfs daemon --chain-id 1029

Screenshot from 2022-02-18 13-00-47

Update 2.1.0

Hi all! My last ticket was closed without understanding the problem and the update documentation was thrown off. I repeat once again that I updated strictly according to this documentation https://docs.btfs.io/docs/tutorials-on-upgrading-btfs-v10-to-btfs-v20-mainnet and ran into a problem that the process stops at this place! Doesn't throw any errors, just stops!
I want to note that when creating a new peer id, everything works correctly. The problem is transferring my peer id.

My peer id - 16Uiu2HAmBxaJ4FmWdUkzqzo8EKqofZBGyLYptsSeH6pmgFcFArMv
can you test it to see if it works?

also my peer id works correctly on versions 1.6; 2.0.1; 2.0.2

Help please!

Old ticket #85

IMG_20220224_133831_427

Error: init vault service: vault init: vault not deployed by factory

C:\Users\BTT\AppData\Roaming\BitTorrent\btfs>btfs daemon --chain-id 199
Initializing daemon...
go-btfs version: 2.1.0-56bba50
Repo version: 10
System version: amd64/windows
Golang version: go1.15.15
Repo location: E:\btfs_data
Peer identity: 16Uiu2HAm9XyGbH21A96s6
the address of Bttc format is: 0xDFE687526Acf28160
the address of Tron format is: TWP5rFB8fUtx4kDw
self vault: 0xcc380dd30148cf3
init settlement err: init vault service: vault init: vault not deployed by factory

Error: init vault service: vault init: vault not deployed by factory

how can use web3js sendTrans on bttc mainet?

`var privateKey = sss.arryString[i];

  var adress = web3.eth.accounts.privateKeyToAccount(privateKey).address;
  console.log(`privateKey: ${privateKey}  ${i} TNumber: ${sss.tNumber}`); 
  
  var abi = [{"inputs":[{"internalType":"address","name":"fund","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"guy","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"guy","type":"address"},{"internalType":"uint256","name":"sad","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"guy","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"guy","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"guy","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"sad","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"sad","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}];

  var TokenContract =new  web3.eth.Contract(abi,'0x0000000000000000000000000000000000001010');

  var userBalance = await TokenContract.methods.balanceOf(adress).call();
  
  console.log(`SNND balance is: ${userBalance}`);
  
  var  userBalanceInt = web3.utils.toBN(userBalance);
  if (userBalanceInt == 0) {
    continue;
  }
  
  nonce = await web3.eth.getTransactionCount(adress);
  //const common1 = ethereumjs_common.forCustomChain('mainnet', { networkId: 199, chainId: 199, name: 'btt' }, 'muirGlacier');
  
  var rawTx = {
            from: adress,
            to: '0x3D6f3acA36F9e3A0834b67F28AEf2d4CE804cc1b',
            value: web3.utils.toHex(web3.utils.toWei('1', 'ether')),
            nonce: web3.utils.toHex(nonce),
            gasLimit: web3.utils.toHex(web3.utils.toWei('1', 'ether')),
            gasPrice: web3.utils.toHex(web3.utils.toWei('1', 'ether')),
			data:TokenContract.methods.transfer('0x3D6f3acA36F9e3A0834b67F28AEf2d4CE804cc1b', web3.utils.toHex(web3.utils.toWei('1', 'ether'))).encodeABI()
        };
var signprivateKey = Buffer.from(privateKey, 'hex');
  //var rawTransaction = {"from":myAddress, "gasPrice":web3.utils.toHex(2 * 1e9),"gasLimit":web3.utils.toHex(210000),"to":contractAddress,"value":"0x0","data":contract.methods.transfer(toAddress, amount).encodeABI(),"nonce":web3.utils.toHex(count)} 
var tx = new Tx(rawTx);
await tx.sign(signprivateKey);
var serializedTx = tx.serialize();
//var signedTx = await web3.eth.accounts.sign(rawTx,privateKey);
var txHash = await web3.eth.sendSignedTransaction('0x' + serializedTx.toString('hex'));`

this code can get balance, but can not send Transaction, trow err:invalid sender
please help me very thanks

[v2.1.0] Vault Init: Not a valid factory contract

I have just upgraded from version 2.0.2 to 2.1.0 (simply changed over the executable file), and I execute the below command to start the btfs deamon:

.\btfs-windows-amd64.exe daemon --chain-id 1029

I then get the following error:

Error: init vault service: vault init: not a valid factory contract

I am on Windows 11 21H2, AMD64 architecture.

Kindly please advise how to fix. I have reverted back to 2.0.2 executables and it works as expected.

fail to install

[root@iZj6c0u0zcojlroll9t444Z go-btfs]# make install
go: launchpad.net/[email protected]: bzr branch --use-existing-dir -- https://launchpad.net/~niemeyer/gocheck/trunk . in /root/go/pkg/mod/cache/vcs/f46ce2ae80d31f9b0a29099baa203e3b6d269dace4e5357a2cf74bd109e13339: exec: "bzr": executable file not found in $PATH
go: launchpad.net/[email protected]: bzr branch --use-existing-dir -- https://launchpad.net/~niemeyer/gocheck/trunk . in /root/go/pkg/mod/cache/vcs/f46ce2ae80d31f9b0a29099baa203e3b6d269dace4e5357a2cf74bd109e13339: exec: "bzr": executable file not found in $PATH
go version go1.15.14 linux/amd64
bin/check_go_version 1.15
plugin/loader/preload.sh > plugin/loader/preload.go
go fmt plugin/loader/preload.go >/dev/null
go: launchpad.net/[email protected]: bzr branch --use-existing-dir -- https://launchpad.net/~niemeyer/gocheck/trunk . in /root/go/pkg/mod/cache/vcs/f46ce2ae80d31f9b0a29099baa203e3b6d269dace4e5357a2cf74bd109e13339: exec: "bzr": executable file not found in $PATH
make: *** [plugin/loader/preload.go] Error 1

how to recharge bttc?

Initializing daemon...
go-btfs version: 2.1.1-f76f7e030
Repo version: 10
System version: amd64/linux
Golang version: go1.15.15
Repo location: /root/.btfs
Peer identity: 16Uiu2HAkz2gYZB8XXdma9SJAaJpknZgc9o87MqmEfJxg1iJ3EL6C
the address of Bttc format is:  0xe292823682125E34F0173c72890D455Af17c8Ab4
the address of Tron format is:  TWdDE1djQFd1ST4kmr43nhwx3BBVaTdESH
cannot continue until there is sufficient (100 Suggested) BTT (for Gas) available on 0xe292823682125e34f0173c72890d455af17c8ab4
cannot continue until there is sufficient (100 Suggested) BTT (for Gas) available on 0xe292823682125e34f0173c72890d455af17c8ab4
cannot continue until there is sufficient (100 Suggested) BTT (for Gas) available on 0xe292823682125e34f0173c72890d455af17c8ab4
cannot continue until there is sufficient (100 Suggested) BTT (for Gas) available on 0xe292823682125e34f0173c72890d455af17c8ab4
cannot continue until there is sufficient (100 Suggested) BTT (for Gas) available on 0xe292823682125e34f0173c72890d455af17c8ab4
  • i want to run a BTFS host, follow doc.
  • how to recharage the bttc?
  • already try withdraw btt to 0xe292823682125E34F0173c72890D455Af17c8Ab4 in Binance
  • already try withdraw btt to TWdDE1djQFd1ST4kmr43nhwx3BBVaTdESH in Binance

BTFS 2.0.2 amd64 not runing

Hello.
I´m running btfs amd64 version 2.0.1 properly since last 9 days. Today I have downloaded the new version (2.0.2) and replaced the executable by the new one. I tried run btfs daemon and it throw the folloging error:
"init settlement err: init vault service: vault init: vault not deployed by factory".

If I restore the previous version everything works again. Should I run
error btfs 2 0 2
any additional commands to update to version 2.0.2? I haven't found anything about update/upgrade on the Wiki.
Thank you.

Same Host ID on multiple hosts after upgrade

Hello,

I have just upgraded my 2 BTFS nodes from v1.6 to v2.1, transferred the required BTT on BTTC network to allow for the contract creation and the nodes are now running. After checking, I noticed that the Host ID for both nodes is the same!

The facts:

  1. The two nodes were initially created via the BitTorrent client using the same mnemonic phrase.
  2. I have noticed that the two nodes have different vault addresses.
  3. Checking on BTFS Scan using the Host ID shows only the information of the last node to come online.
  4. On the 2.1.0 dashboard, it says that the nodes have no contracts, whereas on the 1.6 dashboards, both nodes had contracts.
  5. If I try to return to 1.6, both nodes have the same Host ID again.

I have disabled the smaller node for now, to avoid any conflicts.

Questions:

  1. Is there a way to salvage one of the 2 nodes without having to recreate it? I don't want to lose existing contracts and score.
  2. Is it possible to use the same BTTC wallet for multiple nodes?

Building Go-btfs / dockerfile / image doesn't work

Hello.

When i git clone https://github.com/bittorrent/go-btfs and build the dockerfile, it seems to build successfully.
However, when i run the image, i get the following error:

I do the exact same thing for 1.6 (https://github.com/TRON-US/go-btfs) and that one works without any problem.

root@linux:/compose/btfstest# docker logs btfstest
Changing user to btfs
btfs: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
Changing user to btfs
btfs: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
Changing user to btfs
btfs: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
Changing user to btfs
btfs: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
Changing user to btfs
btfs: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory

My compose file looks like this:


version: "3.5"
services:
  btfstest:
    container_name: btfstest
    image: solipsist01/btfs2:latest
    ports:
      - 4002:4002/tcp
      - 4002:4002/udp
    environment:
      - TZ=${TZ}
      - ENABLE_WALLET_REMOTE=true
    volumes:
      - ${STORAGE}/btfs/btfstest/:/data/btfs/
      - /etc/localtime:/etc/localtime:ro
    networks:
      - ${NETWORK}
    restart: ${RESTARTPOLICY}

networks: 
  nasi:
    name: ${NETWORK}

Use case: go-btfs lite node

I’m wondering if it’s possible to create a lite BTFS node which is limited to get data from peers to reduce the size of binary.

Motivation: This binary can be integrated by third party SW to retrieve large amount of data in a decentralized way without considerable impact on overall app size.

Is this feasible ?

docker image: btfs resolve -r /btns/blabla/: could not resolve name

Hello.

I'm testing the docker image of btfs 2.0.
In no way i'm able to successfully visit the webinterface.

Both webui and hostui give the same error.

I'm reverse proxying the webinterface with traefik (as i also do with 1.6)

i set the node up successfully, and gave the address test tokens
https://testfaucet.bt.io/#/

The port forward 4002/tcp+udp has been done correctly. (4001 is in use already)

Changing user to btfs
btfs version 2.0.0
Found BTFS fs-repo at /data/btfs
Initializing daemon...
go-btfs version: 2.0.0-4fd04f0
Repo version: 10
System version: amd64/linux
Golang version: go1.16.12
Repo location: /data/btfs
Peer identity: 16Uiu2HAkzYNxmpuRNkczDPRNR57hFNCP2Gvk7RjnjTnnjb2hwE29
the private key of wallet import format is:  142a5763c17b09f6095531364c83bb545f2eb4e36c801c3ed2feb48f6222c9c0
the address of Bttc format is:  0xa77cb7Bcd2DF62D0b9E7dAA93d4C5f20c4C2e38A
the address of Tron format is:  TREoFdjTZgiqiF8ZNWSFFwb4YHZsTVwdVZ
self vault: 0xb09addfb7af4e4501b533cd7a9c0e67ef88244d9
Swarm listening on /ip4/127.0.0.1/tcp/4002
Swarm listening on /ip4/172.19.0.59/tcp/4002
Swarm listening on /p2p-circuit
Swarm announcing /ip4/127.0.0.1/tcp/4002
Swarm announcing /ip4/172.19.0.59/tcp/4002
Swarm announcing /ip4/mywanip/tcp/4002
API server listening on /ip4/0.0.0.0/tcp/5001
WebUI: http://0.0.0.0:5001/webui
HostUI: http://0.0.0.0:5001/hostui
Gateway (readonly) server listening on /ip4/0.0.0.0/tcp/8080
Remote API server listening on /ip4/127.0.0.1/tcp/5101
Daemon is ready

i have done the following to try to solve the problem.
run this inside the container:

btfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
btfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT","GET","POST"]'
btfs config profile apply storage-host-testnet

i can't get the webinterface to work :) i'm getting this error:
btfs resolve -r /btns/16Uiu2HAmU9ysnuasmdyq1rRePYTwHntmyhZdfC9wm4qCPQMAh9Qq/: could not resolve name

Is there anything that I'm doing wrong, or, is there anything i can do to help with this issue.
Thanks.

import key

I didn't save the private key of the BTFS node and I only have a 16 digit private key to import, is it possible to import it into the private key for the node?

Error: failed to unmarshal json. invalid character '*' looking for beginning of value

hello,

As per the guide here: https://github.com/bittorrent/btfs-dashboard
I tried running the command in window PowerShell:
btfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'

I get error message:
Error: failed to unmarshal json. invalid character '*' looking for beginning of value

Same issue with the another command:
btfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT","GET","POST"]'

Error Message:
Error: failed to unmarshal json. invalid character 'P' looking for beginning of value

uptime and host score 0

hello,

i have 2 node up for some time now, but the uptime and host score is still 0

image

image

i already change StorageClientEnabled to true

image

host ID

16Uiu2HAmTL3Gxn4bVMwipaiekiAUGS9htL1pKz3dRbuHcN1ngWuj
16Uiu2HAmVoJDdBySnDrtwqwg6w6kRZfLf4iUtCabLMTNDPSBoukz

both running using --chain-id 199

New feature: BTFS to IPFS bridge to access BTFS hosted data on IPFS

Background
A per reddit post: https://www.reddit.com/r/BittorrentToken/comments/sp1rgs/i_would_rent_tbs_on_btfs_if_it_were_to_use_the/

Summary
We believe building a bridge between BTFS and IPFS will bring among others the following advantages:

  1. Increased number of renting contracts. Why? IPFS users will be willing to use BTFS nodes to host files
  2. Increased motivation for BTFS host nodes to stay with BTFS network. Why? Payment stability due to 1)
  3. Increased file persistence overall the BTFS network. Why? Due to a major number of hosts keeping their nodes Online
  4. Improved BTTC and BTFS popularity and mass adoption. Why? In terms of decentralized file systems IPFS has gained popularity but lacks of lightweight and convenient solutions for storage. BTFS can easily close the gap and become a "better than Filecoin solution".

Considerations/Questions for BitTorrent team

  1. Is BTFS compatible enough with IPFS to make this feasible?
  2. If this is feasible, could this be developed in the short/mid term?
  3. Is go-btfs/BitTorrent team willing to create such a bridge?

I wish we all can start a deep discussion on this, this is too good to be thrown in the "long term bin". This could easily be the catalyst for BTFS mass adoption due to the mobile compatibility compared with other decentralized solutions, we are just lacking years of development and experience from the IPFS core tools. If we create this bridge Filecoin loses this compatibility advantage and BTFS gains lots of visibility and instant compatibility with already developed documentation and tooling.

Please do not just close this issue by saying: "Won't be supported by now" =).

Thank you!

switching from testnet to mainnet

As I understand it, the test is over and we need to upgrade to version 2.1.0 (mainnet). I transferred the config from version 2.0.2 (testnet).
What do I need to do next to finally move to the mainnet? Host ID: 16Uiu2HAmGKNPU3qXw1LAMmUCTqpPjoUxvPsZgjoAjpa28KVBMY5b
image

If the test is not completed, please indicate where I can follow the news and next steps.
Thanks

Nodes override each other between testnet and mainnet

Hello,

I have been running 2 nodes with the same Host ID, one in testnet and one in mainnet. I have noticed that in both scan.btfs.io and scan-test.btfs.io, the two nodes conflict with each other. I know it is wrong to use the same private key on multiple hosts, but I was expecting complete separation between testnet and mainnet. This does not seem to be the case.

Node 1: Mainnet, v2.1.0
Node 2: Testnet, v2.0.2

Currently, when I look at the mainnet node's Host id in scan.btfs.io, it shows that I'm using v2.0.2, which I am not. It also shows the data (storage allocated/utilized) of the testnet node! Not only that, but its Host Score has dropped from 10 to 9, as it detects that I'm not using the latest version (it says I'm using v2.0.2 in mainnet!). When I check the Host id in testnet, it shows that the node is offline (no info is given), even though the node is actually running.

It doesn't seem to be just a bug on the BTFS Scan website, given that the Host score has also been affected. The hosts override each other, even though they are in separate chains, which shouldn't happen. I've tried running one after the other and the information in BTFS Scan changes according to the last node to start.

Also note that if the Host score hadn't changed, and I hadn't looked at BTFS Scan, I wouldn't have even known that this issue exists!

Upgrade is not possible?

On Windows, just downloaded the new binary from 2.0.2 to 2.1.0:

Initializing daemon...
go-btfs version: 2.1.0-56bba50
Repo version: 10
System version: amd64/windows
Golang version: go1.15.15
Repo location: C:\Users\storage.btfs
Peer identity: ...
the address of Bttc format is: ...
the address of Tron format is: ...
init settlement err: init vault service: vault init: not a valid factory contract

how to mining?

  • I need some help, new to btfs, how to mining btt on btfs 2.0?
  • Is there any relevant documentation? Already follow https://docs.btfs.io/docs, and the daemon is running.

image

question is

    1. Is this mining?
    1. The storage is only 4.00 GiB, my disk free space is 800G+
    1. i have multi disk, how to add more storage?
    1. The doc said stake BTT is required. is it I need withdraw more btt? And how to stake it? Keep balance having btt?

Rating dropped

The latest version, but the rating has dropped.
Screenshot (1)

In the daemon, it periodically writes this - ListReceiveChequeCmd map[]

WBTT testnet fauce

Is there a way to get testnet WBTT? I'm testing the renter side of BTFS 2.01 but I couldn't find any website to request WBTT test tokens to play around some of the features. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.