Skip to content
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

feat: update state #63

Merged
merged 19 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
374517e
ignite scaffold type block_descriptor height:uint state_root intermed…
liorzilp Aug 21, 2022
7571332
add description for 'mesage BlockDescriptor' proto in rollapp module
liorzilp Aug 21, 2022
a1fa5d1
create a BlockDescriptor list proto type: BlockDescriptors
liorzilp Aug 21, 2022
753937a
ignite scaffold message update-state rollapp_id start_height:uint num…
liorzilp Aug 21, 2022
5e8e20d
add documentation for MsgUpdateState and fix nullable fields
liorzilp Aug 21, 2022
d444f19
basic validations
liorzilp Aug 21, 2022
1285a11
add BeforeUpdateStateRecoverable hook & implement listener for the se…
liorzilp Aug 22, 2022
b1c7f7e
remove basic validations from CreateRollapp() and CreateSequencer() a…
liorzilp Aug 23, 2022
225ad59
add statful validations
liorzilp Aug 23, 2022
64e4b9d
create 'message StateInfo' proto
liorzilp Aug 24, 2022
64d28f6
add store map from <rollappId, stateIndex> to stateInfo (phase1)
liorzilp Aug 24, 2022
7450a1a
add store map from <rollappId, stateIndex> to stateInfo (phase2: merg…
liorzilp Aug 24, 2022
338db8a
ignite scaffold map state_index index:uint --index rollapp_id --no-me…
liorzilp Aug 24, 2022
d318eed
add documentation for StateIndex proto
liorzilp Aug 24, 2022
dd0bb23
add UpdateState logic for updating state
liorzilp Aug 24, 2022
b38031a
remove LastBD from MsgUpdateState
liorzilp Aug 24, 2022
f6bfec1
add stateful tests for update-state
liorzilp Aug 24, 2022
ed05da4
implement creationHeight logic in UpdateState
liorzilp Aug 25, 2022
bec49e4
fix lint errors
liorzilp Aug 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,13 @@ func New(
)
monitoringModule := monitoringp.NewAppModule(appCodec, app.MonitoringKeeper)

//--------------- dYmension specific modules
app.RollappKeeper = *rollappmodulekeeper.NewKeeper(
appCodec,
keys[rollappmoduletypes.StoreKey],
keys[rollappmoduletypes.MemStoreKey],
app.GetSubspace(rollappmoduletypes.ModuleName),
)
rollappModule := rollappmodule.NewAppModule(appCodec, app.RollappKeeper, app.AccountKeeper, app.BankKeeper)

app.SequencerKeeper = *sequencermodulekeeper.NewKeeper(
appCodec,
Expand All @@ -414,7 +414,17 @@ func New(
app.BankKeeper,
app.RollappKeeper,
)

// register the rollapp hooks
app.RollappKeeper.SetHooks(
rollappmoduletypes.NewMultiRollappHooks(
// insert rollapp hooks receivers here
app.SequencerKeeper.RollappHooks(),
),
)

sequencerModule := sequencermodule.NewAppModule(appCodec, app.SequencerKeeper, app.AccountKeeper, app.BankKeeper)
rollappModule := rollappmodule.NewAppModule(appCodec, app.RollappKeeper, app.AccountKeeper, app.BankKeeper)

// this line is used by starport scaffolding # stargate/app/keeperDefinition

Expand Down
Loading