Skip to content

Commit

Permalink
fix(starship): request body too large for MsgInstallBundle
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpatrickdev committed Jun 15, 2024
1 parent ebeb975 commit 75e2737
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions multichain-testing/scripts/update-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ sed -i -e 's/index_all_keys = false/index_all_keys = true/g' $CHAIN_DIR/config/c
sed -i -e 's/seeds = ".*"/seeds = ""/g' $CHAIN_DIR/config/config.toml
sed -i -e 's#cors_allowed_origins = \[\]#cors_allowed_origins = \["*"\]#g' $CHAIN_DIR/config/config.toml

echo "Increase `*_bytes` parameters for MsgInstallBundle"
# See https://github.com/Agoric/agoric-sdk/blob/7b684a6268c999b082a326fdb22f63e4575bac4f/packages/agoric-cli/src/chain-config.js#L66
RPC_MAX_BODY_BYTES=15000000
MAX_HEADER_BYTES=$((RPC_MAX_BODY_BYTES / 10))
MAX_TXS_BYTES=$((RPC_MAX_BODY_BYTES * 50))
sed -i -e "s/max_body_bytes = .*/max_body_bytes = $RPC_MAX_BODY_BYTES/g" $CHAIN_DIR/config/config.toml
sed -i -e "s/max_header_bytes = .*/max_header_bytes = $MAX_HEADER_BYTES/g" $CHAIN_DIR/config/config.toml
sed -i -e "s/max_txs_bytes = .*/max_txs_bytes = $MAX_TXS_BYTES/g" $CHAIN_DIR/config/config.toml
sed -i -e "s/max_tx_bytes = .*/max_tx_bytes = $RPC_MAX_BODY_BYTES/g" $CHAIN_DIR/config/config.toml
sed -i -e "s/^rpc-max-body-bytes =.*/rpc-max-body-bytes = $RPC_MAX_BODY_BYTES/" $CHAIN_DIR/config/app.toml

echo "Update client.toml file"
sed -i -e 's#keyring-backend = "os"#keyring-backend = "test"#g' $CHAIN_DIR/config/client.toml
sed -i -e 's#output = "text"#output = "json"#g' $CHAIN_DIR/config/client.toml
Expand Down

0 comments on commit 75e2737

Please sign in to comment.