diff --git a/package-lock.json b/package-lock.json index 49014828..965947d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "Apache-2.0", "dependencies": { "@chainsafe/libp2p-noise": "^4.1.1", - "@fluencelabs/avm": "0.23.0", + "@fluencelabs/avm": "0.24.2", "@fluencelabs/marine-js": "0.2.5", "async": "3.2.0", "browser-or-node": "^2.0.0", @@ -703,9 +703,9 @@ "dev": true }, "node_modules/@fluencelabs/avm": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.23.0.tgz", - "integrity": "sha512-+cgJltkc8lNa/tr85pV5AEcxLT4dsqRrbhLzdc9MSrkb7cq6xmmHZ3u6o12OflWeAGzRQmaT3uEhSyim/fGI/w==" + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.24.2.tgz", + "integrity": "sha512-BD7pr3ZRHLIb9XVt08i+/fX2+B4l5zln6j+5mEIJmDBQETv6Gz7NdsgKn0jUQueBcztR+mw5w7byM66yf6xEnA==" }, "node_modules/@fluencelabs/avm-runner-background": { "version": "0.2.0", @@ -12872,9 +12872,9 @@ "dev": true }, "@fluencelabs/avm": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.23.0.tgz", - "integrity": "sha512-+cgJltkc8lNa/tr85pV5AEcxLT4dsqRrbhLzdc9MSrkb7cq6xmmHZ3u6o12OflWeAGzRQmaT3uEhSyim/fGI/w==" + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@fluencelabs/avm/-/avm-0.24.2.tgz", + "integrity": "sha512-BD7pr3ZRHLIb9XVt08i+/fX2+B4l5zln6j+5mEIJmDBQETv6Gz7NdsgKn0jUQueBcztR+mw5w7byM66yf6xEnA==" }, "@fluencelabs/avm-runner-background": { "version": "0.2.0", diff --git a/package.json b/package.json index 24302710..955071b5 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ }, "dependencies": { "@chainsafe/libp2p-noise": "^4.1.1", - "@fluencelabs/avm": "0.23.0", + "@fluencelabs/avm": "0.24.2", "@fluencelabs/marine-js": "0.2.5", "async": "3.2.0", "browser-or-node": "^2.0.0", diff --git a/src/internal/FluencePeer.ts b/src/internal/FluencePeer.ts index c0ca9297..82eb47c4 100644 --- a/src/internal/FluencePeer.ts +++ b/src/internal/FluencePeer.ts @@ -721,6 +721,8 @@ async function runAvmRunner( { initPeerId: particle.initPeerId, currentPeerId: currentPeerId, + timestamp: particle.timestamp, + ttl: particle.ttl, }, particle.callResults, ); diff --git a/src/internal/avm.ts b/src/internal/avm.ts index 42ec067f..5118dbc4 100644 --- a/src/internal/avm.ts +++ b/src/internal/avm.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { callAvm, CallResultsArray, InterpreterResult, LogLevel } from '@fluencelabs/avm'; +import { callAvm, CallResultsArray, InterpreterResult, LogLevel, RunParameters } from '@fluencelabs/avm'; import { FluenceAppService } from '@fluencelabs/marine-js'; /** @@ -27,10 +27,7 @@ export type AvmRunner = { air: string, prevData: Uint8Array, data: Uint8Array, - params: { - initPeerId: string; - currentPeerId: string; - }, + params: RunParameters, callResults: CallResultsArray, ) => Promise; }; @@ -53,13 +50,12 @@ export class AVM implements AvmRunner { air: string, prevData: Uint8Array, data: Uint8Array, - params: { initPeerId: string; currentPeerId: string }, + runParams: RunParameters, callResults: CallResultsArray, ): Promise { return callAvm( (args) => this._fluenceAppService.callService('avm', 'invoke', args, undefined), - params.initPeerId, - params.currentPeerId, + runParams, air, prevData, data,