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 file provable_store_test.go has been modified. The second input parameter has been changed from int64 to uint64, affecting the implementation of the function and the GetIBCStoreEntry method call.
A new file called ibc_events.go has been added in the shared/core/types directory. The file contains a new package called types and a new function called NewAttribute which takes two byte array arguments and returns a pointer to an Attribute struct.
In the import path coreTypes of the core_types package in the github.com/pokt-network/pocket/shared/core/types package, the import path has been changed to core_types. Additionally, the method signatures for the EmitEvent and QueryEvents functions have been updated to use the updated core_types.IBCEvent type. A new variable currHeight has been added to retrieve the current height.
The file ibc_event_module.go in the shared/modules directory has been modified. The import path coreTypes has been changed to core_types. The EmitEvent and QueryEvents functions now accept and return the IBCEvent type from the core_types package instead of the coreTypes package.
The file persistence/types/ibc.go has been modified, changing the type of the height parameter in the InsertIBCStoreEntryQuery, InsertIBCEventQuery, and GetIBCStoreEntryQuery functions from int64 to uint64.
Changes have been made to the ibc_test.go file, including the modification of the data type of the height variable in the TestIBC_GetIBCStoreEntry test case from int64 to uint64. Test function names have been renamed, assignments of the height variable have been removed, and the logic to set the height value in the TestGetIBCEvent function has been modified.
A new function GetRevisionNumber() has been added to a file, returning a uint64. A placeholder comment for the GetSupportedChains function has also been added.
The file ibc_events.proto has been modified, changing the IBCEvent message and the Attribute message. The IBCEvent message now has a topic field of type string and a repeated attributes field of type Attribute.
Changes have been made to the Get function in the provable_store.go file. The type of the currHeight variable has been changed from int64 to ConsensusHeight, requiring a conversion to int64 using the int64() function before passing it to NewReadContext.
The persistence/ibc.go file has been modified in the persistence package. The SetIBCStoreEntry and SetIBCEvent functions have p.Height parameters casted to uint64 in the tx.Exec statement. The GetIBCStoreEntry function has the height parameter changed from int64 to uint64.
Changes have been made to the PersistenceReadContext interface in the persistence_module.go file. A new GetRevisionNumber method has been added, taking an int64 height as input and returning a uint64 representing the revision number. The GetIBCStoreEntry method has changed the height parameter type from int64 to uint64. A new GetIBCEvents method has been added, taking a uint64 height and a string topic as input and returning a slice of IBCEvent objects.
Please review and implement the necessary changes for these updates.
Issue
Fixes N/A
Type of change
Please mark the relevant option(s):
[ ] New feature, functionality or library
[ ] Bug fix
[x] Code health or cleanup
[ ] Major breaking change
[ ] Documentation
[ ] Other
List of changes
Remove the Height field from the IBCEvent proto
Pass in uint64 types instead of int64 to queries
Testing
[x] make develop_test; if any code changes were made
[x] make test_e2e on k8s LocalNet; if any code changes were made
[x] e2e-devnet-test passes tests on DevNet; if any code was changed
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)