|
Algorithm 2 Cross-chain data circulation with access control and identity authentication (: improvement point) |
-
1:
Input:
-
2:
: the set of chains in the cross-chain system
-
3:
: the set of auto agents
-
4:
: the set of AGRobots
-
5:
: the set of cross-chain contracts
-
6:
Output:
-
7:
True or False
-
8:
————————————————————————————————————————
-
9:
1. Propose ( from to ):
-
10:
-
11:
-
12:
Authenticate in ▹
-
13:
-
14:
Broadcast in
-
15:
invoke (Cross-chain broadcast)
-
16:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - – - - - - - - - - - - - - - - - - - - -
-
17:
2. Cross-chain broadcast:
-
18:
receives
-
19:
if then
-
20:
▹
-
21:
▹
-
22:
if
then ▹
-
23:
-
24:
Broadcast in
-
25:
invoke (Response)
-
26:
else ▹
-
27:
Return False ▹
-
28:
else
-
29:
Broadcast in
-
30:
Return False
-
31:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - – - - - - - - - - - - - - - - - - - - -
-
32:
3. Response ( receives ):
-
33:
if then
-
34:
▹
-
35:
▹
-
36:
if
then ▹
-
37:
-
38:
Broadcast in
-
39:
else
-
40:
Return False ▹
-
41:
-
42:
Return True
-
43:
else
-
44:
Broadcast in
-
45:
Return False
|