bucket archive improvements and limits#457
Conversation
Signed-off-by: Aaron Sutula <hi@asutula.com>
| repeated string trusted_miners = 4; | ||
| repeated string country_codes = 5; | ||
| ArchiveRenew renew = 6; | ||
| string addr = 7; |
There was a problem hiding this comment.
No more address in the api
| ArchiveTracker *archive.Tracker | ||
| Semaphores *nutil.SemaphorePool | ||
| MaxBucketSize int64 | ||
| MaxBucketArchiveRepFactor int |
There was a problem hiding this comment.
This gets set via configuration
| storageConfig.Cold.Filecoin.Address = defConfRes.DefaultStorageConfig.Cold.Filecoin.Address | ||
| } | ||
| // Get the address from the default storage config for this user. | ||
| storageConfig.Cold.Filecoin.Address = defConfRes.DefaultStorageConfig.Cold.Filecoin.Address |
There was a problem hiding this comment.
We now always get the address from the user's default Powergate StorageConfig, they can't modify this via ArchiveConfig anymore.
| } | ||
| } | ||
|
|
||
| func (s *Service) validateArchiveConfig(c *mdb.ArchiveConfig) error { |
There was a problem hiding this comment.
Simple validation of an ArchiveConfig
| // Threshold indicates how many epochs before expiring should trigger | ||
| // deal renewal. e.g: 100 epoch before expiring. | ||
| Threshold int | ||
| Threshold int `json:"threshold"` |
There was a problem hiding this comment.
Normal json formatting that is also consistent with the JS client.
| // Renew indicates deal-renewal configuration. | ||
| Renew ArchiveRenew `bson:"renew"` | ||
| // Addr is the wallet address used to store the data in filecoin | ||
| Addr string `bson:"addr"` |
There was a problem hiding this comment.
Previously serialized address values will just be ignored from here on out.
Signed-off-by: Aaron Sutula <hi@asutula.com>
|
I added the rep factor limit here in Hub, but also maybe we should add that to Powergate? |
jsign
left a comment
There was a problem hiding this comment.
LGTM.
Considering it has also breaking API changes, this PR should fire some major version bump process?
Sounds like a good safety net and potentially useful for people running Powergate alone. |
Signed-off-by: Aaron Sutula <hi@asutula.com>
Signed-off-by: Aaron Sutula <hi@asutula.com>
addressas part of archive config... just use the user's only address (we don't allow users to create additional addresses)ArchiveConfigthat is consistent with the JS client. Makes jsonArchiveConfigdata interchangeable and consistent between the two clients.