Code Monkey home page Code Monkey logo

fleekhq / space-daemon Goto Github PK

View Code? Open in Web Editor NEW
219.0 11.0 42.0 166.75 MB

The Space Daemon packages together IPFS, Textile Threads/Buckets, and Textile Powergate (Filecoin*) into one easy to install Daemon to make it easy to build peer to peer and privacy focused apps.

License: Apache License 2.0

Go 99.37% Makefile 0.29% Shell 0.19% HCL 0.07% Batchfile 0.08%
golang ipfs textile storage decentralization daemon p2p dweb files blockchain

space-daemon's People

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

space-daemon's Issues

Nil Pointer error when running on Windows 7

Expected Behaviour

The daemon should run and get started successfully.

Actual Behaviour

The daemon fails with a nil pointer reference error during startup

Extra information

Daemon Version: space_Windows_x86_64.exe v0.0.9
Operating System: Windows 7

Logs

time="2020-07-13T14:10:29+01:00" level=debug msg="Running mode" DevMode=false
time="2020-07-13T14:10:29+01:00" level=debug msg="Running daemon with profiler.
Visit http://localhost:6060/debug/pprof"
2020/07/13 14:10:29 Error loading .env file. Using defaults
time="2020-07-13T14:10:29+01:00" level=info msg="using path ~/.fleek-space for s
tore"
badger 2020/07/13 14:10:29 INFO: All 1 tables opened in 3ms
badger 2020/07/13 14:10:29 INFO: Replaying file id: 0 at offset: 385
badger 2020/07/13 14:10:29 INFO: Replay took: 36.002ms
badger 2020/07/13 14:10:29 DEBUG: Value log discard stats empty
time="2020-07-13T14:10:29+01:00" level=debug msg="Starting Component" name=Store
 
time="2020-07-13T14:10:29+01:00" level=debug msg="Starting Component" name=Folde
rWatcher
time="2020-07-13T14:10:36+01:00" level=info msg="Welcome to bucket" peerID=12D3K
ooWM3RXmueyLKYfevsVi4zP5q27QLe5zR3UEkmcEthcyDxp
time="2020-07-13T14:10:36+01:00" level=debug msg="Starting Component" name=Bucke
tDaemon
time="2020-07-13T14:10:36+01:00" level=debug msg="Starting Async Component" name
=TextileClient
time="2020-07-13T14:10:36+01:00" level=debug msg="Generating key pair..."
time="2020-07-13T14:10:36+01:00" level=debug msg="Error generating key pair, key
 might already exist"
time="2020-07-13T14:10:36+01:00" level=debug msg="Error while executing Generate
KeyPair. Key pair already exists. Use GenerateKeyPairWithForce if you want to ov
erride it."
time="2020-07-13T14:10:36+01:00" level=debug msg="Starting Textile Client..."
time="2020-07-13T14:10:36+01:00" level=debug msg="Creating buckets client in 127
.0.0.1:3006"
time="2020-07-13T14:10:36+01:00" level=debug msg="Creating threads client in 127
.0.0.1:3006"
time="2020-07-13T14:10:36+01:00" level=debug msg="Creating default bucket..."
time="2020-07-13T14:10:36+01:00" level=debug msg="Creating a new bucket with slu
g personal"
time="2020-07-13T14:10:36+01:00" level=debug msg="Fetching thread id from local
store"
time="2020-07-13T14:10:36+01:00" level=debug msg="No persisted mountFuseDrive st
ate found"
time="2020-07-13T14:10:36+01:00" level=debug msg="Starting Component" name=FuseC
ontroller
time="2020-07-13T14:10:36+01:00" level=debug msg="Starting Async Component" name
=BucketSync
time="2020-07-13T14:10:36+01:00" level=debug msg="Fetching thread id from local
store"
time="2020-07-13T14:10:36+01:00" level=debug msg="Thread ID found in local store
"
time="2020-07-13T14:10:36+01:00" level=debug msg="Thread ID found in local store
"
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0xf8dbc6]
 
goroutine 2123 [running]:
github.com/textileio/go-threads/db.(*DB).GetCollection(0x0, 0xc00a8ac647, 0x7, 0
x0, 0x0, 0x0, 0x0)
        /Users/runner/go/pkg/mod/github.com/textileio/[email protected]/db/db.g
o:355 +0x46
github.com/textileio/go-threads/api.(*Service).getCollection(0xc00008e338, 0x21a
3740, 0xc00a899e60, 0xc00a8ac647, 0x7, 0xc00a6cf1a0, 0x22, 0x0, 0x0, 0x409f32, .
..)
        /Users/runner/go/pkg/mod/github.com/textileio/[email protected]/api/ser
vice.go:856 +0xd0
github.com/textileio/go-threads/api.(*Service).Find(0xc00008e338, 0x21a3740, 0xc
00a899e60, 0xc00a8ee480, 0xc00008e338, 0x0, 0x0)
        /Users/runner/go/pkg/mod/github.com/textileio/[email protected]/api/ser
vice.go:460 +0x226
github.com/textileio/go-threads/api/pb._API_Find_Handler.func1(0x21a3740, 0xc00a
899e60, 0x18c1b20, 0xc00a8ee480, 0x0, 0x0, 0x0, 0xc00a8ee480)
        /Users/runner/go/pkg/mod/github.com/textileio/[email protected]/api/pb/
threads.pb.go:3170 +0x8d
github.com/grpc-ecosystem/go-grpc-middleware/auth.UnaryServerInterceptor.func1(0
x21a3740, 0xc00a899e30, 0x18c1b20, 0xc00a8ee480, 0xc00a897a60, 0xc00a897a80, 0xf
f21e1, 0x1842e40, 0xc00a897aa0, 0xc00a897a60)
        /Users/runner/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1
.2.0/auth/auth.go:47 +0x10f
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1(0x21a374
0, 0xc00a899e30, 0x18c1b20, 0xc00a8ee480, 0xc00a36fc00, 0x0, 0xc00a627b30, 0x40d
c2f)
        /Users/runner/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1
.2.0/chain.go:25 +0x6a
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1(0x21a3740, 0
xc00a899e30, 0x18c1b20, 0xc00a8ee480, 0xc00a897a60, 0xc00a897a80, 0xc00a627ba0,
0x4aa0ef, 0x1887d80, 0xc00a899e30)
        /Users/runner/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1
.2.0/chain.go:34 +0xdc
github.com/textileio/go-threads/api/pb._API_Find_Handler(0x196e300, 0xc00008e338
, 0x21a3740, 0xc00a899e30, 0xc00a8ee420, 0xc0076a7ad0, 0x21a3740, 0xc00a899e30,
0xc00aa94200, 0x77)
        /Users/runner/go/pkg/mod/github.com/textileio/[email protected]/api/pb/
threads.pb.go:3172 +0x152
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0003ab6c0, 0x21b9b60, 0xc005
bcfe00, 0xc00a36fc00, 0xc0004be450, 0x2f72518, 0x0, 0x0, 0x0)
        /Users/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1171 +
0x511
google.golang.org/grpc.(*Server).handleStream(0xc0003ab6c0, 0x21b9b60, 0xc005bcf
e00, 0xc00a36fc00, 0x0)
        /Users/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1494 +
0xcd4
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc00729b7f0, 0xc0003ab6c0
, 0x21b9b60, 0xc005bcfe00, 0xc00a36fc00)
        /Users/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:834 +0
xa8
created by google.golang.org/grpc.(*Server).serveStreams.func1
        /Users/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:832 +0
x20b

Fix Broken Integration Test on CI for Windows

Expected Behaviour

Github Actions should run existing integration tests successfully on windows-latest machine

Actual Behaviour

Integrations tests run on the windows-latest operating systems are failing.

Extra Information

Here is a CI run that failed: https://github.com/FleekHQ/space-daemon/runs/1524767049?check_suite_focus=true

The issue appears to be with a wrong Ipfsnodepath being passed to the ipfs node started in the integration suites BeforeSuite lifecycle.

Possible Fixes:

  • Investigate why the path expansion by the ipfs library works differently from mac and linux
  • or start an ipfs node in the github workflows service and update the flags set in GetConfig() to point to this new ipfs node.

[file pinning]: task failed -- ERROR -- rpc error: code = Unauthenticated desc = Bad API key signature[]

Hi guys,
I try to run space deamon on my Windows machine and after message "Daemon ready" I receive Error "Bad API signature".
What could be the case? I am not running local IPFS node. I just run the executable binary file from latest release.


> time="2021-11-08T09:47:38+01:00" level=info msg="Daemon ready"
> time="2021-11-08T09:47:41+01:00" level=debug msg="Textile Client healthcheck... Start."
> time="2021-11-08T09:47:41+01:00" level=info msg="Mailbox identity: bbaareics3hq7yq444ljvkfjxeikp47uxajmg2mq7fkuoc37thlp34umbai"
> time="2021-11-08T09:47:41+01:00" level=info msg="Starting to listen for mailbox messages"
> time="2021-11-08T09:47:41+01:00" level=debug msg="Textile Client healthcheck... OK."
> time="2021-11-08T09:47:42+01:00" level=info msg="received inbox watch state: online"
> time="2021-11-08T09:48:08+01:00" level=debug msg="Textile sync [buckets]: Sync start"
> time="2021-11-08T09:48:08+01:00" level=debug msg="Textile sync [buckets]: Total: 1, Queued: 1, Pending: 0, Failed: 0"
> time="2021-11-08T09:48:08+01:00" level=debug msg="Textile sync [buckets]: Processing task ADD_ITEM"
> time="2021-11-08T09:48:08+01:00" level=debug msg="Model.FindMirrorFileByPathAndBucketSlug: returning mirror file with dbid "
> time="2021-11-08T09:48:08+01:00" level=debug msg="Textile sync [file pinning]: Sync start"
> time="2021-11-08T09:48:08+01:00" level=debug msg="Textile sync [file pinning]: Total: 1, Queued: 1, Pending: 0, Failed: 0"
> time="2021-11-08T09:48:08+01:00" level=debug msg="Textile sync [file pinning]: Processing task PIN_FILE"
> time="2021-11-08T09:48:08+01:00" level=debug msg="Textile sync [buckets]: task completed succesfully"
> time="2021-11-08T09:48:08+01:00" level=debug msg="Textile sync [buckets]: Processing task ADD_INDEX_ITEM"
> time="2021-11-08T09:48:08+01:00" level=debug msg="Model.UpdateSearchIndexRecord: Initializing db"
> time="2021-11-08T09:48:08+01:00" level=debug msg="Model.UpdateSearchIndexRecord: Initializing db"
> time="2021-11-08T09:48:08+01:00" level=debug msg="Textile sync [buckets]: task completed succesfully"
> time="2021-11-08T09:48:08+01:00" level=debug msg="Textile sync [buckets]: Sync end"
> time="2021-11-08T09:48:08+01:00" level=error msg="Textile sync [file pinning]: task failed -- ERROR -- rpc error: code = Unauthenticated desc = Bad API key signature[]"
> time="2021-11-08T09:48:38+01:00" level=debug msg="Textile sync [buckets]: Sync start"
> time="2021-11-08T09:48:38+01:00" level=debug msg="Textile sync [buckets]: Total: 0, Queued: 0, Pending: 0, Failed: 0"
> time="2021-11-08T09:48:38+01:00" level=debug msg="Textile sync [buckets]: Sync end"
> time="2021-11-08T09:48:38+01:00" level=debug msg="Textile sync [file pinning]: Sync start"
> time="2021-11-08T09:48:38+01:00" level=debug msg="Textile sync [file pinning]: Total: 1, Queued: 1, Pending: 0, Failed: 0"
> time="2021-11-08T09:48:38+01:00" level=debug msg="Textile sync [file pinning]: Processing task PIN_FILE"
> time="2021-11-08T09:48:38+01:00" level=error msg="Textile sync [file pinning]: task failed -- ERROR -- rpc error: code = Unauthenticated desc = Bad API key signature[]"
> time="2021-11-08T09:48:41+01:00" level=debug msg="Textile Client healthcheck... Start."
> time="2021-11-08T09:48:41+01:00" level=debug msg="Textile Client healthcheck... OK."

