Git Product home page Git Product logo

Comments (7)

vkomodey avatar vkomodey commented on August 13, 2024

Hey, @foufrix . Thanks for indicating the issue! Yes, the problem is in the incorrect address of the reputation oracle in the manifest.json. I've updated docker-compose setup as well as manifest in the PR #19

from fortune.

foufrix avatar foufrix commented on August 13, 2024

Hi @vkomodey just to be sure, I don't see any modification of manifest.json nor docker-compose.yml in #19 it's normal?
I've tried to make it run, on a new ganache setup :

  1. Pulling the change
  2. Remove previous docker instance, Building new code with docker
  3. Deploying contract

image

4. Check that it's same that what's in `constants.js` OK 5. Launching launcher, create escrow => transaction failed

image

Creation of Escrow not working on my side.

Am I doing something wrong? Does it work on your side? This was working prior to #19

from fortune.

vkomodey avatar vkomodey commented on August 13, 2024

Manifest changed here

Please check your manifest has same URLs to oracles as in the code right now(especially the reputation oracle)

Steps are right. You should pull fresh master and do a re-run of the whole docker-compose setup

from fortune.

foufrix avatar foufrix commented on August 13, 2024

Yes effectively for the manifest I'm blind sorry about that. Saw that this refers to docker-compose config.

Solved the error I've pinged about by resetting metamask transaction (error in Tx)

But I'm still having the issue on the call of the Agent 3 when putting the 2nd message on the Escrow :

  1. Setup escrow with escrow address, filling it with HMT and providing manifest.json
{
  "job_title": "Requesting fortunes from the fortunes teller",
  "job_type": "fortune",
  "fortunes_requested": 2,
  "recording_oracle_address": "0x61F9F0B31eacB420553da8BCC59DC617279731Ac",
  "reputation_oracle_address": "0xD979105297fB0eee83F7433fC09279cb5B94fFC6",
  "echange_oracle_address": "0x6b7E3C31F34cF38d1DFC1D9A8A59482028395809",
  "recording_oracle_url": "http://localhost:3005/job/results",
  "reputation_oracle_url": "http://reputation-oracle:3006/job/results",
  "exchange_oracle_url": "http://localhost:3001"
}
  1. Using the address of agent 2 to send a message => OK
  2. Using the address of agent 3 to send a message => KO

Still the same issue as before :
image

And here is the log from the docker image of reputation oracle, I've added a log of the reputationOracleUrl to be sure that we have the good one :

Recording Oracle server listening port 3005

Doing bulk payouts

reputationOracleUrl:  http://reputation-oracle:3005/job/results

Error

Error: connect ECONNREFUSED 172.28.0.3:3005

    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) {

  errno: -111,

  code: 'ECONNREFUSED',

  syscall: 'connect',

  address: '172.28.0.3',

  port: 3005,

  config: {

    transitional: {

      silentJSONParsing: true,

      forcedJSONParsing: true,

      clarifyTimeoutError: false

    },

    adapter: [Function: httpAdapter],

    transformRequest: [ [Function: transformRequest] ],

    transformResponse: [ [Function: transformResponse] ],

    timeout: 0,

    xsrfCookieName: 'XSRF-TOKEN',

    xsrfHeaderName: 'X-XSRF-TOKEN',

    maxContentLength: -1,

    maxBodyLength: -1,

    validateStatus: [Function: validateStatus],

    headers: {

      Accept: 'application/json, text/plain, */*',

      'Content-Type': 'application/json',

      'User-Agent': 'axios/0.25.0',

      'Content-Length': 227

    },

    method: 'post',

    url: 'http://reputation-oracle:3005/job/results',

    data: '{"escrowAddress":"0xE382BaD171463297C92D5192b7cD24A5F213Ee28","fortunes":[{"worker":"0xB113043105b06e98776A74b796Eb40e451C717B9","fortune":"Agent 2"},{"worker":"0x92a2eEF7Ff696BCef98957a0189872680600a959","fortune":"Agent 3"}]}'

  },

  request: <ref *1> Writable {

    _writableState: WritableState {

      objectMode: false,

      highWaterMark: 16384,

      finalCalled: false,

      needDrain: false,

      ending: false,

      ended: false,

      finished: false,

      destroyed: false,

      decodeStrings: true,

      defaultEncoding: 'utf8',

      length: 0,

      writing: false,

      corked: 0,

      sync: true,

      bufferProcessing: false,

      onwrite: [Function: bound onwrite],

      writecb: null,

      writelen: 0,

      afterWriteTickInfo: null,

      buffered: [],

      bufferedIndex: 0,

      allBuffers: true,

      allNoop: true,

      pendingcb: 0,

      constructed: true,

      prefinished: false,

      errorEmitted: false,

      emitClose: true,

      autoDestroy: true,

      errored: null,

      closed: false,

      closeEmitted: false,

      [Symbol(kOnFinished)]: []

    },

    _events: [Object: null prototype] {

      response: [Function: handleResponse],

      error: [Function: handleRequestError],

      socket: [Function: handleRequestSocket]

    },

    _eventsCount: 3,

    _maxListeners: undefined,

    _options: {

      maxRedirects: 21,

      maxBodyLength: 10485760,

      protocol: 'http:',

      path: '/job/results',

      method: 'POST',

      headers: [Object],

      agent: undefined,

      agents: [Object],

      auth: undefined,

      hostname: 'reputation-oracle',

      port: '3005',

      nativeProtocols: [Object],

      pathname: '/job/results'

    },

    _ended: false,

    _ending: true,

    _redirectCount: 0,

    _redirects: [],

    _requestBodyLength: 227,

    _requestBodyBuffers: [ [Object] ],

    _onNativeResponse: [Function (anonymous)],

    _currentRequest: ClientRequest {

      _events: [Object: null prototype],

      _eventsCount: 7,

      _maxListeners: undefined,

      outputData: [],

      outputSize: 0,

      writable: true,

      destroyed: false,

      _last: true,

      chunkedEncoding: false,

      shouldKeepAlive: false,

      maxRequestsOnConnectionReached: false,

      _defaultKeepAlive: true,

      useChunkedEncodingByDefault: true,

      sendDate: false,

      _removedConnection: false,

      _removedContLen: false,

      _removedTE: false,

      _contentLength: null,

      _hasBody: true,

      _trailer: '',

      finished: false,

      _headerSent: true,

      _closed: false,

      socket: [Socket],

      _header: 'POST /job/results HTTP/1.1\r\n' +

        'Accept: application/json, text/plain, */*\r\n' +

        'Content-Type: application/json\r\n' +

        'User-Agent: axios/0.25.0\r\n' +

        'Content-Length: 227\r\n' +

        'Host: reputation-oracle:3005\r\n' +

        'Connection: close\r\n' +

        '\r\n',

      _keepAliveTimeout: 0,

      _onPendingData: [Function: nop],

      agent: [Agent],

      socketPath: undefined,

      method: 'POST',

      maxHeaderSize: undefined,

      insecureHTTPParser: undefined,

      path: '/job/results',

      _ended: false,

      res: null,

      aborted: false,

      timeoutCb: null,

      upgradeOrConnect: false,

      parser: null,

      maxHeadersCount: null,

      reusedSocket: false,

      host: 'reputation-oracle',

      protocol: 'http:',

      _redirectable: [Circular *1],

      [Symbol(kCapture)]: false,

      [Symbol(kNeedDrain)]: false,

      [Symbol(corked)]: 0,

      [Symbol(kOutHeaders)]: [Object: null prototype]

    },

    _currentUrl: 'http://reputation-oracle:3005/job/results',

    [Symbol(kCapture)]: false

  },

  response: undefined,

  isAxiosError: true,

  toJSON: [Function: toJSON]

}

Do you manage to make it work till the end on your side? @vkomodey

We can see here there is a mismatch between the port of the reputation oracle in manifest (3006) and in the code running when calling it (on the log I added we see that it's trying to reach port 3005 instead of 3006)

from fortune.

vkomodey avatar vkomodey commented on August 13, 2024

Yeah. works on my end. From logs I can see that the link to the reputation oracle is wrong

image

Logs saying that it is a 3005 port, but it should be 3006

from fortune.

vkomodey avatar vkomodey commented on August 13, 2024

The recording oracle takes the URL from the manifest. So I guess, the reputation oracle URL is wrong(3005 instead of 3006). Could you please re-check your manifest content?

from fortune.

foufrix avatar foufrix commented on August 13, 2024

I've redone everything, it's an error on my end because now it's working.

Sorry about that, I clearly did a typo on the manifest!

Thank you very much for your help, I'll try with Polygon now!

from fortune.

Related Issues (19)

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.