Skip to content

Commit

Permalink
shrink Fast USDC core eval bundle (#11004)
Browse files Browse the repository at this point in the history
_incidental_

## Description

https://ping.pub/agoric/gov/87 had a surprisingly large core-eval bundle: https://github.com/Agoric/agoric-sdk/releases/tag/fast-usdc-beta-1

The reason was that it imported typeguards from the barrel export of `@agoric/orchestration`, which entrained`@agoric/cosmic-proto`. All it really needed was `typeGuards.js` so this imports that module by deep import.

Eventually we'll want an `"exports"` map for the package but that's out of scope.


### Security Considerations
n/a

### Scaling Considerations
none

### Documentation Considerations
none

### Testing Considerations

```sh
cd a3p-integration/proposals/b:beta-fast-usdc
../../scripts/build-submission.sh fast-usdc/start-fast-usdc.build.js submission --net A3P_INTEGRATION --noNoble
```

**master**
total size: 1636325

**PR**
total size: 586271

(64% reduction)

### Upgrade Considerations
none
  • Loading branch information
mergify[bot] authored Feb 13, 2025
2 parents 9db2909 + e41132d commit 8ef3fde
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion a3p-integration/scripts/build-submission.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ shift || true
sdkroot=$(git rev-parse --show-toplevel)
(
cd "$sdkroot"
yarn agoric run "packages/builders/scripts/$builderScript" "$@"
yarn agoric run --verbose "packages/builders/scripts/$builderScript" "$@"
)

# Create and populate the submission directory.
Expand Down
2 changes: 1 addition & 1 deletion packages/fast-usdc/src/type-guards.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
CosmosChainInfoShape,
DenomDetailShape,
DenomShape,
} from '@agoric/orchestration';
} from '@agoric/orchestration/src/typeGuards.js';
import { PendingTxStatus } from './constants.js';

/**
Expand Down
12 changes: 4 additions & 8 deletions packages/orchestration/src/cosmos-api.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { AnyJson, TypedJson, JsonSafe } from '@agoric/cosmic-proto';
import type { AnyJson, JsonSafe, TypedJson } from '@agoric/cosmic-proto';
import type { Coin } from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js';
import type {
Delegation,
DelegationResponse,
Redelegation,
RedelegationResponse,
UnbondingDelegation,
} from '@agoric/cosmic-proto/cosmos/staking/v1beta1/staking.js';
Expand All @@ -18,7 +16,7 @@ import type {
RequestQuery,
ResponseQuery,
} from '@agoric/cosmic-proto/tendermint/abci/types.js';
import type { Brand, Purse, Payment, Amount } from '@agoric/ertp/src/types.js';
import type { Amount, Payment } from '@agoric/ertp/src/types.js';
import type { Port } from '@agoric/network';
import type {
IBCChannelID,
Expand All @@ -34,10 +32,8 @@ import type {
LocalIbcAddress,
RemoteIbcAddress,
} from '@agoric/vats/tools/ibc-utils.js';
import type { QueryDelegationTotalRewardsResponse } from '@agoric/cosmic-proto/cosmos/distribution/v1beta1/query.js';
import type { Coin } from '@agoric/cosmic-proto/cosmos/base/v1beta1/coin.js';
import type { AmountArg, ChainAddress, Denom, DenomAmount } from './types.js';
import { PFM_RECEIVER } from './exos/chain-hub.js';
import type { AmountArg, ChainAddress, Denom, DenomAmount } from './types.js';

/** An address for a validator on some blockchain, e.g., cosmos, eth, etc. */
export type CosmosValidatorAddress = ChainAddress & {
Expand Down

0 comments on commit 8ef3fde

Please sign in to comment.