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

Merged
merged 1 commit into from
Dec 11, 2024
Merged

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

@keeganquigley
Copy link
Contributor

Thanks @ramilexe still not working for me unfortunately. When I use docker-compose it now gives me this:

ubuntu@ip-172-31-28-30:~/relayer$ docker-compose up --build
Building relayer
[+] Building 0.5s (14/14) FINISHED                                                                                                             docker:default
 => [internal] load build definition from local.Dockerfile                                                                                               0.0s
 => => transferring dockerfile: 300B                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/node:18                                                                                               0.4s
 => [internal] load .dockerignore                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                          0.0s
 => [1/9] FROM docker.io/library/node:18@sha256:83eb05700940a88b14f21fb31cc92e9571a34b1db1a5d8781b466fc26cbb1472                                         0.0s
 => [internal] load build context                                                                                                                        0.0s
 => => transferring context: 5.88kB                                                                                                                      0.0s
 => CACHED [2/9] WORKDIR /app                                                                                                                            0.0s
 => CACHED [3/9] RUN npm install -g typescript ts-node ethers@latest                                                                                     0.0s
 => CACHED [4/9] COPY package.json ./                                                                                                                    0.0s
 => CACHED [5/9] COPY yarn.lock ./                                                                                                                       0.0s
 => CACHED [6/9] COPY tsconfig.json ./                                                                                                                   0.0s
 => CACHED [7/9] RUN yarn                                                                                                                                0.0s
 => CACHED [8/9] COPY . .                                                                                                                                0.0s
 => CACHED [9/9] RUN yarn build                                                                                                                          0.0s
 => exporting to image                                                                                                                                   0.0s
 => => exporting layers                                                                                                                                  0.0s
 => => writing image sha256:b83011181cbca12eedc7702c9f6880900ba6950cabc82ceb1c9b20eaba061b84                                                             0.0s
 => => naming to docker.io/library/relayer_relayer                                                                                                       0.0s

 1 warning found (use docker --debug to expand):
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 15)
postgres is up-to-date
Recreating 3d973dbf7cce_relayer ... 

ERROR: for 3d973dbf7cce_relayer  'ContainerConfig'

ERROR: for relayer  'ContainerConfig'
Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose/cli/main.py", line 81, in main
  File "compose/cli/main.py", line 203, in perform_command
  File "compose/metrics/decorator.py", line 18, in wrapper
  File "compose/cli/main.py", line 1186, in up
  File "compose/cli/main.py", line 1182, in up
  File "compose/project.py", line 702, in up
  File "compose/parallel.py", line 108, in parallel_execute
  File "compose/parallel.py", line 206, in producer
  File "compose/project.py", line 688, in do
  File "compose/service.py", line 581, in execute_convergence_plan
  File "compose/service.py", line 503, in _execute_convergence_recreate
  File "compose/parallel.py", line 108, in parallel_execute
  File "compose/parallel.py", line 206, in producer
  File "compose/service.py", line 496, in recreate
  File "compose/service.py", line 615, in recreate_container
  File "compose/service.py", line 334, in create_container
  File "compose/service.py", line 922, in _get_container_create_options
  File "compose/service.py", line 962, in _build_container_volume_options
  File "compose/service.py", line 1549, in merge_volume_bindings
  File "compose/service.py", line 1579, in get_container_data_volumes
KeyError: 'ContainerConfig'
[16400] Failed to execute script docker-compose

I tried with both node v18.18.0 and v18.20.5.

@keeganquigley
Copy link
Contributor

keeganquigley commented Dec 2, 2024

I was able to build it successfully with Codespaces but then for some reason it fails in a loop:

It will continuously open port 8000 and then exit.

