From cdf911bd76ecfb6e8f041e8b2f7e0ac07bc9d5b5 Mon Sep 17 00:00:00 2001 From: boneyard93501 <4523011+boneyard93501@users.noreply.github.com> Date: Mon, 8 Nov 2021 13:28:58 -0600 Subject: [PATCH] update aqua --- client-peer/src/_aqua/demo_validation.ts | 67 ++++++++++++++---------- peer-node/src/_aqua/snapshot.ts | 10 ++-- 2 files changed, 43 insertions(+), 34 deletions(-) diff --git a/client-peer/src/_aqua/demo_validation.ts b/client-peer/src/_aqua/demo_validation.ts index c9f044b..02934e0 100644 --- a/client-peer/src/_aqua/demo_validation.ts +++ b/client-peer/src/_aqua/demo_validation.ts @@ -3,7 +3,7 @@ * This file is auto-generated. Do not edit manually: changes may be erased. * Generated by Aqua compiler: https://github.com/fluencelabs/aqua/. * If you find any bugs, please write an issue on GitHub: https://github.com/fluencelabs/aqua/issues - * Aqua version: 0.4.0-235 + * Aqua version: 0.4.1-239 * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; @@ -18,7 +18,7 @@ import { export interface EIPValidatorDef { eip712_validation_string: (eip_str: string, peer_id: string, callParams: CallParams<'eip_str' | 'peer_id'>) => { stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; } | Promise<{ stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; }>; -eip712_validation_url: (eip_str: string, peer_id: string, callParams: CallParams<'eip_str' | 'peer_id'>) => { stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; } | Promise<{ stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; }>; + eip712_validation_url: (eip_str: string, peer_id: string, callParams: CallParams<'eip_str' | 'peer_id'>) => { stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; } | Promise<{ stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; }>; } export function registerEIPValidator(service: EIPValidatorDef): void; export function registerEIPValidator(serviceId: string, service: EIPValidatorDef): void; @@ -81,9 +81,9 @@ export function registerEIPValidator(...args: any) { export interface DataProviderDef { delete_records: (password: string, callParams: CallParams<'password'>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>; -get_record: (signature: string, callParams: CallParams<'signature'>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>; -get_record_count: (callParams: CallParams) => number | Promise; -get_records: (callParams: CallParams) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>; + get_record: (signature: string, callParams: CallParams<'signature'>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>; + get_record_count: (callParams: CallParams) => number | Promise; + get_records: (callParams: CallParams) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>; } export function registerDataProvider(service: DataProviderDef): void; export function registerDataProvider(serviceId: string, service: DataProviderDef): void; @@ -381,8 +381,8 @@ export function delete_records(...args: any) { -export function eip_consensus_halfway(signature: string, locations: { node_id: string; relay_id: string; }[], service_node: string, consensus_service: string, threshold: number, config?: {ttl?: number}): Promise; -export function eip_consensus_halfway(peer: FluencePeer, signature: string, locations: { node_id: string; relay_id: string; }[], service_node: string, consensus_service: string, threshold: number, config?: {ttl?: number}): Promise; +export function eip_consensus_halfway(signature: string, locations: { node_id: string; relay_id: string; }[], service_node: string, consensus_service: string, threshold: number, config?: {ttl?: number}): Promise; +export function eip_consensus_halfway(peer: FluencePeer, signature: string, locations: { node_id: string; relay_id: string; }[], service_node: string, consensus_service: string, threshold: number, config?: {ttl?: number}): Promise; export function eip_consensus_halfway(...args: any) { let script = ` @@ -440,7 +440,7 @@ export function eip_consensus_halfway(...args: any) { ) ) (xor - (call %init_peer_id% ("callbackSrv" "response") [$result.$.[0]!]) + (call %init_peer_id% ("callbackSrv" "response") [$result]) (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2]) ) ) @@ -796,41 +796,50 @@ export function eip_consensus(...args: any) { ) (call %init_peer_id% ("getDataSrv" "threshold") [] threshold) ) - (fold locations loc - (par + (par + (seq (seq - (seq - (seq + (fold locations loc + (par (seq - (call -relay- ("op" "noop") []) - (call loc.$.relay_id! ("op" "noop") []) - ) - (xor - (seq - (call loc.$.node_id! ("DataProvider" "get_record") [signature] res) - (ap res.$.stdout.[0].ts_validation! $result) - ) (seq (seq (seq - (seq - (call loc.$.relay_id! ("op" "noop") []) - (call -relay- ("op" "noop") []) - ) - (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) + (call -relay- ("op" "noop") []) + (call loc.$.relay_id! ("op" "noop") []) + ) + (xor + (seq + (call loc.$.node_id! ("DataProvider" "get_record") [signature] res) + (ap res.$.stdout.[0].ts_validation! $result) + ) + (seq + (seq + (seq + (seq + (call loc.$.relay_id! ("op" "noop") []) + (call -relay- ("op" "noop") []) + ) + (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1]) + ) + (call -relay- ("op" "noop") []) + ) + (call loc.$.relay_id! ("op" "noop") []) + ) ) - (call -relay- ("op" "noop") []) ) (call loc.$.relay_id! ("op" "noop") []) ) + (call service_node ("op" "noop") []) ) + (next loc) ) - (call loc.$.relay_id! ("op" "noop") []) ) - (call service_node ("op" "noop") []) + (call -relay- ("op" "noop") []) ) - (next loc) + (call service_node ("op" "noop") []) ) + (null) ) ) (call -relay- ("op" "noop") []) diff --git a/peer-node/src/_aqua/snapshot.ts b/peer-node/src/_aqua/snapshot.ts index 4450246..7b9acd4 100644 --- a/peer-node/src/_aqua/snapshot.ts +++ b/peer-node/src/_aqua/snapshot.ts @@ -3,7 +3,7 @@ * This file is auto-generated. Do not edit manually: changes may be erased. * Generated by Aqua compiler: https://github.com/fluencelabs/aqua/. * If you find any bugs, please write an issue on GitHub: https://github.com/fluencelabs/aqua/issues - * Aqua version: 0.4.0-235 + * Aqua version: 0.4.1-239 * */ import { Fluence, FluencePeer } from '@fluencelabs/fluence'; @@ -18,7 +18,7 @@ import { export interface EIPValidatorDef { eip712_validation_string: (eip_str: string, peer_id: string, callParams: CallParams<'eip_str' | 'peer_id'>) => { stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; } | Promise<{ stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; }>; -eip712_validation_url: (eip_str: string, peer_id: string, callParams: CallParams<'eip_str' | 'peer_id'>) => { stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; } | Promise<{ stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; }>; + eip712_validation_url: (eip_str: string, peer_id: string, callParams: CallParams<'eip_str' | 'peer_id'>) => { stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; } | Promise<{ stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; }>; } export function registerEIPValidator(service: EIPValidatorDef): void; export function registerEIPValidator(serviceId: string, service: EIPValidatorDef): void; @@ -81,9 +81,9 @@ export function registerEIPValidator(...args: any) { export interface DataProviderDef { delete_records: (password: string, callParams: CallParams<'password'>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>; -get_record: (signnature: string, callParams: CallParams<'signnature'>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>; -get_record_count: (callParams: CallParams) => number | Promise; -get_records: (callParams: CallParams) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>; + get_record: (signnature: string, callParams: CallParams<'signnature'>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>; + get_record_count: (callParams: CallParams) => number | Promise; + get_records: (callParams: CallParams) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>; } export function registerDataProvider(service: DataProviderDef): void; export function registerDataProvider(serviceId: string, service: DataProviderDef): void;