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

2599 oxford supports attestation #2666

Merged
merged 6 commits into from
Sep 26, 2023
Merged

Conversation

hui-an-yang
Copy link
Collaborator

Thank you for your contribution to Taquito.

Before submitting this PR, please make sure:

  • Your code builds cleanly without any errors or warnings
  • You have run the linter against the changes
  • You have added unit tests (if relevant/appropriate)
  • You have added integration tests (if relevant/appropriate)
  • All public methods or types have TypeDoc coverage with a complete description, and ideally an @example
  • You have added or updated corresponding documentation
  • If relevant, you have written a first draft summary describing the change for inclusion in Release Notes.

In this PR, please also make sure:

  • You have linked this PR to the issue by putting closes #TICKETNUMBER in the description box (when applicable)
  • You have added a concise description on your changes

Release Note Draft Snippet

If relevant, please write a summary of your change that will be suitable for
inclusion in the Release Notes for the next Taquito release.

@netlify
Copy link

netlify bot commented Sep 21, 2023

Deploy Preview for taquito-test-dapp ready!

Name Link
🔨 Latest commit 87066ad
🔍 Latest deploy log https://app.netlify.com/sites/taquito-test-dapp/deploys/650cb63643780200073ffb0c
😎 Deploy Preview https://deploy-preview-2666--taquito-test-dapp.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hui-an-yang hui-an-yang changed the base branch from master to oxford September 21, 2023 21:31
@github-actions
Copy link

github-actions bot commented Sep 21, 2023

New packages have been deployed to the preview repository at https://npm.preview.tezostaquito.io/.

Published packages:

npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/
npm i @taquito/[email protected] --registry https://npm.preview.tezostaquito.io/

@github-actions
Copy link

A new deploy preview is available on Netlify at https://b1bcc1d--tezostaquito.netlify.app

@hui-an-yang hui-an-yang linked an issue Sep 23, 2023 that may be closed by this pull request
@hui-an-yang hui-an-yang marked this pull request as ready for review September 23, 2023 00:11
@@ -29,7 +33,7 @@ async function example() {
}

tezos.stream.subscribeOperation({
or: [bakerEndorsementFilter, bakerDelegation]
or: [bakeAttestationFilter, bakerEndorsementFilter, bakerDelegation]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is including both endorsement and attestation something temporary? From my understanding, after the transition is complete, we need both for historical data, but only attestation for new blocks?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can be either, this is an example code shows how to use streamProvider. It's focussing on poling the newest block on chain. Protocol oxford might still be endorsement and for protocol P will change to attestation. For user to foresee this change doesn't hurt to have both to make sure their transition is seamless.

@@ -191,6 +221,14 @@ export interface InlinedPreEndorsement {

export type BallotVote = 'nay' | 'yay' | 'pass';

export interface OperationContentsAttestation {
kind: OpKind.ATTESTATION;
slot: number;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should slot and round be required or optional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

both required, here the openAPI reference

      "018-Proxford.operation.alpha.operation_contents_and_result": {
        "oneOf": [
          {
            "title": "Attestation",
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "attestation"
                ]
              },
              "slot": {
                "type": "integer",
                "minimum": 0,
                "maximum": 65535
              },
              "level": {
                "type": "integer",
                "minimum": -2147483648,
                "maximum": 2147483647
              },
              "round": {
                "type": "integer",
                "minimum": -2147483648,
                "maximum": 2147483647
              },
              "block_payload_hash": {
                "$ref": "#/components/schemas/value_hash"
              },
              "metadata": {
                "type": "object",
                "properties": {
                  "balance_updates": {
                    "$ref": "#/components/schemas/018-Proxford.operation_metadata_with_legacy_attestation_name.alpha.balance_updates"
                  },
                  "delegate": {
                    "$ref": "#/components/schemas/Signature.Public_key_hash"
                  },
                  "consensus_power": {
                    "type": "integer",
                    "minimum": -1073741824,
                    "maximum": 1073741823
                  },
                  "consensus_key": {
                    "$ref": "#/components/schemas/Signature.Public_key_hash"
                  }
                },
                "required": [
                  "delegate",
                  "consensus_power",
                  "consensus_key"
                ]
              }
            },
            "required": [
              "kind",
              "slot",
              "level",
              "round",
              "block_payload_hash",
              "metadata"
            ]
          },

@hui-an-yang hui-an-yang merged commit dda9fe0 into oxford Sep 26, 2023
4 of 7 checks passed
@hui-an-yang hui-an-yang deleted the 2599-oxford-supports-attestation branch September 26, 2023 13:24
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.

Change endorsement into attestation
2 participants