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

Bring in SDK changes up to v0.50.10 and Mark v0.50.10-pio-1. #612

Merged
merged 130 commits into from
Oct 10, 2024

Conversation

SpicyLemon
Copy link

@SpicyLemon SpicyLemon commented Oct 9, 2024

Description

This PR brings in all of the SDK changes from (and including) v0.50.8, v0.50.9, and v0.50.10.

One change of note is to the events emitted during InputOutputCoins. The SDK added the sender to the transfer events that are emitted. They can do that because they limit it to a single input, so there's only ever one sender and it can be included in all of those events. However, ours allows for multiple inputs, so it's a little more complicated. The result, though, is that almost all transaction events that it emits will have all there of recipient, sender, and amount, just like the SendCoins events. The only way the sender won't be there is if there are multiple inputs (and one output), but when applying the send restrictions, the recipient is changed for at least one, but not all of the input addresses. E.g. The output address has opted into quarantine and has auto-accept enabled for one of the input addresses, but not the rest. I'm expecting that to be a super rare case though.

Here are the places where I made changes on top of the SDK v0.50.10 changes:

  • x/bank/keeper/send.go: Their change just added the AttributeKeySender attribute to the transfer event, but ours took a little more work (as pointed out above).
  • x/bank/keeper/keeper_test.go: The SDK alternates between the addCoins event and the transfer event for each output address, so the event they're looking for is at index 27. But for us, we emit all the addCoins events, then all the transfer events, which ends up basically swapping event 27 and 28 in that test, so for us, we're expecting that event at 28.
  • CHANGELOG.md: Added entry for this PR.

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

mergify bot and others added 30 commits March 14, 2024 02:59
) (cosmos#19745)

Co-authored-by: Rootul P <rootulp@gmail.com>
Co-authored-by: sontrinh16 <trinhleson2000@gmail.com>
…osmos#19751)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
…mos#19759) (cosmos#19773)

Co-authored-by: mmsqe <mavis@crypto.com>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
…9706) (cosmos#19767)

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
…cosmos#19770)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Cool Developer <cool199966@outlook.com>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…osmos#19811)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
…osmos#19842) (cosmos#19844)

Co-authored-by: Aryan Tikarya <akaladarshi@gmail.com>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…mos#19853) (cosmos#19859)

Co-authored-by: Kien <kien@notional.ventures>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…19985)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…osmos#20008)

Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…#19903) (cosmos#20017)

Co-authored-by: Lucas Francisco López <lucaslopezf@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…s#20027) (cosmos#20031)

Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
)

Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
mergify bot and others added 24 commits August 30, 2024 19:53
…smos#21444) (cosmos#21458)

Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…#21484) (cosmos#21493)

Co-authored-by: MSalopek <matija.salopek994@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…smos#21519)

Co-authored-by: dropbigfish <fillfish@foxmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
cosmos#21535)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…osmos#21544)

Co-authored-by: Reece Williams <31943163+Reecepbcups@users.noreply.github.com>
Co-authored-by: Reece Williams <reecepbcups@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…osmos#21413) (cosmos#21541)

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…ample (backport cosmos#21594) (cosmos#21600)

Co-authored-by: lilasxie <thanklilas@163.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
cosmos#21671) (cosmos#21676)

Co-authored-by: lilasxie <thanklilas@163.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: Eric Mokaya <4112301+ziscky@users.noreply.github.com>
Co-authored-by: Akhil Kumar P <36399231+akhilkumarpilli@users.noreply.github.com>
…ckport cosmos#21701) (cosmos#21708)

Co-authored-by: Eric Mokaya <4112301+ziscky@users.noreply.github.com>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
…osmos#21693) (cosmos#21724)

Co-authored-by: John Letey <john@noble.xyz>
Co-authored-by: sontrinh16 <trinhleson2000@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
…osmos#21816) (cosmos#21818)

Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Release v0.50.10

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQQQT/CpGzc0x0Rg2OeuqMIeYI8dAgUCZu1V+QAKCRCuqMIeYI8d
# AoRRAQDf1S3x/tE7c8ck9Nc/TjiPO0rGKZhHgcjPgO8z7C0u0wEAjcF5kX8QYAYL
# iwMjoim+s85OgCb+7qb91hQgUFZLRQI=
# =o4YU
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri Sep 20 05:01:13 2024 MDT
# gpg:                using EDDSA key 104FF0A91B3734C74460D8E7AEA8C21E608F1D02
# gpg: Can't check signature: No public key

# Conflicts:
#	CHANGELOG.md
#	RELEASE_NOTES.md
#	api/go.mod
#	api/go.sum
#	baseapp/baseapp.go
#	baseapp/options.go
#	client/rpc/tx.go
#	client/v2/CHANGELOG.md
#	client/v2/go.mod
#	client/v2/go.sum
#	core/go.mod
#	core/go.sum
#	docs/docs/build/building-apps/03-app-upgrade.md
#	go.mod
#	go.sum
#	orm/go.mod
#	orm/go.sum
#	runtime/builder.go
#	simapp/go.mod
#	simapp/go.sum
#	store/CHANGELOG.md
#	store/go.mod
#	store/go.sum
#	tests/go.mod
#	tests/go.sum
#	tools/confix/go.mod
#	tools/confix/go.sum
#	tools/cosmovisor/go.mod
#	tools/cosmovisor/go.sum
#	tools/hubl/go.mod
#	tools/hubl/go.sum
#	types/mempool/priority_nonce_test.go
#	x/bank/keeper/send.go
#	x/circuit/go.mod
#	x/circuit/go.sum
#	x/consensus/keeper/keeper.go
#	x/evidence/go.mod
#	x/evidence/go.sum
#	x/feegrant/go.mod
#	x/feegrant/go.sum
#	x/feegrant/module/module.go
#	x/nft/go.mod
#	x/nft/go.sum
#	x/simulation/simulate.go
#	x/tx/go.mod
#	x/tx/go.sum
#	x/upgrade/CHANGELOG.md
#	x/upgrade/go.mod
#	x/upgrade/go.sum
…his in PR cosmos#21460 and I undid it when merging in the v0.50.10 changes since it's more complicated for us than the SDK. So this is bringing us back in line with SDK v0.50.10 with slightly different event ordering. This change also reduces the amount of times subUnlockedCoins is called when there are multiple inputs with the same address.
@SpicyLemon SpicyLemon marked this pull request as ready for review October 9, 2024 22:01
@SpicyLemon
Copy link
Author

I ran the following make targets locally and they all completed successfully:

  • make test
  • make test-sim-nondeterminism
  • make test-sim-import-export
  • make test-sim-after-import
  • make test-sim-multi-seed-short

@SpicyLemon SpicyLemon merged commit 6273e52 into release-pio/v0.50.x Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants