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

Provenance Pulse Endpoints #595

Merged
merged 3 commits into from
Feb 26, 2025
Merged

Provenance Pulse Endpoints #595

merged 3 commits into from
Feb 26, 2025

Conversation

jdfigure
Copy link
Member

Description

Adds endpoints for the new Provenance Pulse web application https://test.provenance.io/pulse.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote unit and integration
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@jdfigure jdfigure requested a review from a team as a code owner February 26, 2025 00:40

/**
* Note that `denom` is a required request param instead of a path variable
* because denoms like `nft/blahblahblah` exist and are not valid path variables.
Copy link
Member

Choose a reason for hiding this comment

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

see also: all the ibc denoms... these caused the REST apis to break a long time ago...

Copy link
Contributor

@dcshock dcshock left a comment

Choose a reason for hiding this comment

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

Without testing functionality, this looks fine to me. My take is ship it since there is no apparent impact to the existing codebase, and it will prep the way to release pulse.

AccountRecord.find {
(AccountTable.isContract eq Op.FALSE) and
(AccountTable.baseAccount.isNotNull()) and
(AccountTable.type eq "BaseAccount")
Copy link
Contributor

Choose a reason for hiding this comment

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

Are all accounts base accounts? I'm still catching up on the hierarchy of base, vest, marker, etc...

Copy link
Member

Choose a reason for hiding this comment

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

Yes. Base account is the bottom. A single extension class can extend/derive from it and add more fields. I’ve heard the sdk team plans to undo all of that at some point which would be an extremely disruptive set of changes I fear.

@@ -151,19 +149,19 @@ class TxCacheRecord(id: EntityID<Int>) : IntEntity(id) {
var join: ColumnSet = TxCacheTable

if (tqp.msgTypes.isNotEmpty()) {
join = join.innerJoin(TxMsgTypeQueryTable, { TxCacheTable.id }, { TxMsgTypeQueryTable.txHashId })
join = join.innerJoin(TxMsgTypeQueryTable, { TxCacheTable.id }, { txHashId })
Copy link
Contributor

Choose a reason for hiding this comment

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

thx for fixing these as you went through. They were making my brain hurt.

}.build()
).market

suspend fun getMarketBriefsByDenom(denom: String): List<MarketBrief> = exchangeClient.getAllMarkets(
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure how we typically order function, but I'm a fan of least protected to most protected, or pub to priv. Your org is fine to me, just curious what our standard should be going forward, or if we even want one.

Copy link
Member Author

Choose a reason for hiding this comment

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

I try to group by "locality of behavior" but that often just turns into last written, last function.

@@ -388,4 +393,9 @@ class ScheduledTaskService(
}
}
}

@Scheduled(initialDelay = 1L, fixedDelay = 5L, timeUnit = TimeUnit.MINUTES)
Copy link
Contributor

Choose a reason for hiding this comment

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

at some point, I'd like to see these scheduled tasks broken up into separate files rather than one huge ScheduledTaskService. There is just too much going on in that service to know the scope of a change. This addition is fine for now though, just future thought.

@jdfigure jdfigure merged commit 4f8a18e into main Feb 26, 2025
3 checks passed
@jdfigure jdfigure deleted the jd/repulse branch February 26, 2025 19:05
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.

3 participants