-
Notifications
You must be signed in to change notification settings - Fork 33
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
[IBC] Change Events to not have a Height field and use uint64 in queries #931
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h5law
added
code health
Nice to have code improvement
e2e-devnet-test
Runs E2E tests on devnet
ibc
IBC specific changes
labels
Jul 24, 2023
Olshansk
approved these changes
Jul 24, 2023
@@ -17,6 +17,11 @@ func (p *PostgresContext) GetVersionAtHeight(height int64) (string, error) { | |||
return "", nil | |||
} | |||
|
|||
// TODO(#882): Implement this function |
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.
cc @0xBigBoss for visibility & context
reviewpad
bot
added
large
Pull request is large
and removed
small
Pull request is small
labels
Jul 26, 2023
reviewpad
bot
added
small
Pull request is small
and removed
large
Pull request is large
labels
Jul 26, 2023
red-0ne
pushed a commit
that referenced
this pull request
Aug 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
code health
Nice to have code improvement
e2e-devnet-test
Runs E2E tests on devnet
ibc
IBC specific changes
small
Pull request is small
waiting-for-review
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Summary generated by Reviewpad on 26 Jul 23 09:16 UTC
This pull request includes multiple file diffs with various changes:
The
newPersistenceMock
function in the fileprovable_store_test.go
has been modified. The second input parameter has been changed fromint64
touint64
, affecting the implementation of the function and theGetIBCStoreEntry
method call.A new file called
ibc_events.go
has been added in theshared/core/types
directory. The file contains a new package calledtypes
and a new function calledNewAttribute
which takes two byte array arguments and returns a pointer to anAttribute
struct.In the import path
coreTypes
of thecore_types
package in thegithub.com/pokt-network/pocket/shared/core/types
package, the import path has been changed tocore_types
. Additionally, the method signatures for theEmitEvent
andQueryEvents
functions have been updated to use the updatedcore_types.IBCEvent
type. A new variablecurrHeight
has been added to retrieve the current height.The file
ibc_event_module.go
in theshared/modules
directory has been modified. The import pathcoreTypes
has been changed tocore_types
. TheEmitEvent
andQueryEvents
functions now accept and return theIBCEvent
type from thecore_types
package instead of thecoreTypes
package.The file
persistence/types/ibc.go
has been modified, changing the type of theheight
parameter in theInsertIBCStoreEntryQuery
,InsertIBCEventQuery
, andGetIBCStoreEntryQuery
functions fromint64
touint64
.Changes have been made to the
ibc_test.go
file, including the modification of the data type of theheight
variable in theTestIBC_GetIBCStoreEntry
test case fromint64
touint64
. Test function names have been renamed, assignments of theheight
variable have been removed, and the logic to set the height value in theTestGetIBCEvent
function has been modified.A new function
GetRevisionNumber()
has been added to a file, returning auint64
. A placeholder comment for theGetSupportedChains
function has also been added.The file
ibc_events.proto
has been modified, changing theIBCEvent
message and theAttribute
message. TheIBCEvent
message now has atopic
field of typestring
and a repeatedattributes
field of typeAttribute
.Changes have been made to the
Get
function in theprovable_store.go
file. The type of thecurrHeight
variable has been changed fromint64
toConsensusHeight
, requiring a conversion toint64
using theint64()
function before passing it toNewReadContext
.The
persistence/ibc.go
file has been modified in thepersistence
package. TheSetIBCStoreEntry
andSetIBCEvent
functions havep.Height
parameters casted touint64
in thetx.Exec
statement. TheGetIBCStoreEntry
function has theheight
parameter changed fromint64
touint64
.Changes have been made to the
PersistenceReadContext
interface in thepersistence_module.go
file. A newGetRevisionNumber
method has been added, taking anint64
height as input and returning auint64
representing the revision number. TheGetIBCStoreEntry
method has changed theheight
parameter type fromint64
touint64
. A newGetIBCEvents
method has been added, taking auint64
height and astring
topic as input and returning a slice ofIBCEvent
objects.Please review and implement the necessary changes for these updates.
Issue
Fixes N/A
Type of change
Please mark the relevant option(s):
List of changes
Height
field from theIBCEvent
protouint64
types instead ofint64
to queriesTesting
make develop_test
; if any code changes were mademake test_e2e
on k8s LocalNet; if any code changes were madee2e-devnet-test
passes tests on DevNet; if any code was changedRequired Checklist
godoc
format comments on touched members (see: tip.golang.org/doc/comment)If Applicable Checklist
shared/docs/*
if I updatedshared/*
README(s)