After saving some value into an sawtooth address, I try to recover it via the rest-api but it responds "There is no state data at the address specified". Here are the steps I've done:
From the tx processor (python sdk) I call "set_state", and check that my address is in returned list.
// address = 7749f2d822961a489fac22690b773c1b613c890197bf65090d3c468f4ba8964b98c555
// value = 327 bytes
addresses = context.set_state({address: value})
//addresses contains the given address
Due to this error, as a validation, I read the value using "get_state", right after that previous line of the tx processor. I can successfully get the value I writed.
state_entries = context.get_state([address])
//state_entries contains the given address
Later from a web client I make a request to the rest-api at 'http://rest-api:8008/state/ADDRESS' (where the address is the one previously set). But the response says "Unable to find entry at address". This is the full response:
sawtooth-nmso-web-client | size: 0,
sawtooth-nmso-web-client | timeout: 0,
sawtooth-nmso-web-client | [Symbol(Body internals)]: {
sawtooth-nmso-web-client | body: PassThrough {
sawtooth-nmso-web-client | _readableState: [ReadableState],
sawtooth-nmso-web-client | readable: true,
sawtooth-nmso-web-client | _events: [Object: null prototype],
sawtooth-nmso-web-client | _eventsCount: 2,
sawtooth-nmso-web-client | _maxListeners: undefined,
sawtooth-nmso-web-client | _writableState: [WritableState],
sawtooth-nmso-web-client | writable: false,
sawtooth-nmso-web-client | allowHalfOpen: true,
sawtooth-nmso-web-client | _transformState: [Object],
sawtooth-nmso-web-client | [Symbol(kCapture)]: false
sawtooth-nmso-web-client | },
sawtooth-nmso-web-client | disturbed: false,
sawtooth-nmso-web-client | error: null
sawtooth-nmso-web-client | },
sawtooth-nmso-web-client | [Symbol(Response internals)]: {
sawtooth-nmso-web-client | url: 'http://rest-api:8008/state/7749f2d822961a489fac22690b773c1b613c890197bf65090d3c468f4ba8964b98c555',
sawtooth-nmso-web-client | status: 404,
sawtooth-nmso-web-client | statusText: 'Not Found',
sawtooth-nmso-web-client | headers: Headers { [Symbol(map)]: [Object: null prototype] },
sawtooth-nmso-web-client | counter: 0
sawtooth-nmso-web-client | }
sawtooth-nmso-web-client | }
sawtooth-nmso-web-client | UserClient.js > request_to_rest_api > response.json: {
sawtooth-nmso-web-client | error: {
sawtooth-nmso-web-client | code: 75,
sawtooth-nmso-web-client | message: 'There is no state data at the address specified.',
sawtooth-nmso-web-client | title: 'State Not Found'
sawtooth-nmso-web-client | }
sawtooth-nmso-web-client | }
Anyone knows what I'm doing wrong? Thanks