v0.0.12 Linux x86_64 build does not have the -ipfsaddr flag

The readme mentions an -ipfsaddr flag that lets the daemon use an existing IPFS node. But the Linux binary doesn't support it:

$ ./space_Linux_x86_64 -ipfsaddr=/ip4/127.0.0.1/tcp/5001
flag provided but not defined: -ipfsaddr
Usage of ./space_Linux_x86_64:
  -cpuprofile file
    	write cpu profile to file
  -debug
    	run daemon with debug mode for profiling (default true)
  -dev
    	run daemon in dev mode to use .env file
  -memprofile file
    	write memory profile to file

Fleek - Space Daemon Prize

Best use of or contribution to the Space Daemon

Prize Bounty

$5k USD/DAI

What is the Space Daemon?

The open source Space Daemon enables developers to easily build powerful privacy-focused apps on the Dweb and the underlying protocols that power it (IPFS, Textile, Filecoin, Ceramic, Handshake). Robust, well-documented and simple-to-use, we provide everything you need to build the next great privacy-focused app on the Dweb!

The Challenge:
  • Build an application that focuses on utilizing the Space Daemon as its fundamental purpose. This application should add a useful feature or functionality to the Space ecosystem. (For instance, building a decentralized dropbox, zoom, slack, etc.)
    And/Or
  • Taking the existing open-source Space Daemon repository and extending it to support new functionality or otherwise significantly improving the user experience is welcome and encouraged. (For instance, adding additional protocol support, extending the Js methods of the clients, supporting additional languages or SDKs, etc.)

Submission Requirements

  • The project must be open source
  • Space Daemon must be a fundamental element of the application or an enhancement to the Space Daemon itself
  • The app or enhancement must do something that is useful and interesting
  • Demo videos are strongly recommended for complete submissions

Example apps and ideas which would qualify for prizes:

Other potential ideas:

  • Applications that are decentralized & privacy-focused versions of web2 products (ex: decentralized dropbox, slack, zoom, twitter, etc.)
  • Enhancements that provide additional functionality to the Space Daemon (Ex: video streaming, messaging/chat, document collaboration)
  • Adding additional protocols to the Space Daemon (Ex: Filecoin, Ethereum, Ceramic, Handshake, etc.)

Judging Criteria

Submissions will be judged on the following:

  • How useful is the application on or enhancement to the Space Daemon
  • Impact on the Space Ecosystem
  • Tested and Working Product

Winner Announcement Date

As soon as the Apollo Hackathon ends

Textile Client healthcheck... Not initialized yet.

Space Daemon v0.0.23 on Mac OS X 10.15.6

What configuration do I need to get rid of the Textile Client healthcheck warning?

INFO[0028] gRPC-web proxy server started on Port 9998   
INFO[0028] gRPC server started on Port 9999             
INFO[0028] Daemon ready 
[...]
DEBU[0589] Textile Client healthcheck... Start.         
DEBU[0589] Textile Client healthcheck... Not initialized yet. 
DEBU[0592] Textile Client healthcheck... Start.         
DEBU[0592] Textile Client healthcheck... Not initialized yet. 

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.