From e92f5225d80c30653c21dd04189c205c53f8eaa3 Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Mon, 16 Dec 2024 15:00:28 -0600 Subject: [PATCH 1/5] build(deps): use backport of cosmos-sdk v0.46.15 --- golang/cosmos/e2e_test/go.mod | 28 +++++++++++++++++++++++++--- golang/cosmos/e2e_test/go.sum | 26 +++++++++++++------------- golang/cosmos/go.mod | 2 +- golang/cosmos/go.sum | 4 ++-- 4 files changed, 41 insertions(+), 19 deletions(-) diff --git a/golang/cosmos/e2e_test/go.mod b/golang/cosmos/e2e_test/go.mod index a6e8cd0e16c..9943ffa2948 100644 --- a/golang/cosmos/e2e_test/go.mod +++ b/golang/cosmos/e2e_test/go.mod @@ -6,7 +6,7 @@ require ( github.com/agoric-labs/interchaintest/v6 v6.0.1-agoriclabs github.com/cosmos/cosmos-sdk v0.46.13 github.com/cosmos/ibc-go/v6 v6.2.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 go.uber.org/zap v1.26.0 ) @@ -17,7 +17,7 @@ require ( cloud.google.com/go/iam v1.1.1 // indirect cloud.google.com/go/storage v1.30.1 // indirect cosmossdk.io/errors v1.0.0-beta.7 // indirect - cosmossdk.io/math v1.0.0-rc.0 // indirect + cosmossdk.io/math v1.4.0 // indirect filippo.io/edwards25519 v1.0.0-rc.1 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -200,7 +200,7 @@ require ( modernc.org/sqlite v1.23.1 // indirect modernc.org/strutil v1.1.3 // indirect modernc.org/token v1.0.1 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) // Some replace copied from https://github.com/gjermundgaraba/ibctest/blob/110aa579a5a889b2af760bed4f3d90e0d2475e7a/go.mod @@ -215,3 +215,25 @@ replace ( github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.27 github.com/vedhavyas/go-subkey => github.com/strangelove-ventures/go-subkey v1.0.7 ) + +// Agoric-specific replacements: +replace ( + // We need a fork of cosmos-sdk until all of the differences are merged. + github.com/cosmos/cosmos-sdk => github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2.5 + + // Pick up an IAVL race fix. + github.com/cosmos/iavl => github.com/cosmos/iavl v0.19.7 + + // Use a version of ibc-go that is compatible with the above forks. + github.com/cosmos/ibc-go/v6 => github.com/agoric-labs/ibc-go/v6 v6.3.1-alpha.agoric.2 + +// use cometbft +// Use our fork at least until post-v0.34.14 is released with +// https://github.com/tendermint/tendermint/issue/6899 resolved. +// github.com/tendermint/tendermint => github.com/agoric-labs/cometbft v0.34.30-alpha.agoric.1 + +// For testing against a local cosmos-sdk, ibc-go, or cometbft +// github.com/cosmos/cosmos-sdk => ../../../forks/cosmos-sdk +// github.com/cosmos/ibc-go/v6 => ../../../forks/ibc-go/v6 +// github.com/tendermint/tendermint => ../../../forks/cometbft +) diff --git a/golang/cosmos/e2e_test/go.sum b/golang/cosmos/e2e_test/go.sum index fafb4941d6f..976eb7d51a3 100644 --- a/golang/cosmos/e2e_test/go.sum +++ b/golang/cosmos/e2e_test/go.sum @@ -51,8 +51,8 @@ cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7Biccwk collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= -cosmossdk.io/math v1.0.0-rc.0 h1:ml46ukocrAAoBpYKMidF0R2tQJ1Uxfns0yH8wqgMAFc= -cosmossdk.io/math v1.0.0-rc.0/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= +cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -85,6 +85,10 @@ github.com/StirlingMarketingGroup/go-namecase v1.0.0/go.mod h1:ZsoSKcafcAzuBx+sn github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= +github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2.5 h1:cwbONQaVbGEPzfVqvTY9PGcLZptlR9LTPunZ9La0QCg= +github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2.5/go.mod h1:Yny/YE+GJ+y/++UgvraITGzfLhXCnwETSWw3dAY5NDg= +github.com/agoric-labs/ibc-go/v6 v6.3.1-alpha.agoric.2 h1:vEzy4JaExzlWNHV3ZSVXEVZcRE9loEFUjieE2TXwDdI= +github.com/agoric-labs/ibc-go/v6 v6.3.1-alpha.agoric.2/go.mod h1:L1xcBjCLIHN7Wd9j6cAQvZertn56pq+eRGFZjRO5bsY= github.com/agoric-labs/interchaintest/v6 v6.0.1-agoriclabs h1:OG3Z7F9YsqFKCi2w/JZVhMWs+VWNsAEujy39/I2Clxo= github.com/agoric-labs/interchaintest/v6 v6.0.1-agoriclabs/go.mod h1:B/KLzyRfuZI+uFKDQe+AXrvjJKRBjl5gds27iOwT9mM= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= @@ -179,17 +183,13 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-alpha8 h1:d3pCRuMYYvGA5bM0ZbbjKn+AoQD4A7dyNG2wzwWalUw= github.com/cosmos/cosmos-proto v1.0.0-alpha8/go.mod h1:6/p+Bc4O8JKeZqe0VqUGTX31eoYqemTT4C1hLCWsO7I= -github.com/cosmos/cosmos-sdk v0.46.13 h1:LhL6WDBadczqBuCW0t5BHUzGQR3vbujdOYOfU0ORt+o= -github.com/cosmos/cosmos-sdk v0.46.13/go.mod h1:EfY521ATNEla8eJ6oJuZBdgP5+p360s7InnRqX+TWdM= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= -github.com/cosmos/iavl v0.19.6 h1:XY78yEeNPrEYyNCKlqr9chrwoeSDJ0bV2VjocTk//OU= -github.com/cosmos/iavl v0.19.6/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-go/v6 v6.2.0 h1:HKS5WNxQrlmjowHb73J9LqlNJfvTnvkbhXZ9QzNTU7Q= -github.com/cosmos/ibc-go/v6 v6.2.0/go.mod h1:+S3sxcNwOhgraYDJAhIFDg5ipXHaUnJrg7tOQqGyWlc= +github.com/cosmos/iavl v0.19.7 h1:ij32FaEnwxfEurtK0QKDNhTWFnz6NUmrI5gky/WnoY0= +github.com/cosmos/iavl v0.19.7/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= @@ -752,8 +752,8 @@ github.com/strangelove-ventures/go-subkey v1.0.7/go.mod h1:E34izOIEm+sZ1YmYawYRq github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -766,8 +766,8 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= @@ -1319,5 +1319,5 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/golang/cosmos/go.mod b/golang/cosmos/go.mod index 1e0919c6a99..1c871ea598c 100644 --- a/golang/cosmos/go.mod +++ b/golang/cosmos/go.mod @@ -187,7 +187,7 @@ replace ( // Agoric-specific replacements: replace ( // We need a fork of cosmos-sdk until all of the differences are merged. - github.com/cosmos/cosmos-sdk => github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2.4 + github.com/cosmos/cosmos-sdk => github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2.5 // Pick up an IAVL race fix. github.com/cosmos/iavl => github.com/cosmos/iavl v0.19.7 diff --git a/golang/cosmos/go.sum b/golang/cosmos/go.sum index 3428b14eeb3..de2b7576df7 100644 --- a/golang/cosmos/go.sum +++ b/golang/cosmos/go.sum @@ -232,8 +232,8 @@ github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBA github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/agoric-labs/cometbft v0.34.30-alpha.agoric.1 h1:tqCNL72pQXdUmBzgv1md5SN2U3K/PaYQ4qZ5pFv8v6w= github.com/agoric-labs/cometbft v0.34.30-alpha.agoric.1/go.mod h1:myvkihZD8eg9jKE3WFaugkNoL5nvEqlP7Jbjg98pCek= -github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2.4 h1:i5IgChQjTyWulV/y5NpVBB5qBJETQ59hYglod6vhok0= -github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2.4/go.mod h1:d7e4h+w7FNBNmE6ysp6duBVuQg67pqMtvsLwpT9ca3E= +github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2.5 h1:cwbONQaVbGEPzfVqvTY9PGcLZptlR9LTPunZ9La0QCg= +github.com/agoric-labs/cosmos-sdk v0.46.16-alpha.agoric.2.5/go.mod h1:Yny/YE+GJ+y/++UgvraITGzfLhXCnwETSWw3dAY5NDg= github.com/agoric-labs/cosmos-sdk/ics23/go v0.8.0-alpha.agoric.1 h1:2jvHI/2d+psWAZy6FQ0vXJCHUtfU3ZbbW+pQFL04arQ= github.com/agoric-labs/cosmos-sdk/ics23/go v0.8.0-alpha.agoric.1/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/agoric-labs/ibc-go/v6 v6.3.1-alpha.agoric.2 h1:vEzy4JaExzlWNHV3ZSVXEVZcRE9loEFUjieE2TXwDdI= From a10b0b5c75ed7929f8581cfad5a8faba33dfa4de Mon Sep 17 00:00:00 2001 From: Chris Hibbert Date: Fri, 13 Dec 2024 18:35:11 -0800 Subject: [PATCH 2/5] Save the contractKit for the auctioneer before overwriting it (#10694) refs: #10680 ## Description We misplaced the adminFacets that would allow us to manage Auctions after they've been replaced and were about to do it again. The auctions were [last upgraded](https://github.com/Agoric/agoric-sdk/blob/43345a561fbdf7621c369abb15e6839f7c696565/packages/inter-protocol/src/proposals/add-auction.js#L157) in `agoric-upgrade-16av`. That code fails to save the instance's adminFacet, and only stores the contractKit in bootstrap promise space under the name `auctioneerKit`, where it will be overwritten on upgrade. Our other contracts now save a copy of the `contractKit` in either `contractKits` or `governedContractKits`, indexed by the instance, so the facets will hang around. This saves the old auctioneer during upgrade so we can manage it later (upgrade, terminate, change parameters). ### Security Considerations Losing our last handle for vats is a problem. ### Scaling Considerations We're upgrading vats to deal with scaling. ### Documentation Considerations None. ### Testing Considerations there was a test in #10680 which looked for this kit in `governedContractKits`, but I commented it out when it didn't succeed. It succeeds now. ### Upgrade Considerations Yes. --- .../scripts/testing/recorded-retired-instances.js | 7 +++---- .../inter-protocol/src/proposals/add-auction.js | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/packages/builders/scripts/testing/recorded-retired-instances.js b/packages/builders/scripts/testing/recorded-retired-instances.js index 58bc79c969e..2dae21fd4af 100644 --- a/packages/builders/scripts/testing/recorded-retired-instances.js +++ b/packages/builders/scripts/testing/recorded-retired-instances.js @@ -12,7 +12,7 @@ const trace = makeTracer('RecordedRetired', true); export const testRecordedRetiredInstances = async ({ consume: { contractKits, - // governedContractKits, + governedContractKits, retiredContractInstances: retiredContractInstancesP, }, }) => { @@ -26,8 +26,7 @@ export const testRecordedRetiredInstances = async ({ assert(auctionIDs.length === 1); const auctionInstance = retiredContractInstances.get(auctionIDs[0]); trace({ auctionInstance }); - // I don't know why it's neither in governedContractKits nor contractKits - // assert(await E(governedContractKits).get(auctionInstance)); + assert(await E(governedContractKits).get(auctionInstance)); const committeeIDs = Array.from(retiredContractInstances.keys()).filter(k => k.startsWith('economicCommittee'), @@ -47,7 +46,7 @@ export const getManifestForRecordedRetiredInstances = () => { [testRecordedRetiredInstances.name]: { consume: { contractKits: true, - // governedContractKits: true, + governedContractKits: true, retiredContractInstances: true, }, }, diff --git a/packages/inter-protocol/src/proposals/add-auction.js b/packages/inter-protocol/src/proposals/add-auction.js index 76dd57a0c6b..2a55972a658 100644 --- a/packages/inter-protocol/src/proposals/add-auction.js +++ b/packages/inter-protocol/src/proposals/add-auction.js @@ -88,6 +88,20 @@ export const addAuction = async ( produceRetiredInstances, ); + const governedContractKits = await governedContractKitsP; + trace('has', governedContractKits.has(legacyKit.instance)); + if (governedContractKits.has(legacyKit.instance)) { + // bootstrap tests start having already run this upgrade. Actual upgrades on + // mainNet or testnets should start with the promiseSpace post upgrade-17, + // which doesn't have this entry in the map. + trace( + '⚠️ WARNING: not expected during chain upgrade. It IS normal during bootstrap tests', + ); + } else { + // @ts-expect-error The original auctioneerKit had everything it needs + governedContractKits.init(legacyKit.instance, legacyKit); + } + // save the auctioneer instance so we can manage it later const boardID = await E(board).getId(legacyKit.instance); const identifier = `auctioneer-${boardID}`; @@ -205,7 +219,6 @@ export const addAuction = async ( governedInstance, ); - const governedContractKits = await governedContractKitsP; governedContractKits.init(kit.instance, kit); auctionUpgradeNewInstance.resolve(governedInstance); auctionUpgradeNewGovCreator.resolve(kit.governorCreatorFacet); From 56a550a9f728ac21a748529003a8c4da70991dbc Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Mon, 16 Dec 2024 15:50:10 -0600 Subject: [PATCH 3/5] fix(cosmic-swingset): expect chain --halt-height exit status > 1 --- packages/cosmic-swingset/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cosmic-swingset/Makefile b/packages/cosmic-swingset/Makefile index 52908818da4..a83d831fc78 100644 --- a/packages/cosmic-swingset/Makefile +++ b/packages/cosmic-swingset/Makefile @@ -161,7 +161,9 @@ BLOCKS_TO_RUN=3 scenario2-run-chain-to-halt: t1/decentral-economy-config.json CHAIN_BOOTSTRAP_VAT_CONFIG="$$PWD/t1/decentral-economy-config.json" \ $(AGC) --home=t1/n0 start --log_level=warn --halt-height=$$(($(INITIAL_HEIGHT) + $(BLOCKS_TO_RUN))); \ - test "$$?" -eq 98 + status=$$?; \ + echo "chain halt status=$$status"; \ + test "$$status" -gt 1 echo ran to $(INITIAL_HEIGHT) + $(BLOCKS_TO_RUN) # Blow away all client state to try again without resetting the chain. From a66f8091b6b64dca5321fe9b760e2289a3cf8e86 Mon Sep 17 00:00:00 2001 From: Chris Hibbert Date: Mon, 16 Dec 2024 10:50:16 -0800 Subject: [PATCH 4/5] test: add proposal w/300 E(chainTimerService).getTimerBrand() calls (#10696) ## Description @warner asked for a proposal that would ensure there were several more (300 was settled on) arbitrary calls in order to provoke bring-out-your-dead. ### Security Considerations test environments only: aimed at mainFork. ### Scaling Considerations No implications ### Documentation Considerations Unnecessary ### Testing Considerations For test environments. ### Upgrade Considerations None. --- .../builders/scripts/testing/provokeBOYD.js | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 packages/builders/scripts/testing/provokeBOYD.js diff --git a/packages/builders/scripts/testing/provokeBOYD.js b/packages/builders/scripts/testing/provokeBOYD.js new file mode 100644 index 00000000000..5bc2c232dae --- /dev/null +++ b/packages/builders/scripts/testing/provokeBOYD.js @@ -0,0 +1,54 @@ +/** + * @file call getTimerBrand() 300 times in hopes of provoking BOYD. This is + * intended for tests on mainFork for upgrade-18. If there's a similar need in + * other tests, it can be included there as well. There would be no value in + * including it in an upgrade of MainNet; it just spins cycles to provoke + * garbage collection. + */ + +import { makeTracer } from '@agoric/internal'; +import { E } from '@endo/far'; + +/// +/** @import {Instance} from '@agoric/zoe/src/zoeService/utils.js'; */ + +const trace = makeTracer('provokeBOYD', true); + +/** + * @param {BootstrapPowers} powers + */ +export const provokeBOYD = async ({ consume: { chainTimerService } }) => { + trace(provokeBOYD.name); + await null; + + for (let i = 0; i < 300; i += 1) { + await E(chainTimerService).getTimerBrand(); + } + trace('done'); +}; +harden(provokeBOYD); + +export const getManifestForProvokeBOYD = () => { + return { + manifest: { + [provokeBOYD.name]: { + consume: { chainTimerService: true }, + }, + }, + }; +}; + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */ +export const defaultProposalBuilder = async () => + harden({ + sourceSpec: '@agoric/builders/scripts/testing/provokeBOYD.js', + getManifestCall: ['getManifestForProvokeBOYD'], + }); + +/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */ +export default async (homeP, endowments) => { + const dspModule = await import('@agoric/deploy-script-support'); + const { makeHelpers } = dspModule; + const { writeCoreEval } = await makeHelpers(homeP, endowments); + await writeCoreEval(provokeBOYD.name, defaultProposalBuilder); +}; From 540d4b194453b4696fc476845be20890a8f67399 Mon Sep 17 00:00:00 2001 From: Mujahid Khan <106528609+mujahidkay@users.noreply.github.com> Date: Tue, 17 Dec 2024 18:32:18 +0500 Subject: [PATCH 5/5] test: skip exitOffer tool reclaims stuck payment --- a3p-integration/proposals/z:acceptance/wallet.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/a3p-integration/proposals/z:acceptance/wallet.test.js b/a3p-integration/proposals/z:acceptance/wallet.test.js index 7ee2a878202..b41e46af13f 100644 --- a/a3p-integration/proposals/z:acceptance/wallet.test.js +++ b/a3p-integration/proposals/z:acceptance/wallet.test.js @@ -41,7 +41,7 @@ test.serial(`send invitation via namesByAddress`, async t => { ); }); -test.serial('exitOffer tool reclaims stuck payment', async t => { +test.skip('exitOffer tool reclaims stuck payment', async t => { const offerId = 'bad-invitation-15'; // offer submitted on proposal upgrade-15 with an incorrect method name const from = 'gov1';