relayer   | /app/node_modules/ethers/lib.commonjs/utils/errors.js:149
relayer   |         throw makeError(message, code, info);
relayer   |         ^
relayer   | 
relayer   | TypeError: invalid BytesLike value (argument="value", value="0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3", code=INVALID_ARGUMENT, version=6.13.4)
relayer   |     at makeError (/app/node_modules/ethers/lib.commonjs/utils/errors.js:122:21)
relayer   |     at assert (/app/node_modules/ethers/lib.commonjs/utils/errors.js:149:15)
relayer   |     at assertArgument (/app/node_modules/ethers/lib.commonjs/utils/errors.js:161:5)
relayer   |     at _getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:27:36)
relayer   |     at getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:37:12)
relayer   |     at dataLength (/app/node_modules/ethers/lib.commonjs/utils/data.js:108:12)
relayer   |     at new SigningKey (/app/node_modules/ethers/lib.commonjs/crypto/signing-key.js:22:66)
relayer   |     at new Wallet (/app/node_modules/ethers/lib.commonjs/wallet/wallet.js:33:56)
relayer   |     at new EthereumProofProvider (/app/dist/services/proof_provider/ethereum.js:28:24)
relayer   |     at Object.<anonymous> (/app/dist/controllers/proof.js:24:5) {
relayer   |   code: 'INVALID_ARGUMENT',
relayer   |   argument: 'value',
relayer   |   value: '0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3',
relayer   |   shortMessage: 'invalid BytesLike value'
relayer   | }
relayer   | 
relayer   | Node.js v18.20.5
relayer   | error Command failed with exit code 1.
relayer   | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
relayer exited with code 0
relayer   | yarn run v1.22.22
relayer   | $ npm exec node ./dist/index.js
relayer   | /app/node_modules/ethers/lib.commonjs/utils/errors.js:149
relayer   |         throw makeError(message, code, info);
relayer   |         ^
relayer   | 
relayer   | TypeError: invalid BytesLike value (argument="value", value="0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3", code=INVALID_ARGUMENT, version=6.13.4)
relayer   |     at makeError (/app/node_modules/ethers/lib.commonjs/utils/errors.js:122:21)
relayer   |     at assert (/app/node_modules/ethers/lib.commonjs/utils/errors.js:149:15)
relayer   |     at assertArgument (/app/node_modules/ethers/lib.commonjs/utils/errors.js:161:5)
relayer   |     at _getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:27:36)
relayer   |     at getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:37:12)
relayer   |     at dataLength (/app/node_modules/ethers/lib.commonjs/utils/data.js:108:12)
relayer   |     at new SigningKey (/app/node_modules/ethers/lib.commonjs/crypto/signing-key.js:22:66)
relayer   |     at new Wallet (/app/node_modules/ethers/lib.commonjs/wallet/wallet.js:33:56)
relayer   |     at new EthereumProofProvider (/app/dist/services/proof_provider/ethereum.js:28:24)
relayer   |     at Object.<anonymous> (/app/dist/controllers/proof.js:24:5) {
relayer   |   code: 'INVALID_ARGUMENT',
relayer   |   argument: 'value',
relayer   |   value: '0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3',
relayer   |   shortMessage: 'invalid BytesLike value'
relayer   | }
relayer   | 
relayer   | Node.js v18.20.5
relayer   | error Command failed with exit code 1.
relayer   | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
relayer   | yarn run v1.22.22
relayer   | $ npm exec node ./dist/index.js
relayer   | /app/node_modules/ethers/lib.commonjs/utils/errors.js:149
relayer   |         throw makeError(message, code, info);
relayer   |         ^
relayer   | 
relayer   | TypeError: invalid BytesLike value (argument="value", value="0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3", code=INVALID_ARGUMENT, version=6.13.4)
relayer   |     at makeError (/app/node_modules/ethers/lib.commonjs/utils/errors.js:122:21)
relayer   |     at assert (/app/node_modules/ethers/lib.commonjs/utils/errors.js:149:15)
relayer   |     at assertArgument (/app/node_modules/ethers/lib.commonjs/utils/errors.js:161:5)
relayer   |     at _getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:27:36)
relayer   |     at getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:37:12)
relayer   |     at dataLength (/app/node_modules/ethers/lib.commonjs/utils/data.js:108:12)
relayer   |     at new SigningKey (/app/node_modules/ethers/lib.commonjs/crypto/signing-key.js:22:66)
relayer   |     at new Wallet (/app/node_modules/ethers/lib.commonjs/wallet/wallet.js:33:56)
relayer   |     at new EthereumProofProvider (/app/dist/services/proof_provider/ethereum.js:28:24)
relayer   |     at Object.<anonymous> (/app/dist/controllers/proof.js:24:5) {
relayer   |   code: 'INVALID_ARGUMENT',
relayer   |   argument: 'value',
relayer   |   value: '0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3',
relayer   |   shortMessage: 'invalid BytesLike value'
relayer   | }
relayer   | 
relayer   | Node.js v18.20.5
relayer   | error Command failed with exit code 1.
relayer   | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
relayer   | yarn run v1.22.22
relayer   | $ npm exec node ./dist/index.js
relayer   | /app/node_modules/ethers/lib.commonjs/utils/errors.js:149
relayer   |         throw makeError(message, code, info);
relayer   |         ^
relayer   | 
relayer   | TypeError: invalid BytesLike value (argument="value", value="0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3", code=INVALID_ARGUMENT, version=6.13.4)
relayer   |     at makeError (/app/node_modules/ethers/lib.commonjs/utils/errors.js:122:21)
relayer   |     at assert (/app/node_modules/ethers/lib.commonjs/utils/errors.js:149:15)
relayer   |     at assertArgument (/app/node_modules/ethers/lib.commonjs/utils/errors.js:161:5)
relayer   |     at _getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:27:36)
relayer   |     at getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:37:12)
relayer   |     at dataLength (/app/node_modules/ethers/lib.commonjs/utils/data.js:108:12)
relayer   |     at new SigningKey (/app/node_modules/ethers/lib.commonjs/crypto/signing-key.js:22:66)
relayer   |     at new Wallet (/app/node_modules/ethers/lib.commonjs/wallet/wallet.js:33:56)
relayer   |     at new EthereumProofProvider (/app/dist/services/proof_provider/ethereum.js:28:24)
relayer   |     at Object.<anonymous> (/app/dist/controllers/proof.js:24:5) {
relayer   |   code: 'INVALID_ARGUMENT',
relayer   |   argument: 'value',
relayer   |   value: '0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3',
relayer   |   shortMessage: 'invalid BytesLike value'
relayer   | }
relayer   | 
relayer   | Node.js v18.20.5
relayer   | error Command failed with exit code 1.
relayer   | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
relayer   | yarn run v1.22.22
relayer   | $ npm exec node ./dist/index.js
relayer   | /app/node_modules/ethers/lib.commonjs/utils/errors.js:149
relayer   |         throw makeError(message, code, info);
relayer   |         ^
relayer   | 
relayer   | TypeError: invalid BytesLike value (argument="value", value="0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3", code=INVALID_ARGUMENT, version=6.13.4)
relayer   |     at makeError (/app/node_modules/ethers/lib.commonjs/utils/errors.js:122:21)
relayer   |     at assert (/app/node_modules/ethers/lib.commonjs/utils/errors.js:149:15)
relayer   |     at assertArgument (/app/node_modules/ethers/lib.commonjs/utils/errors.js:161:5)
relayer   |     at _getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:27:36)
relayer   |     at getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:37:12)
relayer   |     at dataLength (/app/node_modules/ethers/lib.commonjs/utils/data.js:108:12)
relayer   |     at new SigningKey (/app/node_modules/ethers/lib.commonjs/crypto/signing-key.js:22:66)
relayer   |     at new Wallet (/app/node_modules/ethers/lib.commonjs/wallet/wallet.js:33:56)
relayer   |     at new EthereumProofProvider (/app/dist/services/proof_provider/ethereum.js:28:24)
relayer   |     at Object.<anonymous> (/app/dist/controllers/proof.js:24:5) {
relayer   |   code: 'INVALID_ARGUMENT',
relayer   |   argument: 'value',
relayer   |   value: '0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3',
relayer   |   shortMessage: 'invalid BytesLike value'
relayer   | }
relayer   | 
relayer   | Node.js v18.20.5
relayer   | error Command failed with exit code 1.
relayer   | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
relayer   | yarn run v1.22.22
relayer   | $ npm exec node ./dist/index.js
relayer   | /app/node_modules/ethers/lib.commonjs/utils/errors.js:149
relayer   |         throw makeError(message, code, info);
relayer   |         ^
relayer   | 
relayer   | TypeError: invalid BytesLike value (argument="value", value="0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3", code=INVALID_ARGUMENT, version=6.13.4)
relayer   |     at makeError (/app/node_modules/ethers/lib.commonjs/utils/errors.js:122:21)
relayer   |     at assert (/app/node_modules/ethers/lib.commonjs/utils/errors.js:149:15)
relayer   |     at assertArgument (/app/node_modules/ethers/lib.commonjs/utils/errors.js:161:5)
relayer   |     at _getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:27:36)
relayer   |     at getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:37:12)
relayer   |     at dataLength (/app/node_modules/ethers/lib.commonjs/utils/data.js:108:12)
relayer   |     at new SigningKey (/app/node_modules/ethers/lib.commonjs/crypto/signing-key.js:22:66)
relayer   |     at new Wallet (/app/node_modules/ethers/lib.commonjs/wallet/wallet.js:33:56)
relayer   |     at new EthereumProofProvider (/app/dist/services/proof_provider/ethereum.js:28:24)
relayer   |     at Object.<anonymous> (/app/dist/controllers/proof.js:24:5) {
relayer   |   code: 'INVALID_ARGUMENT',
relayer   |   argument: 'value',
relayer   |   value: '0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3',
relayer   |   shortMessage: 'invalid BytesLike value'
relayer   | }
relayer   | 
relayer   | Node.js v18.20.5
relayer   | error Command failed with exit code 1.
relayer   | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
relayer   | yarn run v1.22.22
relayer   | $ npm exec node ./dist/index.js
relayer   | /app/node_modules/ethers/lib.commonjs/utils/errors.js:149
relayer   |         throw makeError(message, code, info);
relayer   |         ^
relayer   | 
relayer   | TypeError: invalid BytesLike value (argument="value", value="0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3", code=INVALID_ARGUMENT, version=6.13.4)
relayer   |     at makeError (/app/node_modules/ethers/lib.commonjs/utils/errors.js:122:21)
relayer   |     at assert (/app/node_modules/ethers/lib.commonjs/utils/errors.js:149:15)
relayer   |     at assertArgument (/app/node_modules/ethers/lib.commonjs/utils/errors.js:161:5)
relayer   |     at _getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:27:36)
relayer   |     at getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:37:12)
relayer   |     at dataLength (/app/node_modules/ethers/lib.commonjs/utils/data.js:108:12)
relayer   |     at new SigningKey (/app/node_modules/ethers/lib.commonjs/crypto/signing-key.js:22:66)
relayer   |     at new Wallet (/app/node_modules/ethers/lib.commonjs/wallet/wallet.js:33:56)
relayer   |     at new EthereumProofProvider (/app/dist/services/proof_provider/ethereum.js:28:24)
relayer   |     at Object.<anonymous> (/app/dist/controllers/proof.js:24:5) {
relayer   |   code: 'INVALID_ARGUMENT',
relayer   |   argument: 'value',
relayer   |   value: '0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3',
relayer   |   shortMessage: 'invalid BytesLike value'
relayer   | }
relayer   | 
relayer   | Node.js v18.20.5
relayer   | error Command failed with exit code 1.
relayer   | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
relayer   | yarn run v1.22.22
relayer   | $ npm exec node ./dist/index.js
relayer   | /app/node_modules/ethers/lib.commonjs/utils/errors.js:149
relayer   |         throw makeError(message, code, info);
relayer   |         ^
relayer   | 
relayer   | TypeError: invalid BytesLike value (argument="value", value="0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3", code=INVALID_ARGUMENT, version=6.13.4)
relayer   |     at makeError (/app/node_modules/ethers/lib.commonjs/utils/errors.js:122:21)
relayer   |     at assert (/app/node_modules/ethers/lib.commonjs/utils/errors.js:149:15)
relayer   |     at assertArgument (/app/node_modules/ethers/lib.commonjs/utils/errors.js:161:5)
relayer   |     at _getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:27:36)
relayer   |     at getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:37:12)
relayer   |     at dataLength (/app/node_modules/ethers/lib.commonjs/utils/data.js:108:12)
relayer   |     at new SigningKey (/app/node_modules/ethers/lib.commonjs/crypto/signing-key.js:22:66)
relayer   |     at new Wallet (/app/node_modules/ethers/lib.commonjs/wallet/wallet.js:33:56)
relayer   |     at new EthereumProofProvider (/app/dist/services/proof_provider/ethereum.js:28:24)
relayer   |     at Object.<anonymous> (/app/dist/controllers/proof.js:24:5) {
relayer   |   code: 'INVALID_ARGUMENT',
relayer   |   argument: 'value',
relayer   |   value: '0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3',
relayer   |   shortMessage: 'invalid BytesLike value'
relayer   | }
relayer   | 
relayer   | Node.js v18.20.5
relayer   | error Command failed with exit code 1.
relayer   | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
relayer   | yarn run v1.22.22
relayer   | $ npm exec node ./dist/index.js
relayer   | /app/node_modules/ethers/lib.commonjs/utils/errors.js:149
relayer   |         throw makeError(message, code, info);
relayer   |         ^
relayer   | 
relayer   | TypeError: invalid BytesLike value (argument="value", value="0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3", code=INVALID_ARGUMENT, version=6.13.4)
relayer   |     at makeError (/app/node_modules/ethers/lib.commonjs/utils/errors.js:122:21)
relayer   |     at assert (/app/node_modules/ethers/lib.commonjs/utils/errors.js:149:15)
relayer   |     at assertArgument (/app/node_modules/ethers/lib.commonjs/utils/errors.js:161:5)
relayer   |     at _getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:27:36)
relayer   |     at getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:37:12)
relayer   |     at dataLength (/app/node_modules/ethers/lib.commonjs/utils/data.js:108:12)
relayer   |     at new SigningKey (/app/node_modules/ethers/lib.commonjs/crypto/signing-key.js:22:66)
relayer   |     at new Wallet (/app/node_modules/ethers/lib.commonjs/wallet/wallet.js:33:56)
relayer   |     at new EthereumProofProvider (/app/dist/services/proof_provider/ethereum.js:28:24)
relayer   |     at Object.<anonymous> (/app/dist/controllers/proof.js:24:5) {
relayer   |   code: 'INVALID_ARGUMENT',
relayer   |   argument: 'value',
relayer   |   value: '0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3',
relayer   |   shortMessage: 'invalid BytesLike value'
relayer   | }
relayer   | 
relayer   | Node.js v18.20.5
relayer   | error Command failed with exit code 1.
relayer   | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
relayer   | yarn run v1.22.22
relayer   | $ npm exec node ./dist/index.js
relayer   | /app/node_modules/ethers/lib.commonjs/utils/errors.js:149
relayer   |         throw makeError(message, code, info);
relayer   |         ^
relayer   | 
relayer   | TypeError: invalid BytesLike value (argument="value", value="0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3", code=INVALID_ARGUMENT, version=6.13.4)
relayer   |     at makeError (/app/node_modules/ethers/lib.commonjs/utils/errors.js:122:21)
relayer   |     at assert (/app/node_modules/ethers/lib.commonjs/utils/errors.js:149:15)
relayer   |     at assertArgument (/app/node_modules/ethers/lib.commonjs/utils/errors.js:161:5)
relayer   |     at _getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:27:36)
relayer   |     at getBytes (/app/node_modules/ethers/lib.commonjs/utils/data.js:37:12)
relayer   |     at dataLength (/app/node_modules/ethers/lib.commonjs/utils/data.js:108:12)
relayer   |     at new SigningKey (/app/node_modules/ethers/lib.commonjs/crypto/signing-key.js:22:66)
relayer   |     at new Wallet (/app/node_modules/ethers/lib.commonjs/wallet/wallet.js:33:56)
relayer   |     at new EthereumProofProvider (/app/dist/services/proof_provider/ethereum.js:28:24)
relayer   |     at Object.<anonymous> (/app/dist/controllers/proof.js:24:5) {
relayer   |   code: 'INVALID_ARGUMENT',
relayer   |   argument: 'value',
relayer   |   value: '0x7gd435f1321b8043d984d95776cf53f570f2e296f86a8b0c9ddbd7c537cee7b3',
relayer   |   shortMessage: 'invalid BytesLike value'
relayer   | }
relayer   | 
relayer   | Node.js v18.20.5
relayer   | error Command failed with exit code 1.
relayer   | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@ramilexe
Copy link
Contributor Author

