-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General refactoring #11
Merged
Merged
Changes from 1 commit
Commits
Show all changes
211 commits
Select commit
Hold shift + click to select a range
4e3172a
Merge pull request #5 from cortze/dev
cortze 42a3883
Changed CID_gen.go
FotiosBistas 72f9050
A hardcoded config, new config options
FotiosBistas 880f9e8
Added new CID source types
FotiosBistas 8dabd66
Configured what type of source is to be used
FotiosBistas 79197d2
Moved cidsource to cid_source.go
FotiosBistas 165c212
what
FotiosBistas c78c228
Deleted the struct
FotiosBistas b47cc99
Naming Convention
FotiosBistas 15699aa
Merge branch 'cortze:master' into CLI-refactoring
FotiosBistas 124ca70
First steps into reading from a file
FotiosBistas 13f2f8b
Implemented the reading from file
FotiosBistas 3692143
Added proper error handling
FotiosBistas c897b95
Moved file close to appropriate place
FotiosBistas f47f80d
Added already published option in the config
FotiosBistas 35fbf8f
Changing some variable names and adding comments
FotiosBistas 8ff06eb
added some comments
FotiosBistas 2ea9a68
variable names
FotiosBistas 018e2e6
added some comments
FotiosBistas ad1194e
comments
FotiosBistas b8b33e9
comments and variable names
FotiosBistas 4a8b27f
Created a new file containing the CID queue
FotiosBistas f7b2407
comment
FotiosBistas 427a4d9
Created generate CIDs method
FotiosBistas 957eda9
Created provide and provide_process method
FotiosBistas feedfad
Described the process taken by the tracker
FotiosBistas ebf0c95
Added todo for the source
FotiosBistas 7ec79d1
Added Comments
FotiosBistas 78f494d
comments
FotiosBistas e680727
comments
FotiosBistas d8e1c7e
comment
FotiosBistas 54e7842
Broke into methods and added comments
FotiosBistas e90ad7e
added comments
FotiosBistas 9ad24e4
Created Publisher ,Discoverer structs and tracker interface
FotiosBistas 6b37149
Cid Tracker Completion and Notifier in the send request
FotiosBistas 7ee401f
Embedded peer.AddrInfo into PeerInfo
FotiosBistas 29dedfa
For loop for inserting peers
FotiosBistas f1b419f
run for the discoverer
FotiosBistas 667d723
variable names
FotiosBistas c496cac
Json types
FotiosBistas dfdcf70
Implemented reading from json file
FotiosBistas 1aeca8a
Removed Discoverer
FotiosBistas f637932
Created new file for publisher
FotiosBistas 87ca788
General way of generating cids
FotiosBistas 9f1d138
Update cid_source.go
FotiosBistas 8600d3f
Read CIDs function
FotiosBistas e714c80
Update
FotiosBistas 850a9f7
Created CID discoverer
FotiosBistas 132b1d6
added a field to the struct
FotiosBistas 67de563
Add address to peerstore
FotiosBistas 8d751bc
Changes for already-published-cids flag
FotiosBistas d35c258
updated imports and go mod file
FotiosBistas ea6e5ec
Use the default config struct
FotiosBistas 89e54d2
Json config file
FotiosBistas 8ad2b06
read config from json file
FotiosBistas 17f6c01
fixed bug not recognized cid source
FotiosBistas 441652e
example config json file
FotiosBistas 05b76d8
print debug
FotiosBistas b887060
bug wrong ctx given as a parameter
FotiosBistas cd764e6
JsonFileCidSource struct
FotiosBistas b1d8554
added json file source
FotiosBistas 2e904d8
changes for the GetNewCidReturnType
FotiosBistas 36c21d5
debug messages
FotiosBistas c7a6b17
discoverer not discover
FotiosBistas 04d6723
removed wrong comments
FotiosBistas d7e71c0
required field already published cids
FotiosBistas 7931db7
collision with package name and variable name
FotiosBistas 72b7d80
return source types from the enum
FotiosBistas 09f7fe7
fixed json type issues with multiaddresses string
FotiosBistas 474ebd1
changed to errorF
FotiosBistas 5c51fef
changed the way the cid file is read
FotiosBistas b9c7626
fixed bug where already-published-cids flag was not being set
FotiosBistas 3b98999
moved cid source interface to cid-source directory
FotiosBistas a54bb21
moved bitswap-cid-source to cid-source directory
FotiosBistas 61b77be
moved json-file-source to cid source directory
FotiosBistas 47d141c
moved to new directory
FotiosBistas 2ff833f
exported open functions
FotiosBistas f4b14e1
added cid-source package
FotiosBistas 3a2aaff
added support for multiple files
FotiosBistas 803efcd
bug fix null pointer exception in iter
FotiosBistas 5aead3a
added proper wait groups and closing the host of the publisher
FotiosBistas 87afe79
added support for two seperate hosts
FotiosBistas b34ceb0
temporary error in json naming
FotiosBistas 144770f
removed this is hacky and terrible (it's probably not)
FotiosBistas 8935836
fixed not initializing pinger host for the discoverer
FotiosBistas 011974e
changed run cmd flags
FotiosBistas c99ea71
removed bloating debug message
FotiosBistas bb8b3ab
removed bloating debug message
FotiosBistas 2c87bf2
receive only channel
FotiosBistas f091e7a
receive only channel
FotiosBistas 86d4fe6
examplejsonfiles
FotiosBistas d7db003
changed json name
FotiosBistas 441fb80
test for file openings
FotiosBistas c5c8b37
added test for get new cid
FotiosBistas bee8ebc
added test for get new cid for simple json files
FotiosBistas ec0246a
debugging
FotiosBistas f104219
added getnewcid for encoded json files
FotiosBistas 0203145
added test for random cid source generation
FotiosBistas 5343f32
added state variables inside random cid struct in order to stop when …
FotiosBistas 37be290
debug and error messages
FotiosBistas 0ab2977
generalized generateCids method
FotiosBistas e4ec155
changes due to generalization of generatecids method
FotiosBistas 11c0ca1
added test get new cid with channels
FotiosBistas 8916c91
bug fix where workers were not initialized for textfilesource,jsonfil…
FotiosBistas 1d8f5a6
bug where some pids couldn't be parsed
FotiosBistas 0734411
removed publisher fields from tracker
FotiosBistas 6d7409c
removed publisher fields from tracker
FotiosBistas 3f211ea
proper API for putting provider in peerstore
FotiosBistas b8dc019
removed TODOs
FotiosBistas e85e156
removed publisher field from tracker
FotiosBistas bf70755
corrected some comments
FotiosBistas 6952a0c
database tests
FotiosBistas e068496
temp idea for the persisting into the database
FotiosBistas 0982d9e
Bug fix
FotiosBistas e0d8e94
Moved fetch results to bottom
FotiosBistas ee88bf7
Bug where default request interval was being set all the time
FotiosBistas 8453bbb
added wg and *models.cidInfo parameter
FotiosBistas c61cb5d
added flag to finish
FotiosBistas 4163554
Added debug messages and closing of pinger host
FotiosBistas 8fab024
Delete examplejsonfiles directory
FotiosBistas a7e5409
updated files
FotiosBistas ea2105f
Merge branch 'CLI-refactoring' of https://github.com/FotiosBistas/ipf…
FotiosBistas 08d57ed
added wait group
FotiosBistas 6f4d54c
Bug fix
FotiosBistas b099e50
Bug fix
FotiosBistas a77484b
removed flags
FotiosBistas 1dc7dc4
Bug fix methods we not finishing
FotiosBistas 96c17eb
example json files and some fixes
FotiosBistas 9bbb449
output to txt
FotiosBistas 8cacbb1
bug fix: pinger not shutting down
FotiosBistas 28b9bdc
bug fix: pinger not closing
FotiosBistas 21397e2
now it works
FotiosBistas 76b77ef
remove examples of OP providers .jsons
cortze d6227a9
remove priv-key flag from config
cortze c6f299d
make naming homogeneus + add method to TrackableCid
cortze 9f18b3a
make naming homogeneus + remove priv-key reading from config
cortze 5dcdfe5
homogeneize src naming + rename to TrackableCid
cortze c4e4b8a
rename + fix missing 1 CID + keep connections open
cortze ad93f50
update ctx to publisher.ctx (compilation error)
cortze 9714f77
fixes
FotiosBistas bd05a9b
New json fields and important log
FotiosBistas bf40169
added user agent fix in the pr holder
FotiosBistas efa5956
Agent Version
FotiosBistas 342d73f
newest example json file
FotiosBistas a910b59
Delete cmd_output.txt
FotiosBistas bdf45f3
analyzer stuff
FotiosBistas bf7c469
Delete cmd_output3.txt
FotiosBistas 456db10
Delete cmd_output3.zip
FotiosBistas d1dd959
corrected ream me
FotiosBistas 12bea17
Merge branch 'CLI-refactoring' of https://github.com/FotiosBistas/ipf…
FotiosBistas 1c6dc3d
removed old analyzer scripts
FotiosBistas b24dae6
Update README.md
FotiosBistas 9ea37e6
Update README.md
FotiosBistas d1928cc
add flag for port
cortze a5b9e39
update user agents + add backoff error to list
cortze 0bc5192
update grace periods
cortze c9c3d10
bug fix: change name of parser due to mix up with py module
FotiosBistas 15881c6
Delete parser.py
FotiosBistas e9bc52a
multiple cid generation lines
FotiosBistas cca0048
added encoding utf 8
FotiosBistas 538a523
bug fix: max len instead of l
FotiosBistas d85dd2e
custom parser and path to logs
FotiosBistas f599247
changed the plots
FotiosBistas 7e02316
update dependencies
FotiosBistas 6f1ca42
Update dependencies + update kad-dht + tidy go.mod
cortze 5976d3f
update gitignore and analyzer
cortze 900bbaa
update error parser + prevent dialbackoff
cortze f4e57c9
update Host params to prevent dial backoffs
cortze cdf30a8
add port to Hoarder configuration
cortze 962bdb5
Update README.md
FotiosBistas 0f17f9f
change make file
FotiosBistas c3438e5
Add ForceDirectDial to the host context to prevent backoffs
cortze 2520b8a
add error distribution graph
cortze 550ecfa
Delete .idea directory
FotiosBistas 8581932
Update .gitignore
FotiosBistas c47778b
http server implementation
FotiosBistas 7aac52b
http server get new cid
FotiosBistas d17dfb6
added dummy trackable cids
FotiosBistas bd8c02a
block min time and log messages
FotiosBistas 64d1969
http listener
FotiosBistas ce6618b
waiting time and add cid to db
FotiosBistas 98ff19a
generate cids http
FotiosBistas 74c7ed9
http source with provider records
FotiosBistas bd66efe
removed lock redundant?
FotiosBistas 8d1b8d4
testing
FotiosBistas fc25679
updated testing
FotiosBistas 7dc6172
created queue
FotiosBistas afcdfef
updated testing
FotiosBistas f79bfc9
Update http_server_test.go
FotiosBistas ada0020
changed error position
FotiosBistas bad07e7
removed not in time to ping
FotiosBistas 7f19e4c
format cmd
cortze ed426cc
update models to make study based on time - not in pings
cortze 5526927
fix retrievability bug
cortze bf22980
first libp2p host config + study based on time - not in pings
cortze 81edbe4
update dependencies
cortze 01788da
set dial timeout + add new registered errors
cortze 14dc1ec
update analyzer scripts
cortze c2897d3
Create log1.txt
FotiosBistas 3732357
Delete log1.txt
FotiosBistas 34c4480
Merge remote-tracking branch 'origin/feat/fix-libp2p-configuration' i…
FotiosBistas d1831e8
synced up http server to latest config
FotiosBistas 5c0f9df
fixed bug in test
FotiosBistas 63c15f6
update go mod
FotiosBistas 637ed8a
added publication time to trackable cid
FotiosBistas fe9ea1b
graceful shutdown of http server
FotiosBistas 727f98b
publication time addition
FotiosBistas 92a89ed
bug fix: publication time was not getting parsed, added time standard
FotiosBistas 24baa49
bug fix: http server proper shutdown
FotiosBistas 1633d58
added path to http connection
FotiosBistas 5b8a264
Update http_server.go
FotiosBistas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could leave the content aside, it's probably a random one. Furthermore, it isn't relevant for the Cid-Hoarder to know the exact bytes of a given CID.
It would also simplify the step for exporting/importing the CIDs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I leave out the content I would need to change the interface type:
Every time a GetNewCid() is called it returns the CID , it's content and an nil error if all went well. In the latest commit which handles errors it's more clear how I thought about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, although it is never used.
You can return an empty
[]byte
and it won't crash, it will also save you some time parsing the file with the CIDs.Might happen that you want to track a CID from where you don't know the content yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay makes sense. What do you think would be best to change the interface or just return a nil type in the place of
[]byte
when reading from a file?The usage of
[]byte
is here:Yeah I saw that //TODO now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmmm, I would just return an empty
[]byte
for now, it might be useful in the future