@vultisig/core-chain 2.16.4 → 2.16.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @vultisig/core-chain
|
|
2
2
|
|
|
3
|
+
## 2.16.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#749](https://github.com/vultisig/vultisig-sdk/pull/749) [`343a921`](https://github.com/vultisig/vultisig-sdk/commit/343a9211d7f5af74753124146a72ebec343e5f2f) Thanks [@gomesalexandre](https://github.com/gomesalexandre)! - cosmos/gas: bump TerraClassic staking gas limit from 2M to 3M and cap msgCount scaling
|
|
8
|
+
|
|
9
|
+
`getCosmosStakingGasLimit` now returns 3M for `Chain.TerraClassic` regardless of `msgCount`. The previous 2M base caused consistent out-of-gas failures (`ValuePerByte` meter in the classic-terra treasury/tax post-handler adds ~200-800 gas beyond the standard SDK estimate). The msgCount scaling is disabled for TerraClassic: at `msgCount >= 2` the scaled gasWanted would exceed the 100 LUNC fee floor, causing node rejection. Columbus-5 callers must split multi-validator reward claims into separate transactions.
|
|
10
|
+
|
|
3
11
|
## 2.16.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmosGasLimitRecord.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/chain/chains/cosmos/cosmosGasLimitRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,WAAW,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAEtF,OAAO,EAAiB,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAqBxD,eAAO,MAAM,iBAAiB,GAAI,MAAM,OAAO,CAAC,WAAW,CAAC,KAAG,MAM9D,CAAA;
|
|
1
|
+
{"version":3,"file":"cosmosGasLimitRecord.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/chain/chains/cosmos/cosmosGasLimitRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,WAAW,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAEtF,OAAO,EAAiB,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAqBxD,eAAO,MAAM,iBAAiB,GAAI,MAAM,OAAO,CAAC,WAAW,CAAC,KAAG,MAM9D,CAAA;AAgCD,KAAK,6BAA6B,GAAG;IACnC,KAAK,EAAE,qBAAqB,CAAA;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,GAAI,qBAAyB,6BAA6B,KAAG,MAcjG,CAAA"}
|
|
@@ -36,9 +36,12 @@ export const getCosmosGasLimit = (coin) => {
|
|
|
36
36
|
* writes that the standard SDK gas estimate omits. In practice this adds
|
|
37
37
|
* ~200-800 gas on top of the base delegate cost (~2M), so a 2M limit fails
|
|
38
38
|
* consistently ("out of gas in location: ValuePerByte; gasWanted: 2000000,
|
|
39
|
-
* gasUsed: 200X"). 3M sits safely under the 100 LUNC fee floor
|
|
40
|
-
* (3M * 28.325 uluna/gas
|
|
41
|
-
*
|
|
39
|
+
* gasUsed: 200X"). 3M sits safely under the 100 LUNC fee floor at msgCount=1
|
|
40
|
+
* (3M * 28.325 uluna/gas ≈ 84.97 LUNC < 100 LUNC). The msgCount scaling is
|
|
41
|
+
* disabled for TerraClassic: at msgCount>=2, scaled gasWanted would exceed
|
|
42
|
+
* 100 LUNC, causing node rejection when the tx fee amount (cosmosGasRecord
|
|
43
|
+
* [TerraClassic]=100_000_000 uluna) no longer covers gasWanted * gasPrice.
|
|
44
|
+
* Columbus-5 callers must split multi-validator claims into separate txs.
|
|
42
45
|
*/
|
|
43
46
|
const cosmosStakingGasLimitRecord = {
|
|
44
47
|
[Chain.Cosmos]: 350000n,
|
|
@@ -65,6 +68,11 @@ export const getCosmosStakingGasLimit = ({ chain, msgCount = 1 }) => {
|
|
|
65
68
|
throw new Error(`getCosmosStakingGasLimit: msgCount must be a non-negative integer, got ${msgCount}`);
|
|
66
69
|
}
|
|
67
70
|
const base = cosmosStakingGasLimitRecord[chain];
|
|
71
|
+
// TerraClassic: fee-floor cap (see comment on cosmosStakingGasLimitRecord).
|
|
72
|
+
// Scaling would push gasWanted above 100 LUNC at msgCount>=2; single-msg
|
|
73
|
+
// policy keeps the tx fee within the cosmosGasRecord floor for columbus-5.
|
|
74
|
+
if (chain === Chain.TerraClassic)
|
|
75
|
+
return base;
|
|
68
76
|
const n = BigInt(Math.max(1, msgCount));
|
|
69
77
|
return base + ((n - 1n) * base) / 4n;
|
|
70
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cosmosGasLimitRecord.js","sourceRoot":"","sources":["../../../../../../packages/core/chain/chains/cosmos/cosmosGasLimitRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAsC,MAAM,4BAA4B,CAAA;AAEtF,OAAO,EAAE,aAAa,EAAW,MAAM,iBAAiB,CAAA;AAExD,MAAM,oBAAoB,GAAgC;IACxD,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO;IACvB,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO;IACxB,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO;IACvB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO;IACrB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO;IACtB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO;IACtB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO;IACtB,iEAAiE;IACjE,gEAAgE;IAChE,kEAAkE;IAClE,mEAAmE;IACnE,uEAAuE;IACvE,uCAAuC;IACvC,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,OAAO;IAC7B,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,SAAS;IAC5B,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,WAAW;CAC/B,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAA0B,EAAU,EAAE;IACtE,IAAI,aAAa,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,YAAY,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;QACnE,OAAO,QAAU,CAAA;IACnB,CAAC;IAED,OAAO,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACzC,CAAC,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"cosmosGasLimitRecord.js","sourceRoot":"","sources":["../../../../../../packages/core/chain/chains/cosmos/cosmosGasLimitRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAsC,MAAM,4BAA4B,CAAA;AAEtF,OAAO,EAAE,aAAa,EAAW,MAAM,iBAAiB,CAAA;AAExD,MAAM,oBAAoB,GAAgC;IACxD,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO;IACvB,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO;IACxB,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO;IACvB,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO;IACrB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO;IACtB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO;IACtB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO;IACtB,iEAAiE;IACjE,gEAAgE;IAChE,kEAAkE;IAClE,mEAAmE;IACnE,uEAAuE;IACvE,uCAAuC;IACvC,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,OAAO;IAC7B,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,SAAS;IAC5B,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,WAAW;CAC/B,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAA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