-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate and restore listeners on startup, and allow deletion if not found in connector #1234
Validate and restore listeners on startup, and allow deletion if not found in connector #1234
Conversation
…leted Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Adding fix for this build failure:
|
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
// cause recreation of all the listeners (noting that listeners that were specified to start | ||
// from latest, will start from the new latest rather than replaying from the block they | ||
// started from before they were deleted). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if, rather than storing "latest" we should resolve what the latest block number is at the time, then store that? This is out of scope for this PR, but may be worth thinking about for better determinism.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor thing which I think will result in a misleading log message, but other than that, looks good!
internal/contracts/manager.go
Outdated
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to increment verifyCount
right here. Currently it doesn't look like it's ever updated.
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Had a situation where we wanted to restore fresh listeners for custom contracts on a FireFly core service, and had assumed FireFly core would re-create the listeners. So deleted them on the EVMConnect runtime directly and restarted FF.
Found related issues, that meant we had to go into the FF DB and remove the contract listeners directly (and have the app recreate them):
BatchPin
listener, and the listeners of the token connectors...404
FireFly failed theDELETE
API.interface{}
and the complexity of anil
check there, we're adding an extrabool
to whether it's found or not (Fabric always returns true)[]byte
for thelocation
rather thanstring