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

feat: add signer-keys from pox4 events #1857

Merged
merged 4 commits into from
Feb 4, 2024
Merged

Conversation

zone117x
Copy link
Member

@zone117x zone117x commented Feb 2, 2024

Parse signer-key arg from pox events (when they are available / in pox4).

Example GET /extended/v1/pox4/events

{
  "limit": 96,
  "offset": 0,
  "results": [
    {
      "block_height": 7,
      "tx_id": "0x6acc6a9a560eedc7be41b645677196ef581c02b039a1ae3e80669af04af67fc4",
      "tx_index": 1,
      "event_index": 1,
      "stacker": "ST18MDW2PDTBSCR1ACXYRJP2JX70FWNM6YY2VX4SS",
      "locked": "3000225000000000",
      "balance": "6999774999999000",
      "burnchain_unlock_height": "140",
      "pox_addr": "mnvi1WQb3cm2QMeeKe6G9D7L1GsjmmGTda",
      "pox_addr_raw": "0x005146f0566e9796602a677d895852e9c0fe5686f7",
      "name": "stack-stx",
      "data": {
        "lock_amount": "3000225000000000",
        "lock_period": "2",
        "start_burn_height": "110",
        "unlock_burn_height": "140",
        "signer_key": "0xc6f48a7ea4fa4919b5135ac37eb1d33900cea5ddb63c4fd1fe4dd02d0749566135"
      }
    }
  ]
}

Backwards compatible with pox1-3
GET /extended/v1/pox3/events

{
  "limit": 96,
  "offset": 0,
  "results": [
    {
      "block_height": 18,
      "tx_id": "0xc4eb4d0962caa87bdb1e85bca8f9d6ff0e1724f5d540afdcbae991bc0a7ac986",
      "tx_index": 0,
      "event_index": 1,
      "stacker": "STB44HYPYAT2BB2QE513NSP81HTMYWBJP02HPGK6",
      "locked": "2062698000000000",
      "balance": "7937301999990000",
      "burnchain_unlock_height": "125",
      "pox_addr": "mmf4gs6mwBYpudc2agd7MomJo8HJd6XksD",
      "pox_addr_raw": "0x0043596b5386f466863e25658ddf94bd0fadab0048",
      "name": "stack-stx",
      "data": {
        "lock_amount": "2062698000000000",
        "lock_period": "1",
        "start_burn_height": "118",
        "unlock_burn_height": "125",
        "signer_key": null
      }
    }
  ]
}

Copy link

github-actions bot commented Feb 2, 2024

Vercel deployment URL: https://stacks-blockchain-lbezbwtqo-blockstack.vercel.app 🚀

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (ada8536) 72.04% compared to head (9bebdce) 71.95%.
Report is 1 commits behind head on nakamoto.

Files Patch % Lines
src/datastore/pg-write-store.ts 0.00% 5 Missing and 5 partials ⚠️
src/event-stream/pox-event-parsing.ts 0.00% 4 Missing ⚠️
src/datastore/pg-store.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           nakamoto    #1857      +/-   ##
============================================
- Coverage     72.04%   71.95%   -0.09%     
============================================
  Files            92       92              
  Lines         11896    11917      +21     
  Branches       2619     2635      +16     
============================================
+ Hits           8570     8575       +5     
- Misses         3173     3184      +11     
- Partials        153      158       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zone117x zone117x marked this pull request as ready for review February 2, 2024 18:33
Copy link
Collaborator

