-
Notifications
You must be signed in to change notification settings - Fork 1
/
config-code.fif
1303 lines (1303 loc) · 67.1 KB
/
config-code.fif
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
PROGRAM{
DECLPROC set_conf_param
DECLPROC load_data
DECLPROC store_data
DECLPROC parse_vote_config
DECLPROC get_vote_config_internal
DECLPROC get_vote_config
DECLPROC check_validator_set
DECLPROC send_answer
DECLPROC send_confirmation
DECLPROC send_error
DECLPROC change_elector_code
1666 DECLMETHOD after_code_upgrade
DECLPROC perform_action
DECLPROC get_current_vset
DECLPROC get_validator_descr
DECLPROC unpack_validator_descr
DECLPROC parse_config_proposal
DECLPROC accept_proposal
DECLPROC perform_proposed_action
DECLPROC unpack_proposal_status
DECLPROC update_proposal_status
DECLPROC begin_pack_proposal_status
DECLPROC register_vote
DECLPROC proceed_register_vote
DECLPROC scan_proposal
DECLPROC scan_random_proposal
DECLPROC register_voting_proposal
DECLPROC recv_internal
DECLPROC recv_external
DECLPROC run_ticktock
85143 DECLMETHOD seqno
DECLPROC unpack_proposal
94347 DECLMETHOD get_proposal
107394 DECLMETHOD list_proposals
75077 DECLMETHOD proposal_storage_price
set_conf_param PROC:<{
// index value
c4 PUSH // index value _3
CTOS // index value cs
LDREF // index value cfg_dict cs
s3 s3 XCHG2
32 PUSHINT // cs value index cfg_dict _9=32
DICTISETREF // cs cfg_dict
NEWC // cs cfg_dict _11
STREF // cs _12
SWAP // _12 cs
STSLICER // _13
ENDC // _14
c4 POP
}>
load_data PROC:<{
//
c4 PUSH // _1
CTOS // cs
LDREF // _4 cs
32 LDU // _4 _6 cs
256 LDU // _4 _6 _9 cs
LDDICT // res res res res cs
ENDS
}>
store_data PROC:<{
// cfg_dict stored_seqno public_key vote_dict
s0 s3 XCHG
NEWC // vote_dict stored_seqno public_key cfg_dict _4
STREF // vote_dict stored_seqno public_key _5
s1 s2 XCHG // vote_dict public_key stored_seqno _5
32 STU // vote_dict public_key _7
256 STU // vote_dict _9
STDICT // _10
ENDC // _11
c4 POP
}>
parse_vote_config PROC:<{
// c
CTOS // cs
8 LDU // _4 cs
SWAP // cs _4
54 EQINT // cs _8
44 THROWIFNOT
8 LDU // _11 cs
8 LDU // _11 _14 cs
8 LDU // _11 _14 _17 cs
8 LDU // _11 _14 _17 _20 cs
32 LDU // _11 _14 _17 _20 _23 cs
32 LDU // _11 _14 _17 _20 _23 _26 cs
32 LDU // _11 _14 _17 _20 _23 _26 _29 cs
32 LDU // res res res res res res res res cs
ENDS
}>
get_vote_config_internal PROCREF:<{
// critical? cparam11
CTOS // critical? cs
8 LDU // critical? _5 cs
SWAP
145 PUSHINT // critical? cs _5 _8=145
EQUAL // critical? cs _9
44 THROWIFNOT
SWAP // cs critical?
IF:<{ // cs
LDREF // _18 _17
NIP // cs
}> // cs
PLDREF // _13
parse_vote_config INLINECALLDICT // _19 _20 _21 _22 _23 _24 _25 _26
}>
get_vote_config PROC:<{
// critical?
11 PUSHINT // critical? _1=11
CONFIGOPTPARAM // critical? _2
get_vote_config_internal INLINECALLDICT // _4 _5 _6 _7 _8 _9 _10 _11
}>
check_validator_set PROC:<{
// vset
CTOS // cs
8 LDU // _4 cs
SWAP // cs _4
18 EQINT // cs _8
9 THROWIFNOT
32 LDU // utime_since cs
32 LDU // utime_since utime_until cs
16 LDU // utime_since utime_until total cs
16 LDU // utime_since utime_until total _42 _41
DROP // utime_since utime_until total main
DUP // utime_since utime_until total main main
0 GTINT // utime_since utime_until total main _28
9 THROWIFNOT
GEQ // utime_since utime_until _31
9 THROWIFNOT
}>
send_answer PROC:<{
// addr query_id ans_tag mode
0 PUSHINT // addr query_id ans_tag mode _4=0
24 PUSHINT // addr query_id ans_tag mode _4=0 _5=24
NEWC // addr query_id ans_tag mode _4=0 _5=24 _6
6 STU // addr query_id ans_tag mode _4=0 _8
s0 s5 XCHG2 // _4=0 query_id ans_tag mode _8 addr
STSLICER // _4=0 query_id ans_tag mode _9
s1 s4 XCHG // mode query_id ans_tag _4=0 _9
111 STU // mode query_id ans_tag _23
32 STU // mode query_id _25
64 STU // mode _27
ENDC // mode _28
SWAP // _28 mode
SENDRAWMSG
}>
send_confirmation PROC:<{
// addr query_id ans_tag
64 PUSHINT // addr query_id ans_tag _3=64
send_answer CALLDICT
}>
send_error PROC:<{
// addr query_id ans_tag
64 PUSHINT // addr query_id ans_tag _3=64
send_answer CALLDICT
}>
change_elector_code PROC:<{
// cs
1 PUSHINT // cs _2=1
CONFIGOPTPARAM // cs _3
CTOS // cs _4
256 PLDU // cs dest_addr
NOW // cs dest_addr query_id
1313042276 PUSHINT // cs dest_addr query_id _9=1313042276
0 PUSHINT // cs dest_addr query_id _9=1313042276 _10=0
50431 PUSHINT // cs dest_addr query_id _9=1313042276 _10=0 _11=50431
NEWC // cs dest_addr query_id _9=1313042276 _10=0 _11=50431 _12
17 STU // cs dest_addr query_id _9=1313042276 _10=0 _14
s1 s4 XCHG // cs _10=0 query_id _9=1313042276 dest_addr _14
256 STU // cs _10=0 query_id _9=1313042276 _16
30 PUSHPOW2 // cs _10=0 query_id _9=1313042276 _16 _19
STGRAMS // cs _10=0 query_id _9=1313042276 _20
s1 s3 XCHG // cs _9=1313042276 query_id _10=0 _20
107 STU // cs _9=1313042276 query_id _34
s1 s2 XCHG // cs query_id _9=1313042276 _34
32 STU // cs query_id _36
64 STU // cs _38
SWAP // _38 cs
STSLICER // _39
ENDC // _40
0 PUSHINT // _40 _41=0
SENDRAWMSG
}>
after_code_upgrade PROC:<{
// param old_code
2DROP //
}>
perform_action PROCREF:<{
// cfg_dict public_key action cs
OVER
1130778657 PUSHINT // cfg_dict public_key action cs action _4=1130778657
EQUAL // cfg_dict public_key action cs _5
IFJMP:<{ // cfg_dict public_key action cs
NIP // cfg_dict public_key cs
32 LDI // cfg_dict public_key param_index cs
LDREF // cfg_dict public_key param_index param_value cs
ENDS
s0 s1 s3 XCHG3
32 PUSHINT // public_key param_value param_index cfg_dict _15=32
DICTISETREF // public_key cfg_dict
SWAP // cfg_dict public_key
}> // cfg_dict public_key action cs
OVER
1313042276 PUSHINT // cfg_dict public_key action cs action _17=1313042276
EQUAL // cfg_dict public_key action cs _18
IFJMP:<{ // cfg_dict public_key action cs
NIP // cfg_dict public_key cs
LDREF // cfg_dict public_key new_code cs
OVER // cfg_dict public_key new_code cs new_code
SETCODE
c3 PUSH // cfg_dict public_key new_code cs old_code
s0 s2 XCHG // cfg_dict public_key old_code cs new_code
CTOS // cfg_dict public_key old_code cs _25
BLESS // cfg_dict public_key old_code cs _26
c3 POP
SWAP // cfg_dict public_key cs old_code
after_code_upgrade CALLDICT
0 THROW
}> // cfg_dict public_key action cs
OVER
1348619041 PUSHINT // cfg_dict public_key action cs action _31=1348619041
EQUAL // cfg_dict public_key action cs _32
IFJMP:<{ // cfg_dict public_key action cs
2 1 BLKDROP2 // cfg_dict cs
256 LDU // cfg_dict public_key cs
ENDS
}> // cfg_dict public_key action cs
OVER
1313074949 PUSHINT // cfg_dict public_key action cs action _37=1313074949
EQUAL // cfg_dict public_key action cs _38
IFJMP:<{ // cfg_dict public_key action cs
NIP // cfg_dict public_key cs
change_elector_code CALLDICT
}> // cfg_dict public_key action cs
DROP // cfg_dict public_key action
32 THROWIF
}>
get_current_vset PROCREF:<{
//
34 PUSHINT // _1=34
CONFIGOPTPARAM // vset
DUP // vset vset
CTOS // vset cs
8 LDU // vset _6 cs
SWAP // vset cs _6
18 EQINT // vset cs _10
40 THROWIFNOT
96 PUSHINT // vset cs _19
SDSKIPFIRST // vset cs
64 LDU // vset _23 cs
LDDICT // vset total_weight dict cs
ENDS
}>
get_validator_descr PROCREF:<{
// idx
get_current_vset INLINECALLDICT // idx _9 _10 _11
s2 POP // idx dict total_weight
-ROT
16 PUSHINT // total_weight idx dict _7=16
DICTUGET
NULLSWAPIFNOT // total_weight _12 _13
DROP // total_weight value
SWAP // value total_weight
}>
unpack_validator_descr PROC:<{
// cs
8 LDU // _2 cs
32 PUSHINT // _2 cs _5=32
NOT // _2 cs _6
s1 s2 XCHG // cs _2 _6
AND // cs _7
83 EQINT // cs _9
41 THROWIFNOT
32 LDU // _12 cs
SWAP
2390828938 PUSHINT // cs _12 _15=2390828938
EQUAL // cs _16
41 THROWIFNOT
256 LDU // _18 cs
64 LDU // _18 _31 _30
DROP // _18 _21
}>
parse_config_proposal PROCREF:<{
// c
CTOS // cs
8 LDI // _4 cs
SWAP // cs _4
-13 EQINT // cs _10
44 THROWIFNOT
32 LDI // _15 cs
LDOPTREF // _15 _18 cs
1 LDI // id val hash cs
SWAP // id val cs hash
IF:<{ // id val cs
256 LDU // id val hash cs
}>ELSE<{ // id val cs
-1 PUSHINT // id val cs hash=-1
SWAP // id val hash cs
}>
ENDS
}>
accept_proposal PROCREF:<{
// cfg_dict proposal critical?
SWAP // cfg_dict critical? proposal
parse_config_proposal INLINECALLDICT // cfg_dict critical? param_id param_val req_hash
s2 s4 PUSH2
32 PUSHINT // cfg_dict critical? param_id param_val req_hash param_id cfg_dict _8=32
DICTIGETOPTREF // cfg_dict critical? param_id param_val req_hash cur_val
DUP // cfg_dict critical? param_id param_val req_hash cur_val cur_val
ISNULL // cfg_dict critical? param_id param_val req_hash cur_val _11
IF:<{ // cfg_dict critical? param_id param_val req_hash cur_val
DROP // cfg_dict critical? param_id param_val req_hash
0 PUSHINT // cfg_dict critical? param_id param_val req_hash _12=0
}>ELSE<{ // cfg_dict critical? param_id param_val req_hash cur_val
HASHCU // cfg_dict critical? param_id param_val req_hash _12
}> // cfg_dict critical? param_id param_val req_hash cur_hash
OVER // cfg_dict critical? param_id param_val req_hash cur_hash req_hash
NEQ // cfg_dict critical? param_id param_val req_hash _15
SWAP // cfg_dict critical? param_id param_val _15 req_hash
-1 GTINT // cfg_dict critical? param_id param_val _15 _17
AND // cfg_dict critical? param_id param_val _18
IFJMP:<{ // cfg_dict critical? param_id param_val
3 BLKDROP // cfg_dict
0 PUSHINT // cfg_dict _19=0
PUSHNULL // cfg_dict _19=0 _20
}> // cfg_dict critical? param_id param_val
9 PUSHINT // cfg_dict critical? param_id param_val _22=9
s4 PUSH
32 PUSHINT // cfg_dict critical? param_id param_val _22=9 cfg_dict _23=32
DICTIGETOPTREF // cfg_dict critical? param_id param_val mparams
s2 s(-1) PUXC
32 PUSHINT // cfg_dict critical? param_id param_val param_id mparams _27=32
DICTIGET
NULLSWAPIFNOT // cfg_dict critical? param_id param_val _49 _50
NIP // cfg_dict critical? param_id param_val found?
OVER // cfg_dict critical? param_id param_val found? param_val
ISNULL // cfg_dict critical? param_id param_val found? _29
AND // cfg_dict critical? param_id param_val _30
IFJMP:<{ // cfg_dict critical? param_id param_val
3 BLKDROP // cfg_dict
0 PUSHINT // cfg_dict _31=0
PUSHNULL // cfg_dict _31=0 _32
}> // cfg_dict critical? param_id param_val
10 PUSHINT // cfg_dict critical? param_id param_val _34=10
s4 PUSH
32 PUSHINT // cfg_dict critical? param_id param_val _34=10 cfg_dict _35=32
DICTIGETOPTREF // cfg_dict critical? param_id param_val cparams
s2 s(-1) PUXC
32 PUSHINT // cfg_dict critical? param_id param_val param_id cparams _38=32
DICTIGET
NULLSWAPIFNOT // cfg_dict critical? param_id param_val _51 _52
NIP // cfg_dict critical? param_id param_val found?
s0 s3 XCHG2 // cfg_dict param_val param_id found? critical?
LESS // cfg_dict param_val param_id _40
IFJMP:<{ // cfg_dict param_val param_id
2DROP // cfg_dict
0 PUSHINT // cfg_dict _41=0
PUSHNULL // cfg_dict _41=0 _42
}> // cfg_dict param_val param_id
s1 s(-1) s2 PU2XC
32 PUSHINT // param_id param_val param_val param_id cfg_dict _44=32
DICTISETREF // param_id param_val cfg_dict
-ROT // cfg_dict param_id param_val
}>
perform_proposed_action PROCREF:<{
// cfg_dict public_key param_id param_val
OVER
-999 PUSHINT // cfg_dict public_key param_id param_val param_id _4=-999
EQUAL // cfg_dict public_key param_id param_val _5
IFJMP:<{ // cfg_dict public_key param_id param_val
2 1 BLKDROP2 // cfg_dict param_val
DUP // cfg_dict param_val param_val
ISNULL // cfg_dict param_val _6
IF:<{ // cfg_dict param_val
DROP // cfg_dict
0 PUSHINT // cfg_dict _7=0
}>ELSE<{ // cfg_dict param_val
CTOS // cfg_dict _9
256 PLDU // cfg_dict _7
}>
}> // cfg_dict public_key param_id param_val
DUP // cfg_dict public_key param_id param_val param_val
ISNULL // cfg_dict public_key param_id param_val _12
IFJMP:<{ // cfg_dict public_key param_id param_val
2DROP // cfg_dict public_key
}> // cfg_dict public_key param_id param_val
OVER
-1000 PUSHINT // cfg_dict public_key param_id param_val param_id _13=-1000
EQUAL // cfg_dict public_key param_id param_val _14
IFJMP:<{ // cfg_dict public_key param_id param_val
NIP // cfg_dict public_key param_val
CTOS // cfg_dict public_key cs
LDREF // cfg_dict public_key new_code cs
OVER // cfg_dict public_key new_code cs new_code
SETCODE
c3 PUSH // cfg_dict public_key new_code cs old_code
s0 s2 XCHG // cfg_dict public_key old_code cs new_code
CTOS // cfg_dict public_key old_code cs _23
BLESS // cfg_dict public_key old_code cs _24
c3 POP
SWAP // cfg_dict public_key cs old_code
after_code_upgrade CALLDICT
0 THROW
}> // cfg_dict public_key param_id param_val
SWAP
-1001 PUSHINT // cfg_dict public_key param_val param_id _29=-1001
EQUAL // cfg_dict public_key param_val _30
IF:<{ // cfg_dict public_key param_val
CTOS // cfg_dict public_key cs
change_elector_code CALLDICT
}>ELSE<{
DROP // cfg_dict public_key
}>
}>
unpack_proposal_status PROCREF:<{
// cs
8 LDI // _2 cs
SWAP // cs _2
-50 EQINT // cs _8
44 THROWIFNOT
32 LDU // _10 cs
LDREF // _10 _13 cs
1 LDI // _10 _13 _15 cs
LDDICT // _10 _13 _15 _18 cs
64 LDI // _10 _13 _15 _18 _20 cs
256 LDU // _10 _13 _15 _18 _20 _23 cs
}>
update_proposal_status PROCREF:<{
// rest weight_remaining critical?
get_vote_config INLINECALLDICT // rest weight_remaining _43 _44 _45 _46 _47 _48 _49 _50
s4 s7 XCHG
7 BLKDROP // rest weight_remaining max_losses
s0 s2 XCHG // max_losses weight_remaining rest
8 LDU // max_losses weight_remaining _15 rest
8 LDU // max_losses weight_remaining _15 _18 rest
8 LDU // max_losses weight_remaining _15 _18 _56 _55
DROP // max_losses weight_remaining rounds_remaining wins losses
s0 s3 XCHG // max_losses losses rounds_remaining wins weight_remaining
-1 GTINT // max_losses losses rounds_remaining wins _25
s1 s3 XCHG // max_losses wins rounds_remaining losses _25
SUB // max_losses wins rounds_remaining losses
s0 s3 PUXC // losses wins rounds_remaining losses max_losses
GREATER // losses wins rounds_remaining _27
IFJMP:<{ // losses wins rounds_remaining
3 BLKDROP //
PUSHNULL // _28
}> // losses wins rounds_remaining
DEC // losses wins rounds_remaining
DUP // losses wins rounds_remaining rounds_remaining
0 LESSINT // losses wins rounds_remaining _32
IFJMP:<{ // losses wins rounds_remaining
3 BLKDROP //
PUSHNULL // _33
}> // losses wins rounds_remaining
NEWC // losses wins rounds_remaining _34
8 STU // losses wins _36
8 STU // losses _38
8 STU // _40
ENDC // _41
CTOS // _42
}>
begin_pack_proposal_status PROC:<{
// expires proposal critical? voters weight_remaining vset_id
-50 PUSHINT // expires proposal critical? voters weight_remaining vset_id _8
NEWC // expires proposal critical? voters weight_remaining vset_id _8 _9
8 STI // expires proposal critical? voters weight_remaining vset_id _11
s1 s6 XCHG // vset_id proposal critical? voters weight_remaining expires _11
32 STU // vset_id proposal critical? voters weight_remaining _13
s1 s4 XCHG // vset_id weight_remaining critical? voters proposal _13
STREF // vset_id weight_remaining critical? voters _14
s1 s2 XCHG // vset_id weight_remaining voters critical? _14
1 STI // vset_id weight_remaining voters _16
STDICT // vset_id weight_remaining _17
64 STI // vset_id _19
256 STU // _21
}>
register_vote PROCREF:<{
// vote_dict phash idx weight
s2 s3 PUSH2
8 PUSHPOW2 // vote_dict phash idx weight phash vote_dict _6=256
DICTUGET
NULLSWAPIFNOT // vote_dict phash idx weight pstatus found?
IFNOTJMP:<{ // vote_dict phash idx weight pstatus
4 BLKDROP // vote_dict
PUSHNULL // vote_dict _8
-1 PUSHINT // vote_dict _8 _9=-1
}> // vote_dict phash idx weight pstatus
get_current_vset INLINECALLDICT // vote_dict phash idx weight pstatus _111 _112 _113
DROP // vote_dict phash idx weight pstatus cur_vset total_weight
SWAP // vote_dict phash idx weight pstatus total_weight cur_vset
HASHCU // vote_dict phash idx weight pstatus total_weight cur_vset_id
s0 s2 XCHG // vote_dict phash idx weight cur_vset_id total_weight pstatus
unpack_proposal_status INLINECALLDICT // vote_dict phash idx weight cur_vset_id total_weight expires proposal critical? voters weight_remaining vset_id rest
s6 PUSH
NOW // vote_dict phash idx weight cur_vset_id total_weight expires proposal critical? voters weight_remaining vset_id rest expires _24
LEQ // vote_dict phash idx weight cur_vset_id total_weight expires proposal critical? voters weight_remaining vset_id rest _25
IFJMP:<{ // vote_dict phash idx weight cur_vset_id total_weight expires proposal critical? voters weight_remaining vset_id rest
11 BLKDROP // vote_dict phash
SWAP
8 PUSHPOW2 // phash vote_dict _27=256
DICTUDEL // _121 _122
DROP // vote_dict
PUSHNULL // vote_dict _29
-1 PUSHINT // vote_dict _29 _30=-1
}> // vote_dict phash idx weight cur_vset_id total_weight expires proposal critical? voters weight_remaining vset_id rest
s1 s8 PUSH2 // vote_dict phash idx weight cur_vset_id total_weight expires proposal critical? voters weight_remaining vset_id rest vset_id cur_vset_id
NEQ // vote_dict phash idx weight cur_vset_id total_weight expires proposal critical? voters weight_remaining vset_id rest _31
IF:<{ // vote_dict phash idx weight cur_vset_id total_weight expires proposal critical? voters weight_remaining vset_id rest
NIP
s2 POP // vote_dict phash idx weight vset_id total_weight expires proposal critical? rest weight_remaining
s2 PUSH // vote_dict phash idx weight vset_id total_weight expires proposal critical? rest weight_remaining critical?
update_proposal_status INLINECALLDICT // vote_dict phash idx weight vset_id total_weight expires proposal critical? rest
PUSHNULL // vote_dict phash idx weight vset_id total_weight expires proposal critical? rest voters
s0 s5 XCHG
3 PUSHINT // vote_dict phash idx weight vset_id voters expires proposal critical? rest total_weight _34=3
2 MULRSHIFT# // vote_dict phash idx weight vset_id voters expires proposal critical? rest weight_remaining
s1 s5 XCHG // vote_dict phash idx weight vset_id rest expires proposal critical? voters weight_remaining
}>ELSE<{
s7 POP
s7 POP // vote_dict phash idx weight vset_id rest expires proposal critical? voters weight_remaining
}>
s5 PUSH // vote_dict phash idx weight vset_id rest expires proposal critical? voters weight_remaining rest
ISNULL // vote_dict phash idx weight vset_id rest expires proposal critical? voters weight_remaining _37
IFJMP:<{ // vote_dict phash idx weight vset_id rest expires proposal critical? voters weight_remaining
9 BLKDROP // vote_dict phash
SWAP
8 PUSHPOW2 // phash vote_dict _39=256
DICTUDEL // _123 _124
DROP // vote_dict
PUSHNULL // vote_dict _41
-1 PUSHINT // vote_dict _41 _42=-1
}> // vote_dict phash idx weight vset_id rest expires proposal critical? voters weight_remaining
s8 s1 PUSH2
16 PUSHINT // vote_dict phash idx weight vset_id rest expires proposal critical? voters weight_remaining idx voters _45=16
DICTUGET
NULLSWAPIFNOT // vote_dict phash idx weight vset_id rest expires proposal critical? voters weight_remaining _125 _126
NIP // vote_dict phash idx weight vset_id rest expires proposal critical? voters weight_remaining found?
IFJMP:<{ // vote_dict phash idx weight vset_id rest expires proposal critical? voters weight_remaining
10 BLKDROP // vote_dict
PUSHNULL // vote_dict _47
-2 PUSHINT // vote_dict _47 _48=-2
}> // vote_dict phash idx weight vset_id rest expires proposal critical? voters weight_remaining
NOW // vote_dict phash idx weight vset_id rest expires proposal critical? voters weight_remaining _50
NEWC // vote_dict phash idx weight vset_id rest expires proposal critical? voters weight_remaining _50 _51
32 STU // vote_dict phash idx weight vset_id rest expires proposal critical? voters weight_remaining _53
s9 s2 XCHG2
16 PUSHINT // vote_dict phash weight_remaining weight vset_id rest expires proposal critical? _53 idx voters _54=16
DICTUSETB // vote_dict phash weight_remaining weight vset_id rest expires proposal critical? voters
s7 PUSH // vote_dict phash weight_remaining weight vset_id rest expires proposal critical? voters old_wr
s8 s7 XCHG2 // vote_dict phash voters old_wr vset_id rest expires proposal critical? weight_remaining weight
SUB // vote_dict phash voters old_wr vset_id rest expires proposal critical? weight_remaining
s0 s6 PUXC // vote_dict phash voters weight_remaining vset_id rest expires proposal critical? weight_remaining old_wr
XOR // vote_dict phash voters weight_remaining vset_id rest expires proposal critical? _58
-1 GTINT // vote_dict phash voters weight_remaining vset_id rest expires proposal critical? _60
IFJMP:<{ // vote_dict phash voters weight_remaining vset_id rest expires proposal critical?
3 4 BLKSWAP // vote_dict phash rest expires proposal critical? voters weight_remaining vset_id
begin_pack_proposal_status INLINECALLDICT // vote_dict phash rest _62
SWAP // vote_dict phash _62 rest
STSLICER // vote_dict phash _63
s0 s2 XCHG
8 PUSHPOW2 // _63 phash vote_dict _64=256
DICTUSETB // vote_dict
PUSHNULL // vote_dict _66
2 PUSHINT // vote_dict _66 _67=2
}> // vote_dict phash voters weight_remaining vset_id rest expires proposal critical?
DUP // vote_dict phash voters weight_remaining vset_id rest expires proposal critical? critical?
get_vote_config INLINECALLDICT // vote_dict phash voters weight_remaining vset_id rest expires proposal critical? _127 _128 _129 _130 _131 _132 _133 _134
s5 s7 XCHG
7 BLKDROP // vote_dict phash voters weight_remaining vset_id rest expires proposal critical? min_wins
s0 s4 XCHG // vote_dict phash voters weight_remaining vset_id min_wins expires proposal critical? rest
8 LDU // vote_dict phash voters weight_remaining vset_id min_wins expires proposal critical? _80 rest
8 LDU // vote_dict phash voters weight_remaining vset_id min_wins expires proposal critical? _80 _83 rest
8 LDU // vote_dict phash voters weight_remaining vset_id min_wins expires proposal critical? _80 _83 _140 _139
DROP // vote_dict phash voters weight_remaining vset_id min_wins expires proposal critical? rounds_remaining wins losses
SWAP // vote_dict phash voters weight_remaining vset_id min_wins expires proposal critical? rounds_remaining losses wins
INC // vote_dict phash voters weight_remaining vset_id min_wins expires proposal critical? rounds_remaining losses wins
s0 s6 PUXC // vote_dict phash voters weight_remaining vset_id wins expires proposal critical? rounds_remaining losses wins min_wins
GEQ // vote_dict phash voters weight_remaining vset_id wins expires proposal critical? rounds_remaining losses _91
IFJMP:<{ // vote_dict phash voters weight_remaining vset_id wins expires proposal critical? rounds_remaining losses
2DROP
s5 s6 XCHG2
5 BLKDROP // vote_dict phash critical? proposal
s2 s3 XCHG2
8 PUSHPOW2 // proposal critical? phash vote_dict _93=256
DICTUDEL // proposal critical? _141 _142
DROP // proposal critical? vote_dict
6 PUSHINT
ROT // proposal vote_dict _95=6 critical?
SUB // proposal vote_dict _96
s1 s2 XCHG // vote_dict proposal _96
}> // vote_dict phash voters weight_remaining vset_id wins expires proposal critical? rounds_remaining losses
s4 s5 XCHG
s3 s4 XCHG
s2 s3 XCHG
s8 s7 s6 XCHG3 // vote_dict phash wins rounds_remaining losses expires proposal critical? voters weight_remaining vset_id
begin_pack_proposal_status INLINECALLDICT // vote_dict phash wins rounds_remaining losses _98
s1 s2 XCHG // vote_dict phash wins losses rounds_remaining _98
8 STU // vote_dict phash wins losses _100
s1 s2 XCHG // vote_dict phash losses wins _100
8 STU // vote_dict phash losses _102
8 STU // vote_dict phash _104
s0 s2 XCHG
8 PUSHPOW2 // _104 phash vote_dict _105=256
DICTUSETB // vote_dict
PUSHNULL // vote_dict _107
2 PUSHINT // vote_dict _107 _108=2
}>
proceed_register_vote PROCREF:<{
// phash idx weight
load_data INLINECALLDICT // phash idx weight cfg_dict stored_seqno public_key vote_dict
s6 s1 s3 XCHG3
s5 s4 XCHG2 // stored_seqno public_key cfg_dict vote_dict phash idx weight
register_vote INLINECALLDICT // stored_seqno public_key cfg_dict vote_dict accepted_proposal status
s3 s5 s4 PUSH3
s5 PUSH // stored_seqno public_key cfg_dict vote_dict accepted_proposal status cfg_dict stored_seqno public_key vote_dict
store_data INLINECALLDICT
OVER // stored_seqno public_key cfg_dict vote_dict accepted_proposal status accepted_proposal
ISNULL // stored_seqno public_key cfg_dict vote_dict accepted_proposal status _12
IFNOT:<{ // stored_seqno public_key cfg_dict vote_dict accepted_proposal status
6 PUSHINT // stored_seqno public_key cfg_dict vote_dict accepted_proposal status _14=6
OVER // stored_seqno public_key cfg_dict vote_dict accepted_proposal status _14=6 status
SUB // stored_seqno public_key cfg_dict vote_dict accepted_proposal status critical?
s4 s4 s0 XCHG3 // stored_seqno public_key status vote_dict cfg_dict accepted_proposal critical?
accept_proposal INLINECALLDICT // stored_seqno public_key status vote_dict cfg_dict param_id param_val
s2 s6 s5 PUSH3
s6 PUSH // stored_seqno public_key status vote_dict cfg_dict param_id param_val cfg_dict stored_seqno public_key vote_dict
store_data INLINECALLDICT
OVER // stored_seqno public_key status vote_dict cfg_dict param_id param_val param_id
IF:<{ // stored_seqno public_key status vote_dict cfg_dict param_id param_val
COMMIT
s2 s3 XCHG
s2 s5 XCHG // stored_seqno vote_dict status cfg_dict public_key param_id param_val
perform_proposed_action INLINECALLDICT // stored_seqno vote_dict status cfg_dict public_key
s4 s0 s3 XCHG3 // status cfg_dict stored_seqno public_key vote_dict
store_data INLINECALLDICT
}>ELSE<{
s4 s6 XCHG
6 BLKDROP // status
}>
}>ELSE<{
5 1 BLKDROP2 // status
}>
}>
scan_proposal PROCREF:<{
// phash pstatus
NIP // pstatus
get_current_vset INLINECALLDICT // pstatus _35 _36 _37
DROP // pstatus cur_vset total_weight
SWAP // pstatus total_weight cur_vset
HASHCU // pstatus total_weight cur_vset_id
s2 PUSH // pstatus total_weight cur_vset_id pstatus
unpack_proposal_status INLINECALLDICT // pstatus total_weight cur_vset_id _38 _39 _40 _41 _42 _43 _44
s3 POP // pstatus total_weight cur_vset_id expires proposal critical? rest weight_remaining vset_id
s5 PUSH
NOW // pstatus total_weight cur_vset_id expires proposal critical? rest weight_remaining vset_id expires _16
LEQ // pstatus total_weight cur_vset_id expires proposal critical? rest weight_remaining vset_id _17
IFJMP:<{ // pstatus total_weight cur_vset_id expires proposal critical? rest weight_remaining vset_id
9 BLKDROP //
PUSHNULL // _18
TRUE // _18 _19
}> // pstatus total_weight cur_vset_id expires proposal critical? rest weight_remaining vset_id
s6 PUSH // pstatus total_weight cur_vset_id expires proposal critical? rest weight_remaining vset_id cur_vset_id
EQUAL // pstatus total_weight cur_vset_id expires proposal critical? rest weight_remaining _20
IFJMP:<{ // pstatus total_weight cur_vset_id expires proposal critical? rest weight_remaining
7 BLKDROP // pstatus
FALSE // pstatus _21
}> // pstatus total_weight cur_vset_id expires proposal critical? rest weight_remaining
s7 POP // weight_remaining total_weight vset_id expires proposal critical? rest
s0 s6 s6 XC2PU // critical? total_weight vset_id expires proposal rest weight_remaining critical?
update_proposal_status INLINECALLDICT // critical? total_weight vset_id expires proposal rest
PUSHNULL // critical? total_weight vset_id expires proposal rest voters
s0 s5 XCHG
3 PUSHINT // critical? voters vset_id expires proposal rest total_weight _24=3
2 MULRSHIFT# // critical? voters vset_id expires proposal rest weight_remaining
OVER // critical? voters vset_id expires proposal rest weight_remaining rest
ISNULL // critical? voters vset_id expires proposal rest weight_remaining _27
IFJMP:<{ // critical? voters vset_id expires proposal rest weight_remaining
7 BLKDROP //
PUSHNULL // _28
TRUE // _28 _29
}> // critical? voters vset_id expires proposal rest weight_remaining
s3 s5 XCHG
s2 s4 XCHG
s3 s6 XCHG
s6 s0 s6 XCHG3 // rest expires proposal critical? voters weight_remaining vset_id
begin_pack_proposal_status INLINECALLDICT // rest _30
SWAP // _30 rest
STSLICER // _31
ENDC // _32
CTOS // _33
TRUE // _33 _34
}>
scan_random_proposal PROCREF:<{
// vote_dict
RANDU256 // vote_dict _4
OVER
8 PUSHPOW2 // vote_dict _4 vote_dict _5=256
DICTUGETNEXTEQ
NULLSWAPIFNOT2 // vote_dict pstatus phash found?
IFNOTJMP:<{ // vote_dict pstatus phash
2DROP // vote_dict
}> // vote_dict pstatus phash
s0 s1 PUXC // vote_dict phash phash pstatus
scan_proposal INLINECALLDICT // vote_dict phash pstatus changed?
IF:<{ // vote_dict phash pstatus
DUP // vote_dict phash pstatus pstatus
ISNULL // vote_dict phash pstatus _9
IF:<{ // vote_dict phash pstatus
DROP // vote_dict phash
SWAP
8 PUSHPOW2 // phash vote_dict _11=256
DICTUDEL // _21 _22
DROP // vote_dict
}>ELSE<{ // vote_dict phash pstatus
s0 s2 XCHG
8 PUSHPOW2 // pstatus phash vote_dict _14=256
DICTUSET // vote_dict
}>
}>ELSE<{
2DROP // vote_dict
}>
}>
register_voting_proposal PROCREF:<{
// cs msg_value
SWAP // msg_value cs
32 LDU // msg_value _5 cs
LDREF // msg_value _5 _8 cs
1 LDI // msg_value _5 _8 _156 _155
DROP // msg_value expire_at proposal critical?
s2 PUSH // msg_value expire_at proposal critical? expire_at
30 RSHIFT# // msg_value expire_at proposal critical? _14
IF:<{ // msg_value expire_at proposal critical?
s0 s2 XCHG
NOW // msg_value critical? proposal expire_at _15
SUB // msg_value critical? proposal expire_at
s0 s2 XCHG // msg_value expire_at proposal critical?
}> // msg_value expire_at proposal critical?
OVER // msg_value expire_at proposal critical? proposal
parse_config_proposal INLINECALLDICT // msg_value expire_at proposal critical? param_id param_val hash
DUP // msg_value expire_at proposal critical? param_id param_val hash hash
-1 GTINT // msg_value expire_at proposal critical? param_id param_val hash _22
IF:<{ // msg_value expire_at proposal critical? param_id param_val hash
s2 PUSH // msg_value expire_at proposal critical? param_id param_val hash param_id
CONFIGOPTPARAM // msg_value expire_at proposal critical? param_id param_val hash cur_val
DUP // msg_value expire_at proposal critical? param_id param_val hash cur_val cur_val
ISNULL // msg_value expire_at proposal critical? param_id param_val hash cur_val _26
IF:<{ // msg_value expire_at proposal critical? param_id param_val hash cur_val
DROP // msg_value expire_at proposal critical? param_id param_val hash
0 PUSHINT // msg_value expire_at proposal critical? param_id param_val hash _27=0
}>ELSE<{ // msg_value expire_at proposal critical? param_id param_val hash cur_val
HASHCU // msg_value expire_at proposal critical? param_id param_val hash _27
}> // msg_value expire_at proposal critical? param_id param_val hash cur_hash
OVER // msg_value expire_at proposal critical? param_id param_val hash cur_hash hash
NEQ // msg_value expire_at proposal critical? param_id param_val hash _30
IF:<{ // msg_value expire_at proposal critical? param_id param_val hash
DROP // msg_value expire_at proposal critical? param_id param_val
-3798229846 PUSHINT // msg_value expire_at proposal critical? param_id param_val hash=-3798229846
}> // msg_value expire_at proposal critical? param_id param_val hash
}>ELSE<{ // msg_value expire_at proposal critical? param_id param_val hash
9 PUSHINT // msg_value expire_at proposal critical? param_id param_val hash _33=9
CONFIGOPTPARAM // msg_value expire_at proposal critical? param_id param_val hash m_params
s3 s(-1) PUXC
32 PUSHINT // msg_value expire_at proposal critical? param_id param_val hash param_id m_params _37=32
DICTIGET
NULLSWAPIFNOT // msg_value expire_at proposal critical? param_id param_val hash _160 _161
NIP // msg_value expire_at proposal critical? param_id param_val hash found?
IF:<{ // msg_value expire_at proposal critical? param_id param_val hash
DROP // msg_value expire_at proposal critical? param_id param_val
-3444600428 PUSHINT // msg_value expire_at proposal critical? param_id param_val hash=-3444600428
}> // msg_value expire_at proposal critical? param_id param_val hash
}>
OVER // msg_value expire_at proposal critical? param_id param_val hash param_val
CDEPTH // msg_value expire_at proposal critical? param_id param_val hash _40
7 PUSHPOW2 // msg_value expire_at proposal critical? param_id param_val hash _40 _41=128
GEQ // msg_value expire_at proposal critical? param_id param_val hash _42
IF:<{ // msg_value expire_at proposal critical? param_id param_val hash
DROP // msg_value expire_at proposal critical? param_id param_val
-3261162582 PUSHINT // msg_value expire_at proposal critical? param_id param_val hash=-3261162582
}> // msg_value expire_at proposal critical? param_id param_val hash
DUP // msg_value expire_at proposal critical? param_id param_val hash hash
-1 LESSINT // msg_value expire_at proposal critical? param_id param_val hash _45
IFJMP:<{ // msg_value expire_at proposal critical? param_id param_val hash
6 1 BLKDROP2 // hash
}> // msg_value expire_at proposal critical? param_id param_val hash
s3 PUSH // msg_value expire_at proposal critical? param_id param_val hash critical?
IFNOT:<{ // msg_value expire_at proposal critical? param_id param_val hash
10 PUSHINT // msg_value expire_at proposal critical? param_id param_val hash _47=10
CONFIGOPTPARAM // msg_value expire_at proposal critical? param_id param_val hash crit_params
s1 s3 XCHG
32 PUSHINT // msg_value expire_at proposal critical? hash param_val param_id crit_params _51=32
DICTIGET
NULLSWAPIFNOT // msg_value expire_at proposal critical? hash param_val _162 _163
NIP // msg_value expire_at proposal critical? hash param_val found?
IF:<{ // msg_value expire_at proposal critical? hash param_val
-3279055188 PUSHINT
s2 POP // msg_value expire_at proposal critical? hash=-3279055188 param_val
}> // msg_value expire_at proposal critical? hash param_val
}>ELSE<{
s2 POP // msg_value expire_at proposal critical? hash param_val
}>
OVER // msg_value expire_at proposal critical? hash param_val hash
-1 LESSINT // msg_value expire_at proposal critical? hash param_val _55
IFJMP:<{ // msg_value expire_at proposal critical? hash param_val
s1 s5 XCHG
5 BLKDROP // hash
}> // msg_value expire_at proposal critical? hash param_val
NIP // msg_value expire_at proposal critical? param_val
OVER // msg_value expire_at proposal critical? param_val critical?
get_vote_config INLINECALLDICT // msg_value expire_at proposal critical? param_val _172 _173 _174 _175 _176 _177 _178 _179
s4 POP
s4 POP
s5 POP // msg_value expire_at proposal critical? param_val max_store_sec max_tot_rounds bit_price cell_price min_store_sec
s8 s(-1) PUXC // msg_value expire_at proposal critical? param_val max_store_sec max_tot_rounds bit_price cell_price expire_at min_store_sec
LESS // msg_value expire_at proposal critical? param_val max_store_sec max_tot_rounds bit_price cell_price _66
IFJMP:<{ // msg_value expire_at proposal critical? param_val max_store_sec max_tot_rounds bit_price cell_price
9 BLKDROP //
-3313004649 PUSHINT // _67=-3313004649
}> // msg_value expire_at proposal critical? param_val max_store_sec max_tot_rounds bit_price cell_price
s7 s3 XCHG2 // msg_value bit_price proposal critical? param_val cell_price max_tot_rounds expire_at max_store_sec
MIN // msg_value bit_price proposal critical? param_val cell_price max_tot_rounds expire_at
s0 s3 XCHG
10 PUSHPOW2 // msg_value bit_price proposal critical? expire_at cell_price max_tot_rounds param_val _72=1024
CDATASIZE // msg_value bit_price proposal critical? expire_at cell_price max_tot_rounds _180 _181 _182
s2 POP // msg_value bit_price proposal critical? expire_at cell_price max_tot_rounds refs bits
10 PUSHPOW2 // msg_value bit_price proposal critical? expire_at cell_price max_tot_rounds refs bits _75=1024
ADD // msg_value bit_price proposal critical? expire_at cell_price max_tot_rounds refs _76
s1 s7 XCHG // msg_value refs proposal critical? expire_at cell_price max_tot_rounds bit_price _76
MUL // msg_value refs proposal critical? expire_at cell_price max_tot_rounds _77
s0 s6 XCHG // msg_value _77 proposal critical? expire_at cell_price max_tot_rounds refs
2 ADDCONST // msg_value _77 proposal critical? expire_at cell_price max_tot_rounds _79
s1 s2 XCHG // msg_value _77 proposal critical? expire_at max_tot_rounds cell_price _79
MUL // msg_value _77 proposal critical? expire_at max_tot_rounds _80
s1 s5 XCHG // msg_value max_tot_rounds proposal critical? expire_at _77 _80
ADD // msg_value max_tot_rounds proposal critical? expire_at pps
s0 s1 PUSH2 // msg_value max_tot_rounds proposal critical? expire_at pps pps expire_at
MUL // msg_value max_tot_rounds proposal critical? expire_at pps price
s0 s2 XCHG
NOW // msg_value max_tot_rounds proposal critical? price pps expire_at _84
ADD // msg_value max_tot_rounds proposal critical? price pps expire_at
load_data INLINECALLDICT // msg_value max_tot_rounds proposal critical? price pps expire_at cfg_dict stored_seqno public_key vote_dict
s8 PUSH // msg_value max_tot_rounds proposal critical? price pps expire_at cfg_dict stored_seqno public_key vote_dict proposal
HASHCU // msg_value max_tot_rounds proposal critical? price pps expire_at cfg_dict stored_seqno public_key vote_dict phash
s0 s1 PUSH2
8 PUSHPOW2 // msg_value max_tot_rounds proposal critical? price pps expire_at cfg_dict stored_seqno public_key vote_dict phash phash vote_dict _95=256
DICTUGET
NULLSWAPIFNOT // msg_value max_tot_rounds proposal critical? price pps expire_at cfg_dict stored_seqno public_key vote_dict phash pstatus found?
IFJMP:<{ // msg_value max_tot_rounds proposal critical? price pps expire_at cfg_dict stored_seqno public_key vote_dict phash pstatus
s8 POP
s9 POP
s9 POP // msg_value vote_dict phash critical? pstatus pps expire_at cfg_dict stored_seqno public_key
s0 s5 XCHG // msg_value vote_dict phash critical? public_key pps expire_at cfg_dict stored_seqno pstatus
unpack_proposal_status INLINECALLDICT // msg_value vote_dict phash critical? public_key pps expire_at cfg_dict stored_seqno expires r_proposal r_critical? voters weight_remaining vset_id rest
s4 s12 PUXC // msg_value vote_dict phash rest public_key pps expire_at cfg_dict stored_seqno expires r_proposal r_critical? voters weight_remaining vset_id r_critical? critical?
NEQ // msg_value vote_dict phash rest public_key pps expire_at cfg_dict stored_seqno expires r_proposal r_critical? voters weight_remaining vset_id _105
IFJMP:<{ // msg_value vote_dict phash rest public_key pps expire_at cfg_dict stored_seqno expires r_proposal r_critical? voters weight_remaining vset_id
15 BLKDROP //
-3279055189 PUSHINT // _106=-3279055189
}> // msg_value vote_dict phash rest public_key pps expire_at cfg_dict stored_seqno expires r_proposal r_critical? voters weight_remaining vset_id
s5 s8 PUSH2 // msg_value vote_dict phash rest public_key pps expire_at cfg_dict stored_seqno expires r_proposal r_critical? voters weight_remaining vset_id expires expire_at
GEQ // msg_value vote_dict phash rest public_key pps expire_at cfg_dict stored_seqno expires r_proposal r_critical? voters weight_remaining vset_id _107
IFJMP:<{ // msg_value vote_dict phash rest public_key pps expire_at cfg_dict stored_seqno expires r_proposal r_critical? voters weight_remaining vset_id
15 BLKDROP //
-3245109829 PUSHINT // _108=-3245109829
}> // msg_value vote_dict phash rest public_key pps expire_at cfg_dict stored_seqno expires r_proposal r_critical? voters weight_remaining vset_id
s8 s5 PUXC // msg_value vote_dict phash rest public_key pps expire_at cfg_dict stored_seqno vset_id r_proposal r_critical? voters weight_remaining expire_at expires
SUB // msg_value vote_dict phash rest public_key pps expire_at cfg_dict stored_seqno vset_id r_proposal r_critical? voters weight_remaining _109
14 PUSHPOW2 // msg_value vote_dict phash rest public_key pps expire_at cfg_dict stored_seqno vset_id r_proposal r_critical? voters weight_remaining _109 _110=16384
ADD // msg_value vote_dict phash rest public_key pps expire_at cfg_dict stored_seqno vset_id r_proposal r_critical? voters weight_remaining _111
s1 s9 XCHG // msg_value vote_dict phash rest public_key weight_remaining expire_at cfg_dict stored_seqno vset_id r_proposal r_critical? voters pps _111
MUL // msg_value vote_dict phash rest public_key weight_remaining expire_at cfg_dict stored_seqno vset_id r_proposal r_critical? voters price
s13 s13 XCPU // price vote_dict phash rest public_key weight_remaining expire_at cfg_dict stored_seqno vset_id r_proposal r_critical? voters msg_value price
SUB // price vote_dict phash rest public_key weight_remaining expire_at cfg_dict stored_seqno vset_id r_proposal r_critical? voters _113
30 PUSHPOW2 // price vote_dict phash rest public_key weight_remaining expire_at cfg_dict stored_seqno vset_id r_proposal r_critical? voters _113 _116
LESS // price vote_dict phash rest public_key weight_remaining expire_at cfg_dict stored_seqno vset_id r_proposal r_critical? voters _117
IFJMP:<{ // price vote_dict phash rest public_key weight_remaining expire_at cfg_dict stored_seqno vset_id r_proposal r_critical? voters
13 BLKDROP //
-4032919844 PUSHINT // _118=-4032919844
}> // price vote_dict phash rest public_key weight_remaining expire_at cfg_dict stored_seqno vset_id r_proposal r_critical? voters
s5 s6 XCHG
s0 s1 s4 XCHG3
s7 s7 XCHG2
s0 s3 XCHG // price vote_dict phash rest public_key stored_seqno cfg_dict expire_at r_proposal r_critical? voters weight_remaining vset_id
begin_pack_proposal_status INLINECALLDICT // price vote_dict phash rest public_key stored_seqno cfg_dict _120
s0 s4 XCHG2 // price vote_dict phash cfg_dict public_key stored_seqno _120 rest
STSLICER // price vote_dict phash cfg_dict public_key stored_seqno _121
s0 s4 s5 XCHG3
8 PUSHPOW2 // price public_key stored_seqno cfg_dict _121 phash vote_dict _122=256
DICTUSETB // price public_key stored_seqno cfg_dict vote_dict
s1 s3 XCHG // price cfg_dict stored_seqno public_key vote_dict
store_data INLINECALLDICT
}> // msg_value max_tot_rounds proposal critical? price pps expire_at cfg_dict stored_seqno public_key vote_dict phash pstatus
DROP
s6 POP // msg_value max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key vote_dict
s10 s6 XCPU // vote_dict max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key msg_value price
SUB // vote_dict max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key _125
30 PUSHPOW2 // vote_dict max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key _125 _128
LESS // vote_dict max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key _129
IFJMP:<{ // vote_dict max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key
10 BLKDROP //
-4032919844 PUSHINT // _130=-4032919844
}> // vote_dict max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key
get_current_vset INLINECALLDICT // vote_dict max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key _196 _197 _198
DROP // vote_dict max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key vset total_weight
3 PUSHINT // vote_dict max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key vset total_weight _136=3
2 MULRSHIFT# // vote_dict max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key vset weight_remaining
0 PUSHINT // vote_dict max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key vset weight_remaining _140=0
PUSHNULL // vote_dict max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key vset weight_remaining _140=0 _141
s0 s3 XCHG // vote_dict max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key _141 weight_remaining _140=0 vset
HASHCU // vote_dict max_tot_rounds proposal critical? price phash expire_at cfg_dict stored_seqno public_key _141 weight_remaining _140=0 _142
s5 s7 XCHG
s4 s11 XCHG
s1 s10 XCHG
s3 s3 s0 XCHG3 // vote_dict max_tot_rounds public_key _140=0 price phash stored_seqno cfg_dict expire_at proposal critical? _141 weight_remaining _142
begin_pack_proposal_status INLINECALLDICT // vote_dict max_tot_rounds public_key _140=0 price phash stored_seqno cfg_dict _143
s1 s7 XCHG // vote_dict cfg_dict public_key _140=0 price phash stored_seqno max_tot_rounds _143
8 STU // vote_dict cfg_dict public_key _140=0 price phash stored_seqno _145
s1 s4 XCHG // vote_dict cfg_dict public_key stored_seqno price phash _140=0 _145
16 STU // vote_dict cfg_dict public_key stored_seqno price phash _147
s0 s1 s6 XCHG3
8 PUSHPOW2 // price cfg_dict public_key stored_seqno _147 phash vote_dict _148=256
DICTUSETB // price cfg_dict public_key stored_seqno vote_dict
s1 s2 XCHG // price cfg_dict stored_seqno public_key vote_dict
store_data INLINECALLDICT
}>
recv_internal PROC:<{
// msg_value in_msg_cell in_msg
SWAP // msg_value in_msg in_msg_cell
CTOS // msg_value in_msg cs
4 LDU // msg_value in_msg flags cs
LDMSGADDR // msg_value in_msg flags _128 _127
DROP // msg_value in_msg flags s_addr
DUP // msg_value in_msg flags s_addr s_addr
REWRITESTDADDR // msg_value in_msg flags s_addr src_wc src_addr
SWAP // msg_value in_msg flags s_addr src_addr src_wc
INC // msg_value in_msg flags s_addr src_addr _16
s0 s3 XCHG
1 PUSHINT // msg_value in_msg _16 s_addr src_addr flags _17=1
AND // msg_value in_msg _16 s_addr src_addr _18
s1 s3 XCHG // msg_value in_msg src_addr s_addr _16 _18
OR // msg_value in_msg src_addr s_addr _19
s3 PUSH // msg_value in_msg src_addr s_addr _19 in_msg
SEMPTY // msg_value in_msg src_addr s_addr _19 _20
OR // msg_value in_msg src_addr s_addr _21
IFJMP:<{ // msg_value in_msg src_addr s_addr
4 BLKDROP //
}> // msg_value in_msg src_addr s_addr
s0 s2 XCHG // msg_value s_addr src_addr in_msg
32 LDU // msg_value s_addr src_addr tag in_msg
64 LDU // msg_value s_addr src_addr tag query_id in_msg
s2 PUSH
1314280276 PUSHINT // msg_value s_addr src_addr tag query_id in_msg tag _30=1314280276
EQUAL // msg_value s_addr src_addr tag query_id in_msg _31
IFJMP:<{ // msg_value s_addr src_addr tag query_id in_msg
s2 POP
s4 POP // query_id s_addr src_addr in_msg
LDREF // query_id s_addr src_addr vset in_msg
ENDS
1 PUSHINT // query_id s_addr src_addr vset _37=1
CONFIGOPTPARAM // query_id s_addr src_addr vset elector_param
DUP // query_id s_addr src_addr vset elector_param elector_param
ISNULL // query_id s_addr src_addr vset elector_param _40
IF:<{ // query_id s_addr src_addr vset elector_param
DROP // query_id s_addr src_addr vset
-1 PUSHINT // query_id s_addr src_addr vset _41=-1
}>ELSE<{ // query_id s_addr src_addr vset elector_param
CTOS // query_id s_addr src_addr vset _43
256 PLDU // query_id s_addr src_addr vset _41
}> // query_id s_addr src_addr vset elector_addr
s0 s2 XCHG
FALSE
s0 s3 XCHG // query_id s_addr ok vset src_addr elector_addr
EQUAL // query_id s_addr ok vset _48
IF:<{ // query_id s_addr ok vset
NIP // query_id s_addr vset
DUP // query_id s_addr vset vset
check_validator_set CALLDICT // query_id s_addr vset t_since t_until
OVER
NOW // query_id s_addr vset t_since t_until t_since t
GREATER // query_id s_addr vset t_since t_until _54
s0 s2 XCHG // query_id s_addr vset _54 t_until t_since
GREATER // query_id s_addr vset _54 _55
AND // query_id s_addr vset ok
SWAP // query_id s_addr ok vset
}> // query_id s_addr ok vset
SWAP // query_id s_addr vset ok
IFJMP:<{ // query_id s_addr vset
36 PUSHINT // query_id s_addr vset _57=36
SWAP // query_id s_addr _57=36 vset
set_conf_param CALLDICT
SWAP
4000730955 PUSHINT // s_addr query_id _59=4000730955
send_confirmation INLINECALLDICT
}> // query_id s_addr vset
DROP // query_id s_addr
SWAP
4000730991 PUSHINT // s_addr query_id _61=4000730991
send_error INLINECALLDICT
}> // msg_value s_addr src_addr tag query_id in_msg
s3 POP // msg_value s_addr in_msg tag query_id
OVER