You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cdk-erigon version: v2.0.0-beta17
OS & Version: Linux & v0.0.9
Expected behaviour
I think the function of ProcessPendingMonitoredTxs have a issue in some chance, because only when result.Status == types.MonitoredTxStatusMined || result.Status == types.MonitoredTxStatusFailed , it will break, in other case it will halt to waiting tx.
It should
I run the node the logs as follow, when the tx is mined and safe , but the waiting for monitored tx is only support types.MonitoredTxStatusMined and types.MonitoredTxStatusFailed, but no hvae safe, so it will waiting tx long times.
2024-10-09T11:07:17.347+0800 INFO ethtxmanager/ethtxmanager.go:750 mined {"pid": 26882, "monitoredTxId": "0x0ea6203a3b062d8bb277495770ad86560349445fed88ce5bd77a7eb8e8e8b65e", "createdAt": "2024-10-09T11:07:15.738+0800", "from": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", "to": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e"}
2024-10-09T11:07:17.347+0800 INFO ethtxmanager/ethtxmanager.go:520 safe {"pid": 26882, "monitoredTxId": "0x0ea6203a3b062d8bb277495770ad86560349445fed88ce5bd77a7eb8e8e8b65e", "createdAt": "2024-10-09T11:07:15.738+0800", "from": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", "to": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e"}
2024-10-09T11:07:17.745+0800 INFO ethtxmanager/ethtxmanager.go:1010 waiting for monitored tx to get confirmed, status: safe {"pid": 26882, "monitoredTxId": "0x0ea6203a3b062d8bb277495770ad86560349445fed88ce5bd77a7eb8e8e8b65e"}
2024-10-09T11:07:18.748+0800 INFO ethtxmanager/ethtxmanager.go:1010 waiting for monitored tx to get confirmed, status: safe {"pid": 26882, "monitoredTxId": "0x0ea6203a3b062d8bb277495770ad86560349445fed88ce5bd77a7eb8e8e8b65e"}
2024-10-09T11:07:19.233+0800 INFO l1_sync/l1_syncer_sequential.go:150 Syncing FromBlock: 19308, ToBlock: 19380, MaximumBlock: 19380 Progress: Percent: 99.6 {"pid": 26882}
func (c *Client) ProcessPendingMonitoredTxs(ctx context.Context, resultHandler ResultHandler) {
statusesFilter := []types.MonitoredTxStatus{
types.MonitoredTxStatusCreated,
types.MonitoredTxStatusSent,
types.MonitoredTxStatusFailed,
types.MonitoredTxStatusMined,
}
// keep running until there are pending monitored txs
for {
.........
for _, result := range results {
mTxResultLogger := CreateMonitoredTxResultLogger(result)
.........
// if the result is either not confirmed or failed, it means we need to wait until it gets confirmed of failed.
for {
// wait before refreshing the result info
time.Sleep(time.Second)
// refresh the result info
result, err := c.Result(ctx, result.ID)
if err != nil {
mTxResultLogger.Errorf("failed to get monitored tx result, err: %v", err)
continue
}
// if the result status is confirmed or failed, breaks the wait loop
if result.Status == types.MonitoredTxStatusMined || result.Status == types.MonitoredTxStatusFailed ||
result.Status == MonitoredTxStatusSafe || result.Status == MonitoredTxStatusFinalized {
break
}
mTxResultLogger.Infof("waiting for monitored tx to get confirmed, status: %v", result.Status.String())
}
}
}
}
Actual behaviour
func (c *Client) ProcessPendingMonitoredTxs(ctx context.Context, resultHandler ResultHandler) {
statusesFilter := []types.MonitoredTxStatus{
types.MonitoredTxStatusCreated,
types.MonitoredTxStatusSent,
types.MonitoredTxStatusFailed,
types.MonitoredTxStatusMined,
}
// keep running until there are pending monitored txs
for {
.........
for _, result := range results {
mTxResultLogger := CreateMonitoredTxResultLogger(result)
.........
// if the result is either not confirmed or failed, it means we need to wait until it gets confirmed of failed.
for {
// wait before refreshing the result info
time.Sleep(time.Second)
// refresh the result info
result, err := c.Result(ctx, result.ID)
if err != nil {
mTxResultLogger.Errorf("failed to get monitored tx result, err: %v", err)
continue
}
// if the result status is confirmed or failed, breaks the wait loop
if result.Status == types.MonitoredTxStatusMined || result.Status == types.MonitoredTxStatusFailed {
break
}
mTxResultLogger.Infof("waiting for monitored tx to get confirmed, status: %v", result.Status.String())
}
}
}
}
Steps to reproduce the behaviour
Backtrace
[backtrace]
When submitting logs: please submit them as text and not screenshots.
The text was updated successfully, but these errors were encountered:
System information
cdk-erigon version:
v2.0.0-beta17
OS & Version:
Linux
& v0.0.9Expected behaviour
I think the function of ProcessPendingMonitoredTxs have a issue in some chance, because only when result.Status == types.MonitoredTxStatusMined || result.Status == types.MonitoredTxStatusFailed , it will break, in other case it will halt to waiting tx.
It should
I run the node the logs as follow, when the tx is mined and safe , but the waiting for monitored tx is only support types.MonitoredTxStatusMined and types.MonitoredTxStatusFailed, but no hvae safe, so it will waiting tx long times.
Actual behaviour
Steps to reproduce the behaviour
Backtrace
When submitting logs: please submit them as text and not screenshots.
The text was updated successfully, but these errors were encountered: