Giter Club home page Giter Club logo

Comments (4)

Daryl-L avatar Daryl-L commented on July 25, 2024

Deploy the Node

There is something wrong in Mac.

kuai node start
<jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
<jemalloc>: (This is the expected behaviour if you are running under QEMU)

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^
AxiosError: socket hang up
    at connResetException (node:internal/errors:720:14)
    at Socket.socketOnEnd (node:_http_client:525:23)
    at Socket.emit (node:events:529:35)
    at endReadableNT (node:internal/streams/readable:1368:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: 'ECONNRESET',
...
  1. kuai node start --port 8200 the port is useless in this command.
  2. Users don't know the private key of the Node, and they should to enter into the container to find the private key from the config file of ckb.
  3. When the node starts, there is no omnilock script in config. Should users to add the config to predefined.config of lumos in the devnet?

from kuai.

Daryl-L avatar Daryl-L commented on July 25, 2024

Deploy the Contract

  1. The version of capsule in capsule.toml is 0.9.0 which is generated in running kuai init. So maybe it is necessary to tell users to upgrade the capsule to the version 0.9.0.
cargo install ckb-capsule --git https://github.com/nervosnetwork/capsule.git --tag v0.9.0
  1. The ckb-cli should be installed before deploying the contract, and the private key should be imported to the ckb-cli.
ckb-cli account import  --privkey-path  ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80.json 
Password: 
address:
  mainnet: ckb1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsq2ml7ehvnfcm86xc8xjezyvcnvu5w576rgmcuk83
  testnet: ckt1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsq2ml7ehvnfcm86xc8xjezyvcnvu5w576rg42hedf
address(deprecated):
  mainnet: ckb1qyq9hlanwexn3k05dswd9jyge3xeegafa5xs7nt0dl
  testnet: ckt1qyq9hlanwexn3k05dswd9jyge3xeegafa5xsrk4spr
lock_arg: 0x5bffb3764d38d9f46c1cd2c888cc4d9ca3a9ed0d
  1. It is not easy for most fresh users to build the contract.json by the transaction hash which is returned from the transcation of contract deployment.
{
  "kuai-mvp-contract": {
    "depType": "code",
    "outPoint": {
      "txHash": "0x005a153ec6a35adbc8d82544ae11d8c6f8c0601fc9059f8a872e01f638fc9f62",
      "index": "0x0"
    },
    "script": {
      "codeHash": "0x1a3de2a61b454e8492a775cf438748e362e71930170bec90c4e6b79e4dd7ea3c",
      "hashType": "type",
      "args": "0x"
    }
  }
}

from kuai.

Daryl-L avatar Daryl-L commented on July 25, 2024

The MVP

  1. the npm run dev could exist caused by the timeout of calling ckb.
npm run dev

> kuai-mvp-dapp@0.0.1-alpha.2 dev
> ts-node src/main.ts

kuai app listening to http://127.0.0.1:3000
Registry `find` catch error Error: No matching bindings found for serviceIdentifier: local://0xf329effd1c475a2978453c8600e1eaf0bc2087ee093c3ee64cc96ec6847752cb/type/0x01f39fd6e51aad88f6f4ce6ab8827279cfffb9226600/record
    at _validateActiveBindingCount (/Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/planning/planner.ts:113:15)
    at _getActiveBindings (/Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/planning/planner.ts:91:3)
    at _createSubRequests (/Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/planning/planner.ts:146:22)
    at plan (/Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/planning/planner.ts:240:5)
    at /Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/container/container.ts:623:25
    at Container._get (/Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/container/container.ts:574:37)
    at Container._getButThrowIfAsync (/Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/container/container.ts:580:25)
    at Container.get (/Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/container/container.ts:325:17)
    at Registry.<anonymous> (/Users/guopenglin/test_kuai/kuai/packages/models/lib/actor/registry.js:25:87)
    at Registry.findOrBind (/Users/guopenglin/test_kuai/kuai/packages/models/lib/actor/registry.js:50:85)
Registry `find` catch error Error: No matching bindings found for serviceIdentifier: local://0x01f39fd6e51aad88f6f4ce6ab8827279cfffb9226600/omnilock
    at _validateActiveBindingCount (/Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/planning/planner.ts:113:15)
    at _getActiveBindings (/Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/planning/planner.ts:91:3)
    at _createSubRequests (/Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/planning/planner.ts:146:22)
    at plan (/Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/planning/planner.ts:240:5)
    at /Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/container/container.ts:623:25
    at Container._get (/Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/container/container.ts:574:37)
    at Container._getButThrowIfAsync (/Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/container/container.ts:580:25)
    at Container.get (/Users/guopenglin/test_kuai/kuai/node_modules/inversify/src/container/container.ts:325:17)
    at Registry.<anonymous> (/Users/guopenglin/test_kuai/kuai/packages/models/lib/actor/registry.js:25:87)
    at Registry.findOrBind (/Users/guopenglin/test_kuai/kuai/packages/models/lib/actor/registry.js:50:85)
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "AxiosError: timeout of 30000ms exceeded".] {
  code: 'ERR_UNHANDLED_REJECTION'
}
npm ERR! Lifecycle script `dev` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: kuai-mvp-dapp@0.0.1-alpha.2 
npm ERR!   at location: /Users/guopenglin/test_kuai/kuai/packages/samples/mvp-dapp
  1. Unit test should be added to the MVP project.
  2. It is not timely for model to update the chainData when call the api /meta/:address.
  3. Is it necessary to explain how does the model update the data?
  4. It is convenient for users to learn how to write unit tests by adding a valid address of /load:address` in mvp unit tests.
  5. Users may need to learn the moleculec which is used in the MVP contract.
  6. The MVP contract may use the moleculec, but I did not see any serializing and deserializing in the project. Is it a json string?

from kuai.

Daryl-L avatar Daryl-L commented on July 25, 2024

Something more in kuai/models

  1. Comments should be added into the Store class to explain the meanings of the parameters.

  2. > extends Actor<GetStorageStruct<StructSchema>, MessagePayload<StoreMessage>> {
    protected states: Record<OutPointString, GetStorageStruct<StructSchema>> = {}
    protected chainData: Record<OutPointString, UpdateStorageValue> = {}
    protected outPointStrings: OutPointString[] = []
    protected usedOutPointStrings = new Set<OutPointString>()
    protected options?: Option
    protected schemaOption: GetStorageOption<StructSchema>
    protected cellPatterns: CellPattern[] = []
    protected schemaPattern?: SchemaPattern
    protected mergedState?: GetStorageStruct<StructSchema>
    protected mergedStatesFieldOutPoint: Record<string, OutPointString> = {}
    protected isSection = false

from kuai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.