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

Add Node Service(swarm) to SDK #3911

Merged
merged 8 commits into from
Aug 14, 2024
Merged

Conversation

s2quake
Copy link
Contributor

@s2quake s2quake commented Aug 2, 2024

Node

  • Added the Node to run the Swarm for consensus.
  • Added the IBlockChainService and the IReadChainService interfaces.
  • Added the INodeService interface.

Grpc

  • Added BlockChainGrpcService to get the various information of block chain.
  • Added SeedGrpcService for seed service.

Options

  • If a non-required property is not set in appsettings.json, the default value is set by the OptionsConfigurator.
  • The OptionsValidator is then used to validate that the option is valid.

Dependency Injection

  • Added the feature to ServiceCollection to find and automatically register the required services in the domain's assemblies without having to register the services manually.
  • With attributes GrpcAttribute, OptionsAttribute and SingletonAttribute, they are automatically collected at application startup and registered with the service.

Data Annotations

  • ValidationAttribute can be used to validate attributes used in options. This will provide the information needed to generate the schema for writing appsettings.json in the future.
  • Currently, the following attributes are available
    • AddressAttribute
    • BoundPeerAttribute
    • DnsEndPointAttribute
    • PrivateKeyAttribute
    • PublicKeyAttribute

Extensions

  • Added method extensions to the ServiceCollection class to make it easier to use Dependency Injection.

@s2quake s2quake added the no changelog Bypasses changelog check label Aug 2, 2024
@s2quake s2quake self-assigned this Aug 2, 2024
@s2quake s2quake changed the base branch from main to exp/sdk/node August 2, 2024 02:15
@s2quake s2quake force-pushed the exp/sdk/swarm branch 4 times, most recently from ef2a744 to 4681fc2 Compare August 5, 2024 06:22
@s2quake s2quake changed the title Add node(swarm) to sdk Add Node Service(swarm) to SDK Aug 7, 2024
@s2quake s2quake force-pushed the exp/sdk/swarm branch 10 times, most recently from 081bf10 to c523ae7 Compare August 12, 2024 06:09
@s2quake s2quake marked this pull request as ready for review August 12, 2024 06:09
@s2quake s2quake merged commit e40cc5f into planetarium:exp/sdk/node Aug 14, 2024
21 checks passed
@s2quake s2quake deleted the exp/sdk/swarm branch September 12, 2024 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Bypasses changelog check sdk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants