bittorrent / go-btfs Goto Github PK
View Code? Open in Web Editor NEWBTFS - The First Scalable Decentralized Storage System - A Foundational Platform for Decentralized Applications
Home Page: https://www.btfs.io
License: Other
BTFS - The First Scalable Decentralized Storage System - A Foundational Platform for Decentralized Applications
Home Page: https://www.btfs.io
License: Other
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 ?
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
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
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
If the test is not completed, please indicate where I can follow the news and next steps.
Thanks
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.
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}
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.
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
question is
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 )
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:
Considerations/Questions for BitTorrent team
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!
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}
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
5f85b99
this change may caused 2.1.1 canot recive airdrop contract, air drop node version is 2.1.0? can not syncHost find 2.1.1 node?
After I upgraded 2.1.0 to 2.1.1 yesterday, 10000+ nodes have no contract.
please fix ,thanks
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.
Hi!
I'm facing this error on both Windows and Linux every time I open localhost:5001/webui
or localhost:5001/hostui
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.
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:
I have disabled the smaller node for now, to avoid any conflicts.
Questions:
Background:
While trying to compile on Android (Termux) I'm getting several errors related to karalabe/usb.
System information:
Test steps:
git clone bittorrent/go-btfs
cd go-btfs
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
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
any additional commands to update to version 2.0.2? I haven't found anything about update/upgrade on the Wiki.
Thank you.
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"]'
As titled, I have transfer some of my in app walllet BTT to OLDBTT and converted to the new BTTC
but there are still balance in the bittorrent speed wallet, but I also upgraded the wallet already
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.
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.
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:
Dashboard: It may take few days to show the node online and uptime % as per previous issue comments
`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
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!
Daemon is ready
but open http://127.0.0.1:5001/hostui
error:btfs resolve -r /btns/16Uiu2HAmU9ysnuasmdyq1rRePYTwHntmyhZdfC9wm4qCPQMAh9Qq/: could not resolve name
[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
[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
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!
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:
What happens to old inpp btt after launching btfs mainnet 2.0?
Your site does mention requirements but they say put most recent go. It wont work if you do that. needs earlier 15 not 17
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
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
Ok
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
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
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?
I can't get it to work for Windows 10, is there a tutorial? Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.