Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ coverage.txt
dev.env

.editorconfig

# rust package
target

# MacOS devices attributes
.DS_Store
47 changes: 41 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@

This repository is a development gateway to the Akash Blockchain.
It aims following:

- Define data types and API via [protobuf](./proto)
- Akash Blockchain and it's stores, aka [node](./proto/node)
- Akash Provider Interface, aka [provider](./proto/provider)
- Akash Blockchain and it's stores, aka [node](./proto/node)
- Akash Provider Interface, aka [provider](./proto/provider)
- Define data types and API (both REST and GRPC) of Akash Provider Interface
- Provide official reference clients for supported [programming languages](#supported-languages)


## Supported languages

### Golang

[This implementation](./go) provider all necessary code-generation as well as client defining Akash Blockchain
There are a few packages this implementation exports. All packages available via Vanity URLs which are hosted as [Github Pages](https://github.com/akash-network/vanity).

#### Go package

Source code is located within [go](./go) directory
Expand All @@ -33,20 +34,23 @@ import "pkg.akt.dev/go"
##### Migrate package

Depending on difference in API and stores between current and previous versions of the blockchain, there may be a **migrate** package. It is intended to be used by [node](https://github.com/akash-network/node) only.

```go
import "pkg.akt.dev/go/node/migrate"
```

#### SDL package

Reference implementation of the SDL.

```go
import "pkg.akt.dev/go/sdl"
```

#### CLI package

CLI package which combines improved version of cli clients from node](https://github.com/akash-network/node) and [cosmos-sdk](https://github.com/cosmos/cosmos-sdk)
CLI package which combines improved version of cli clients from node](<https://github.com/akash-network/node>) and [cosmos-sdk](https://github.com/cosmos/cosmos-sdk)

```go
import "pkg.akt.dev/go/cli"
```
Expand All @@ -55,18 +59,19 @@ import "pkg.akt.dev/go/cli"

Source code is located within [ts](./ts) directory


## Protobuf

All protobuf definitions are located within [proto](./proto) directory.

This repository consolidates gRPC API definitions for the [Akash Node](https://github.com/akash-network/node) and [Akash Provider](https://github.com/akash-network/provider). It also includes related code generation.

Currently, two `buf` packages are defined, with potential future publication to BSR based on demand:

- **Node Package**: `buf.build/pkg.akt.dev/node`
- **Provider Package**: `buf.build/pkg.akt.dev/provider`

Proto documentation is available for:

- [Node](docs/proto/node.md)
- [Provider](docs/proto/provider.md)

Expand All @@ -78,10 +83,13 @@ If there is a need to run regenerate protobuf (in case of API or documentation c

1. Install [direnv](https://direnv.net) and hook it to the [shell](https://direnv.net/docs/hook.html)
- **MacOS**

```shell
brew install make direnv
```

2. Allow direnv within project

```shell
direnv allow
```
Expand All @@ -93,17 +101,44 @@ If there is a need to run regenerate protobuf (in case of API or documentation c
```shell
make modvendor
```

- generate changes to all [supported programming languages](#supported-languages)

```shell
make proto-gen
```

- to run codegen for specific language use `make proto-gen-<lang>`. For example

```shell
make proto-gen-go
```


## Latest Proto Definition Versions

| Module | Latest Version | Deprecated Version(s) |
|--------|---------------|----------------------|
| Audit | `akash/audit/v1` | `v1beta3` |
| Base: Attributes | `akash/base/attributes/v1` | - |
| Base: Deposit | `akash/base/deposit/v1` | - |
| Base: Offchain Sign | `akash/base/offchain/sign/v1` | - |
| Base: Resources | `akash/base/resources/v1beta4` | `v1beta3` |
| Bme | `akash/bme/v1` | - |
| Cert | `akash/cert/v1` | `v1beta3` |
| Deployment | `akash/deployment/v1beta4` | `v1beta3` |
| Discovery | `akash/discovery/v1` | - |
| Downtime Detector | `akash/downtimedetector/v1beta1` | - |
| Epochs | `akash/epochs/v1beta1` | - |
| Escrow | `akash/escrow/v1` | `v1beta3` |
| Market | `akash/market/v1beta5` | `v1beta4` |
| Oracle | `akash/oracle/v1` | - |
| Provider | `akash/provider/v1beta4` | `v1beta3` |
| Take | `akash/take/v1` | `v1beta3` |
| Wasm | `akash/wasm/v1` | - |

For details on changes between deprecated and current versions, see the [Proto Migration Guide](docs/api-proto-migration-guide.md).

## Releases

Releases indicate changes to the repository itself. API versions are defined within each module.
Expand Down
109 changes: 109 additions & 0 deletions docs/proto/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
- [EventMintStatusChange](#akash.bme.v1.EventMintStatusChange)
- [EventVaultSeeded](#akash.bme.v1.EventVaultSeeded)

- [akash/bme/v1/filters.proto](#akash/bme/v1/filters.proto)
- [LedgerRecordFilters](#akash.bme.v1.LedgerRecordFilters)

- [akash/bme/v1/params.proto](#akash/bme/v1/params.proto)
- [Params](#akash.bme.v1.Params)

Expand All @@ -114,6 +117,9 @@
- [MsgUpdateParamsResponse](#akash.bme.v1.MsgUpdateParamsResponse)

- [akash/bme/v1/query.proto](#akash/bme/v1/query.proto)
- [QueryLedgerRecordEntry](#akash.bme.v1.QueryLedgerRecordEntry)
- [QueryLedgerRecordsRequest](#akash.bme.v1.QueryLedgerRecordsRequest)
- [QueryLedgerRecordsResponse](#akash.bme.v1.QueryLedgerRecordsResponse)
- [QueryParamsRequest](#akash.bme.v1.QueryParamsRequest)
- [QueryParamsResponse](#akash.bme.v1.QueryParamsResponse)
- [QueryStatusRequest](#akash.bme.v1.QueryStatusRequest)
Expand Down Expand Up @@ -419,6 +425,7 @@
- [akash/oracle/v1/params.proto](#akash/oracle/v1/params.proto)
- [Params](#akash.oracle.v1.Params)
- [PythContractParams](#akash.oracle.v1.PythContractParams)
- [WormholeContractParams](#akash.oracle.v1.WormholeContractParams)

- [akash/oracle/v1/genesis.proto](#akash/oracle/v1/genesis.proto)
- [GenesisState](#akash.oracle.v1.GenesisState)
Expand Down Expand Up @@ -1580,6 +1587,40 @@ if field is nil resource is not present in the given data-structure



<!-- end messages -->

<!-- end enums -->

<!-- end HasExtensions -->

<!-- end services -->



<a name="akash/bme/v1/filters.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## akash/bme/v1/filters.proto



<a name="akash.bme.v1.LedgerRecordFilters"></a>

### LedgerRecordFilters
LedgerRecordFilters defines filters used to filter ledger records


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `source` | [string](#string) | | source is the account address of the user who initiated the burn/mint |
| `denom` | [string](#string) | | denom filters by the burn denomination |
| `to_denom` | [string](#string) | | to_denom filters by the mint denomination |
| `status` | [string](#string) | | status filters by record status (pending or executed). Uses the string representation of LedgerRecordStatus enum values. If empty, returns both pending and executed records. |





<!-- end messages -->

<!-- end enums -->
Expand Down Expand Up @@ -1911,6 +1952,56 @@ This is used to provide an initial volatility buffer



<a name="akash.bme.v1.QueryLedgerRecordEntry"></a>

### QueryLedgerRecordEntry
QueryLedgerRecordEntry wraps a ledger record with its ID and status


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `id` | [LedgerRecordID](#akash.bme.v1.LedgerRecordID) | | id is the unique identifier of the ledger record |
| `status` | [LedgerRecordStatus](#akash.bme.v1.LedgerRecordStatus) | | status indicates whether this record is pending or executed |
| `pending_record` | [LedgerPendingRecord](#akash.bme.v1.LedgerPendingRecord) | | pending_record is set when the record status is pending |
| `executed_record` | [LedgerRecord](#akash.bme.v1.LedgerRecord) | | executed_record is set when the record status is executed |






<a name="akash.bme.v1.QueryLedgerRecordsRequest"></a>

### QueryLedgerRecordsRequest
QueryLedgerRecordsRequest is the request type for the Query/LedgerRecords RPC method


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `filters` | [LedgerRecordFilters](#akash.bme.v1.LedgerRecordFilters) | | filters holds the ledger record fields to filter the request |
| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines the pagination for the request |






<a name="akash.bme.v1.QueryLedgerRecordsResponse"></a>

### QueryLedgerRecordsResponse
QueryLedgerRecordsResponse is the response type for the Query/LedgerRecords RPC method


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `records` | [QueryLedgerRecordEntry](#akash.bme.v1.QueryLedgerRecordEntry) | repeated | records is a list of ledger records matching the filters |
| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination contains the information about response pagination |






<a name="akash.bme.v1.QueryParamsRequest"></a>

### QueryParamsRequest
Expand Down Expand Up @@ -2007,6 +2098,7 @@ This is used to provide an initial volatility buffer
| `Params` | [QueryParamsRequest](#akash.bme.v1.QueryParamsRequest) | [QueryParamsResponse](#akash.bme.v1.QueryParamsResponse) | Params returns the module parameters | GET|/akash/bme/v1/params|
| `VaultState` | [QueryVaultStateRequest](#akash.bme.v1.QueryVaultStateRequest) | [QueryVaultStateResponse](#akash.bme.v1.QueryVaultStateResponse) | VaultState returns the current vault state | GET|/akash/bme/v1/vault|
| `Status` | [QueryStatusRequest](#akash.bme.v1.QueryStatusRequest) | [QueryStatusResponse](#akash.bme.v1.QueryStatusResponse) | Status returns the current circuit breaker status | GET|/akash/bme/v1/status|
| `LedgerRecords` | [QueryLedgerRecordsRequest](#akash.bme.v1.QueryLedgerRecordsRequest) | [QueryLedgerRecordsResponse](#akash.bme.v1.QueryLedgerRecordsResponse) | LedgerRecords queries ledger records with optional filters for status, source, denom, to_denom | GET|/akash/bme/v1/ledger|

<!-- end services -->

Expand Down Expand Up @@ -5585,6 +5677,23 @@ It also represents a single data point in TWAP history




<a name="akash.oracle.v1.WormholeContractParams"></a>

### WormholeContractParams
WormholeContractParams contains configuration for Wormhole guardian set.
This allows the Wormhole contract to pull guardian public keys from x/oracle
module params, enabling guardian set updates via Akash governance.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `guardian_addresses` | [string](#string) | repeated | guardian_addresses is the list of Wormhole guardian addresses. Each address is a 20-byte Ethereum-style address, hex-encoded. The Wormhole contract uses these to verify VAA signatures. |





<!-- end messages -->

<!-- end enums -->
Expand Down
4 changes: 2 additions & 2 deletions go/node/bme/v1/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions proto/node/akash/cert/v1beta3/cert.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ option go_package = "pkg.akt.dev/go/node/cert/v1beta3";

// CertificateID stores owner and sequence number
message CertificateID {
option deprecated = true;
option (gogoproto.equal) = false;
option (gogoproto.goproto_stringer) = false;

Expand All @@ -23,6 +24,7 @@ message CertificateID {

// Certificate stores state, certificate and it's public key
message Certificate {
option deprecated = true;
// State is an enum which refers to state of deployment
enum State {
option (gogoproto.goproto_enum_prefix) = false;
Expand Down Expand Up @@ -53,6 +55,7 @@ message Certificate {

// CertificateFilter defines filters used to filter certificates
message CertificateFilter {
option deprecated = true;
option (gogoproto.equal) = false;

string owner = 1 [
Expand All @@ -73,6 +76,7 @@ message CertificateFilter {

// MsgCreateCertificate defines an SDK message for creating certificate
message MsgCreateCertificate {
option deprecated = true;
option (gogoproto.equal) = false;

string owner = 1 [
Expand All @@ -92,10 +96,13 @@ message MsgCreateCertificate {
}

// MsgCreateCertificateResponse defines the Msg/CreateCertificate response type.
message MsgCreateCertificateResponse {}
message MsgCreateCertificateResponse {
option deprecated = true;
}

// MsgRevokeCertificate defines an SDK message for revoking certificate
message MsgRevokeCertificate {
option deprecated = true;
option (gogoproto.equal) = false;

CertificateID id = 1 [
Expand All @@ -107,4 +114,6 @@ message MsgRevokeCertificate {
}

// MsgRevokeCertificateResponse defines the Msg/RevokeCertificate response type.
message MsgRevokeCertificateResponse {}
message MsgRevokeCertificateResponse {
option deprecated = true;
}
3 changes: 3 additions & 0 deletions proto/node/akash/deployment/v1beta3/deployment.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ option go_package = "pkg.akt.dev/go/node/deployment/v1beta3";

// DeploymentID stores owner and sequence number
message DeploymentID {
option deprecated = true;
option (gogoproto.equal) = false;
option (gogoproto.goproto_stringer) = false;

Expand All @@ -23,6 +24,7 @@ message DeploymentID {

// Deployment stores deploymentID, state and version details
message Deployment {
option deprecated = true;
option (gogoproto.equal) = false;

DeploymentID deployment_id = 1 [
Expand Down Expand Up @@ -57,6 +59,7 @@ message Deployment {

// DeploymentFilters defines filters used to filter deployments
message DeploymentFilters {
option deprecated = true;
option (gogoproto.equal) = false;

string owner = 1 [
Expand Down
Loading