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

ADR-0004 Common PAB API document #586

Merged
merged 11 commits into from
Jul 29, 2022

Conversation

szg251
Copy link
Contributor

@szg251 szg251 commented Jul 12, 2022

See the end result here: https://plutus-apps--586.org.readthedocs.build/en/586/adr/0004-common-pab-api.html

Pre-submit checklist:

  • Branch
    • Tests are provided (if possible)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
    • Formatting, PNG optimization, etc. are updated
  • PR
    • Self-reviewed the diff
    • Useful pull request description
    • Reference the ADR in the PR and reference the PR in the ADR (if revelant)
    • Reviewer requested

@koslambrou koslambrou self-requested a review July 13, 2022 01:59
@ghost ghost self-requested a review July 14, 2022 06:44

The PAB Contract (defined in `plutus-apps`) is using the `freer-simple` effect system to define all the contract effects. This already allows us to separate the interface from the implementation, or to have multiple implementations for one interface.

Our proposal, is to further separate these two components: create a separate repository with these contract effects and types, but without any implementation or any unnecessary dependencies. By moving the contracts out of the plutus-apps monorepository, any tool could update to newer version to their discretion. Without many dependencies, many tools could utilize the contract API without having to depend on the whole plutus-apps monorepo.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having the contract effects and types in a separate package should be enough right? I don't see the need for a separate repository.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The disadvantage of this is that cabal will have to clone the whole repo to use the package (haskell/cabal#7264).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a downside that seems pretty minor to us not having a monorepo anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another downside is that PAB will not be able to use a different version of the interface. Tools, that only use the interface would have to wait for the PAB implementation. And the reality is that the PAB implementation is lagging behind the hardfork, and we're unsure when we will be able to use Vasil features (this is the main reason for this proposal).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, the interface would be updated well before a testnet hardfork, so library developers can start building on it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, we could do that with a separate branch, like we do now with the next-node branch, but that's a bit of a kludge.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd also allow this specific "interface-only" package not depend on a great amount of packages that may also need to be updated for it to work. A separate repo will ensure the interface package is truly minimal, easy to depend on, and implement an interpreter for. Of course, it'll also make this interface-only repo much easier to maintain.

@koslambrou koslambrou marked this pull request as draft July 14, 2022 13:29
@szg251 szg251 marked this pull request as ready for review July 29, 2022 14:56
@koslambrou koslambrou merged commit 6e69848 into IntersectMBO:main Jul 29, 2022
@szg251 szg251 deleted the adr-0004-common-pab-api branch August 1, 2022 13:19
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.

4 participants