Skip to content

Commit

Permalink
release: v0.2.2-alpha.1
Browse files Browse the repository at this point in the history
release: v0.2.2-alpha.1
  • Loading branch information
joeylichang authored Jun 8, 2023
2 parents 42bb1b0 + 9f884ef commit 1008779
Show file tree
Hide file tree
Showing 227 changed files with 7,893 additions and 9,409 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ build/
logs/

# Local deployment
deployment/localup/local_env/
deployment/localup/local_env/
greenfield/
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## v0.2.2-alpha.1

FEATURES
* [\#502](https://github.com/bnb-chain/greenfield-storage-provider/pull/502) feat: support b2 store
* [\#512](https://github.com/bnb-chain/greenfield-storage-provider/pull/512) feat: universal endpoint for private object
* [\#517](https://github.com/bnb-chain/greenfield-storage-provider/pull/517) feat:group add extra field
* [\#524](https://github.com/bnb-chain/greenfield-storage-provider/pull/524) feat: query storage params by timestamp
* [\#525](https://github.com/bnb-chain/greenfield-storage-provider/pull/525) feat: reject unseal object after upload or replicate fail
* [\#528](https://github.com/bnb-chain/greenfield-storage-provider/pull/528) feat: support loading tasks
* [\#530](https://github.com/bnb-chain/greenfield-storage-provider/pull/530) feat: add debug command
* [\#533](https://github.com/bnb-chain/greenfield-storage-provider/pull/533) feat: return repeated approval task
* [\#536](https://github.com/bnb-chain/greenfield-storage-provider/pull/536) feat:group add extra field
* [\#542](https://github.com/bnb-chain/greenfield-storage-provider/pull/542) feat: change get block height by ws protocol

REFACTOR
* [\#486](https://github.com/bnb-chain/greenfield-storage-provider/pull/486) refactor: off chain auth
* [\#493](https://github.com/bnb-chain/greenfield-storage-provider/pull/493) fix: refine gc object workflow
* [\#495](https://github.com/bnb-chain/greenfield-storage-provider/pull/495) perf: perf get object workflow
* [\#503](https://github.com/bnb-chain/greenfield-storage-provider/pull/503) fix: refine sp db update interface
* [\#515](https://github.com/bnb-chain/greenfield-storage-provider/pull/515) feat: refine get challenge info workflow
* [\#546](https://github.com/bnb-chain/greenfield-storage-provider/pull/546) docs: add sp infra deployment docs
* [\#557](https://github.com/bnb-chain/greenfield-storage-provider/pull/557) fix: refine error code in universal endpoint and auto-close the walle…

BUGFIX
* [\#487](https://github.com/bnb-chain/greenfield-storage-provider/pull/487) fix: init challenge task add storage params
* [\#499](https://github.com/bnb-chain/greenfield-storage-provider/pull/499) fix: permission api
* [\#509](https://github.com/bnb-chain/greenfield-storage-provider/pull/509) fix:blocksyncer oom

## v0.2.1-alpha.1

FEATURES
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ generate:
install-tools:
go install github.com/golang/mock/[email protected]
go install github.com/bufbuild/buf/cmd/[email protected]
go install github.com/cosmos/gogoproto/protoc-gen-gocosmos
go install github.com/cosmos/gogoproto/protoc-gen-gocosmos@latest

buf-gen:
buf generate
Expand Down
183 changes: 99 additions & 84 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Greenfield Storage Provider
(__ ) /_/ /_/ / / / /_/ / /_/ / __/ / /_/ / / / /_/ / |/ / / /_/ / __/ /
/____/\__/\____/_/ \__,_/\__, /\___/ / .___/_/ \____/|___/_/\__,_/\___/_/
/____/ /_/
Version : v0.1.3
Version : vx.x.x
Branch : master
Commit : bfc32b9748c11d74493f93c420744ade4dbc18ac
Build : go1.20.3 darwin arm64 2023-05-12 13:37
Expand All @@ -63,90 +63,105 @@ Build : go1.20.3 darwin arm64 2023-05-12 13:37
#### Edit configuration

```toml
# start service list
Service = ["auth", "gateway", "uploader", "downloader", "challenge", "tasknode", "receiver", "signer", "blocksyncer", "metadata", "manager"]
# sp operator address
SpOperatorAddress = ""
# service endpoint for other to connect
[Endpoint]
challenge = "localhost:9333"
downloader = "localhost:9233"
gateway = "gnfd.test-sp.com"
metadata = "localhost:9733"
p2p = "localhost:9833"
receiver = "localhost:9533"
signer = "localhost:9633"
tasknode = "localhost:9433"
uploader = "localhost:9133"
auth = "localhost:10033"
# service listen address
[ListenAddress]
challenge = "localhost:9333"
downloader = "localhost:9233"
gateway = "localhost:9033"
metadata = "localhost:9733"
p2p = "localhost:9833"
receiver = "localhost:9533"
signer = "localhost:9633"
tasknode = "localhost:9433"
uploader = "localhost:9133"
auth = "localhost:10033"
# SQL configuration
[SpDBConfig]
User = "root"
Passwd = "test_pwd"
Address = "localhost:3306"
Database = "storage_provider_db"
# piece store configuration
[PieceStoreConfig]
Server = []
GrpcAddress = '0.0.0.0:9333'

[SpDB]
User = '${db_user}'
Passwd = '${db_password}'
Address = '${db_address}'
Database = 'storage_provider_db'

[BsDB]
User = '${db_user}'
Passwd = '${db_password}'
Address = '${db_address}'
Database = 'block_syncer'

[BsDBBackup]
User = '${db_user}'
Passwd = '${db_password}'
Address = '${db_address}'
Database = 'block_syncer_backup'

[PieceStore]
Shards = 0
[PieceStoreConfig.Store]
# default use local file system
Storage = "file"
BucketURL = "./data"
# greenfiel chain configuration
[ChainConfig]
ChainID = "greenfield_9000-1741"
[[ChainConfig.NodeAddr]]
GreenfieldAddresses = ["localhost:9090"]
TendermintAddresses = ["http://localhost:26750"]
# signer configuration
[SignerCfg]
GRPCAddress = "localhost:9633"
APIKey = ""
WhitelistCIDR = ["127.0.0.1/32"]
GasLimit = 210000
OperatorPrivateKey = ""
FundingPrivateKey = ""
SealPrivateKey = ""
ApprovalPrivateKey = ""
# block syncer configuration
# signer configuration
[SignerCfg]
WhitelistCIDR = ["0.0.0.0/0"]
GasLimit = 210000
OperatorPrivateKey = "${SP_Operator_PrivKey}"
FundingPrivateKey = "${SP_Funding_PrivKey}"
SealPrivateKey = "${SP_Seal_PrivKey}"
ApprovalPrivateKey = "${SP_Approval_PrivKey}"
[BlockSyncerCfg]
Modules = ["epoch", "bucket", "object", "payment"]
Dsn = "localhost:3308"
# p2p node configuration
[P2PCfg]
ListenAddress = "127.0.0.1:9933"
# p2p node msg Secp256k1 encryption key, it is different from other SP's addresses
P2PPrivateKey = ""
# p2p node's bootstrap node, format: [node_id1@ip1:port1, node_id2@ip1:port2]
Bootstrap = []
# log configuration
[LogCfg]
Level = "info"
Path = "./gnfd-sp.log"
# metrics configuration
[MetricsCfg]
Enabled = false
HTTPAddress = "localhost:24036"

[PieceStore.Store]
Storage = 's3'
BucketURL = '${bucket_url}'
MaxRetries = 5
MinRetryDelay = 0
TLSInsecureSkipVerify = false
IAMType = 'SA'

[Chain]
ChainID = '${chain_id}'
ChainAddress = ['${chain_address}']

[SpAccount]
SpOperateAddress = '${sp_operator_address}'
OperatorPrivateKey = '${operator_private_key}'
FundingPrivateKey = '${funding_private_key}'
SealPrivateKey = '${seal_private_key}'
ApprovalPrivateKey = '${approval_private_key}'
GcPrivateKey = '${gc_private_key}'

[Endpoint]
ApproverEndpoint = 'approver:9333'
ManagerEndpoint = 'manager:9333'
DownloaderEndpoint = 'downloader:9333'
ReceiverEndpoint = 'receiver:9333'
MetadataEndpoint = 'metadata:9333'
UploaderEndpoint = 'uploader:9333'
P2PEndpoint = 'p2p:9333'
SignerEndpoint = 'signer:9333'
AuthorizerEndpoint = 'localhost:9333'

[Gateway]
Domain = '${gateway_domain_name}'
HttpAddress = '0.0.0.0:9033'

[P2P]
P2PPrivateKey = '${p2p_private_key}'
P2PAddress = '0.0.0.0:9933'
P2PAntAddress = '${p2p_ant_address}'
P2PBootstrap = ['${node_id@p2p_ant_address}']
P2PPingPeriod = 0

[Parallel]
DiscontinueBucketEnabled = true
DiscontinueBucketKeepAliveDays = 2

[Monitor]
DisableMetrics = false
DisablePProf = false
MetricsHttpAddress = '0.0.0.0:24367'
PProfHttpAddress = '0.0.0.0:24368'

[Rcmgr]
DisableRcmgr = false

[Metadata]
IsMasterDB = true
BsDBSwitchCheckIntervalSec = 30

[BlockSyncer]
Modules = ['epoch','bucket','object','payment','group','permission','storage_provider','prefix_tree']
Dsn = '${dsn}'
DsnSwitched = ''
RecreateTables = false
Workers = 50
EnableDualDB = false

[APIRateLimiter]
PathPattern = [{Key = ".*request_nonc.*", RateLimit = 10, RatePeriod = 'S'},{Key = ".*1l65v.*", RateLimit = 20, RatePeriod = 'S'}]
HostPattern = [{Key = ".*vfdxy.*", RateLimit = 15, RatePeriod = 'S'}]

[APIRateLimiter.IPLimitCfg]
On = true
RateLimit = 5000
RatePeriod = 'S'
```

### Start
Expand Down
6 changes: 6 additions & 0 deletions base/gfspapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type GfSpBaseApp struct {
appID string
grpcAddress string
operateAddress string
chainID string

server *grpc.Server
client *gfspclient.GfSpClient
Expand Down Expand Up @@ -103,6 +104,11 @@ func (g *GfSpBaseApp) OperateAddress() string {
return g.operateAddress
}

// ChainID returns the chain ID used by this sp instance
func (g *GfSpBaseApp) ChainID() string {
return g.chainID
}

// GfSpDB returns the sp db client.
func (g *GfSpBaseApp) GfSpDB() spdb.SPDB {
return g.gfSpDB
Expand Down
Loading

0 comments on commit 1008779

Please sign in to comment.