console doesn't display record fields as would be expected #41

Open
opened 2023-10-18 01:48:02 +00:00 by zramsay · 0 comments
Member

Currently, only "Type, Version, Created" is displayed in the console:
Screenshot 2023-10-17 at 21 19 36

from a sample record that looks like:

record:
  type: WebsiteRegistrationRecord
  url: 'https://cerc.io'
  repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D
  build_artifact_cid: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9
  tls_cert_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
  version: 1.0.23

It was deployed using this demo

Looking at this console code

          <TableCell onClick={sortBy('attributes.type')} size='medium'>Type</TableCell>
          <TableCell onClick={sortBy('names[0]')}>Registered Names</TableCell>
          <TableCell onClick={sortBy('attributes.version')} size='small'>Version</TableCell>
          <TableCell onClick={sortBy('attributes.name')}>Display Name</TableCell>
          <TableCell onClick={sortBy('createTime')} size='small'>Created</TableCell>
          <TableCell onClick={sortBy('attributes.package')}>Package</TableCell>

I expected to be able to modify the record to include:

record:
  names: [ 'alias1', 'alias2' ]
  name: 'MyWatcher'
  package: 'some other description'

then publish it, and have those values filled in the columns of the console. Instead, when running the modified script from the demo, the error looks like:

Balance is: 99998999999999990996400000
Created bond with id: ed45112b07e51d12f5c21f13a67a6eed56b57e63aa30d50dbb6517f34689e204

github.com/cerc-io/laconicd/x/registry/keeper.Keeper.ProcessSetRecord
	github.com/cerc-io/laconicd/x/registry/keeper/keeper.go:265
github.com/cerc-io/laconicd/x/registry/keeper.msgServer.SetRecord
	github.com/cerc-io/laconicd/x/registry/keeper/msg_server.go:28
github.com/cerc-io/laconicd/x/registry/types._Msg_SetRecord_Handler.func1
	github.com/cerc-io/laconicd/x/registry/types/tx.pb.go:1346
github.com/cosmos/cosmos-sdk/baseapp.(*MsgServiceRouter).RegisterService.func2.1
	github.com/cosmos/cosmos-sdk@v0.46.7/baseapp/msg_service_router.go:113
github.com/cerc-io/laconicd/x/registry/types._Msg_SetRecord_Handler
	github.com/cerc-io/laconicd/x/registry/types/tx.pb.go:1348
github.com/cosmos/cosmos-sdk/baseapp.(*MsgServiceRouter).RegisterService.func2
	github.com/cosmos/cosmos-sdk@v0.46.7/baseapp/msg_service_router.go:126
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runMsgs
	github.com/cosmos/cosmos-sdk@v0.46.7/baseapp/baseapp.go:779
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx
	github.com/cosmos/cosmos-sdk@v0.46.7/baseapp/baseapp.go:719
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).DeliverTx
	github.com/cosmos/cosmos-sdk@v0.46.7/baseapp/abci.go:283
github.com/tendermint/tendermint/abci/client.(*localClient).DeliverTxAsync
	github.com/tendermint/tendermint@v0.34.24/abci/client/local_client.go:93
github.com/tendermint/tendermint/proxy.(*appConnConsensus).DeliverTxAsync
	github.com/tendermint/tendermint@v0.34.24/proxy/app_conn.go:85
github.com/tendermint/tendermint/state.execBlockOnProxyApp
	github.com/tendermint/tendermint@v0.34.24/state/execution.go:320
github.com/tendermint/tendermint/state.(*BlockExecutor).ApplyBlock
	github.com/tendermint/tendermint@v0.34.24/state/execution.go:140
github.com/tendermint/tendermint/consensus.(*State).finalizeCommit
	github.com/tendermint/tendermint@v0.34.24/consensus/state.go:1654
github.com/tendermint/tendermint/consensus.(*State).tryFinalizeCommit
	github.com/tendermint/tendermint@v0.34.24/consensus/state.go:1563
github.com/tendermint/tendermint/consensus.(*State).enterCommit.func1
	github.com/tendermint/tendermint@v0.34.24/consensus/state.go:1498
github.com/tendermint/tendermint/consensus.(*State).enterCommit
	github.com/tendermint/tendermint@v0.34.24/consensus/state.go:1536
github.com/tendermint/tendermint/consensus.(*State).addVote
	github.com/tendermint/tendermint@v0.34.24/consensus/state.go:2150
github.com/tendermint/tendermint/consensus.(*State).tryAddVote
	github.com/tendermint/tendermint@v0.34.24/consensus/state.go:1948
github.com/tendermint/tendermint/consensus.(*State).handleMsg
	github.com/tendermint/tendermint@v0.34.24/consensus/state.go:853
github.com/tendermint/tendermint/consensus.(*State).receiveRoutine
	github.com/tendermint/tendermint@v0.34.24/consensus/state.go:780
failed to execute message; message index: 0: Invalid signature.: unauthorized
laconic cns record publish

Register record.

Options:
      --version   Show version number                                  [boolean]
  -v, --verbose   Verbose output                      [boolean] [default: false]
  -c, --config    Config file path.             [string] [default: "config.yml"]
  -o, --output    Gives output in json format when specified.           [string]
      --user-key                                                        [string]
      --tx-key                                                          [string]
      --bond-id                                                         [string]
      --chain-id                                                        [string]
  -f, --filename
      --id                                                              [string]
      --address                                                         [string]
      --gas                                                             [string]
      --fees                                                            [string]
      --help      Show help                                            [boolean]

Error: Unable to write to laconicd.
    at Registry.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/@cerc-io/laconic-sdk/dist/index.js:469:23)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/share/.config/yarn/global/node_modules/@cerc-io/laconic-sdk/dist/index.js:5:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Note: to get this behaviour, you must bump to version or change something from an existing record, otherwise the script will tell you you've published a record when in fact you haven't. Which is better than overwriting it and not tell you.

Currently, only "Type, Version, Created" is displayed in the console: <img width="1433" alt="Screenshot 2023-10-17 at 21 19 36" src="https://github.com/cerc-io/laconic-console/assets/8304391/d67a932d-96e4-474e-bce2-b4fb61913e3f"> from a sample record that looks like: ``` record: type: WebsiteRegistrationRecord url: 'https://cerc.io' repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D build_artifact_cid: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 tls_cert_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR version: 1.0.23 ``` It was deployed using [this demo](https://github.com/cerc-io/stack-orchestrator/blob/main/docs/laconicd-with-console.md) Looking at [this console code](https://github.com/cerc-io/laconic-console/blob/83fca9efe9f3288d5f34caef805fdde3634d62a1/src/containers/panels/registry/RegistryRecords.js#L86) ``` <TableCell onClick={sortBy('attributes.type')} size='medium'>Type</TableCell> <TableCell onClick={sortBy('names[0]')}>Registered Names</TableCell> <TableCell onClick={sortBy('attributes.version')} size='small'>Version</TableCell> <TableCell onClick={sortBy('attributes.name')}>Display Name</TableCell> <TableCell onClick={sortBy('createTime')} size='small'>Created</TableCell> <TableCell onClick={sortBy('attributes.package')}>Package</TableCell> ``` I expected to be able to modify the record to include: ``` record: names: [ 'alias1', 'alias2' ] name: 'MyWatcher' package: 'some other description' ``` then publish it, and have those values filled in the columns of the console. Instead, when running the modified script from the demo, the error looks like: ``` Balance is: 99998999999999990996400000 Created bond with id: ed45112b07e51d12f5c21f13a67a6eed56b57e63aa30d50dbb6517f34689e204 github.com/cerc-io/laconicd/x/registry/keeper.Keeper.ProcessSetRecord github.com/cerc-io/laconicd/x/registry/keeper/keeper.go:265 github.com/cerc-io/laconicd/x/registry/keeper.msgServer.SetRecord github.com/cerc-io/laconicd/x/registry/keeper/msg_server.go:28 github.com/cerc-io/laconicd/x/registry/types._Msg_SetRecord_Handler.func1 github.com/cerc-io/laconicd/x/registry/types/tx.pb.go:1346 github.com/cosmos/cosmos-sdk/baseapp.(*MsgServiceRouter).RegisterService.func2.1 github.com/cosmos/cosmos-sdk@v0.46.7/baseapp/msg_service_router.go:113 github.com/cerc-io/laconicd/x/registry/types._Msg_SetRecord_Handler github.com/cerc-io/laconicd/x/registry/types/tx.pb.go:1348 github.com/cosmos/cosmos-sdk/baseapp.(*MsgServiceRouter).RegisterService.func2 github.com/cosmos/cosmos-sdk@v0.46.7/baseapp/msg_service_router.go:126 github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runMsgs github.com/cosmos/cosmos-sdk@v0.46.7/baseapp/baseapp.go:779 github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx github.com/cosmos/cosmos-sdk@v0.46.7/baseapp/baseapp.go:719 github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).DeliverTx github.com/cosmos/cosmos-sdk@v0.46.7/baseapp/abci.go:283 github.com/tendermint/tendermint/abci/client.(*localClient).DeliverTxAsync github.com/tendermint/tendermint@v0.34.24/abci/client/local_client.go:93 github.com/tendermint/tendermint/proxy.(*appConnConsensus).DeliverTxAsync github.com/tendermint/tendermint@v0.34.24/proxy/app_conn.go:85 github.com/tendermint/tendermint/state.execBlockOnProxyApp github.com/tendermint/tendermint@v0.34.24/state/execution.go:320 github.com/tendermint/tendermint/state.(*BlockExecutor).ApplyBlock github.com/tendermint/tendermint@v0.34.24/state/execution.go:140 github.com/tendermint/tendermint/consensus.(*State).finalizeCommit github.com/tendermint/tendermint@v0.34.24/consensus/state.go:1654 github.com/tendermint/tendermint/consensus.(*State).tryFinalizeCommit github.com/tendermint/tendermint@v0.34.24/consensus/state.go:1563 github.com/tendermint/tendermint/consensus.(*State).enterCommit.func1 github.com/tendermint/tendermint@v0.34.24/consensus/state.go:1498 github.com/tendermint/tendermint/consensus.(*State).enterCommit github.com/tendermint/tendermint@v0.34.24/consensus/state.go:1536 github.com/tendermint/tendermint/consensus.(*State).addVote github.com/tendermint/tendermint@v0.34.24/consensus/state.go:2150 github.com/tendermint/tendermint/consensus.(*State).tryAddVote github.com/tendermint/tendermint@v0.34.24/consensus/state.go:1948 github.com/tendermint/tendermint/consensus.(*State).handleMsg github.com/tendermint/tendermint@v0.34.24/consensus/state.go:853 github.com/tendermint/tendermint/consensus.(*State).receiveRoutine github.com/tendermint/tendermint@v0.34.24/consensus/state.go:780 failed to execute message; message index: 0: Invalid signature.: unauthorized laconic cns record publish Register record. Options: --version Show version number [boolean] -v, --verbose Verbose output [boolean] [default: false] -c, --config Config file path. [string] [default: "config.yml"] -o, --output Gives output in json format when specified. [string] --user-key [string] --tx-key [string] --bond-id [string] --chain-id [string] -f, --filename --id [string] --address [string] --gas [string] --fees [string] --help Show help [boolean] Error: Unable to write to laconicd. at Registry.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/@cerc-io/laconic-sdk/dist/index.js:469:23) at Generator.next (<anonymous>) at fulfilled (/usr/local/share/.config/yarn/global/node_modules/@cerc-io/laconic-sdk/dist/index.js:5:58) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) ``` Note: to get this behaviour, you must bump to version or change something from an existing record, otherwise the script will tell you you've published a record when in fact you haven't. Which is better than overwriting it and not tell you.
roysc self-assigned this 2023-10-27 23:02:45 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/laconic-console#41
No description provided.