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

A Pegasus-IBC walkthrough tutorial #7533

Open
wants to merge 5,085 commits into
base: ibc-example-scripts
Choose a base branch
from

Conversation

anilhelvaci
Copy link
Collaborator

closes: #7532
refs: #7532

Description

I've created a walkthrough tutorial for those who are new to both IBC and Pegasus. The architecture is as below:

  • Two local networks
    1. CosmosHub created with gaiad and gm
    2. Agoric created with make scenario2-run-chain
  • Send IST to local CosmosHub from Agroic using Pegasus
  • Receive an asset from CosmosHub and display it in WalletUI using Pegasus

Merged the current master to ibc-example-scripts branch before I started working.

Security Considerations

This process requires users to access home.pegasusConnections in ag-solo. This is currently not allowed but also needed to use pegasus.

Scaling Considerations

None.

Documentation Considerations

I don't believe there's any documentation for Pegasus

Testing Considerations

This PR does not contain any new functionality to the sdk.

michaelfig and others added 30 commits April 14, 2023 15:28
* fix: nextAuction timing when startFrequency is reduced

* chore: change type of AuctionParams

* chore: improved types for timestamps in governance

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
feat(zoe): error on unexpected properties from start()
…nce-label

refactor(swingset-liveslots): rep vs instance label tests more similar
refactor(store): Use @endo/(pass-style,patterns,exo) and drop our stale copies
Now that `kindHandleToID` is a *strong* Map, KindHandles are held
strongly, from definition/reanimation time through to the end of the
incarnation. That means their prototype is no longer useful as a GC
sensor, and we don't need to use `linkToCohort` or `unweakable` to
prevent userspace from trying.
Previously, we stored both the static parts of a
DurableKindDescriptor (tag, stateShape) and the dynamic
part (nextInstanceID) in the same vatStore
key (`vom.dkind.${kindID}`). This meant we had to re-write the whole
thing each time we make a new instance, which seems like a waste.

This change splits the next instance ID out to a separate key:
* `vom.dkind.${kindID}.descriptor`: holds the static descriptor
* `vom.dkind.${kindID}.nextID`: holds the next instance ID

Note that KindIDs are always integers, and we always append the
.descriptor/.nextID suffix, so I'm not worried about vatstore key
confusion/collision.

It also changes the merely-virtual Kind descriptor key to match:
`vom.vkind.${kindID}.descriptor`. Note that we don't bother recording
a `nextID` for virtual Kinds, since these never outlive an
incarnation, so we can hold the nextInstanceID in RAM. We only write
out the descriptor for external tooling and debugging, anyways.

Internally, `nextInstanceID` is now a BigInt, because we use `Nat()`
on the value we get back from the vatstore. This is not exposed to
userspace, and vrefs are strings (which incorporate the ID).

closes Agoric#7364
VOM: split nextInstanceID into a separate vatstore key
not relevant to test terms that aren't generated by bootstrap
refactor tests to use bootstrap to get the reserve
surround the transfers for empty-checks.
…erve

feat(auction): auction send leftovers to Reserve
…rnel-quiescent

feat(cosmic-swingset): poll timer after swingset quiescent
mergify bot and others added 23 commits April 25, 2023 19:02
fix(vbank): properly detect module accounts
…ript

Add incarnation number to the transcript store records
fix(zcf): mint kind during reincarnation
…check

refactor(casting): jessie-check where easy
…-jessie-check

refactor(cosmic-swingset): jessie-check where easy
…-check

refactor(notifier): jessie-check where easy
…-checks

refactor(vat-data): jessie-check where easy
warner added a commit that referenced this pull request Apr 29, 2023
This changes the snapshot scheduling logic to be more consistent. We
still use `snapshotInitial` to trigger a snapshot shortly after worker
initialization, and `snapshotInterval` to trigger periodic ones after
that.

However the previous code compared `snapshotInitial` to the absolute
deliveryNum, which meant it only applied to the first incarnation, and
would not attempt to take a snapshot shortly after upgrade, leaving
the kernel vulnerable to replaying the long `startVat` delivery for a
larger window than we intended. And `snapshotInterval` was compared
against the difference between the latest transcript and the latest
snapshot, which changed with the addition of the load-worker
pseudo-entry.

The new code uses `snapshotInitial` whenever there is not an existing
snapshot (so the first span of *all* incarnations), and compares it
against the length of the current span (so it includes all the
pseudo-events). `snapshotInterval` is also compared against the length
of the current span.

The result is simpler and more predictable set of rules:

* in the first span of each incarnation, trigger a snapshot once we
  have at least `snapshotInterval` entries
* in all other spans, trigger once we have at least `snapshotInterval`

In addition, when triggering a snapshot, we perform a BringOutYourDead
delivery before asking the worker to save a snapshot. This gives us
one last chance to shake out any garbage (making the snapshot as small
as possible), and reduces the variation we might see forced GC that
happens during snapshot write (any FinalizationRegistry callbacks
should get run during the BOYD, not the save-snapshot).

closes #7533
closes #7504
@warner
Copy link
Member

warner commented Apr 29, 2023

oops, sorry, I wrote the wrong ticket number into my PR, it has nothing to do with Pegasus or IBC

@michaelfig michaelfig self-requested a review January 9, 2024 06:31
@michaelfig
Copy link
Member

Hi @anilhelvaci ! Are you interested in updating this PR? I would be willing to review it. Sorry that it slipped through the cracks.

@anilhelvaci
Copy link
Collaborator Author

Hey @michaelfig, sure! I would love to improve this, just need to make some time for in my schedule.

To understand how much work it requires, can you point me to some docs regarding the questions below;

  • What changes happened to pegasus in the past 8 months?
    • Is there a way to create a peg without using ag-solo?

@michaelfig
Copy link
Member

To understand how much work it requires...

Let's hold off for now, until after we can make Pegasus permissionless and use the Orchestration APIs.

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.