Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/remove/block-issuance-by-node' i…
Browse files Browse the repository at this point in the history
…nto feat/block-issuer-tests
  • Loading branch information
cyberphysic4l committed Oct 4, 2023
2 parents 2375744 + 7987fc9 commit faa3256
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 60 deletions.
9 changes: 2 additions & 7 deletions components/inx/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ func init() {
IsEnabled: func(c *dig.Container) bool {
return ParamsINX.Enabled
},
Provide: provide,
Configure: configure,
Run: run,
Provide: provide,
Run: run,
}
}

Expand Down Expand Up @@ -53,10 +52,6 @@ func provide(c *dig.Container) error {
return nil
}

func configure() error {
return nil
}

func run() error {
if err := Component.Daemon().BackgroundWorker("INX", func(ctx context.Context) {
Component.LogInfo("Starting INX ... done")
Expand Down
6 changes: 0 additions & 6 deletions components/restapi/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ type ParametersRestAPI struct {
// the maximum number of results that may be returned by an endpoint
MaxResults int `default:"1000" usage:"the maximum number of results that may be returned by an endpoint"`
}

// BlockIssuerAccount the accountID of the account that will issue the blocks.
BlockIssuerAccount string `default:"" usage:"the accountID of the account that will issue the blocks"`

// BlockIssuerPrivateKey the private key of the account that will issue the blocks.
BlockIssuerPrivateKey string `default:"" usage:"the private key of the account that will issue the blocks"`
}

var ParamsRestAPI = &ParametersRestAPI{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ services:
--profiling.bindAddress=0.0.0.0:6061
--profiling.enabled=true
--protocol.snapshot.path=/app/data/snapshot.bin
--restAPI.allowIncompleteBlock=true
{% if 'node-01' in inventory_hostname or 'node-02' in inventory_hostname or 'node-03' in inventory_hostname %}
--validator.enabled=true
--validator.account={{validatorAccount}}
Expand All @@ -49,11 +48,6 @@ services:
{% if 'node-01' in inventory_hostname %}
--validator.ignoreBootstrapped=true
{% endif %}
--restAPI.allowIncompleteBlock=true
--restAPI.blockIssuerAccount={{validatorAccount}}
--restAPI.blockIssuerPrivateKey={{validatorPrivKey}}
--inx.blockIssuerAccount={{validatorAccount}}
--inx.blockIssuerPrivateKey={{validatorPrivKey}}
--p2p.peers=/dns/node-01.feature/tcp/14666/p2p/12D3KooWCrjmh4dUCWfGVQT6ivzArieJB9Z3eKdy2mdEEN95NDPS
--p2p.externalMultiAddresses={{ ips | join(',') }}
--p2p.identityPrivateKey={{p2pIdentityPrivateKey}}
Expand Down
22 changes: 6 additions & 16 deletions documentation/docs/references/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,11 @@ Example:
| publicRoutes | The HTTP REST routes which can be called without authorization. Wildcards using \* are allowed | array | /health<br/>/api/routes<br/>/api/core/v3/info<br/>/api/core/v3/blocks\*<br/>/api/core/v3/transactions\*<br/>/api/core/v3/commitments\*<br/>/api/core/v3/outputs\*<br/>/api/core/v3/accounts\*<br/>/api/core/v3/validators\*<br/>/api/core/v3/rewards\*<br/>/api/core/v3/committee<br/>/api/debug/v2/\*<br/>/api/indexer/v2/\*<br/>/api/mqtt/v2 |
| protectedRoutes | The HTTP REST routes which need to be called with authorization. Wildcards using \* are allowed | array | /api/\* |
| debugRequestLoggerEnabled | Whether the debug logging for requests should be enabled | boolean | false |
| allowIncompleteBlock | Whether the node allows to fill in incomplete block and issue it for user | boolean | false |
| maxPageSize | The maximum number of results per page | uint | 100 |
| requestsMemoryCacheGranularity | Defines per how many slots a cache is created for big API requests | uint | 10 |
| maxRequestedSlotAge | The maximum age of a request that will be processed | uint | 10 |
| [jwtAuth](#restapi_jwtauth) | Configuration for jwtAuth | object | |
| [limits](#restapi_limits) | Configuration for limits | object | |
| blockIssuerAccount | The accountID of the account that will issue the blocks | string | "" |
| blockIssuerPrivateKey | The private key of the account that will issue the blocks | string | "" |

### <a id="restapi_jwtauth"></a> JwtAuth

Expand Down Expand Up @@ -228,7 +225,6 @@ Example:
"/api/*"
],
"debugRequestLoggerEnabled": false,
"allowIncompleteBlock": false,
"maxPageSize": 100,
"requestsMemoryCacheGranularity": 10,
"maxRequestedSlotAge": 10,
Expand All @@ -238,9 +234,7 @@ Example:
"limits": {
"maxBodyLength": "1M",
"maxResults": 1000
},
"blockIssuerAccount": "",
"blockIssuerPrivateKey": ""
}
}
}
```
Expand Down Expand Up @@ -499,22 +493,18 @@ Example:

## <a id="inx"></a> 14. Inx

| Name | Description | Type | Default value |
| --------------------- | --------------------------------------------------------- | ------- | ---------------- |
| enabled | Whether the INX plugin is enabled | boolean | false |
| bindAddress | The bind address on which the INX can be accessed from | string | "localhost:9029" |
| blockIssuerAccount | The accountID of the account that will issue the blocks | string | "" |
| blockIssuerPrivateKey | The private key of the account that will issue the blocks | string | "" |
| Name | Description | Type | Default value |
| ----------- | ------------------------------------------------------ | ------- | ---------------- |
| enabled | Whether the INX plugin is enabled | boolean | false |
| bindAddress | The bind address on which the INX can be accessed from | string | "localhost:9029" |

Example:

```json
{
"inx": {
"enabled": false,
"bindAddress": "localhost:9029",
"blockIssuerAccount": "",
"blockIssuerPrivateKey": ""
"bindAddress": "localhost:9029"
}
}
```
Expand Down
25 changes: 0 additions & 25 deletions tools/docker-network/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,8 @@ services:
--validator.ignoreBootstrapped=true
--validator.account=0x907c02e9302e0f0571f10f885594e56d8c54ff0708ab7a39bc1b74d396b93b12
--validator.privateKey=443a988ea61797651217de1f4662d4d6da11fd78e67f94511453bf6576045a05293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b
--restAPI.allowIncompleteBlock=true
--restAPI.blockIssuerAccount=0x907c02e9302e0f0571f10f885594e56d8c54ff0708ab7a39bc1b74d396b93b12
--restAPI.blockIssuerPrivateKey=443a988ea61797651217de1f4662d4d6da11fd78e67f94511453bf6576045a05293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b
--inx.enabled=true
--inx.bindAddress=0.0.0.0:9029
--inx.blockIssuerAccount=0x907c02e9302e0f0571f10f885594e56d8c54ff0708ab7a39bc1b74d396b93b12
--inx.blockIssuerPrivateKey=443a988ea61797651217de1f4662d4d6da11fd78e67f94511453bf6576045a05293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b
volumes:
- ./docker-network.snapshot:/app/data/snapshot.bin
- ./config.json:/app/config.json:ro
Expand Down Expand Up @@ -54,13 +49,8 @@ services:
--validator.enabled=true
--validator.account=0x375358f92cc94750669598b0aaa55a6ff73310b90710e1fad524c0f911be0fea
--validator.privateKey=3a5d39f8b60367a17fd54dac2a32c172c8e1fd6cf74ce65f1e13edba565f281705c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064
--restAPI.allowIncompleteBlock=true
--restAPI.blockIssuerAccount=0x375358f92cc94750669598b0aaa55a6ff73310b90710e1fad524c0f911be0fea
--restAPI.blockIssuerPrivateKey=3a5d39f8b60367a17fd54dac2a32c172c8e1fd6cf74ce65f1e13edba565f281705c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064
--inx.enabled=true
--inx.bindAddress=0.0.0.0:9029
--inx.blockIssuerAccount=0x375358f92cc94750669598b0aaa55a6ff73310b90710e1fad524c0f911be0fea
--inx.blockIssuerPrivateKey=3a5d39f8b60367a17fd54dac2a32c172c8e1fd6cf74ce65f1e13edba565f281705c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064
volumes:
- ./docker-network.snapshot:/app/data/snapshot.bin
- ./config.json:/app/config.json:ro
Expand All @@ -84,13 +74,8 @@ services:
--validator.enabled=true
--validator.account=0x6aee704f25558e8aa7630fed0121da53074188abc423b3c5810f80be4936eb6e
--validator.privateKey=db39d2fde6301d313b108dc9db1ee724d0f405f6fde966bd776365bc5f4a5fb31e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648
--restAPI.allowIncompleteBlock=true
--restAPI.blockIssuerAccount=0x6aee704f25558e8aa7630fed0121da53074188abc423b3c5810f80be4936eb6e
--restAPI.blockIssuerPrivateKey=db39d2fde6301d313b108dc9db1ee724d0f405f6fde966bd776365bc5f4a5fb31e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648
--inx.enabled=true
--inx.bindAddress=0.0.0.0:9029
--inx.blockIssuerAccount=0x6aee704f25558e8aa7630fed0121da53074188abc423b3c5810f80be4936eb6e
--inx.blockIssuerPrivateKey=db39d2fde6301d313b108dc9db1ee724d0f405f6fde966bd776365bc5f4a5fb31e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648
volumes:
- ./docker-network.snapshot:/app/data/snapshot.bin
- ./config.json:/app/config.json:ro
Expand All @@ -109,13 +94,8 @@ services:
${COMMON_CONFIG}
${MANUALPEERING_CONFIG}
--p2p.identityPrivateKey=03feb3bcd25e57f75697bb329e6e0100680431e4c45c85bc013da2aea9e9d0345e08a0c37407dc62369deebc64cb0fb3ea26127d19d141ee7fb8eaa6b92019d7
--restAPI.allowIncompleteBlock=true
--restAPI.blockIssuerAccount=0xd057230f48fdf59ae093e2179857c590e960b05389399399ce69ad169a9c7f37
--restAPI.blockIssuerPrivateKey=dcf7adb000f03826f1964a3e5378874b1972c38229fb740a8e47f2c421cddcf9a54fafa44a88e4a6a37796526ea884f613a24d84337871226eb6360f022d8b39
--inx.enabled=true
--inx.bindAddress=0.0.0.0:9029
--inx.blockIssuerAccount=0xd057230f48fdf59ae093e2179857c590e960b05389399399ce69ad169a9c7f37
--inx.blockIssuerPrivateKey=dcf7adb000f03826f1964a3e5378874b1972c38229fb740a8e47f2c421cddcf9a54fafa44a88e4a6a37796526ea884f613a24d84337871226eb6360f022d8b39
volumes:
- ./docker-network.snapshot:/app/data/snapshot.bin
- ./config.json:/app/config.json:ro
Expand All @@ -134,13 +114,8 @@ services:
${COMMON_CONFIG}
${MANUALPEERING_CONFIG}
--p2p.identityPrivateKey=7d1491df3ef334dee988d6cdfc4b430b996d520bd63375a01d6754f8cee979b855b200fbea8c936ea1937a27e6ad72a7c9a21c1b17c2bd3c11f1f6994d813446
--restAPI.allowIncompleteBlock=true
--restAPI.blockIssuerAccount=0x7a9ec5d9c0c145bae03b20cbe481cfea306e688c00525b410eb8cb18a169ed7f
--restAPI.blockIssuerPrivateKey=0d8ecad4cefe927d2b6c64ee56576c52450f9a7a0113f96683cf8e8cc5c64264cb5ea14175ce649149ee41217c44aa70c3205b9939968449eae408727a71f91b
--inx.enabled=true
--inx.bindAddress=0.0.0.0:9029
--inx.blockIssuerAccount=0x7a9ec5d9c0c145bae03b20cbe481cfea306e688c00525b410eb8cb18a169ed7f
--inx.blockIssuerPrivateKey=0d8ecad4cefe927d2b6c64ee56576c52450f9a7a0113f96683cf8e8cc5c64264cb5ea14175ce649149ee41217c44aa70c3205b9939968449eae408727a71f91b
volumes:
- ./docker-network.snapshot:/app/data/snapshot.bin
- ./config.json:/app/config.json:ro
Expand Down

0 comments on commit faa3256

Please sign in to comment.