GithubHelp home page GithubHelp logo

Comments (22)

linh2931 avatar linh2931 commented on July 22, 2024 1

Thanks for extra information. I tracked the problem to the new nested container feature. After I disabled it, all tests passed. I am going to work out a fix:

$ zeus test ipfsconsumer --services ipfs --chain eos --single-chain
⚓ Setup environment 01-dapp-client.js
⚓ Setup environment 02-a-eos-local-nodeos.js
⚓ Setup environment 05-a-eos-local-bios.js
⚡ uploaded contract old_eosio.bios to account eosio
⚡ uploaded contract eosio.token to account eosio.token
⚡ uploaded contract eosio.msig to account eosio.msig
⚡ uploaded contract old_eosio.system to account eosio
⚓ Setup environment 15-a-eos-demux.js
☁️ Running service: demux port: 3195
☁️ Running service: demux port: 6390
⚓ Setup environment 15-ipfs-dameon.js
☁️ Running service: ipfs-daemon port: 3199
⚓ Setup environment 20-a-eos-local-dapp-services.js
⚡ uploaded contract dappservices to account dappservices
☁️ Running service: dapp-services-node port: 13015
☁️ Running service: dapp-services-node port: 26030
⚓ Setup environment 21-a-eos-local-services-all-dapp-services.js
⚡ uploaded contract dappservices to account dappservices
☁️ Running service: ipfs-dapp-service-node port: 13115
☁️ Running service: ipfs-dapp-service-node port: 26230
⚡ Running tests

> [email protected] test
> mocha --require=dotenv/config --exit --timeout 1000000 --color



  IPFS Service Test Contract
⚡ uploaded contract ipfsconsumer to account test1ipfs
⚡ uploaded contract ipfsconsumer to account tstbakcomp
⚡ uploaded contract ipfsconsumer to account test2ipfs
(node:704297) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
    ✔ IPFS Write (438ms)
    ✔ Cleanup (15437ms)
    ✔ IPFS Read (1467ms)
    ✔ dapp::multi_index Get Available Key (2512ms)
    ✔ dapp::multi_index Resize Should Fail (156ms)
    ✔ dapp::multi_index uint64_t Primary Key (4488ms)
    ✔ dapp::multi_index uint128_t Primary Key (862ms)
    ✔ dapp::multi_index checksum256 Primary Key (941ms)
    ✔ dapp::multi_index checksum256 Get Available Key (579ms)
    ✔ doesnt overwrite data when buckets collide (4454ms)
    ✔ dapp::multi_index delayed cleanup (12584ms)
    ✔ IPFS Save Manifest
    ✔ IPFS Clear (2078ms)
    ✔ IPFS Load Manifest (1382ms)
    ✔ IPFS without custom dsp permissions (backwards compatibility) (1494ms)
    ✔ IPFS Read Third Party (22511ms)


  16 passing (2m)

✔️ tests ok

from cdt.

stephenpdeos avatar stephenpdeos commented on July 22, 2024

@NatPDeveloper can you supply a simpler example that replicates this issue that builds directly with cdt-cpp and does not require zeus sdk?

from cdt.

NatPDeveloper avatar NatPDeveloper commented on July 22, 2024

@NatPDeveloper can you supply a simpler example that replicates this issue that builds directly with cdt-cpp and does not require zeus sdk?

I could but it would take a while to put together with the cleos commands and all the associated smart contract dependencies. I think zeus is the best option for the moment. Try it out and let me know if you have any issues.

I would recommend using:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:        18.04
Codename:       bionic

node -v
v16.14.2

from cdt.

linh2931 avatar linh2931 commented on July 22, 2024

@NatPDeveloper I tried to follow your steps to reproduce the problem but failed with zeus unbox. Can you send us simplified contracts so we can reproduce the problem and fix it.

zeus unbox ipfs-dapp-service
...
Installing newly added packages to ./package.json

{ Error: exec failed
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/@liquidapps/zeus-cmd/lib/helpers/_exec.js:51:19)
    at ChildProcess.emit (events.js:198:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
...
code: 1 }
{ Error: ENOTEMPTY: directory not empty, rmdir '/home/lh/work/ipfs-dapp-service/zeus_boxes/ipfs-dapp-service'
    at Object.rmdirSync (fs.js:684:3)
    at handler (/usr/local/lib/node_modules/@liquidapps/zeus-cmd/lib/cmds/unbox.js:364:8)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  errno: -39,
  syscall: 'rmdir',
  code: 'ENOTEMPTY',
  path:
   '/home/lh/work/ipfs-dapp-service/zeus_boxes/ipfs-dapp-service' }
...

from cdt.

NatPDeveloper avatar NatPDeveloper commented on July 22, 2024

zeus unbox ipfs-dapp-service

Hm that's odd. What OS/version of nodejs is this? That step is just installing the current packages. You could try npm i directly as well.

from cdt.

linh2931 avatar linh2931 commented on July 22, 2024

I am on Ubuntu 20.04.

node -v
v10.19.0

Not familiar with Javascript side. Did you mean npm i ipfs-dapp-service?

from cdt.

NatPDeveloper avatar NatPDeveloper commented on July 22, 2024

I am on Ubuntu 20.04.

node -v
v10.19.0

Not familiar with Javascript side. Did you mean npm i ipfs-dapp-service?

I see. I would suggest nodejs version 16. You can install this with nvm (node version manager).

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash

# copy and paste the suggested output will look like this

# export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

# then install nodejs 16
nvm install 16
nvm use 16

# inside ipfs-dapp-service folder
rm -rf node_modules
zeus unbox # will reinstall all necessary dependencies

You will also need make and cmake if not installed

apt-get install -y cmake make

from cdt.

linh2931 avatar linh2931 commented on July 22, 2024

I tried several rounds but still failed. I installed node v16.17.0, removed ipfs-dapp-service, rerun zeus unbox ipfs-dapp-service, modified several files to change ${EOSIO_CDT_ROOT}/lib/cmake/eosio.cdt/EosioWasmToolchain.cmake to ${EOSIO_CDT_ROOT}/lib/cmake/cdt/CDTWasmToolchain.cmake. Run zeus compile; it failed. Manually run cmake, it failed too.

The fastest way is for you to provide us a smart contract to reproduce the problem.

zeus compile
⚗️ Generating ./contracts/eos/dappservices/ipfs.hpp ipfs
⚗️ Generating ./contracts/eos/dappservices/log.hpp log

⚡  EOSIO CONTRACT COMPILING

☹️ eos contracts compile failed

Manually,

ipfs-dapp-service/contracts/eos$ cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: ~/work/ipfs-dapp-service/contracts/eos
~/work/ipfs-dapp-service/contracts/eos$ make
~/work/ipfs-dapp-service/contracts/eos$ make
Scanning dependencies of target ipfsconsumer
[  1%] Creating directories for 'ipfsconsumer'
[  3%] No download step for 'ipfsconsumer'
[  5%] No patch step for 'ipfsconsumer'
[  7%] No update step for 'ipfsconsumer'
[  9%] Performing configure step for 'ipfsconsumer'
-- Setting up CDT Wasm Toolchain 3.0.0-rc2 at /home/lh/work/cdt-rel-3.0/build
-- Setting up CDT Wasm Toolchain 3.0.0-rc2 at /home/lh/work/cdt-rel-3.0/build
-- The C compiler identification is Clang 9.0.1
-- The CXX compiler identification is Clang 9.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:6 (find_package):
  By not providing "Findeosio.cdt.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "eosio.cdt", but CMake did not find one.

  Could not find a package configuration file provided by "eosio.cdt" with
  any of the following names:

    eosio.cdtConfig.cmake
    eosio.cdt-config.cmake

  Add the installation prefix of "eosio.cdt" to CMAKE_PREFIX_PATH or set
  "eosio.cdt_DIR" to a directory containing one of the above files.  If
  "eosio.cdt" provides a separate development package or SDK, be sure it has
  been installed.

from cdt.

NatPDeveloper avatar NatPDeveloper commented on July 22, 2024

I tried several rounds but still failed. I installed node v16.17.0, removed ipfs-dapp-service, rerun zeus unbox ipfs-dapp-service, modified several files to change EOSIOCDTROOT/lib/cmake/eosio.cdt/EosioWasmToolchain.cmaketo{EOSIO_CDT_ROOT}/lib/cmake/cdt/CDTWasmToolchain.cmake. Run zeus compile; it failed. Manually run cmake, it failed too.

The fastest way is for you to provide us a smart contract to reproduce the problem.

zeus compile
⚗️ Generating ./contracts/eos/dappservices/ipfs.hpp ipfs
⚗️ Generating ./contracts/eos/dappservices/log.hpp log

⚡  EOSIO CONTRACT COMPILING

☹️ eos contracts compile failed

Manually,

ipfs-dapp-service/contracts/eos$ cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: ~/work/ipfs-dapp-service/contracts/eos
~/work/ipfs-dapp-service/contracts/eos$ make
~/work/ipfs-dapp-service/contracts/eos$ make
Scanning dependencies of target ipfsconsumer
[  1%] Creating directories for 'ipfsconsumer'
[  3%] No download step for 'ipfsconsumer'
[  5%] No patch step for 'ipfsconsumer'
[  7%] No update step for 'ipfsconsumer'
[  9%] Performing configure step for 'ipfsconsumer'
-- Setting up CDT Wasm Toolchain 3.0.0-rc2 at /home/lh/work/cdt-rel-3.0/build
-- Setting up CDT Wasm Toolchain 3.0.0-rc2 at /home/lh/work/cdt-rel-3.0/build
-- The C compiler identification is Clang 9.0.1
-- The CXX compiler identification is Clang 9.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:6 (find_package):
  By not providing "Findeosio.cdt.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "eosio.cdt", but CMake did not find one.

  Could not find a package configuration file provided by "eosio.cdt" with
  any of the following names:

    eosio.cdtConfig.cmake
    eosio.cdt-config.cmake

  Add the installation prefix of "eosio.cdt" to CMAKE_PREFIX_PATH or set
  "eosio.cdt_DIR" to a directory containing one of the above files.  If
  "eosio.cdt" provides a separate development package or SDK, be sure it has
  been installed.

Cool. So this is how you need to do it.

Namely you need to change the following in the main cmake and the cmake in each folder.

if(EOSIO_CDT_ROOT STREQUAL "" OR NOT EOSIO_CDT_ROOT)
   find_package(eosio.cdt)

To

if(CDT_ROOT STREQUAL "" OR NOT CDT_ROOT)
   find_package(cdt)

In each contract folder ./contracts/eos/contract/CMakeFile.txt (each folder in here has its own cmake). Don't worry about the prefix folders, you're going to delete those.

This change also needs to be performed in the general cmake file ./contracts/eos/CMakeFile.txt. Also for the general cmake file you need to update

CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=\${EOSIO_CDT_ROOT}/lib/cmake/eosio.cdt/EosioWasmToolchain.cmake

To

CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=\${CDT_ROOT}/lib/cmake/cdt/CDTWasmToolchain.cmake

For each contract.

Then since you compiled you'll also need to clear the temp files with a script you can find here.

Then you will be able to compile with zeus compile.

from cdt.

NatPDeveloper avatar NatPDeveloper commented on July 22, 2024

contracts.tar.gz

Alternatively you can use this contract folder which can be dropped in place of the current contracts folder and is ready to compile then test.

from cdt.

linh2931 avatar linh2931 commented on July 22, 2024

I used your tar ball with only change of setting CDT_ROOT to my local 3.0 CDT and compiled. I saw the same problem of Unknown type: B_vector_int8_E as you had seen. Looks like map related. Did this work before? What's the last CDT version it worked?

from cdt.

linh2931 avatar linh2931 commented on July 22, 2024

I think we need a simplified contract to debug this. It is hard for us to go into the details of your system and figure out how all things are connected. Thanks.

from cdt.

NatPDeveloper avatar NatPDeveloper commented on July 22, 2024

I used your tar ball with only change of setting CDT_ROOT to my local 3.0 CDT and compiled. I saw the same problem of Unknown type: B_vector_int8_E as you had seen. Looks like map related. Did this work before? What's the last CDT version it worked?

That's great! This has worked on every CDT until 3.0.0-rc1.

On rc1 I had the following issue.

Unknown type: pair_uint64_bytes which appears to be related to the vRAM service

From the vRAM contract: std::map<uint64_t,std::vector<char>> shardbuckets;.

From vRAM shardbuckets abi:

        {
            "name": "manifest",
            "base": "",
            "fields": [
                ...
                {
                    "name": "shardbuckets",
                    "type": "pair_uint64_bytes[]"
                }
            ]
        },

Bucky replied

Sorry about that. It was removed in error and added back in the 'release/3.0' branch. If you would like to pull that branch to test. Or, we will be releasing CDT rc2 in the next week that should also solve your problem.
https://t.me/c/1139062279/312952

from cdt.

NatPDeveloper avatar NatPDeveloper commented on July 22, 2024

I think we need a simplified contract to debug this. It is hard for us to go into the details of your system and figure out how all things are connected. Thanks.

The type just needs to be bytes. Instead of B_vector_int8_E and it should work.

from cdt.

NatPDeveloper avatar NatPDeveloper commented on July 22, 2024

You can use this abi and it will work. Was generated with an older cdt. Also here's a diff check. https://www.diffchecker.com/VFI7wcMk

{
    "____comment": "This file was generated with eosio-abigen. DO NOT EDIT ",
    "version": "eosio::abi/1.2",
    "types": [],
    "structs": [
        {
            "name": "bigentry",
            "base": "",
            "fields": [
                {
                    "name": "id",
                    "type": "checksum256"
                },
                {
                    "name": "sometestnumber",
                    "type": "uint64"
                }
            ]
        },
        {
            "name": "checkbig",
            "base": "",
            "fields": [
                {
                    "name": "id",
                    "type": "checksum256"
                },
                {
                    "name": "value",
                    "type": "uint64"
                }
            ]
        },
        {
            "name": "checkmed",
            "base": "",
            "fields": [
                {
                    "name": "id",
                    "type": "uint128"
                },
                {
                    "name": "value",
                    "type": "uint64"
                }
            ]
        },
        {
            "name": "increment",
            "base": "",
            "fields": [
                {
                    "name": "somenumber",
                    "type": "uint32"
                }
            ]
        },
        {
            "name": "ipfsentry",
            "base": "",
            "fields": [
                {
                    "name": "id",
                    "type": "uint64"
                },
                {
                    "name": "data",
                    "type": "bytes"
                },
                {
                    "name": "pending_commit",
                    "type": "bool$"
                }
            ]
        },
        {
            "name": "ipfsremote",
            "base": "",
            "fields": [
                {
                    "name": "id",
                    "type": "uint64"
                },
                {
                    "name": "shard",
                    "type": "uint32"
                },
                {
                    "name": "code",
                    "type": "name"
                },
                {
                    "name": "table",
                    "type": "name"
                },
                {
                    "name": "chain",
                    "type": "name"
                },
                {
                    "name": "data",
                    "type": "bytes"
                }
            ]
        },
        {
            "name": "manifest",
            "base": "",
            "fields": [
                {
                    "name": "next_available_key",
                    "type": "checksum256"
                },
                {
                    "name": "shards",
                    "type": "uint32"
                },
                {
                    "name": "buckets_per_shard",
                    "type": "uint32"
                },
                {
                    "name": "shardbuckets",
                    "type": "pair_uint64_bytes[]"
                }
            ]
        },
        {
            "name": "medentry",
            "base": "",
            "fields": [
                {
                    "name": "id",
                    "type": "uint128"
                },
                {
                    "name": "sometestnumber",
                    "type": "uint64"
                }
            ]
        },
        {
            "name": "pair_uint64_bytes",
            "base": "",
            "fields": [
                {
                    "name": "key",
                    "type": "uint64"
                },
                {
                    "name": "value",
                    "type": "bytes"
                }
            ]
        },
        {
            "name": "testbig",
            "base": "",
            "fields": [
                {
                    "name": "id",
                    "type": "checksum256"
                },
                {
                    "name": "value",
                    "type": "uint64"
                }
            ]
        },
        {
            "name": "testchain",
            "base": "",
            "fields": [
                {
                    "name": "remote",
                    "type": "name"
                },
                {
                    "name": "id",
                    "type": "uint64"
                },
                {
                    "name": "chain",
                    "type": "name"
                }
            ]
        },
        {
            "name": "testclear",
            "base": "",
            "fields": []
        },
        {
            "name": "testcollide",
            "base": "",
            "fields": [
                {
                    "name": "id",
                    "type": "uint64"
                },
                {
                    "name": "value",
                    "type": "uint64"
                }
            ]
        },
        {
            "name": "testdelay",
            "base": "",
            "fields": [
                {
                    "name": "id",
                    "type": "uint64"
                },
                {
                    "name": "value",
                    "type": "uint64"
                },
                {
                    "name": "delay_sec",
                    "type": "uint32"
                }
            ]
        },
        {
            "name": "testempty",
            "base": "",
            "fields": [
                {
                    "name": "uri",
                    "type": "string"
                }
            ]
        },
        {
            "name": "testentry",
            "base": "",
            "fields": [
                {
                    "name": "field1",
                    "type": "uint64"
                },
                {
                    "name": "field2",
                    "type": "bytes"
                },
                {
                    "name": "field3",
                    "type": "uint64"
                }
            ]
        },
        {
            "name": "testfind",
            "base": "",
            "fields": [
                {
                    "name": "id",
                    "type": "uint64"
                }
            ]
        },
        {
            "name": "testget",
            "base": "",
            "fields": [
                {
                    "name": "uri",
                    "type": "string"
                },
                {
                    "name": "expectedfield",
                    "type": "uint32"
                }
            ]
        },
        {
            "name": "testindex",
            "base": "",
            "fields": [
                {
                    "name": "id",
                    "type": "uint64"
                },
                {
                    "name": "sometestnumber",
                    "type": "uint64"
                }
            ]
        },
        {
            "name": "testindex_shardbucket",
            "base": "",
            "fields": [
                {
                    "name": "shard_uri",
                    "type": "bytes"
                },
                {
                    "name": "shard",
                    "type": "uint64"
                }
            ]
        },
        {
            "name": "testindexa",
            "base": "",
            "fields": [
                {
                    "name": "id",
                    "type": "uint64"
                }
            ]
        },
        {
            "name": "testman",
            "base": "",
            "fields": [
                {
                    "name": "man",
                    "type": "manifest"
                }
            ]
        },
        {
            "name": "testmed",
            "base": "",
            "fields": [
                {
                    "name": "id",
                    "type": "uint128"
                },
                {
                    "name": "value",
                    "type": "uint64"
                }
            ]
        },
        {
            "name": "testremote",
            "base": "",
            "fields": [
                {
                    "name": "remote",
                    "type": "name"
                },
                {
                    "name": "id",
                    "type": "uint64"
                }
            ]
        },
        {
            "name": "testresize",
            "base": "",
            "fields": []
        },
        {
            "name": "testset",
            "base": "",
            "fields": [
                {
                    "name": "data",
                    "type": "testentry"
                }
            ]
        },
        {
            "name": "vconfig",
            "base": "",
            "fields": [
                {
                    "name": "next_available_key",
                    "type": "checksum256"
                },
                {
                    "name": "shards",
                    "type": "uint32"
                },
                {
                    "name": "buckets_per_shard",
                    "type": "uint32"
                },
                {
                    "name": "revision",
                    "type": "uint32"
                }
            ]
        },
        {
            "name": "verfempty",
            "base": "",
            "fields": []
        },
        {
            "name": "vmanifest",
            "base": "",
            "fields": [
                {
                    "name": "next_available_key",
                    "type": "checksum256"
                },
                {
                    "name": "shards",
                    "type": "uint32"
                },
                {
                    "name": "buckets_per_shard",
                    "type": "uint32"
                },
                {
                    "name": "shardbuckets",
                    "type": "pair_uint64_bytes[]"
                }
            ]
        },
        {
            "name": "xcleanchain",
            "base": "",
            "fields": [
                {
                    "name": "current_provider",
                    "type": "name"
                },
                {
                    "name": "package",
                    "type": "name"
                },
                {
                    "name": "shard",
                    "type": "uint32"
                },
                {
                    "name": "code",
                    "type": "name"
                },
                {
                    "name": "table",
                    "type": "name"
                },
                {
                    "name": "chain",
                    "type": "name"
                },
                {
                    "name": "size",
                    "type": "uint32"
                },
                {
                    "name": "uris",
                    "type": "string[]"
                }
            ]
        },
        {
            "name": "xcleanup",
            "base": "",
            "fields": [
                {
                    "name": "current_provider",
                    "type": "name"
                },
                {
                    "name": "package",
                    "type": "name"
                },
                {
                    "name": "size",
                    "type": "uint32"
                },
                {
                    "name": "uri",
                    "type": "string"
                }
            ]
        },
        {
            "name": "xcleanuprow",
            "base": "",
            "fields": [
                {
                    "name": "current_provider",
                    "type": "name"
                },
                {
                    "name": "package",
                    "type": "name"
                },
                {
                    "name": "size",
                    "type": "uint32"
                },
                {
                    "name": "uris",
                    "type": "string[]"
                }
            ]
        },
        {
            "name": "xcommit",
            "base": "",
            "fields": [
                {
                    "name": "current_provider",
                    "type": "name"
                },
                {
                    "name": "package",
                    "type": "name"
                },
                {
                    "name": "size",
                    "type": "uint32"
                },
                {
                    "name": "uri",
                    "type": "string"
                }
            ]
        },
        {
            "name": "xdcommit",
            "base": "",
            "fields": [
                {
                    "name": "data",
                    "type": "bytes"
                }
            ]
        },
        {
            "name": "xsignal",
            "base": "",
            "fields": [
                {
                    "name": "service",
                    "type": "name"
                },
                {
                    "name": "action",
                    "type": "name"
                },
                {
                    "name": "provider",
                    "type": "name"
                },
                {
                    "name": "package",
                    "type": "name"
                },
                {
                    "name": "signalRawData",
                    "type": "bytes"
                }
            ]
        },
        {
            "name": "xwarmup",
            "base": "",
            "fields": [
                {
                    "name": "current_provider",
                    "type": "name"
                },
                {
                    "name": "package",
                    "type": "name"
                },
                {
                    "name": "size",
                    "type": "uint32"
                },
                {
                    "name": "uri",
                    "type": "string"
                },
                {
                    "name": "data",
                    "type": "bytes"
                }
            ]
        },
        {
            "name": "xwarmupchain",
            "base": "",
            "fields": [
                {
                    "name": "current_provider",
                    "type": "name"
                },
                {
                    "name": "package",
                    "type": "name"
                },
                {
                    "name": "shard",
                    "type": "uint32"
                },
                {
                    "name": "code",
                    "type": "name"
                },
                {
                    "name": "table",
                    "type": "name"
                },
                {
                    "name": "chain",
                    "type": "name"
                },
                {
                    "name": "size",
                    "type": "uint32"
                },
                {
                    "name": "uris",
                    "type": "string[]"
                },
                {
                    "name": "data",
                    "type": "bytes[]"
                }
            ]
        },
        {
            "name": "xwarmupcode",
            "base": "",
            "fields": [
                {
                    "name": "current_provider",
                    "type": "name"
                },
                {
                    "name": "package",
                    "type": "name"
                },
                {
                    "name": "size",
                    "type": "uint32"
                },
                {
                    "name": "uri",
                    "type": "string"
                },
                {
                    "name": "data",
                    "type": "bytes"
                }
            ]
        },
        {
            "name": "xwarmuprow",
            "base": "",
            "fields": [
                {
                    "name": "current_provider",
                    "type": "name"
                },
                {
                    "name": "package",
                    "type": "name"
                },
                {
                    "name": "size",
                    "type": "uint32"
                },
                {
                    "name": "uris",
                    "type": "string[]"
                },
                {
                    "name": "data",
                    "type": "bytes[]"
                }
            ]
        }
    ],
    "actions": [
        {
            "name": "checkbig",
            "type": "checkbig",
            "ricardian_contract": ""
        },
        {
            "name": "checkmed",
            "type": "checkmed",
            "ricardian_contract": ""
        },
        {
            "name": "increment",
            "type": "increment",
            "ricardian_contract": ""
        },
        {
            "name": "testbig",
            "type": "testbig",
            "ricardian_contract": ""
        },
        {
            "name": "testchain",
            "type": "testchain",
            "ricardian_contract": ""
        },
        {
            "name": "testclear",
            "type": "testclear",
            "ricardian_contract": ""
        },
        {
            "name": "testcollide",
            "type": "testcollide",
            "ricardian_contract": ""
        },
        {
            "name": "testdelay",
            "type": "testdelay",
            "ricardian_contract": ""
        },
        {
            "name": "testempty",
            "type": "testempty",
            "ricardian_contract": ""
        },
        {
            "name": "testfind",
            "type": "testfind",
            "ricardian_contract": ""
        },
        {
            "name": "testget",
            "type": "testget",
            "ricardian_contract": ""
        },
        {
            "name": "testindex",
            "type": "testindex",
            "ricardian_contract": ""
        },
        {
            "name": "testindexa",
            "type": "testindexa",
            "ricardian_contract": ""
        },
        {
            "name": "testman",
            "type": "testman",
            "ricardian_contract": ""
        },
        {
            "name": "testmed",
            "type": "testmed",
            "ricardian_contract": ""
        },
        {
            "name": "testremote",
            "type": "testremote",
            "ricardian_contract": ""
        },
        {
            "name": "testresize",
            "type": "testresize",
            "ricardian_contract": ""
        },
        {
            "name": "testset",
            "type": "testset",
            "ricardian_contract": ""
        },
        {
            "name": "verfempty",
            "type": "verfempty",
            "ricardian_contract": ""
        },
        {
            "name": "xcleanchain",
            "type": "xcleanchain",
            "ricardian_contract": ""
        },
        {
            "name": "xcleanup",
            "type": "xcleanup",
            "ricardian_contract": ""
        },
        {
            "name": "xcleanuprow",
            "type": "xcleanuprow",
            "ricardian_contract": ""
        },
        {
            "name": "xcommit",
            "type": "xcommit",
            "ricardian_contract": ""
        },
        {
            "name": "xdcommit",
            "type": "xdcommit",
            "ricardian_contract": ""
        },
        {
            "name": "xsignal",
            "type": "xsignal",
            "ricardian_contract": ""
        },
        {
            "name": "xwarmup",
            "type": "xwarmup",
            "ricardian_contract": ""
        },
        {
            "name": "xwarmupchain",
            "type": "xwarmupchain",
            "ricardian_contract": ""
        },
        {
            "name": "xwarmupcode",
            "type": "xwarmupcode",
            "ricardian_contract": ""
        },
        {
            "name": "xwarmuprow",
            "type": "xwarmuprow",
            "ricardian_contract": ""
        }
    ],
    "tables": [
        {
            "name": ".test",
            "type": "testindex",
            "index_type": "i64",
            "key_names": [],
            "key_types": []
        },
        {
            "name": ".test1",
            "type": "testindex",
            "index_type": "i64",
            "key_names": [],
            "key_types": []
        },
        {
            "name": ".test2",
            "type": "bigentry",
            "index_type": "i64",
            "key_names": [],
            "key_types": []
        },
        {
            "name": ".test3",
            "type": "medentry",
            "index_type": "i64",
            "key_names": [],
            "key_types": []
        },
        {
            "name": ".vconfig",
            "type": "vconfig",
            "index_type": "i64",
            "key_names": [],
            "key_types": []
        },
        {
            "name": ".vmanifest",
            "type": "vmanifest",
            "index_type": "i64",
            "key_names": [],
            "key_types": []
        },
        {
            "name": "ipfsentry",
            "type": "ipfsentry",
            "index_type": "i64",
            "key_names": [],
            "key_types": []
        },
        {
            "name": "ipfsremote",
            "type": "ipfsremote",
            "index_type": "i64",
            "key_names": [],
            "key_types": []
        },
        {
            "name": "test",
            "type": "testindex_shardbucket",
            "index_type": "i64",
            "key_names": [],
            "key_types": []
        },
        {
            "name": "test1",
            "type": "testindex_shardbucket",
            "index_type": "i64",
            "key_names": [],
            "key_types": []
        },
        {
            "name": "test2",
            "type": "testindex_shardbucket",
            "index_type": "i64",
            "key_names": [],
            "key_types": []
        },
        {
            "name": "test3",
            "type": "testindex_shardbucket",
            "index_type": "i64",
            "key_names": [],
            "key_types": []
        },
        {
            "name": "testentry",
            "type": "testentry",
            "index_type": "i64",
            "key_names": [],
            "key_types": []
        }
    ],
    "kv_tables": {},
    "ricardian_clauses": [],
    "variants": [],
    "action_results": []
}

from cdt.

NatPDeveloper avatar NatPDeveloper commented on July 22, 2024

Also Unknown type: comes from https://github.com/eosnetworkfoundation/mandel-eosjs/blob/main/src/eosjs-serialize.ts#L1028.

from cdt.

linh2931 avatar linh2931 commented on July 22, 2024

If you can build CDT yourself, you can try branch fix_nested_container before the PR is released.

from cdt.

NatPDeveloper avatar NatPDeveloper commented on July 22, 2024

I am getting the following error:

⚡  EOSIO CONTRACT COMPILING

-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/environment/ipfs-dapp-service/contracts/eos
⚫ Scanning dependencies of target ipfsconsumer
◼️ [ 11%] Creating directories for 'ipfsconsumer'
◼️ [ 22%] No download step for 'ipfsconsumer'
◼️ [ 33%] No patch step for 'ipfsconsumer'
◼️ [ 44%] No update step for 'ipfsconsumer'
◼️ [ 55%] Performing configure step for 'ipfsconsumer'
-- Setting up CDT Wasm Toolchain 3.0.0-rc2 at /usr
-- Setting up CDT Wasm Toolchain 3.0.0-rc2 at /usr
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/environment/ipfs-dapp-service/contracts/eos/ipfsconsumer
◼️ [ 66%] Performing build step for 'ipfsconsumer'
⚫ Scanning dependencies of target ipfsconsumer
◼️ [ 50%] Building CXX object CMakeFiles/ipfsconsumer.dir/ipfsconsumer.cpp.obj
/usr/bin/cdt-cpp: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory
◼️ make[6]: *** [CMakeFiles/ipfsconsumer.dir/ipfsconsumer.cpp.obj] Error 127
CMakeFiles/ipfsconsumer.dir/build.make:62: recipe for target 'CMakeFiles/ipfsconsumer.dir/ipfsconsumer.cpp.obj' failed
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ipfsconsumer.dir/all' failed
Makefile:83: recipe for target 'all' failed
◼️ make[5]: *** [CMakeFiles/ipfsconsumer.dir/all] Error 2
◼️ make[4]: *** [all] Error 2
◼️ make[3]: *** [ipfsconsumer-prefix/src/ipfsconsumer-stamp/ipfsconsumer-build] Error 2
CMakeFiles/ipfsconsumer.dir/build.make:111: recipe for target 'ipfsconsumer-prefix/src/ipfsconsumer-stamp/ipfsconsumer-build' failed
◼️ make[2]: *** [CMakeFiles/ipfsconsumer.dir/all] Error 2
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/ipfsconsumer.dir/all' failed
◼️ make[1]: *** [CMakeFiles/ipfsconsumer.dir/rule] Error 2
CMakeFiles/Makefile2:116: recipe for target 'CMakeFiles/ipfsconsumer.dir/rule' failed
Makefile:131: recipe for target 'ipfsconsumer' failed
◼️ make: *** [ipfsconsumer] Error 2
☹️ eos contracts compile failed, if you want to use docker add --docker=true

Maybe something related to how I updated my fork. I set the upstream then checked out the branch

git remote add upstream [email protected]:AntelopeIO/cdt.git
git fetch upstream
git merge upstream/main
git checkout fix_nested_container
...
git status
HEAD detached at upstream/fix_nested_container

And I see the function you added.

I built with

rm -rf build/
git submodule update --init --recursive
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j $(nproc)
cd packages/
bash ./generate_package.sh deb ubuntu-18.04 amd64 # since I'm using 18.04

from cdt.

linh2931 avatar linh2931 commented on July 22, 2024

It must be something to do how the repo is forked and cdt is built.

Was you able to build and run before? If so, can you just manually take the changes in tools/include/eosio/gen.hpp from my PR and give it a try on your original build system?

from cdt.

NatPDeveloper avatar NatPDeveloper commented on July 22, 2024

It must be something to do how the repo is forked and cdt is built.

Was you able to build and run before? If so, can you just manually take the changes in tools/include/eosio/gen.hpp from my PR and give it a try on your original build system?

I just pulled the current cdt repo and the branch and built, same error.

git clone https://github.com/AntelopeIO/cdt
cd cdt/
git fetch
git checkout fix_nested_container
git log --name-status HEAD^..HEAD
git submodule update --init --recursive
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j $(nproc)
cd packages/
bash ./generate_package.sh deb ubuntu-18.04 amd64

I've only successfully built for Ubuntu 22. This is Ubuntu 18, so perhaps there's an issue with that version.

from cdt.

NatPDeveloper avatar NatPDeveloper commented on July 22, 2024

Our of curiosity I tried installing an Ubuntu 22 version (ubuntu-22.04) both on my Ubuntu 18 and Ubuntu 22 setup. The Ubuntu 22 setup worked, the 18 still did not work. Perhaps if you can build yourself for 18 and pass me the version compressed I can try that.

from cdt.

NatPDeveloper avatar NatPDeveloper commented on July 22, 2024

Works on my Ubuntu 22 setup, closing. Thank you for embracing nodejs.

from cdt.

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.