ramilexe commented Dec 3, 2024

Hi @keeganquigley
we fixed that error, please pull latest commit from the repo: DAOsign/relayer@9c38a71 and update your .env file accordingly

@keeganquigley
Copy link
Contributor

Thanks @ramilexe for the fixes, much appreciated. The relayer is now working properly with docker-compose. That almost wraps it up from my side, but the only remaining issue is that the previous instructions still don't work. Can you perhaps remove these from the readme to avoid confusion?

For example, when I use the npm version (instead of Docker) npm start still returns:

ubuntu@ip-172-31-29-57:~/relayer$ npm start

> relayer@1.0.0 start
> npm exec node ./dist/index.js

(node:5339) ExperimentalWarning: CommonJS module /home/ubuntu/.nvm/versions/node/v23.2.0/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /home/ubuntu/.nvm/versions/node/v23.2.0/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
node:internal/modules/cjs/loader:1246
  throw err;
  ^

Error: Cannot find module '/home/ubuntu/relayer/dist/index.js'
    at Function._resolveFilename (node:internal/modules/cjs/loader:1243:15)
    at Function._load (node:internal/modules/cjs/loader:1068:27)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
    at node:internal/main/run_main_module:36:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v23.2.0

The Docker version without docker-compose also still doesn't run:

 1 warning found (use docker --debug to expand):
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 15)
ubuntu@ip-172-31-29-57:~/relayer$ docker run --env-file .env daosign-relayer
yarn run v1.22.22
$ npm exec node ./dist/index.js
Server is running at http://localhost:8000
Error during Data Source initialization: Error: getaddrinfo ENOTFOUND postgres
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'postgres'
}

