Skip to content

Commit

Permalink
Fix for HIP validation
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Sheehy <steven.sheehy@swirldslabs.com>
  • Loading branch information
steven-sheehy committed Feb 2, 2023
1 parent b17d884 commit cdd6781
Showing 1 changed file with 25 additions and 52 deletions.
77 changes: 25 additions & 52 deletions HIP/HIP-668.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
hip: 668
title: Mirror Node GraphQL API
author: Steven Sheehy <@steven-sheehy>
working-group: Daniel Costa
author: Steven Sheehy <steven.sheehy@swirldslabs.com>
working-group: Daniel Costa <daniel@arkhia.io>
type: Standards Track
category: Mirror
needs-council-approval: Yes
Expand Down Expand Up @@ -166,7 +166,7 @@ In addition to the built-in scalars, this API defines a few custom scalars.
"An ISO 8601 compatible duration with support for nanoseconds granularity in the format P[n]Y[n]M[n]DT[n]H[n]M[n]S."
scalar Duration

"A 64-bit numeric type."
"A 64-bit signed numeric type."
scalar Long

"A map-like object with dynamic key/value pairs."
Expand All @@ -189,7 +189,7 @@ identifier and has a common set of fields defined by the `Entity` interface.
"A specialization of an Entity appropriate for entities that have a Hbar balance."
interface Accountable implements Entity & Node {
"The account charged the auto-renewal fee."
autoRenewAccount: Account
autoRenewEntity: Accountable

"The amount of time to elapse before auto-renew occurs."
autoRenewPeriod: Duration
Expand Down Expand Up @@ -252,9 +252,6 @@ interface Accountable implements Entity & Node {

"A consensus timestamp range with an inclusive from timestamp and an exclusive to timestamp."
timestamp: TimestampRange!

"The type of Hedera entity."
type: EntityType!
}

"The encoding used to convert the raw bytes to String."
Expand All @@ -272,7 +269,7 @@ across all entity types and associated with a particular shard and realm.
"""
interface Entity implements Node {
"The account charged the auto-renewal fee."
autoRenewAccount: Account
autoRenewEntity: Accountable

"The amount of time to elapse before auto-renew occurs."
autoRenewPeriod: Duration
Expand All @@ -297,7 +294,8 @@ interface Entity implements Node {

"""
The admin key associated with this entity whose signing requirements must be met in order to modify the entity on
the network.
the network. This returns a dynamic map that varies per entity and may be arbitrarily complex depending upon this
key's signing requirements.
"""
key: Object

Expand All @@ -306,9 +304,6 @@ interface Entity implements Node {

"A consensus timestamp range with an inclusive from timestamp and an exclusive to timestamp."
timestamp: TimestampRange!

"The type of Hedera entity."
type: EntityType!
}

"An incrementing identifier that is shared across all entity types and associated with a particular shard and realm."
Expand All @@ -335,17 +330,6 @@ input EntityIdInput {
shard: Long! = 0 @Min(value: 0)
}

"The type of Hedera entity."
enum EntityType {
ACCOUNT
CONTRACT
FILE
SCHEDULE
TOKEN
TOPIC
UNKNOWN
}

"A rational number, used to provide an accurate number without any rounding issues and to provide consistency with HAPI."
type Fraction {
"The rational's denominator. Will be a value of one when the numerator should be treated as a whole number."
Expand Down Expand Up @@ -496,7 +480,7 @@ type Account implements Accountable & Entity & Node {
allowances: Allowances!

"The account charged the auto-renewal fee."
autoRenewAccount: Account
autoRenewEntity: Accountable

"The amount of time to elapse before auto-renew occurs."
autoRenewPeriod: Duration
Expand Down Expand Up @@ -577,9 +561,6 @@ type Account implements Accountable & Entity & Node {

"Lists the transactions associated with this account."
transactions(after: String, before: String, first: Int, last: Int): TransactionConnection!

"The type of Hedera entity."
type: EntityType!
}

"""
Expand Down Expand Up @@ -857,6 +838,12 @@ enum BlockType {
Users can query their smart contract by its unique identifier and return associated info like the results or state.

```graphql
"The type of entity calling the contract."
enum CallerType {
ACCOUNT
CONTRACT
}

"The specific operation type of a call."
enum CallOperationType {
CALL
Expand All @@ -871,7 +858,7 @@ enum CallOperationType {
"Represents a Hedera contract on the network."
type Contract implements Accountable & Entity & Node {
"The account charged the auto-renewal fee."
autoRenewAccount: Account
autoRenewEntity: Accountable

"The amount of time to elapse before auto-renew occurs."
autoRenewPeriod: Duration
Expand Down Expand Up @@ -952,9 +939,6 @@ type Contract implements Accountable & Entity & Node {

"A consensus timestamp range with an inclusive from timestamp and an exclusive to timestamp."
timestamp: TimestampRange!

"The type of Hedera entity."
type: EntityType!
}

"A fine grained action within a contract result. Sometimes called 'internal transactions'."
Expand All @@ -971,8 +955,8 @@ type ContractAction implements Node {
"The entity calling the contract."
caller: EntityId!

"The type of entity calling the contract. Can only be ACCOUNT or CONTRACT."
callerType: EntityType!
"The type of entity calling the contract."
callerType: CallerType!

"The upper limit of gas this action can spend."
gas: Long!
Expand Down Expand Up @@ -1288,7 +1272,7 @@ Users can query for a specific Hedera file and its associated data.
"Represents a file on the Hedera network to allow arbitrarily large byte sequences on the ledger."
type File implements Entity & Node {
"The account charged the auto-renewal fee."
autoRenewAccount: Account
autoRenewEntity: Accountable

"The amount of time to elapse before auto-renew occurs."
autoRenewPeriod: Duration
Expand Down Expand Up @@ -1325,9 +1309,6 @@ type File implements Entity & Node {

"A consensus timestamp range with an inclusive from timestamp and an exclusive to timestamp."
timestamp: TimestampRange!

"The type of Hedera entity."
type: EntityType!
}

"The chunked file contents associated with a Hedera file."
Expand Down Expand Up @@ -1537,7 +1518,7 @@ Users can query for a specific Hedera Schedule.
"A schedule entity allows a transaction to be scheduled for future execution."
type Schedule implements Entity & Node {
"The account charged the auto-renewal fee."
autoRenewAccount: Account
autoRenewEntity: Accountable

"The amount of time to elapse before auto-renew occurs."
autoRenewPeriod: Duration
Expand Down Expand Up @@ -1585,9 +1566,6 @@ type Schedule implements Entity & Node {
"The scheduled transaction body to be executed in the future. Encoded bytes of SchedulableTransactionBody protobuf."
transactionBody(encoding: BinaryEncoding = BASE64): String!

"The type of Hedera entity."
type: EntityType!

"""
Whether the scheduled transaction will be evaluated for execution at its expiration time instead of when all
required signatures are received.
Expand Down Expand Up @@ -1778,7 +1756,7 @@ type Token implements Entity & Node {
accounts(after: String, before: String, first: Int, last: Int): TokenAssociationConnection!

"The account charged the auto-renewal fee."
autoRenewAccount: Account
autoRenewEntity: Accountable

"The amount of time to elapse before auto-renew occurs."
autoRenewPeriod: Duration
Expand Down Expand Up @@ -1877,9 +1855,6 @@ type Token implements Entity & Node {
"The token class type for IWA compatibility."
tokenType: TokenType!

"The type of Hedera entity."
type: EntityType!

"The key which can wipe the token balance of an account."
wipeKey: Object
}
Expand Down Expand Up @@ -1918,7 +1893,7 @@ Users can query for a specific Hedera topic and its associated messages.
"A Hedera topic provides aBFT consensus as to the order and validity of messages submitted to it."
type Topic implements Entity & Node {
"The account charged the auto-renewal fee."
autoRenewAccount: Account
autoRenewEntity: Accountable

"The amount of time to elapse before auto-renew occurs."
autoRenewPeriod: Duration
Expand Down Expand Up @@ -1962,9 +1937,6 @@ type Topic implements Entity & Node {

"A consensus timestamp range with an inclusive from timestamp and an exclusive to timestamp."
timestamp: TimestampRange!

"The type of Hedera entity."
type: EntityType!
}

"The unique identifier to get a specific topic."
Expand Down Expand Up @@ -2245,7 +2217,7 @@ type Transfers {
## Backwards Compatibility

This HIP introduces a new mirror node API and as such introduces no backwards compatibility concerns. The existing
mirror node REST API will continue to be maintained.
mirror node REST API will continue to be maintained and new features will be added to both APIs going forward.

## Security Implications

Expand All @@ -2269,7 +2241,7 @@ exact query depth will be determined based upon performance testing.

Limiting each list is necessary to reduce the multiplier of having nested queries. Any list will be limited to at
most 100 items. Each of those list could potentially contain other lists who are each similarly constrained to 100 items
and so on.
and so on. The exact number may change in the future depending upon performance testing.

### Query Complexity Limit

Expand Down Expand Up @@ -2308,7 +2280,8 @@ available queries. Additional documentation will be provided by Hedera to instru
A reference implementation is underway on the Mirror Node GitHub repository. The results of this effort will manifest
themselves as a new `hedera-mirror-graphql` module and associated microservice. GitHub issues labeled
with [graphql](https://github.com/hashgraph/hedera-mirror-node/issues?q=is%3Aissue+is%3Aopen+graphql+label%3Agraphql)
can be used by interested parties to track the progress of this work.
or the GraphQL API [epic](https://github.com/hashgraph/hedera-mirror-node/issues/5304) can be used by interested
parties to track the progress of this work.

## Rejected Ideas

Expand Down

0 comments on commit cdd6781

Please sign in to comment.