Skip to content

Commit

Permalink
feat: set tendermint default during init
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Letang <[email protected]>
  • Loading branch information
jeremyletang committed Aug 22, 2024
1 parent 880103f commit 528357b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
- [11546](https://github.com/vegaprotocol/vega/issues/11546) - Add validation to market proposals metadata.
- [11562](https://github.com/vegaprotocol/vega/issues/11562) - Update average notional metric with mark price at the end of the epoch and when calculating live score.
- [11570](https://github.com/vegaprotocol/vega/issues/11570) - Include the required set of parties for evaluation for eligible entities reward.
- [11576](https://github.com/vegaprotocol/vega/issues/11576) - Replace additional rebate validation with a cap.
- [11533](https://github.com/vegaprotocol/vega/issues/11533) - Suppose per party fee discounts in fee estimation.
- [11576](https://github.com/vegaprotocol/vega/issues/11576) - Replace additional rebate validation with a cap.
- [11533](https://github.com/vegaprotocol/vega/issues/11533) - Suppose per party fee discounts in fee estimation.
- [10716](https://github.com/vegaprotocol/vega/issues/10716) - Set Tendermint defaults during init.

### 🐛 Fixes

Expand All @@ -40,7 +41,7 @@
- [11544](https://github.com/vegaprotocol/vega/issues/11544) - Fix empty candles stream.
- [11579](https://github.com/vegaprotocol/vega/issues/11579) - Spot calculate fee on amend, use order price if no amended price is provided.
- [11585](https://github.com/vegaprotocol/vega/issues/11585) - Initialise rebate stats service in API.
- [11592](https://github.com/vegaprotocol/vega/issues/11592) - Fix the order of calls at end of epoch between rebate engine and market tracker.
- [11592](https://github.com/vegaprotocol/vega/issues/11592) - Fix the order of calls at end of epoch between rebate engine and market tracker.

## 0.77.5

Expand Down
13 changes: 13 additions & 0 deletions cmd/vega/commands/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"errors"
"fmt"
"os"
"path/filepath"
"time"

"code.vegaprotocol.io/vega/core/config"
Expand Down Expand Up @@ -127,7 +128,19 @@ func (opts *InitCmd) Execute(args []string) error {
if !initCmd.NoTendermint {
tmCfg := tmcfg.DefaultConfig()
tmCfg.SetRoot(os.ExpandEnv(initCmd.TendermintHome))
// add a few defaults
tmCfg.P2P.MaxPacketMsgPayloadSize = 16384
tmCfg.P2P.SendRate = 20000000
tmCfg.P2P.RecvRate = 20000000
tmCfg.Mempool.Size = 10000
tmCfg.Mempool.CacheSize = 20000
tmCfg.Consensus.TimeoutCommit = 0 * time.Second
tmCfg.Consensus.SkipTimeoutCommit = true
tmCfg.Consensus.CreateEmptyBlocksInterval = 1 * time.Second
tmCfg.Storage.DiscardABCIResponses = true
tmcfg.EnsureRoot(tmCfg.RootDir)
// then rewrite the config to apply the changes, EnsureRoot create the config, but with a default config
tmcfg.WriteConfigFile(filepath.Join(tmCfg.RootDir, tmcfg.DefaultConfigDir, tmcfg.DefaultConfigFileName), tmCfg)
if err := initTendermintConfiguration(output, logger, tmCfg); err != nil {
return fmt.Errorf("couldn't initialise tendermint %w", err)
}
Expand Down

0 comments on commit 528357b

Please sign in to comment.