The deliverables are technically passed but please remove the first Docker instructions from the readme and consider fixing or removing npm instructions.

@ramilexe
Copy link
Contributor Author

Thank you @keeganquigley we fixed the Readme file: DAOsign/relayer@c9e24ea

@keeganquigley
Copy link
Contributor

Thanks for the fixes @ramilexe since the deliverable requirements are technically met, I'm willing to pass it, but tbh it seems like bare minimum effort was put in here. Regardless, here is my final evaluation.

@keeganquigley keeganquigley merged commit 18d69a6 into w3f:master Dec 11, 2024
5 of 6 checks passed
Copy link

🪙 Please fill out the invoice form in order to initiate the payment process. Thank you!

Copy link

We noticed that this is the last milestone of your project. Congratulations on completing your grant! 🎊

So, where to from here? First of all, you should join our Grants Community chat, if you haven't already, so we can stay in touch.
If you are looking for continuative support for your project, there are quite a few options. The main goal of the W3F grants program is to support research as well as early-stage technical projects. If your project still falls under one of those categories, you might want to apply for a follow-up grant. However, depending on your goals and project status, there are other support programs in our ecosystem that might be better suited as the next step. For example, projects with a Business Case/Token should look into the Substrate Builders Program or VC Funding and Common Good projects have a good chance of receiving Treasury Funding. If you are looking for guidance, the team at https://substrate.io/ecosystem/square-one/ has compiled a list of ecosystem support sources and are happy to help you navigate it.

For a more comprehensive list, see our Alternative Funding page. Let us know if you have any questions regarding the above. We are more than happy to point you to additional resources and help you determine the best course of action.
Lastly, we hope your W3F grant was a success and we want to thank you for being part of the journey!

@ramilexe ramilexe deleted the daosign-milestone-3 branch December 11, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants