Commit Graph

497 Commits

Author SHA1 Message Date
Kaloyan Raev
dd76829d10
Improve logic for cutting the long tail during upload (#909) 2019-02-05 12:54:25 +02:00
Dylan Lott
1385a2d6bd
Storagenode online confirmation ping (#1144)
* initial commit of dashboard connection tools

* Currently working against default configs

* Update configs and remove hardcoded addresses

* Update config handling

* adds external address param for tunneling nodes

* remove unnecessary address check logic
2019-01-25 10:46:09 -07:00
Bryan White
7bed8050aa
Improve identity cli ux: (#1142) 2019-01-25 17:55:45 +01:00
Alexander Leitner
c4afec9328
quick log cleanup for storage node (#1121)
* Clean up logs
2019-01-24 11:09:37 -05:00
Egon Elbre
b6c61cdd55
Use storagenode.Peer for storagenode (#1107) 2019-01-23 12:39:03 +02:00
Egon Elbre
2d00f882a3
Kademlia Dialer (#1092) 2019-01-18 10:00:56 -05:00
JT Olio
f8ee5f88e5 cmd/bootstrap: a kademlia-only server (#1001) 2019-01-09 17:59:51 +02:00
Egon Elbre
fe9dd0ba21
Upgrade monkit (#996) 2019-01-08 20:10:07 +02:00
Egon Elbre
cb74d91cb0
Upgrade monkit-hw (#984) 2019-01-07 21:11:11 +02:00
Egon Elbre
0ca03b41e2
Use generated locking database implementation (#947) 2019-01-02 19:53:27 +02:00
Bryan White
249244536a
CSR Service (part 2): cert signing rpc (#950)
* CSR Service:

+ implement certificate sign rpc method
+ implement certificate signer client/server
+ refactor `AuthorizationDB#Create`
+ refactor `NewTestIdentity`
+ add `AuthorizationDB#Claim`
+ add `Token#Equal`
+ fix `Authorizations#Marshal` when marshaling identities and certificates
+ tweak `Authorization#String` format
+ cert debugging improvements (jsondiff)
+ receive context arg in `NewTestIdentity`
+ misc. fixes
2019-01-02 12:39:17 -05:00
Egon Elbre
0a717ac4fe
Upgrade errs package (#912) 2018-12-20 00:48:06 +02:00
Natalie Villasana
d97e27ed80
removes a few todos (#867) 2018-12-17 13:11:29 -05:00
Egon Elbre
a5aaf54e7d
Upgrade hrtime package (#869) 2018-12-17 13:41:40 +02:00
Egon Elbre
f8caefcdeb
Update go.sum (#878) 2018-12-17 13:07:28 +02:00
Bryan White
2016ce9fd6
Certificate revocation (#836)
* wip certificate revocation

* refactor tests

* wip testing

* testing

* review fixes

* integration fix attempt #1

* review fixes

* integration fix attempt #2

* linter fixes

* add copywrite

* integration fix attemp #3

* more testing

* more tests

* go mod tidy

* review fixes

* linter fixes
2018-12-13 21:01:43 +01:00
Egon Elbre
e2d22b4b58 Update monkit-hw to not poll /proc on non-linux (#853) 2018-12-13 08:55:06 -07:00
JT Olio
362f447d9f
cmd/statreceiver: lua-scriptable stat receiver (#636)
* cmd/statreceiver: lua-scriptable stat receiver

Change-Id: I3ce0fe3f1ef4b1f4f27eed90bac0e91cfecf22d7

* some updates

Change-Id: I7c3485adcda1278fce01ae077b4761b3ddb9fb7a

* more comments

Change-Id: I0bb22993cd934c3d40fc1da80d07e49e686b80dd

* linter fixes

Change-Id: Ied014304ecb9aadcf00a6b66ad28f856a428d150

* catch errors

Change-Id: I6e1920f1fd941e66199b30bc427285c19769fc70

* review feedback

Change-Id: I9d4051851eab18970c5f5ddcf4ff265508e541d3

* errorgroup improvements

Change-Id: I4699dda3022f0485fbb50c9dafe692d3921734ff

* too tricky

the previous thing was better for memory with lots of errors at a time
but https://play.golang.org/p/RweTMRjoSCt is too much of a foot gun

Change-Id: I23f0b3d77dd4288fcc20b3756a7110359576bf44
2018-12-11 11:24:31 -07:00
Egon Elbre
4224be5bb1
install specific gogo (#757) 2018-12-05 11:06:57 +02:00
Dylan Lott
c6d790d58e
Improvements to Kad Lookups (#731)
* adds channel for getting node out of lookup

* WIP adding the channels to lookups

* WIP adding channel to node lookups

* Wires up FindNodes method with channels

* WIP adds a test suite for lookup - tests are still failing

* WIP wires up use of testplanet for kademlia lookup tests

* WIP merging in node id changes

* Merges in pkg/storj node type changes

* Tests passing

* Lookup node working via Inspector now

* updates

* WIP working on getting tests passing

* WIP getting tests passing

* FindNode works

* Linter fix

* Adds copyrights to lookup_test

* removes a fmt.Printf I missed

* Removes commented out lines
2018-12-04 14:39:28 -07:00
Egon Elbre
3e461df470
Linting protobuf files (#676) 2018-11-30 17:02:01 +02:00
Bryan White
2a0c4e60d2
preparing for use of customtype gogo extension with NodeID type (#693)
* preparing for use of `customtype` gogo extension with `NodeID` type

* review changes

* preparing for use of `customtype` gogo extension with `NodeID` type

* review changes

* wip

* tests passing

* wip fixing tests

* more wip test fixing

* remove NodeIDList from proto files

* linter fixes

* linter fixes

* linter/review fixes

* more freaking linter fixes

* omg just kill me - linterrrrrrrr

* travis linter, i will muder you and your family in your sleep

* goimports everything - burn in hell travis

* goimports update

* go mod tidy
2018-11-29 19:39:27 +01:00
Yaroslav Vorobiov
c442205b3a
account api: infrastructure, login, register, getUser (#611) 2018-11-14 12:50:15 +02:00
Egon Elbre
6d401a4351
Check for go.mod validity (#605) 2018-11-09 15:32:35 +02:00
aligeti
a760e48d4d
Satellite bw usage v3 121 (#547)
* protobuf for sending bandwidth agreements to satellite from storage nodes

* Setup process for sending agreements

* Add payer_id to db with bandwidth agreements for better sorting

* Linter errors

* Read agreements from PSDB

* Try writing message to server

* Cleanup

* Basic functionality

* Better error handelling

* Fix test

* setup config and server structure for receiving bandwidth agreements

* Resolve linter issues

* Optional commit for if we want to handle deletes all at once

* add identity to Server, add logic for receiving bandwidth messsages

* Bandwidth agreement DBX creation and integration with bw agreement endpoint

Co-authored-by: Kishore <kishore@storj.io>
Co-authored-by: Cam <cameron@storj.io>

* protobuf for sending bandwidth agreements to satellite from storage nodes

* Setup process for sending agreements

* Add payer_id to db with bandwidth agreements for better sorting

* Linter errors

* Read agreements from PSDB

* Try writing message to server

* Cleanup

* Basic functionality

* Better error handelling

* Fix test

* setup config and server structure for receiving bandwidth agreements

* Resolve linter issues

* Optional commit for if we want to handle deletes all at once

* add identity to Server, add logic for receiving bandwidth messsages

* Bandwidth agreement DBX creation and integration with bw agreement endpoint

Co-authored-by: Kishore <kishore@storj.io>
Co-authored-by: Cam <cameron@storj.io>

* added postgres create/read/delete test function

Co-authored-by: kishore <kishore@storj.io
Co-authored-by: cam <cameron@storj.io>

* edit comment

* removed sqlite3 driver from dbx

* remove generated sqlite code, add dbx read limitoffset

* remove getServerAndDB function, rename getDBPath to getPSQLInfo

* WIP writing server endpoint test

* code review changes
2018-11-05 10:23:54 -05:00
paul cannon
e2c0dd437a
offer PostgreSQL storage for pointerdb (#440)
..although it ought to work for other storage.KeyValueStore needs as
well. it's just optimized to work pretty well for a largish hierarchy of
paths.

This includes the addition of "long benchmarks" for KeyValueStore
testing. These will only be run when -test-bench-long is added to the
test flags. In these benchmarks, a large corpus of paths matching a
natural ("real-life") hierarchy is read from paths.data.gz (which you
can get from https://github.com/storj/path-test-corpus) and imported
into a particular KeyValueStore. Recursive and non-recursive queries are
run on it to detect performance problems that arise only at scale.

This also includes alternate implementation of the postgreskv client,
which works in a less-bizarre way for non-recursive queries, but suffers
from poor performance in tests such as the long benchmarks. Once this
alternate impl is committed to the tree, we can remove it again; I just
want it to be available for future reference.
2018-10-25 12:11:28 -05:00
Michal Niewrzal
b3c1ea1852
Add 'mount' command for uplink cli (read-only access) (#345)
* Add 'mount' command for uplink cli

* limit build to unix

* small changes

* Removed in-memory files map, fix in read function

* unmount on interrupt

* add delete support

* some Read improvements

* update to latest api version

* removed Println and better error handling

* fix linter errors

* fix linter errors

* disable async read + review comments

* minor fixes

* remove mutex

* code cleanup

* add prefix support

* simplifying if statement
2018-10-25 12:44:34 +02:00
Maximillian von Briesen
3551b34ea7
Path Encryption (#448)
* begin adding path encryption

* do not encrypt/decrypt first element of path (bucket)

* add path encryption for delete and list

* use encrypted paths in streamstore.Meta

* fix listing with encrypted paths

* move encrypt/decryptAfterBucket to streamstore

* fix listing with no prefix

* remove duplicate logic for listing with no prefix
2018-10-15 11:39:09 -04:00
Egon Elbre
9ba5b1156a
Run go mod tidy (#473) 2018-10-15 15:26:34 +03:00
Dylan Lott
7849d7fa63
Remove newID function (#468)
* Removes node.NewID usage from kademlia tests

* Updates more tests

* remove comments

* removes NewID method from overlay tests

* adds error checking to NewFullIdentity

* removes /x/tools from go.mod

* Removes commented out code
2018-10-12 15:10:50 -06:00
Egon Elbre
5b655d4a89
Restore go.sum (#432) 2018-10-06 20:57:53 +03:00
nfarah86
7812f1bbc0
Stripe selection (#375)
* initial commit- wip, working on testing and library

* wip working on testing library functioon to get poointer

* working on nil  reference for testing

* tests wip

* wip-working on getting tests  to  work

* working on tests

* put test passes

* working on test- need to export

* created pdclient, and now working on testing function

* tests working for list- getting object back

* wip - got derived piece id

* fixed making grpc public

* fixed linter errors and minor added method for size

* need to work on  testing, added random  integer function

* got psc server working for  testing

* working on ranger test and ranger  method

* testing creds for new computer

* working on getting segment metadata

* get random stripe

* added caveat to random fn

* fixed data types

* modified library to have one public function that returns a random stripe

* removed extra comments

* added commons.go file for audit

* added last path to be remembered

* changed random function to cryto/rand/ & worked on tests passing

* working on testing to get analysis of randomness

* changed to track last item in pagination

* finished testing randomness, cleaned up code

* fixed rebase errors

* removed error, kept common file

* fixed travis errors

* attempt to fix overlay issue

* fixed travis error

* updated pointer parameters

* made smaller functions, renamed audit

* made changes per suggestions

* removed gosum

* fixed pr per suggestions

* removed comment
2018-10-05 06:34:15 -07:00
Dylan Lott
ae38817fa3
Pointer lookup (#407)
* Loads cache from context for PointerDB access

* WIP adds overlay lookups to pointerdb requests

* Pointer lookup code is added for Get

* adds feature flag for pointerdb return

* refactors pointerdb code

* removes some unnecessary debug logs

* Fixes indent in config

* adds early return for non-remote pointers

* formats code, removes some comments

* Fixes tests broken by pointer proto changes

* adds error check and merges variable declaration

* removes commented out proto import

* adds error check to pdbclient
2018-10-04 15:00:19 -06:00
Egon Elbre
c3a1d71616
examples: turn paths binary to Go documentation example (#405)
* examples: turn paths binary to Go documentation example
* remove bip39 dependency
2018-10-03 15:15:54 +03:00
Egon Elbre
764234109f
remove urfave/cli from dependencies (#415) 2018-10-03 12:15:17 +03:00
Egon Elbre
96e55d3cf3
Fix go.mod (#395) 2018-09-28 18:44:02 +03:00
Maximillian von Briesen
821d0b6f1d
Stream encryption (#302)
* begin adding encryption for remote pieces

* begin adding decryption

* add encryption key as arg to Put and Get

* move encryption/decryption to object store

* Add encryption key to object store constructor

* Add the erasure scheme to object store constructor

* Ensure decrypter is initialized with the stripe size used by encrypter

* Revert "Ensure decrypter is initialized with the stripe size used by encrypter"

This reverts commit 07272333f461606edfb43ad106cc152f37a3bd46.

* Revert "Add the erasure scheme to object store constructor"

This reverts commit ea5e793b536159d993b96e3db69a37c1656a193c.

* move encryption to stream store

* move decryption stuff to stream store

* revert changes in object store

* add encryptedBlockSize and close rangers on error during Get

* calculate padding sizes correctly

* encryptedBlockSize -> encryptionBlockSize

* pass encryption key and block size into stream store

* remove encryption key and block size from object store constructor

* move encrypter/decrypter initialization

* remove unnecessary cast

* Fix padding issue

* Fix linter

* add todos

* use random encryption key for data encryption. Store an encrypted copy of this key in segment metadata

* use different encryption key for each segment

* encrypt data in one step if it is small enough

* refactor and move encryption stuff

* fix errors related to nil slices passed to copy

* fix encrypter vs. decrypter bug

* put encryption stuff in eestream

* get captplanet test to pass

* fix linting errors

* add types for encryption keys/nonces and clean up

* fix tests

* more review changes

* add Cipher type for encryption stuff

* fix rs_test

* Simplify type casting of key and nonce

* Init starting nonce to the segment index

* don't copy derived key

* remove default encryption key; force user to explicitly set it

* move getSegmentPath to streams package

* dont require user to specify encryption key for captplanet

* rename GenericKey and GenericNonce to Key and Nonce

* review changes

* fix linting error

* Download uses the encryption type from metadata

* Store enc block size in metadata and use it for download
2018-09-26 09:32:23 -04:00
aligeti
97cbacb299
storage node quick check and startup validation (#368)
* storage node quick check and startup validation

*  rearranged the startup validation and quick check logic

* travis lint warning fixes

* travis lint warning fixes

* travis lint warning fixes

* code changes per review comments

* code clean dev debug info

* travis lint wranings

* code changes per code review comments

* code changes per code review comments

* code update per review

* sqlite SUM is having issue when getting the SUM of an empty column; filepath was checking a directory that doesn't exist when starting server; Example updated to print allocated and used space

* storage node quick check and startup validation

*  rearranged the startup validation and quick check logic

* travis lint warning fixes

* travis lint warning fixes

* travis lint warning fixes

* code changes per review comments

* code clean dev debug info

* travis lint wranings

* code changes per code review comments

* code changes per code review comments

* code update per review

* no file or directory error

* Updated mock PSClient
2018-09-25 12:49:55 -04:00
Egon Elbre
10d9420f24
command-line benchmark and visualization (#342) 2018-09-11 18:35:46 +03:00
Egon Elbre
7a906285e3 Small cleanup at top-level (#336)
* cleanup some top-level packages

* remove unused index.html

* update indirect tags
2018-09-10 07:23:08 -07:00
Alexander Leitner
c68cd1232d Prevent sql injection for farmer (#322)
* Validate incoming ID

* Pass tests, cleanup code

* Smarter regex

* Update server.go
2018-09-08 11:06:44 -06:00
JT Olio
8da996d61a infectious: pull in optimizations (#320) 2018-09-07 10:32:54 +03:00
Egon Elbre
83df0ee1b0
Implement ListV2 with storage rework (#303)
1. Added KeyValueStore.Iterate for implementing the different List, ListV2 etc. implementations. This allows for more efficient use of memory depending on the situation.
2. Implemented an inmemory teststore for running tests. This should allow to replace MockKeyValueStore in most places.
3. Rewrote tests
4. Pulled out logger from bolt implementation so it can be used for all other storage implementations.
5. Fixed multiple things in bolt and redis implementations.
2018-09-05 19:10:35 +03:00
Cameron
ea9f5b4e63
CopyObject (#242)
* add CopyObject method

* use utils.LogClose

* extract common code from GetObject to getObject helper

* remove rr.Range from getObject helper, create helper putObject

* return rr, err in getObject helper

* extract code from PutObject into putObject helper

* remove commented out text

* remove other commented out code

* WIP trying to get storj cp command to work with copyObject

* fix typo in rb and now it works

* use rr.Size() instead of srcInfo.Size

* Revert "WIP trying to get storj cp command to work with copyObject"

This reverts commit e256b9f9a0fda728d41eb5b9d7a98b5446825842.

* add CopyObject test

* rebase and fix merge conflicts

* check error in gateway-storj test

* fix typo
2018-08-29 11:00:05 -04:00
JT Olio
58c810519f
cross-compilation: fix darwin (#293)
* cross-compilation: fix darwin

* minio without fsnotify

* update Gopkg.lock

* make release target
2018-08-27 15:06:55 -06:00
JT Olio
3154086e58 go1.11: update monotime (#287) 2018-08-24 20:23:09 -04:00
Egon Elbre
f80185a807
Preliminary support for windows (#266)
* Don't use url.Parse for bolt paths: filepaths may not be valid URL-s.
* go.mod: update dependencies
* README.md: add Windows instructions
* pkg/overlay: check for the correct path and text in error
* pkg/overlay: fix tests for windows
* pkg/piecestore: make windows tests pass
* pkg/telemetry: skip test, as it doesn't shutdown nicely
* storage/redis: ensure that redis is clean before running tests
2018-08-23 10:05:56 +03:00