Skip to content

Commit

Permalink
feat: Add created/updated at block heights to registry (#458)
Browse files Browse the repository at this point in the history
This PR adds the `created_at_block_height` and `updated_at_block_height`
fields to `IndexerConfig` within the registry contract. The motive
behind this is to provide Coordinator V2 with a way for comparing the
actual and desired states of the system, i.e. if there is a mismatch
between the registry and the system, action should be taken. Without
versions, there is no way of making this comparison.

## Compilation Errors
~~I ran in to several issues trying to compile the `wasm32` binary, and
have outlined all these issues in
near/near-sdk-rs#1125, as well as in the
`README.md` so that the fixes are documented. These fixes are a bit
janky, but I've tested the deployed contract and all seems to be ok.~~

These have been resolved, see:
#458 (comment)

## Account Roles Migration
I've also included `account_roles` in this migration as we have some
incorrect accounts as `Owner`s (`pavelnear.near`). All owners will be
wiped and re-written from the contract default state. All `User`s will
remain.

## Coordinator V1
Coordinator V1 has been tested to ensure that it can still parse the
registry after these new fields have been applied.
  • Loading branch information
morgsmccauley committed Jan 4, 2024
1 parent 314dc2c commit ed72374
Show file tree
Hide file tree
Showing 6 changed files with 312 additions and 32 deletions.
2 changes: 1 addition & 1 deletion block-streamer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tokio-stream = "0.1.14"
tonic = "0.10.2"
wildmatch = "2.1.1"

registry-types = { path = "../registry/types" }
registry-types = { path = "../registry/types", features = ["near-primitives"] }

near-lake-framework = "0.7.4"

Expand Down
1 change: 0 additions & 1 deletion registry/contract/Cargo.lock

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

5 changes: 1 addition & 4 deletions registry/contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["cdylib"]
borsh = "1.0.0"
near-sdk = "5.0.0-alpha.1"
uint = { version = "0.9.3", default-features = false }
registry-types = { path = "../types", features = ["nearsdk"] }
registry-types = { path = "../types", features = ["near-sdk"] }

[profile.release]
codegen-units = 1
Expand All @@ -20,6 +20,3 @@ lto = true
debug = false
panic = "abort"
overflow-checks = true

[workspace]
members = []
Loading

0 comments on commit ed72374

Please sign in to comment.