mirror of https://github.com/certusone/dc4bc.git
updated default chunk size
This commit is contained in:
parent
b394de0230
commit
696e26ccfd
|
@ -142,14 +142,22 @@ Node 1:
|
||||||
|
|
||||||
1. go run cmd/dc4bc_d/main.go gen_keys --username node_1 --key_store_dbdsn /tmp/dc4bc_node_1_key_store
|
1. go run cmd/dc4bc_d/main.go gen_keys --username node_1 --key_store_dbdsn /tmp/dc4bc_node_1_key_store
|
||||||
2. go run cmd/dc4bc_d/main.go start --username node_1 --key_store_dbdsn /tmp/dc4bc_node_1_key_store --listen_addr localhost:8080 --state_dbdsn /tmp/dc4bc_node_1_state --storage_dbdsn /tmp/dc4bc_storage
|
2. go run cmd/dc4bc_d/main.go start --username node_1 --key_store_dbdsn /tmp/dc4bc_node_1_key_store --listen_addr localhost:8080 --state_dbdsn /tmp/dc4bc_node_1_state --storage_dbdsn /tmp/dc4bc_storage
|
||||||
|
3. go run cmd/dc4bc_cli/main.go get_address --listen_addr localhost:8080
|
||||||
|
4. go run cmd/airgapped/main.go /tmp/dc4bc_node_1_airgapped_state
|
||||||
|
|
||||||
Node 2:
|
Node 2:
|
||||||
|
|
||||||
1. go run cmd/dc4bc_d/main.go gen_keys --username node_2 --key_store_dbdsn /tmp/dc4bc_node_2_key_store
|
1. go run cmd/dc4bc_d/main.go gen_keys --username node_2 --key_store_dbdsn /tmp/dc4bc_node_2_key_store
|
||||||
2. go run cmd/dc4bc_d/main.go start --username node_2 --key_store_dbdsn /tmp/dc4bc_node_2_key_store --listen_addr localhost:8081 --state_dbdsn /tmp/dc4bc_node_2_state --storage_dbdsn /tmp/dc4bc_storage
|
2. go run cmd/dc4bc_d/main.go start --username node_2 --key_store_dbdsn /tmp/dc4bc_node_2_key_store --listen_addr localhost:8081 --state_dbdsn /tmp/dc4bc_node_2_state --storage_dbdsn /tmp/dc4bc_storage
|
||||||
|
3. go run cmd/dc4bc_cli/main.go get_address --listen_addr localhost:8080
|
||||||
|
4. go run cmd/airgapped/main.go /tmp/dc4bc_node_2_airgapped_state
|
||||||
|
|
||||||
#### Start the DKG
|
#### Start the DKG
|
||||||
|
|
||||||
1. go run cmd/dc4bc_cli/main.go get_address --listen_addr localhost:8080
|
1. go run cmd/dc4bc_cli/main.go get_address --listen_addr localhost:8080
|
||||||
2. go run cmd/dc4bc_cli/main.go get_address --listen_addr localhost:8081
|
2. go run cmd/dc4bc_cli/main.go get_address --listen_addr localhost:8081
|
||||||
3. go run cmd/dc4bc_cli/main.go start_dkg 2 2 --listen_addr localhost:8080
|
3. go run cmd/dc4bc_cli/main.go start_dkg 2 2 --listen_addr localhost:8080
|
||||||
|
|
||||||
|
#### Perform required operations for both nodes
|
||||||
|
|
||||||
|
1. go run cmd/dc4bc_cli/main.go get_operations --listen_addr localhost:8080
|
||||||
|
|
|
@ -259,7 +259,7 @@ func (c *Client) GetOperationQRPath(operationID string) ([]string, error) {
|
||||||
return nil, fmt.Errorf("failed to get operation in JSON: %w", err)
|
return nil, fmt.Errorf("failed to get operation in JSON: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
operationQRPath := filepath.Join(QrCodesDir, operationID)
|
operationQRPath := filepath.Join(QrCodesDir, fmt.Sprintf("qr_dc4bc_%s", operationID))
|
||||||
chunks, err := qr.DataToChunks(operationJSON)
|
chunks, err := qr.DataToChunks(operationJSON)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to divide a data on chunks: %w", err)
|
return nil, fmt.Errorf("failed to divide a data on chunks: %w", err)
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"math"
|
"math"
|
||||||
)
|
)
|
||||||
|
|
||||||
const chunkSize = 1024
|
const chunkSize = 512
|
||||||
|
|
||||||
type chunk struct {
|
type chunk struct {
|
||||||
Data []byte
|
Data []byte
|
||||||
|
|
Loading…
Reference in New Issue