Skip to content

feat: Endorsements Service#553

Merged
wjmelements merged 46 commits into
masterfrom
feat/endorsement-set
Jan 20, 2026
Merged

feat: Endorsements Service#553
wjmelements merged 46 commits into
masterfrom
feat/endorsement-set

Conversation

@wjmelements
Copy link
Copy Markdown
Contributor

@wjmelements wjmelements commented Jan 14, 2026

Reviewer @rvagg @hugomrdias
Closes #540
Replaces #443

Changes

Kubuxu and others added 30 commits November 12, 2025 18:59
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Co-authored-by: Jakub Sztandera <oss@kubuxu.com>
Co-authored-by: Rod Vagg <rod@vagg.org>
Co-authored-by: Rod Vagg <rod@vagg.org>
Comment thread examples/cli/src/commands/endorse.ts Outdated
@wjmelements wjmelements marked this pull request as ready for review January 15, 2026 21:45
@rjan90 rjan90 moved this from ⌨️ In Progress to 🔎 Awaiting review in FOC Jan 16, 2026
Comment thread packages/synapse-sdk/src/storage/context.ts
Comment thread packages/synapse-sdk/src/test/synapse.test.ts
Copy link
Copy Markdown
Collaborator

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

This all seems good to me; I'd like to have @hugomrdias's eyes on it though before merging, particularly for the synapse-core stuff.
There's also the comment about covering the fallback case in tests I wouldn't mind in here too.

@rjan90 rjan90 mentioned this pull request Jan 19, 2026
Comment thread examples/cli/src/commands/endorse.ts Outdated
},
},
{
name: 'ProviderIdSet',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
name: 'ProviderIdSet',
name: 'Endorsements',

its called endorsements in other places

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The contract is called ProviderIdSet. Endorsements is-a ProviderIdSet.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sure either way call it one of those everywhere.

address constant is called ENDORSEMENTS_ADDRESS_MAINNET

i prefer endorsements but im fine with whatever you think is best

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All of our other contracts were singletons but this one is not. We could have numerous ProviderIdSet for purposes besides endorsements; for example we could also use them for the approved SP list and deprecate the list currently living in FWSS. In the opposite direction, they can also be used for blacklisting or sanctions compliance.

Comment thread packages/synapse-core/src/warm-storage/data-sets.ts
Comment thread packages/synapse-core/src/warm-storage/providers.ts
@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting review to ⌨️ In Progress in FOC Jan 19, 2026
Copy link
Copy Markdown
Member

@hugomrdias hugomrdias left a comment

Choose a reason for hiding this comment

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

LGTM, just pending the naming thing and the awaits

},
},
{
name: 'ProviderIdSet',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sure either way call it one of those everywhere.

address constant is called ENDORSEMENTS_ADDRESS_MAINNET

i prefer endorsements but im fine with whatever you think is best

@rjan90 rjan90 added this to the M4: Filecoin Service Liftoff milestone Jan 20, 2026
@wjmelements
Copy link
Copy Markdown
Contributor Author

The build failure is caused by merging master (which github does for approved PRs). I pulled the latest ABI changes in this PR, which is incompatible with #550

@wjmelements wjmelements merged commit fba3280 into master Jan 20, 2026
15 checks passed
@wjmelements wjmelements deleted the feat/endorsement-set branch January 20, 2026 23:42
@github-project-automation github-project-automation Bot moved this from ⌨️ In Progress to 🎉 Done in FOC Jan 20, 2026
lordshashank pushed a commit to lordshashank/synapse-sdk that referenced this pull request Mar 9, 2026
* Baseline super-good-enough cert

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* stub decodeEndorsements

* preferEndorsements

* start decoding endorsements

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* notAfter as timesetamp

* encodeEndorsements

* mv cert.ts to utils

* utils export from cert.ts

* fix test

* test that createContexts prefers endorsements

* encode/decode certs with domain separator

* add cert test

* add tools/endorse-sp.js

* increase timeout for CI

* make the decodeEndorsements a bit simpler

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* add more tests

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* Update packages/synapse-core/src/utils/cert.ts

Co-authored-by: Jakub Sztandera <oss@kubuxu.com>

* rm sinon

* Update packages/synapse-core/src/utils/cert.ts

Co-authored-by: Rod Vagg <rod@vagg.org>

* cleanup

* Update packages/synapse-core/src/utils/cert.ts

Co-authored-by: Rod Vagg <rod@vagg.org>

* disallow undefined chainId in decodeEndorsement

* accept any of the preferred endorsements

* remove certs

* wagmi

* constants

* EndorsementsService

* plumbing

* import type

* add endorsements mock and restore test

* add endorsements script to examples/cli

* delete keystore when init with pk

* Revert "delete keystore when init with pk"

This reverts commit c76237c.

* fix lint

* isCancel

* serviceURL

* lint

* decodePDPCapabilities is not async

* Revert "chore: re-add `getMaxProvingPeriod` and `challengeWindow` function (FilOzone#550)"

This reverts commit 62bb92a.

* getContract

* test fallback on ping failure

---------

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Co-authored-by: Jakub Sztandera <oss@kubuxu.com>
Co-authored-by: Rod Vagg <rod@vagg.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

Decision: Endorsement Certificates vs Smart Contract Approach

5 participants