@rafaelcr rafaelcr left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -1910,8 +1910,12 @@ export class PgStore extends BasePgStore {
poxTable: PoxSyntheticEventTable;
}): Promise<DbPoxSyntheticEvent[]> {
return await this.sqlTransaction(async sql => {
const cols =
poxTable === 'pox4_events'
? [...POX_SYNTHETIC_EVENT_COLUMNS, 'signer_key']
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably not needed, but this could be an array.push, depending on how often this code path runs, to avoid a spread

@zone117x zone117x merged commit c17ad23 into nakamoto Feb 4, 2024
30 checks passed
@zone117x zone117x deleted the feat/pox4-signer-keys branch February 4, 2024 02:42
blockstack-devops pushed a commit that referenced this pull request Feb 4, 2024
## [7.9.0-nakamoto.4](v7.9.0-nakamoto.3...v7.9.0-nakamoto.4) (2024-02-04)

### Features

* add signer-keys from pox4 events ([#1857](#1857)) ([c17ad23](c17ad23))
@blockstack-devops
Copy link

🎉 This PR is included in version 7.9.0-nakamoto.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

blockstack-devops pushed a commit that referenced this pull request Mar 21, 2024
## [7.10.0-nakamoto.1](v7.9.0...v7.10.0-nakamoto.1) (2024-03-21)

### Features

* add signer-keys from pox4 events ([#1857](#1857)) ([c17ad23](c17ad23))
* ingest signer_bitvec ([#1900](#1900)) ([aa1750f](aa1750f))
* nakamoto block timestamps ([#1886](#1886)) ([f547832](f547832))
* pox 4 revoke events and signer-key support ([#1829](#1829)) ([5e5650a](5e5650a)), closes [#1849](#1849)
* pox stacker & signer cycle details ([#1873](#1873)) ([d2c2805](d2c2805))

### Bug Fixes

* event-replay readiness for nakamoto & fix for [#1879](#1879) ([#1903](#1903)) ([1572e73](1572e73))
* remove signer columns from tenure-change transactions ([#1845](#1845)) ([8ec726b](8ec726b))
* sql transactional consistency bug with fetching chaintip in various areas ([#1853](#1853)) ([ada8536](ada8536))
@blockstack-devops
Copy link

🎉 This PR is included in version 7.10.0-nakamoto.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

blockstack-devops pushed a commit that referenced this pull request Mar 21, 2024
## [7.10.0-beta.1](v7.9.0...v7.10.0-beta.1) (2024-03-21)

### Features

* add signer-keys from pox4 events ([#1857](#1857)) ([c17ad23](c17ad23))
* ingest signer_bitvec ([#1900](#1900)) ([aa1750f](aa1750f))
* nakamoto block timestamps ([#1886](#1886)) ([f547832](f547832))
* pox 4 revoke events and signer-key support ([#1829](#1829)) ([5e5650a](5e5650a)), closes [#1849](#1849)
* pox stacker & signer cycle details ([#1873](#1873)) ([d2c2805](d2c2805))

### Bug Fixes

* event-replay readiness for nakamoto & fix for [#1879](#1879) ([#1903](#1903)) ([1572e73](1572e73))
* remove signer columns from tenure-change transactions ([#1845](#1845)) ([8ec726b](8ec726b))
* sql transactional consistency bug with fetching chaintip in various areas ([#1853](#1853)) ([ada8536](ada8536))
@blockstack-devops
Copy link

🎉 This PR is included in version 7.10.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

blockstack-devops pushed a commit that referenced this pull request Apr 15, 2024
## [7.10.0](v7.9.1...v7.10.0) (2024-04-15)

### Features

* add nakamoto block time to v2 endpoints ([#1921](#1921)) ([ae6bbe8](ae6bbe8))
* add signer-keys from pox4 events ([#1857](#1857)) ([c17ad23](c17ad23))
* ingest signer_bitvec ([#1900](#1900)) ([aa1750f](aa1750f))
* nakamoto block timestamps ([#1886](#1886)) ([f547832](f547832))
* pox 4 revoke events and signer-key support ([#1829](#1829)) ([5e5650a](5e5650a)), closes [#1849](#1849)
* pox stacker & signer cycle details ([#1873](#1873)) ([d2c2805](d2c2805))
* rosetta pox4 stacking support ([#1928](#1928)) ([2ba36f9](2ba36f9)), closes [#1929](#1929)

### Bug Fixes

* add nakamoto testnet to openapi docs ([#1910](#1910)) ([01fb971](01fb971))
* batch drop mempool transactions ([#1920](#1920)) ([a7ee96d](a7ee96d))
* cycle signer filter ([#1916](#1916)) ([dc7d600](dc7d600))
* cycles response for empty cycle info ([#1914](#1914)) ([a7a4558](a7a4558))
* delegate-stx burn-op parsing and test fix ([#1939](#1939)) ([73ec0db](73ec0db))
* event-replay readiness for nakamoto & fix for [#1879](#1879) ([#1903](#1903)) ([1572e73](1572e73))
* log message when sql migration is performed ([#1942](#1942)) ([49a4d25](49a4d25))
* other empty result responses ([#1915](#1915)) ([3cd2c64](3cd2c64))
* pox4 stack-stx burn-op handling ([#1936](#1936)) ([9e9a464](9e9a464))
* remove signer columns from tenure-change transactions ([#1845](#1845)) ([8ec726b](8ec726b))
* sql transactional consistency bug with fetching chaintip in various areas ([#1853](#1853)) ([ada8536](ada8536))
@blockstack-devops
Copy link

🎉 This PR is included in version 7.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

blockstack-devops pushed a commit that referenced this pull request Apr 15, 2024
## [7.10.0-beta.1](v7.9.1...v7.10.0-beta.1) (2024-04-15)

### Features

* add nakamoto block time to v2 endpoints ([#1921](#1921)) ([ae6bbe8](ae6bbe8))
* add signer-keys from pox4 events ([#1857](#1857)) ([c17ad23](c17ad23))
* ingest signer_bitvec ([#1900](#1900)) ([aa1750f](aa1750f))
* nakamoto block timestamps ([#1886](#1886)) ([f547832](f547832))
* pox 4 revoke events and signer-key support ([#1829](#1829)) ([5e5650a](5e5650a)), closes [#1849](#1849)
* pox stacker & signer cycle details ([#1873](#1873)) ([d2c2805](d2c2805))
* rosetta pox4 stacking support ([#1928](#1928)) ([2ba36f9](2ba36f9)), closes [#1929](#1929)
* support multiple STX faucet source accounts ([#1946](#1946)) ([5d69c7c](5d69c7c))

### Bug Fixes

* add nakamoto testnet to openapi docs ([#1910](#1910)) ([01fb971](01fb971))
* batch drop mempool transactions ([#1920](#1920)) ([a7ee96d](a7ee96d))
* cycle signer filter ([#1916](#1916)) ([dc7d600](dc7d600))
* cycles response for empty cycle info ([#1914](#1914)) ([a7a4558](a7a4558))
* delegate-stx burn-op parsing and test fix ([#1939](#1939)) ([73ec0db](73ec0db))
* event-replay readiness for nakamoto & fix for [#1879](#1879) ([#1903](#1903)) ([1572e73](1572e73))
* log message when sql migration is performed ([#1942](#1942)) ([49a4d25](49a4d25))
* other empty result responses ([#1915](#1915)) ([3cd2c64](3cd2c64))
* pox4 stack-stx burn-op handling ([#1936](#1936)) ([9e9a464](9e9a464))
* remove signer columns from tenure-change transactions ([#1845](#1845)) ([8ec726b](8ec726b))
* sql transactional consistency bug with fetching chaintip in various areas ([#1853](#1853)) ([ada8536](ada8536))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants