Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Compiling smart contract not getting done #1090

Open
varshadqz opened this issue Apr 19, 2021 · 3 comments
Open

Compiling smart contract not getting done #1090

varshadqz opened this issue Apr 19, 2021 · 3 comments
Labels
bug Something isn't working track-in-jira

Comments

@varshadqz
Copy link

I have a setup of multi-node of 4 peers blockchain. Blockchain is running, few days before I deployed the smart contract and using it to save data on the blockchain. Now, I did some changes to the smart contract by changing the multi-index table name. Trying to compile and deploy this smart contract again. On the local machine, it gets compiled successfully. But on the server-side, the compilation is not getting finished with no error. It looks stuck (blinking cursor). What may be the reason? Let me know if anybody needs more information. Compilation command:

eosio-cpp --abigen commoncontract.cpp -o commoncontract.wasm

And

EOSIO.CDT 1.6.3

Smart contracts are in hpp files saved in /usr/opt/eosio.cdt/1.6.3/include/contracts/ and included in smart contract as header files. Smart contract is:

#include "contracts/group.hpp"
#include "contracts/user.hpp"
#include "contracts/document.hpp"

extern "C" {

        [[eosio::wasm_entry]]
                void apply(uint64_t receiver, uint64_t code, uint64_t action) {
                        if (code == receiver) {
                                switch (action) {
                                        EOSIO_DISPATCH_HELPER(group, (upsertgroup)(erasegroup))
                                        EOSIO_DISPATCH_HELPER(user, (upsertuser)(eraseuser))
                                        EOSIO_DISPATCH_HELPER(document, (upsertdoc)(erasedoc))
                                }
                        }
                }
}

Also when I tried multiple times, temporary wasm files get generated like commoncontract.wasm.tmp3f5048b. Please help.

@sanaraufx
Copy link

Can you please share the OS version, memory size, and # of cores?

@varshadqz
Copy link
Author

OS: Ubuntu 18.04, Memory : 7.79 GiB, CPU Cores : 2

@guilledk
Copy link

guilledk commented May 11, 2021

I've been having a similar error manifesting on github workflow runs, I'm developing a python pytest plugin and have CI setup, but when adding non trivial smart contracts, eosio-cpp just hangs.

Locally everything runs fine.

Here is a recent run: https://github.com/guilledk/pytest-eosiocdt/runs/2551125202?check_suite_focus=true
For more examples, check any actions run with over 6hs in run time: https://github.com/vapaee/vapaee-smart-contracts/actions

@sanaraufx sanaraufx added bug Something isn't working track-in-jira labels May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working track-in-jira
Projects
None yet
Development

No branches or pull requests

3 participants