Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DaoSign Milestone 3 delivery #1227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ramilexe
Copy link
Contributor

Milestone Delivery Checklist

  • The milestone-delivery-template.md has been copied and updated.
  • This pull request is being made by the same account as the accepted application.
  • I have disclosed any and all sources of reused code in the submitted repositories and have done my due diligence to meet its license requirements.
  • In case of acceptance, invoices must be submitted and payments will be transferred to the Polkadot AssetHub and/or fiat account provided in the application.
  • The delivery is according to the Guidelines for Milestone Deliverables.

Link to the application pull request: w3f/Grants-Program#1770

@ramilexe ramilexe mentioned this pull request Nov 18, 2024
10 tasks
@keeganquigley keeganquigley self-assigned this Nov 19, 2024
Copy link
Contributor

@keeganquigley keeganquigley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the delivery @ramilexe I started my evaluation, please see the document to look at the errors I'm getting, I'm having issues due to the .env file. The .env sample in the readme is different from the actual .env.sample file. Which one should I be copying? (neither work because there is no actual network info). Also, what should I be entering for POLKADOT_CONTRACT_ADDRESS=<Polkadot contract address> I'm not sure how this would be used since Polkadot relay chain doesn't run smart contracts.

I would think the .env example should provide some RPC nodes to connect to? Should I be running the backend while running the tests?

@semuelle
Copy link
Member

pinging @ramilexe

@ramilexe
Copy link
Contributor Author

Hi @semuelle @keeganquigley
We implemented some changes regarding your comments (DAOsign/relayer#39). Added some default values to .env.example and also added docker-compose with local database. It is already merged to main branch, could you re-evaluate it please?

@keeganquigley
Copy link
Contributor

keeganquigley commented Nov 27, 2024

Thanks @ramilexe much appreciated, thanks for the fixes. All the unit tests are passing now, which is great. But for some reason when I try to run the Docker build, it fails with this error:

ubuntu@ip-172-31-27-130:~/relayer$ docker run --env-file .env daosign-relayer
yarn run v1.22.22
$ npm exec node ./dist/index.js
/app/node_modules/ethers/lib.commonjs/utils/errors.js:149
        throw makeError(message, code, info);
        ^

TypeError: invalid BytesLike value (argument="value", value="0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3", code=INVALID_ARGUMENT, version=6.13.4)
    at makeError (/app/node_modules/ethers/lib.commonjs/utils/errors.js:122:21)
    at assert (/app/node_modules/ethers/lib.commonjs/utils/errors.js:149:15)
    at assertArgument (/app/node_modules/ethers/lib.commonjs/utils/errors.js:161:5)
    at _getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:27:36)
    at getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:37:12)
    at dataLength (/app/node_modules/ethers/lib.commonjs/utils/data.js:108:12)
    at new SigningKey (/app/node_modules/ethers/lib.commonjs/crypto/signing-key.js:22:66)
    at new Wallet (/app/node_modules/ethers/lib.commonjs/wallet/wallet.js:33:56)
    at new EthereumProofProvider (/app/dist/services/proof_provider/ethereum.js:28:24)
    at Object.<anonymous> (/app/dist/controllers/proof.js:24:5) {
  code: 'INVALID_ARGUMENT',
  argument: 'value',
  value: '0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3',
  shortMessage: 'invalid BytesLike value'
}

Node.js v18.20.5
error Command failed with exit code 1.

Additionally, the alternative method npm start returns an error now too:

ubuntu@ip-172-31-27-130:~/relayer$ npm start

> [email protected] start
> npm exec node ./dist/index.js

node:internal/modules/cjs/loader:1143
  throw err;
  ^

Error: Cannot find module '/home/ubuntu/relayer/dist/index.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
    at Module._load (node:internal/modules/cjs/loader:981:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.20.5

I made sure my node version is using v18.20.5 to no avail. Any ideas? Can you confirm which versions I should be using? I'm also kind of confused by the use of both package managers, why not pick either npm or yarn?

I'll try testing locally on my Mac too.

@ramilexe
Copy link
Contributor Author

Hi @keeganquigley
can you try to run using docker-compose? Relayer requires database to run.

Here is command:

docker-compose up -d

or

docker compose up -d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants