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

refactor(abci): add msg index to event #15845

Merged
merged 33 commits into from
Apr 24, 2023
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8c4cd92
add msg index to event
tac0turtle Apr 14, 2023
424280a
changelog
tac0turtle Apr 14, 2023
b267802
further manual testing
tac0turtle Apr 14, 2023
006035b
address comments
tac0turtle Apr 14, 2023
7d073fe
move comment
tac0turtle Apr 14, 2023
bb7b7b0
Merge branch 'main' into marko/15017
tac0turtle Apr 15, 2023
7298214
Merge branch 'main' into marko/15017
tac0turtle Apr 17, 2023
a8943bd
Merge branch 'main' into marko/15017
tac0turtle Apr 17, 2023
b9c7e0a
Merge branch 'main' into marko/15017
tac0turtle Apr 18, 2023
a56cb3e
add upgrading and docs
tac0turtle Apr 18, 2023
79ef241
fix tests
tac0turtle Apr 18, 2023
6ff441c
fix tests
tac0turtle Apr 18, 2023
313c926
events
tac0turtle Apr 18, 2023
b28eb6d
events
tac0turtle Apr 18, 2023
8a5744c
Merge branch 'main' into marko/15017
tac0turtle Apr 18, 2023
4c0b513
revert comment
tac0turtle Apr 19, 2023
cf63181
fix imports
tac0turtle Apr 19, 2023
a0daa86
fix tests
tac0turtle Apr 19, 2023
eb9fb1d
Merge branch 'main' into marko/15017
tac0turtle Apr 19, 2023
612ff6e
fix tests
tac0turtle Apr 19, 2023
6a535e5
try waiting for the next block to check things
tac0turtle Apr 19, 2023
de66a3c
remove waitfor
tac0turtle Apr 19, 2023
ce7804e
tets
tac0turtle Apr 19, 2023
0b25697
Merge branch 'main' into marko/15017
tac0turtle Apr 20, 2023
4b4b21a
some changes
tac0turtle Apr 20, 2023
fa821d6
Merge branch 'main' into marko/15017
facundomedica Apr 20, 2023
64e55b5
Merge branch 'main' into marko/15017
facundomedica Apr 20, 2023
ccd7e7f
fix group e2e test
facundomedica Apr 20, 2023
47f9ed6
cleaner err check
facundomedica Apr 20, 2023
1d0cb1f
cleaner err check
facundomedica Apr 20, 2023
b5059bd
fix event check
facundomedica Apr 20, 2023
23284d8
Merge branch 'main' into marko/15017
tac0turtle Apr 22, 2023
84f62be
fix auth test case
tac0turtle Apr 24, 2023
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
17 changes: 7 additions & 10 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -800,17 +800,15 @@ func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg, mode runTxMode) (*s
//
// Note: Each message result's data must be length-prefixed in order to
// separate each result.
events = events.AppendEvents(msgEvents)

// add message index to all events to identify which events are from which message
for _, event := range events {
event.Attributes = append(event.Attributes, abci.EventAttribute{
Key: "msg_index",
Value: strconv.Itoa(i),
},
)
var me = make(sdk.Events, len(msgEvents))

// append message index to all events
for j, event := range msgEvents {
me[j] = event.AppendAttributes(sdk.NewAttribute("msg_index", strconv.Itoa(i)))
tac0turtle marked this conversation as resolved.
Show resolved Hide resolved
}

events = events.AppendEvents(me)

// Each individual sdk.Result that went through the MsgServiceRouter
// (which should represent 99% of the Msgs now, since everyone should
// be using protobuf Msgs) has exactly one Msg response, set inside
Expand All @@ -833,7 +831,6 @@ func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg, mode runTxMode) (*s

return &sdk.Result{
Data: data,
Log: "",
Events: events.ToABCIEvents(),
MsgResponses: msgResponses,
}, nil
Expand Down