@sentio/runtime 2.57.9-rc.11 → 2.57.9-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{chunk-2VEXZO35.js → chunk-TTE5MQNI.js} +13 -13
- package/lib/{chunk-2VEXZO35.js.map → chunk-TTE5MQNI.js.map} +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/lib/processor-runner.js +27 -27
- package/lib/processor-runner.js.map +1 -1
- package/package.json +1 -1
- package/src/full-service.ts +21 -0
- package/src/gen/processor/protos/processor.ts +157 -1
- package/src/service.ts +0 -1
package/package.json
CHANGED
package/src/full-service.ts
CHANGED
@@ -28,6 +28,7 @@ const FUEL_PROTO_UPDATE_VERSION = parseSemver('2.54.0-rc.7')
|
|
28
28
|
const FUEL_PROTO_NO_FUEL_TRANSACTION_AS_CALL_VERSION = parseSemver('2.55.0-rc.1')
|
29
29
|
|
30
30
|
const MOVE_USE_RAW_VERSION = parseSemver('2.55.0-rc.1')
|
31
|
+
const ETH_USE_RAW_VERSION = parseSemver('2.57.9-rc.12')
|
31
32
|
// new driver (after MOVE_USE_RAW_VERSION) will sent the same event multiple times when fetch all true
|
32
33
|
// so we need to cache it, key will be tx-handler_id
|
33
34
|
const PROCESSED_MOVE_EVENT_TX_HANDLER = new LRUCache<string, boolean>({
|
@@ -162,11 +163,31 @@ export class FullProcessorServiceImpl implements ProcessorServiceImplementation
|
|
162
163
|
|
163
164
|
private adjustDataBinding(dataBinding?: DataBinding): void {
|
164
165
|
const isBeforeMoveUseRawVersion = compareSemver(this.sdkVersion, MOVE_USE_RAW_VERSION) < 0
|
166
|
+
// const isBeforeEthUseRawVersion = compareSemver(this.sdkVersion,ETH_USE_RAW_VERSION) < 0
|
165
167
|
|
166
168
|
if (!dataBinding) {
|
167
169
|
return
|
168
170
|
}
|
169
171
|
switch (dataBinding.handlerType) {
|
172
|
+
case HandlerType.ETH_LOG:
|
173
|
+
const ethLog = dataBinding.data?.ethLog
|
174
|
+
if (ethLog?.log == null && ethLog?.rawLog) {
|
175
|
+
ethLog.log = JSON.parse(ethLog.rawLog)
|
176
|
+
ethLog.transaction = ethLog.rawTransaction ? JSON.parse(ethLog.rawTransaction) : undefined
|
177
|
+
ethLog.block = ethLog.rawBlock ? JSON.parse(ethLog.rawBlock) : undefined
|
178
|
+
ethLog.transactionReceipt = ethLog.rawTransactionReceipt
|
179
|
+
? JSON.parse(ethLog.rawTransactionReceipt)
|
180
|
+
: undefined
|
181
|
+
}
|
182
|
+
break
|
183
|
+
case HandlerType.ETH_TRANSACTION:
|
184
|
+
const ethTx = dataBinding.data?.ethTransaction
|
185
|
+
if (ethTx?.transaction == null && ethTx?.rawTransaction) {
|
186
|
+
ethTx.transaction = JSON.parse(ethTx.rawTransaction)
|
187
|
+
ethTx.block = ethTx.rawBlock ? JSON.parse(ethTx.rawBlock) : undefined
|
188
|
+
ethTx.transactionReceipt = ethTx.rawTransactionReceipt ? JSON.parse(ethTx.rawTransactionReceipt) : undefined
|
189
|
+
}
|
190
|
+
break
|
170
191
|
case HandlerType.FUEL_TRANSACTION:
|
171
192
|
if (compareSemver(this.sdkVersion, FUEL_PROTO_UPDATE_VERSION) < 0) {
|
172
193
|
dataBinding.handlerType = HandlerType.FUEL_CALL
|
@@ -416,6 +416,7 @@ export interface ExecutionConfig_DecoderWorkerConfig {
|
|
416
416
|
enabled: boolean;
|
417
417
|
workerCount?: number | undefined;
|
418
418
|
skipWhenDecodeFailed?: boolean | undefined;
|
419
|
+
recordTiming?: boolean | undefined;
|
419
420
|
}
|
420
421
|
|
421
422
|
export interface ProcessConfigRequest {
|
@@ -1118,6 +1119,10 @@ export interface Data_EthLog {
|
|
1118
1119
|
transaction?: { [key: string]: any } | undefined;
|
1119
1120
|
transactionReceipt?: { [key: string]: any } | undefined;
|
1120
1121
|
block?: { [key: string]: any } | undefined;
|
1122
|
+
rawLog: string;
|
1123
|
+
rawTransaction?: string | undefined;
|
1124
|
+
rawTransactionReceipt?: string | undefined;
|
1125
|
+
rawBlock?: string | undefined;
|
1121
1126
|
}
|
1122
1127
|
|
1123
1128
|
export interface Data_EthBlock {
|
@@ -1130,6 +1135,10 @@ export interface Data_EthTransaction {
|
|
1130
1135
|
transactionReceipt?: { [key: string]: any } | undefined;
|
1131
1136
|
block?: { [key: string]: any } | undefined;
|
1132
1137
|
trace?: { [key: string]: any } | undefined;
|
1138
|
+
rawTransaction: string;
|
1139
|
+
rawTransactionReceipt?: string | undefined;
|
1140
|
+
rawBlock?: string | undefined;
|
1141
|
+
rawTrace?: string | undefined;
|
1133
1142
|
}
|
1134
1143
|
|
1135
1144
|
export interface Data_EthTrace {
|
@@ -1587,7 +1596,7 @@ export const ExecutionConfig = {
|
|
1587
1596
|
};
|
1588
1597
|
|
1589
1598
|
function createBaseExecutionConfig_DecoderWorkerConfig(): ExecutionConfig_DecoderWorkerConfig {
|
1590
|
-
return { enabled: false, workerCount: undefined, skipWhenDecodeFailed: undefined };
|
1599
|
+
return { enabled: false, workerCount: undefined, skipWhenDecodeFailed: undefined, recordTiming: undefined };
|
1591
1600
|
}
|
1592
1601
|
|
1593
1602
|
export const ExecutionConfig_DecoderWorkerConfig = {
|
@@ -1601,6 +1610,9 @@ export const ExecutionConfig_DecoderWorkerConfig = {
|
|
1601
1610
|
if (message.skipWhenDecodeFailed !== undefined) {
|
1602
1611
|
writer.uint32(24).bool(message.skipWhenDecodeFailed);
|
1603
1612
|
}
|
1613
|
+
if (message.recordTiming !== undefined) {
|
1614
|
+
writer.uint32(32).bool(message.recordTiming);
|
1615
|
+
}
|
1604
1616
|
return writer;
|
1605
1617
|
},
|
1606
1618
|
|
@@ -1632,6 +1644,13 @@ export const ExecutionConfig_DecoderWorkerConfig = {
|
|
1632
1644
|
|
1633
1645
|
message.skipWhenDecodeFailed = reader.bool();
|
1634
1646
|
continue;
|
1647
|
+
case 4:
|
1648
|
+
if (tag !== 32) {
|
1649
|
+
break;
|
1650
|
+
}
|
1651
|
+
|
1652
|
+
message.recordTiming = reader.bool();
|
1653
|
+
continue;
|
1635
1654
|
}
|
1636
1655
|
if ((tag & 7) === 4 || tag === 0) {
|
1637
1656
|
break;
|
@@ -1648,6 +1667,7 @@ export const ExecutionConfig_DecoderWorkerConfig = {
|
|
1648
1667
|
skipWhenDecodeFailed: isSet(object.skipWhenDecodeFailed)
|
1649
1668
|
? globalThis.Boolean(object.skipWhenDecodeFailed)
|
1650
1669
|
: undefined,
|
1670
|
+
recordTiming: isSet(object.recordTiming) ? globalThis.Boolean(object.recordTiming) : undefined,
|
1651
1671
|
};
|
1652
1672
|
},
|
1653
1673
|
|
@@ -1662,6 +1682,9 @@ export const ExecutionConfig_DecoderWorkerConfig = {
|
|
1662
1682
|
if (message.skipWhenDecodeFailed !== undefined) {
|
1663
1683
|
obj.skipWhenDecodeFailed = message.skipWhenDecodeFailed;
|
1664
1684
|
}
|
1685
|
+
if (message.recordTiming !== undefined) {
|
1686
|
+
obj.recordTiming = message.recordTiming;
|
1687
|
+
}
|
1665
1688
|
return obj;
|
1666
1689
|
},
|
1667
1690
|
|
@@ -1673,6 +1696,7 @@ export const ExecutionConfig_DecoderWorkerConfig = {
|
|
1673
1696
|
message.enabled = object.enabled ?? false;
|
1674
1697
|
message.workerCount = object.workerCount ?? undefined;
|
1675
1698
|
message.skipWhenDecodeFailed = object.skipWhenDecodeFailed ?? undefined;
|
1699
|
+
message.recordTiming = object.recordTiming ?? undefined;
|
1676
1700
|
return message;
|
1677
1701
|
},
|
1678
1702
|
};
|
@@ -9607,6 +9631,10 @@ function createBaseData_EthLog(): Data_EthLog {
|
|
9607
9631
|
transaction: undefined,
|
9608
9632
|
transactionReceipt: undefined,
|
9609
9633
|
block: undefined,
|
9634
|
+
rawLog: "",
|
9635
|
+
rawTransaction: undefined,
|
9636
|
+
rawTransactionReceipt: undefined,
|
9637
|
+
rawBlock: undefined,
|
9610
9638
|
};
|
9611
9639
|
}
|
9612
9640
|
|
@@ -9627,6 +9655,18 @@ export const Data_EthLog = {
|
|
9627
9655
|
if (message.block !== undefined) {
|
9628
9656
|
Struct.encode(Struct.wrap(message.block), writer.uint32(50).fork()).ldelim();
|
9629
9657
|
}
|
9658
|
+
if (message.rawLog !== "") {
|
9659
|
+
writer.uint32(58).string(message.rawLog);
|
9660
|
+
}
|
9661
|
+
if (message.rawTransaction !== undefined) {
|
9662
|
+
writer.uint32(66).string(message.rawTransaction);
|
9663
|
+
}
|
9664
|
+
if (message.rawTransactionReceipt !== undefined) {
|
9665
|
+
writer.uint32(74).string(message.rawTransactionReceipt);
|
9666
|
+
}
|
9667
|
+
if (message.rawBlock !== undefined) {
|
9668
|
+
writer.uint32(82).string(message.rawBlock);
|
9669
|
+
}
|
9630
9670
|
return writer;
|
9631
9671
|
},
|
9632
9672
|
|
@@ -9672,6 +9712,34 @@ export const Data_EthLog = {
|
|
9672
9712
|
|
9673
9713
|
message.block = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
9674
9714
|
continue;
|
9715
|
+
case 7:
|
9716
|
+
if (tag !== 58) {
|
9717
|
+
break;
|
9718
|
+
}
|
9719
|
+
|
9720
|
+
message.rawLog = reader.string();
|
9721
|
+
continue;
|
9722
|
+
case 8:
|
9723
|
+
if (tag !== 66) {
|
9724
|
+
break;
|
9725
|
+
}
|
9726
|
+
|
9727
|
+
message.rawTransaction = reader.string();
|
9728
|
+
continue;
|
9729
|
+
case 9:
|
9730
|
+
if (tag !== 74) {
|
9731
|
+
break;
|
9732
|
+
}
|
9733
|
+
|
9734
|
+
message.rawTransactionReceipt = reader.string();
|
9735
|
+
continue;
|
9736
|
+
case 10:
|
9737
|
+
if (tag !== 82) {
|
9738
|
+
break;
|
9739
|
+
}
|
9740
|
+
|
9741
|
+
message.rawBlock = reader.string();
|
9742
|
+
continue;
|
9675
9743
|
}
|
9676
9744
|
if ((tag & 7) === 4 || tag === 0) {
|
9677
9745
|
break;
|
@@ -9688,6 +9756,12 @@ export const Data_EthLog = {
|
|
9688
9756
|
transaction: isObject(object.transaction) ? object.transaction : undefined,
|
9689
9757
|
transactionReceipt: isObject(object.transactionReceipt) ? object.transactionReceipt : undefined,
|
9690
9758
|
block: isObject(object.block) ? object.block : undefined,
|
9759
|
+
rawLog: isSet(object.rawLog) ? globalThis.String(object.rawLog) : "",
|
9760
|
+
rawTransaction: isSet(object.rawTransaction) ? globalThis.String(object.rawTransaction) : undefined,
|
9761
|
+
rawTransactionReceipt: isSet(object.rawTransactionReceipt)
|
9762
|
+
? globalThis.String(object.rawTransactionReceipt)
|
9763
|
+
: undefined,
|
9764
|
+
rawBlock: isSet(object.rawBlock) ? globalThis.String(object.rawBlock) : undefined,
|
9691
9765
|
};
|
9692
9766
|
},
|
9693
9767
|
|
@@ -9708,6 +9782,18 @@ export const Data_EthLog = {
|
|
9708
9782
|
if (message.block !== undefined) {
|
9709
9783
|
obj.block = message.block;
|
9710
9784
|
}
|
9785
|
+
if (message.rawLog !== "") {
|
9786
|
+
obj.rawLog = message.rawLog;
|
9787
|
+
}
|
9788
|
+
if (message.rawTransaction !== undefined) {
|
9789
|
+
obj.rawTransaction = message.rawTransaction;
|
9790
|
+
}
|
9791
|
+
if (message.rawTransactionReceipt !== undefined) {
|
9792
|
+
obj.rawTransactionReceipt = message.rawTransactionReceipt;
|
9793
|
+
}
|
9794
|
+
if (message.rawBlock !== undefined) {
|
9795
|
+
obj.rawBlock = message.rawBlock;
|
9796
|
+
}
|
9711
9797
|
return obj;
|
9712
9798
|
},
|
9713
9799
|
|
@@ -9721,6 +9807,10 @@ export const Data_EthLog = {
|
|
9721
9807
|
message.transaction = object.transaction ?? undefined;
|
9722
9808
|
message.transactionReceipt = object.transactionReceipt ?? undefined;
|
9723
9809
|
message.block = object.block ?? undefined;
|
9810
|
+
message.rawLog = object.rawLog ?? "";
|
9811
|
+
message.rawTransaction = object.rawTransaction ?? undefined;
|
9812
|
+
message.rawTransactionReceipt = object.rawTransactionReceipt ?? undefined;
|
9813
|
+
message.rawBlock = object.rawBlock ?? undefined;
|
9724
9814
|
return message;
|
9725
9815
|
},
|
9726
9816
|
};
|
@@ -9789,6 +9879,10 @@ function createBaseData_EthTransaction(): Data_EthTransaction {
|
|
9789
9879
|
transactionReceipt: undefined,
|
9790
9880
|
block: undefined,
|
9791
9881
|
trace: undefined,
|
9882
|
+
rawTransaction: "",
|
9883
|
+
rawTransactionReceipt: undefined,
|
9884
|
+
rawBlock: undefined,
|
9885
|
+
rawTrace: undefined,
|
9792
9886
|
};
|
9793
9887
|
}
|
9794
9888
|
|
@@ -9809,6 +9903,18 @@ export const Data_EthTransaction = {
|
|
9809
9903
|
if (message.trace !== undefined) {
|
9810
9904
|
Struct.encode(Struct.wrap(message.trace), writer.uint32(58).fork()).ldelim();
|
9811
9905
|
}
|
9906
|
+
if (message.rawTransaction !== "") {
|
9907
|
+
writer.uint32(66).string(message.rawTransaction);
|
9908
|
+
}
|
9909
|
+
if (message.rawTransactionReceipt !== undefined) {
|
9910
|
+
writer.uint32(74).string(message.rawTransactionReceipt);
|
9911
|
+
}
|
9912
|
+
if (message.rawBlock !== undefined) {
|
9913
|
+
writer.uint32(82).string(message.rawBlock);
|
9914
|
+
}
|
9915
|
+
if (message.rawTrace !== undefined) {
|
9916
|
+
writer.uint32(90).string(message.rawTrace);
|
9917
|
+
}
|
9812
9918
|
return writer;
|
9813
9919
|
},
|
9814
9920
|
|
@@ -9854,6 +9960,34 @@ export const Data_EthTransaction = {
|
|
9854
9960
|
|
9855
9961
|
message.trace = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
9856
9962
|
continue;
|
9963
|
+
case 8:
|
9964
|
+
if (tag !== 66) {
|
9965
|
+
break;
|
9966
|
+
}
|
9967
|
+
|
9968
|
+
message.rawTransaction = reader.string();
|
9969
|
+
continue;
|
9970
|
+
case 9:
|
9971
|
+
if (tag !== 74) {
|
9972
|
+
break;
|
9973
|
+
}
|
9974
|
+
|
9975
|
+
message.rawTransactionReceipt = reader.string();
|
9976
|
+
continue;
|
9977
|
+
case 10:
|
9978
|
+
if (tag !== 82) {
|
9979
|
+
break;
|
9980
|
+
}
|
9981
|
+
|
9982
|
+
message.rawBlock = reader.string();
|
9983
|
+
continue;
|
9984
|
+
case 11:
|
9985
|
+
if (tag !== 90) {
|
9986
|
+
break;
|
9987
|
+
}
|
9988
|
+
|
9989
|
+
message.rawTrace = reader.string();
|
9990
|
+
continue;
|
9857
9991
|
}
|
9858
9992
|
if ((tag & 7) === 4 || tag === 0) {
|
9859
9993
|
break;
|
@@ -9870,6 +10004,12 @@ export const Data_EthTransaction = {
|
|
9870
10004
|
transactionReceipt: isObject(object.transactionReceipt) ? object.transactionReceipt : undefined,
|
9871
10005
|
block: isObject(object.block) ? object.block : undefined,
|
9872
10006
|
trace: isObject(object.trace) ? object.trace : undefined,
|
10007
|
+
rawTransaction: isSet(object.rawTransaction) ? globalThis.String(object.rawTransaction) : "",
|
10008
|
+
rawTransactionReceipt: isSet(object.rawTransactionReceipt)
|
10009
|
+
? globalThis.String(object.rawTransactionReceipt)
|
10010
|
+
: undefined,
|
10011
|
+
rawBlock: isSet(object.rawBlock) ? globalThis.String(object.rawBlock) : undefined,
|
10012
|
+
rawTrace: isSet(object.rawTrace) ? globalThis.String(object.rawTrace) : undefined,
|
9873
10013
|
};
|
9874
10014
|
},
|
9875
10015
|
|
@@ -9890,6 +10030,18 @@ export const Data_EthTransaction = {
|
|
9890
10030
|
if (message.trace !== undefined) {
|
9891
10031
|
obj.trace = message.trace;
|
9892
10032
|
}
|
10033
|
+
if (message.rawTransaction !== "") {
|
10034
|
+
obj.rawTransaction = message.rawTransaction;
|
10035
|
+
}
|
10036
|
+
if (message.rawTransactionReceipt !== undefined) {
|
10037
|
+
obj.rawTransactionReceipt = message.rawTransactionReceipt;
|
10038
|
+
}
|
10039
|
+
if (message.rawBlock !== undefined) {
|
10040
|
+
obj.rawBlock = message.rawBlock;
|
10041
|
+
}
|
10042
|
+
if (message.rawTrace !== undefined) {
|
10043
|
+
obj.rawTrace = message.rawTrace;
|
10044
|
+
}
|
9893
10045
|
return obj;
|
9894
10046
|
},
|
9895
10047
|
|
@@ -9903,6 +10055,10 @@ export const Data_EthTransaction = {
|
|
9903
10055
|
message.transactionReceipt = object.transactionReceipt ?? undefined;
|
9904
10056
|
message.block = object.block ?? undefined;
|
9905
10057
|
message.trace = object.trace ?? undefined;
|
10058
|
+
message.rawTransaction = object.rawTransaction ?? "";
|
10059
|
+
message.rawTransactionReceipt = object.rawTransactionReceipt ?? undefined;
|
10060
|
+
message.rawBlock = object.rawBlock ?? undefined;
|
10061
|
+
message.rawTrace = object.rawTrace ?? undefined;
|
9906
10062
|
return message;
|
9907
10063
|
},
|
9908
10064
|
};
|
package/src/service.ts
CHANGED
@@ -418,7 +418,6 @@ export class ProcessorServiceImpl implements ProcessorServiceImplementation {
|
|
418
418
|
subject: Subject<DeepPartial<ProcessStreamResponse>>
|
419
419
|
) {
|
420
420
|
const contexts = new Contexts()
|
421
|
-
|
422
421
|
for await (const request of requests) {
|
423
422
|
try {
|
424
423
|
// console.debug('received request:', request)
|