Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
326 stars 206 forks source link

re-adopt npm release of cosmology/telescope #10112

Open turadg opened 1 day ago

turadg commented 1 day ago

What is the Problem Being Solved?

We've had to fork the project to https://github.com/agoric-labs/telescope/tree/agoric-safe . Since then the Cosmology folks have released 1.10.0 to incorporate the changes.

It's best if we're on the NPM release so let's get back.

Description of the Design

in codegen.cjs,

        customTypes: {
          // Use @endo/base64 instead of globals
          base64Lib: '@endo/base64',
          // Use inbuilt Decimal type that uses BigInt instead of @cosmjs/math that uses bn.js
          usePatchedDecimal: true,
        },

Then yarn codegen && yarn build && yarn test. Unfortunately with just those changes there is this problem,

  helpers › toRequestQueryJson

  test/helpers.test.js:83

   82:   t.like(
   83:     toRequestQueryJson(
   84:       cosmos.bank.v1beta1.QueryBalanceRequest.toProtoMsg({

  Error thrown in test:

  Error {
    message: 'Invalid base64 character 10 in string <unknown>',
  }

So there is some additional work to figure out whether we're using it wrong or need other changes upstream.

Security Considerations

Scaling Considerations

Test Plan

Upgrade Considerations

Zetazzz commented 1 day ago

Hi, please excuse me, I can't find lines and the in the branch agoric-safe:

test/helpers.test.js:83

82: t.like( 83: toRequestQueryJson( 84: cosmos.bank.v1beta1.QueryBalanceRequest.toProtoMsg({

Could you please provide me a branch that I can debug on?

Thank you very much!

turadg commented 20 hours ago

Thanks for looking into it!

To repro,

git checkout origin 10112/npm-telescope
cd packages/cosmic-proto
yarn build && yarn test

To test with another source of telescope, these will update the codgen that's being built:

yarn install && yarn codegen