code.vegaprotocol.io/vega@v0.79.0/UPGRADING.md (about) 1 Upgrading from v0.67.1 to v0.71.4 2 ================================= 3 4 Read through for a list of the major changes between versions 0.67.1 and 0.71.4, covering: 5 * [Configuration changes](#configuration-changes) 6 * [Command line changes](#command-line-changes) 7 8 This document covers most of the breaking changes in using the command line or configuring the different softwares. 9 10 # Configuration changes 11 12 We recommend that node operators generate a bare configuration (`vega init...`, `vega datanode init...`) in a temporary folder to compare these new configurations to their existing ones to address any changes. Any missing entries in the configuration will be using defaults. 13 14 ## Vega 15 16 The Vega configuration file can be found in `$VEGA_HOME/config/node/config.toml`. 17 18 ## Data node 19 20 The data node configuration file can be found in `$DATANODE_HOME/config/data-node/config.toml`. 21 22 ### Settings added in 0.71.4 23 24 **_Rate Limiting_** - In the past, the data node API did rate limiting only by the number of subscriptions open per IP. In the new version, a rate limit per IP on the unary calls for the REST, GraphQL and gRPC APIs was introduced. The server now allows 20 API calls per second on average with a burst of up to 100 API calls in a short period of time. 25 For details how to use this setting and configure this functionality, please refer to the [rate limiting](https://github.com/vegaprotocol/vega/blob/develop/datanode/ratelimit/README.md) documentation. 26 27 **_REST and GraphQL configuration_** - Previously the configuration of the GraphQL and REST APIs used separate HTTP servers and configuration. This has now been merged into a single server. 28 29 Also, the default endpoint for GraphQL has changed from `/query` to `/graphql`. 30 Usage example: 31 ```Toml 32 [Gateway] 33 Port = 3008 34 IP = "0.0.0.0" 35 [Gateway.GraphQL] 36 Enabled = true 37 Endpoint = "/graphql" 38 [Gateway.REST] 39 Enabled = true 40 ``` 41 42 **_IPFS update_** - The IPFS library used by the data node to share network history has been updated. This may require manual steps to reset the state and apply the IPFS migrations. 43 44 ### Settings removed in 0.71.4 45 46 **_X-Vega-Connection_** - This HTTP header is now deprecated from API calls to the data node. 47 48 ## Visor 49 50 ### Breaking changes with 0.71.4 51 52 Visor used to require both the Vega and data node binaries. With recent changes, the Vega binary is now embedded in the data node CLI as a subcommand. This has been reflected in the Visor configuration as now only a single binary is required in the configuration. 53 54 Here's an example of Visor configuration reflecting these changes: 55 ```Toml 56 maxNumberOfFirstConnectionRetries = 43200 57 maxNumberOfRestarts = 3 58 restartsDelaySeconds = 5 59 stopDelaySeconds = 3 60 stopSignalTimeoutSeconds = 15 61 62 [upgradeFolders] 63 "vX.X.X" = "vX.X.X" 64 65 [autoInstall] 66 enabled = true 67 repositoryOwner = "vegaprotocol" 68 repository = "vega" 69 [autoInstall.assets] 70 assset_name = "vega-linux-amd64.zip" 71 binary_name = "vega" 72 ``` 73 74 # Command line changes 75 76 ## Vega 77 78 #### Deprecations 79 80 `IssueSignatures` is no longer a validator command and is now protected by the spam protection engine. 81 82 ### Vega Wallet 83 84 The Vega Wallet has had several commands changed. Refer to the Vega Wallet `--help` to see the latest commands and guidance on how to use them. 85 86 87 Upgrading from v0.53.0 to v0.67.1 88 ================================= 89 90 Read through for a list of the major changes between versions 0.53.0 and 0.67.1, covering: 91 * [Repository changes](#repository-changes) 92 * [Configuration changes](#configuration-changes) 93 * [Command line changes](#command-line-changes) 94 95 # Repository changes 96 97 Along the way to the v0.67 release, most Vega code has been made public. In addition, the code for the Vega Wallet ([previously](https://github.com/vegaprotocol/vegawallet)) and the data node ([previously](https://github.com/vegaprotocol/data-node)) have been imported in this repository, and both of the previous repositories are now unmaintained. 98 99 The binaries are still available as standalone files in the Vega repo and can be downloaded through the GitHub release [page](https://github.com/vegaprotocol/vega/releases). When downloading the binaries, be sure to choose the compatible software version to that of the network. However, they are also available under the vega toolchain: 100 ``` 101 vega datanode --help 102 vega wallet --help 103 ``` 104 105 The Vega core node is now a built-in Tendermint application. This means that it's no longer required (and not recommended) to run Tendermint separately. Most Tendermint commands used to manage a Tendermint chain are also available under the Vega toolchain: 106 ``` 107 vega tendermint --help 108 ``` 109 110 ## New service 111 With version 0.67, `vegavisor` was introduced to help facilitate protocol upgrades. This tool is not required to run the node but recommended in order to ease software upgrades when they're expected by the network. Read more about [Vega Visor](https://github.com/vegaprotocol/vega/blob/develop/visor/readme.md). 112 113 # Configuration changes 114 115 ## Vega 116 117 The Vega configuration file can be found in `$VEGA_HOME/config/node/config.toml`. 118 119 ### Settings added in v0.67 120 121 **_MaxMemoryPercent_** - A value to control the maximum amount of memory the Vega node will use. The accept range of value is 1-100: 100 basically removes any memory usage restriction. The default is set to 33 when initialising a full node (accounting for a possible data node running as well on the same hardware) and 100 when initialising a validator. 122 123 Usage example: 124 ```Toml 125 # set the memory usage to 50% max of the available resources on the hardware 126 MaxMemoryPercent = 50 127 ``` 128 129 **_[Ethereum] section_** - This whole section has been added to set up the configuration of the Ethereum node that validators use to validate events on the Ethereum chain. It's required to set it for a validator node, and unused when running a non-validator node. 130 131 **note: Validator nodes are required to connect to an Ethereum archive node.** 132 133 Usage example: 134 ```Toml 135 [Ethereum] 136 # control the log level of this package 137 Level = "Info" 138 # The address of the ethereum node RPC endpoint 139 RPCEndpoint = "http://some_rpc_endpoint" 140 RetryDelay = "15s" 141 ``` 142 143 **_EvtForward.Ethereum.PollEventRetryDuration_** - Configure how often the Ethereum event source will try to find new activity on the Ethereum bridge. 144 145 Usage Example: 146 ```Toml 147 [EvtForward] 148 [EvtForward.Ethereum] 149 PollEventRetryDuration = "20s" 150 ``` 151 152 **_Snapshot.StartHeight_** - This parameter already existed, but the default has changed to `-1`. We recommend setting it to this value as it makes the node restart from the last local snapshot. 153 154 Usage Example: 155 ```Toml 156 [Snapshot] 157 StartHeight = -1 158 ``` 159 160 ### Settings removed in v0.67 161 162 **_UlimitNOFile_** - Previously used to increase the number of FD created by the node. It was required for internal use of Badger, which has been removed. 163 164 **_Admin.Server.Enabled_** - Previously used to disable the admin server. This is not an option anymore as it is required for protocol upgrades. 165 166 **_Blockchain.Tendermint.ClientAddr_**, **_Blockchain.Tendermint.ClientEndpoint_**, **_Blockchain.Tendermint.ServerPort_**, **_Blockchain.Tendermint.ServerAddr_** - As Vega now uses a built-in Tendermint application, there's no need to set up configuration with an external Tendermint node. 167 168 **_[Monitoring] section_** - This section has been removed. 169 170 **_[NodeWallet.ETH]_** - This has been removed from the _[NodeWallet]_ section, and is now set in its own _[Ethereum]_ section. 171 172 ## Tendermint 173 174 The Tendermint configuration can be found in `$TENDERMINT_HOME/config/config.toml`. 175 176 Below is a list of Tendermint configuration settings that need to be set so Vega operates correctly. Others can be kept at the defaults. 177 178 ```Toml 179 [p2p] 180 # Maximum size of a message packet payload, in bytes 181 max_packet_msg_payload_size = 16384 182 183 [mempool] 184 # Mempool version to use: 185 # 1) "v0" - (default) FIFO mempool. 186 # 2) "v1" - prioritized mempool. 187 version = "v1" 188 # Maximum number of transactions in the mempool 189 size = 10000 190 # Size of the cache (used to filter transactions we saw earlier) in transactions 191 cache_size = 20000 192 193 [consensus] 194 # How long we wait after committing a block, before starting on the new 195 # height (this gives us a chance to receive some more precommits, even 196 # though we already have +2/3). 197 timeout_commit = "0s" 198 # Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) 199 skip_timeout_commit = true 200 # EmptyBlocks mode and possible interval between empty blocks 201 create_empty_blocks = true 202 create_empty_blocks_interval = "1s" 203 ``` 204 205 ## Data node 206 207 The data node configuration file can be found in `$DATANODE_HOME/config/data-node/config.toml`. 208 209 ### Settings added in v0.67 210 211 **_MaxMemoryPercent_** - A value to control the maximum amount of memory the Vega node will use. The accepted range of values is 1-100. The default value is 33, assuming that the data node is running on the same host as the Vega core node and Postgres. 212 213 Usage example: 214 ```Toml 215 # set the memory usage to 50% max of the available resources on the hardware 216 MaxMemoryPercent = 50 217 ``` 218 219 **_AutoInitialiseFromNetworkHistory_** - Used if the data node is bootstrapping its state from other data nodes in the network. 220 221 Usage example: 222 ```Toml 223 AutoInitialiseFromNetworkHistory = false 224 ``` 225 **_ChainID_** - The chain ID of the current Vega mainnet. This is set automatically when running `init` for the first time. 226 227 Usage example: 228 ```Toml 229 ChainID = "vega-mainnet-0009" 230 ``` 231 232 **_[Admin] section_** - The configuration for the admin's local API. This is generated automatically when running `init` for the first time. 233 234 Usage example: 235 ```Toml 236 [Admin] 237 Level = "Info" 238 [Admin.Server] 239 SocketPath = "/var/folders/l7/lq57j66j6hjdllwffykpqf_h0000gn/T/datanode.sock" 240 HTTPPath = "/datanode/rpc" 241 ``` 242 243 **_SQLStore.ConnectionRetryConfig_**, **_SQLStore.LogRotationConfig_** - Advanced configuration for the Postgres connector. We recommend using the default setting created when running the `init` command. 244 245 **_Gateway.MaxSubscriptionPerClient_** - The maximum number of GraphQL subscriptions allowed per client connection. The default is set to 250. 246 247 Usage example: 248 ```Toml 249 [Gateway] 250 MaxSubscriptionPerClient = 100 251 ``` 252 253 **_Gateway.GraphQL.Endpoint_** - The endpoint serving the GraphQL API. The default is set to the standard endpoint for GraphQL APIs. 254 255 ```Toml 256 [Gateway] 257 [Gateway.GraphQL] 258 Endpoint = "/graphql" 259 ``` 260 261 **_Broker.UseBufferedEventSource_** - The broker is the connection between the Vega core node and data node. This connection needs to be stable at all times to ensure the data node can reconcile all the state from the Vega events. This setting allows the data node to use a buffer when it's not able to consume events as fast as the Vega core node produces them. We recommend setting this to `true`. 262 263 Usage example: 264 ```Toml 265 [Broker] 266 UseBufferedEventSource = true 267 ``` 268 269 **_[Broker.BufferedEventSourceConfig] section_** - This section configures the buffered event source mentioned previously. We recommend using the default from the `init` command. 270 271 **_[NetworkHistory] section_** - This configures the network history settings for a data node. We recommend using the default configuration created when running the `init` command. 272 273 ### Settings removed in v0.67 274 275 **_UlimitNOFile_** - Previously used to increase the number of FD created by the node. It was required for the internal use of Badger, which has been removed. 276 277 **_API.ExposeLegacyAPI_**, **_API.LegacyAPIPortOffset_** - The legacy API has been fully removed in the new version, so these fields are unnecessary. 278 279 ### Settings moved in v0.67 280 281 Previously it was only possible to enable HTTPS support on the GraphQL API gateway. In 0.67.1 we also added support for enabling HTTPS on the REST gateway. As a result, the HTTPS settings have moved from the `[Gateway.GraphQL]` to the `[Gateway]` section. 282 283 For example, if your previous settings were 284 285 ```toml 286 [Gateway] 287 ... 288 [Gateway.GraphQL] 289 HTTPSEnabled = true 290 AutoCertDomain = "api.vega.example.com" 291 CertificateFile = "" 292 KeyFile = "" 293 ... 294 ``` 295 They must now become 296 ```toml 297 [Gateway] 298 ... 299 HTTPSEnabled = true 300 AutoCertDomain = "api.vega.example.com" 301 CertificateFile = "" 302 KeyFile = "" 303 [Gateway.GraphQL] 304 ... 305 ``` 306 Please note, that for `autocert` to work then either the GraphQL or REST endpoints *must* be reachable on the internet at `api.vega.example.com:443` (this is a hard requirement from LetsEncrypt). You could forward the port with a firewall rule or proxy, or simply specify 443 as the port for one of them in the `[Gateway.GraphQL]` or `[Gateway.Rest]` config sections. 307 308 If that is not possible, you will need to use [other means](https://letsencrypt.org/getting-started/) to generate and provide a signed certificate to datanode. Specify the path to your certificate & private key in the `CertificateFile` and `KeyFile` options. 309 310 Please note, you may either use `autocert` to manage your certificates *or* provide certificate files. Datanode will refuse to start if you both enable `autocert` by specifying an `AutoCertDomain` and also specify a certificate via `CertificateFile` 311 312 313 # Command line changes 314 315 ## Vega 316 317 #### Deprecations 318 319 `node` subcommand has been deprecated in favour of `start`. You should use the new command as the previous one will be fully removed in a future release. 320 321 `tm` subcommand has been deprecated in favour of `tendermint`. You should use the new command as the previous one will be fully removed in a future release. Also, as Vega now has Tendermint as a built-in application, some of the commands exposed by the subcommand have also been removed, such as the `node` subcommand. 322 323 #### Additions 324 325 `init` and `start` now take an optional `--tendermint-home` used to specify the home of the Tendermint configuration and state. If ignored, the default Tendermint home is used (`$HOME/.tendermint`). 326 327 `init` also takes an optional `--no-tendermint` which will skip creating the Tendermint configuration. 328 329 `protocol_upgrade_proposal` subcommand has been introduced. This is used by validator nodes to share on-chain their intent to upgrade to a newer version of the protocol. 330 331 The Vega toolchain now also exposes some of the other programs under the following subcommands: 332 - `tools`: Tools used for interrogating the Vega chain 333 - `wallet`: The Vega Wallet 334 - `datanode`: The Vega data node 335 - `blockexplorer`: The API used by the block explorer 336 337 Refer to the documentation for more information, or use the standard `--help` flag for more details. 338 339 For extended help about the Vega toolchain run: 340 ```Shell 341 vega --help 342 ``` 343 344 ### Vega Wallet 345 346 The Vega Wallet has had several commands changed. Refer to the Vega Wallet `--help` to see the latest commands and guidance on how to use them. 347 348 ## Data node 349 350 #### Deprecations 351 352 `node` subcommand has been deprecated in favour of `start`. You should use the new command as the previous one will be fully removed in a future release. 353 354 #### Additions 355 356 `init` now requires the chain-id of the current Vega network. For example, if you were to initialise a data node for the current mainnet, you would run the following command: 357 358 ```Shell 359 vega datanode init --home="$DATANODE_HOME" "vega-mainnet-0009" 360 ``` 361 362 `network-history`, a new subcommand, provides tools to manage the network history segments saved by the data node, which are shared across the network through IPFS. 363 364 `last-block`, a new command, returns the last block processed by the data node.