Laconic state machine
Go to file
Thomas E Lackey 880367d5df 122: Fix attribute index key collision (#123)
Fix #122, where the structure of the index key allowed unintended collisions (see below).

This also adds a test cases which _fails_ under the old scheme, but passes now:

**Before:**

```
--- FAIL: TestKeeperTestSuite (0.31s)
    --- FAIL: TestKeeperTestSuite/TestGrpcGetRecordLists (0.09s)
        grpc_query_test.go:143:
                Error Trace:    /home/telackey/cerc/laconicd/x/registry/keeper/grpc_query_test.go:143
                                                        /home/telackey/cerc/laconicd/x/registry/keeper/suite.go:91
                Error:          Not equal:
                                expected: 0
                                actual  : 1
                Test:           TestKeeperTestSuite/TestGrpcGetRecordLists
        --- FAIL: TestKeeperTestSuite/TestGrpcGetRecordLists/Case_Filter_with_typ_(cerc-io/laconicd#122)_ (0.00s)
            testing.go:1490: test executed panic(nil) or runtime.Goexit: subtest may have called FailNow on a parent test
FAIL
FAIL    github.com/cerc-io/laconicd/x/registry/keeper   0.765s
FAIL
make: *** [Makefile:333: run-tests] Error 1

❯ laconic cns record list --all --typ eWebsiteRegistrationRecord
[
  {
    "id": "bafyreies5he2mxyrjso2quewwlmh6cisekkjnf7yijpd2742wrzxgzuazi",
    "names": null,
    "owners": [
      "FC9B9FB065D70DBB10C8F511348421C16669B37D"
    ],
    "bondId": "a9c7161fc154cf44ee61efc699a59c8a27c804bb23ce4c8a7ffa0a39fcc540b1",
    "createTime": "2023-11-28T19:09:03Z",
    "expiryTime": "2024-11-27T19:09:03Z",
    "attributes": {
      "url": "https://hello-urbit.laconic.com",
      "repo_registration_record_cid": "QmTZQ8ZJS6mALjEM2wY71msFno6zzxFftVCiZELj9xREPx",
      "build_artifact_cid": "~lostex-rabdur-labtul-moltev/hello-urbit",
      "tls_cert_cid": "QmR1acEmQt7Tjmhp9cFtymie2eFcrHURQKt9kGto1TQTW1",
      "type": "WebsiteRegistrationRecord",
      "version": "0.2.4"
    }
  }
...

❯ laconic cns record list --all --type WebsiteRegistrationRecord
[
  {
    "id": "bafyreies5he2mxyrjso2quewwlmh6cisekkjnf7yijpd2742wrzxgzuazi",
    "names": null,
    "owners": [
      "FC9B9FB065D70DBB10C8F511348421C16669B37D"
    ],
    "bondId": "a9c7161fc154cf44ee61efc699a59c8a27c804bb23ce4c8a7ffa0a39fcc540b1",
    "createTime": "2023-11-28T19:09:03Z",
    "expiryTime": "2024-11-27T19:09:03Z",
    "attributes": {
      "url": "https://hello-urbit.laconic.com",
      "repo_registration_record_cid": "QmTZQ8ZJS6mALjEM2wY71msFno6zzxFftVCiZELj9xREPx",
      "build_artifact_cid": "~lostex-rabdur-labtul-moltev/hello-urbit",
      "tls_cert_cid": "QmR1acEmQt7Tjmhp9cFtymie2eFcrHURQKt9kGto1TQTW1",
      "type": "WebsiteRegistrationRecord",
      "version": "0.2.4"
    }
  }
...
```

**After:**

```
ok      github.com/cerc-io/laconicd/x/registry/keeper   1.573s

❯ laconic cns record list --all --typ eWebsiteRegistrationRecord
[]

❯ laconic cns record list --all --type WebsiteRegistrationRecord
[
  {
    "id": "bafyreies5he2mxyrjso2quewwlmh6cisekkjnf7yijpd2742wrzxgzuazi",
    "names": null,
    "owners": [
      "FC9B9FB065D70DBB10C8F511348421C16669B37D"
    ],
    "bondId": "a9c7161fc154cf44ee61efc699a59c8a27c804bb23ce4c8a7ffa0a39fcc540b1",
    "createTime": "2023-11-28T19:09:03Z",
    "expiryTime": "2024-11-27T19:09:03Z",
    "attributes": {
      "url": "https://hello-urbit.laconic.com",
      "repo_registration_record_cid": "QmTZQ8ZJS6mALjEM2wY71msFno6zzxFftVCiZELj9xREPx",
      "build_artifact_cid": "~lostex-rabdur-labtul-moltev/hello-urbit",
      "tls_cert_cid": "QmR1acEmQt7Tjmhp9cFtymie2eFcrHURQKt9kGto1TQTW1",
      "type": "WebsiteRegistrationRecord",
      "version": "0.2.4"
    }
  }
...
```

Reviewed-on: cerc-io/laconicd#123
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-11-29 00:05:56 +00:00
.bencher ci: add bencher config (#652) 2021-10-08 12:07:03 +00:00
.github 119: Disable "stale" workflow. (#120) 2023-11-28 19:06:10 +00:00
app chain id (#73) 2023-01-11 10:52:29 +05:30
client Sync from fork (#74) 2023-01-10 10:20:57 +05:30
cmd Sync from fork (#74) 2023-01-10 10:20:57 +05:30
contrib/scripts ethermintd->laconicd 2022-10-13 11:23:17 +05:30
crypto Sync from fork (#74) 2023-01-10 10:20:57 +05:30
docs Sync from fork (#74) 2023-01-10 10:20:57 +05:30
encoding update fork 2022-10-10 16:08:33 +05:30
ethereum/eip712 Sync from fork (#74) 2023-01-10 10:20:57 +05:30
gql Changes to run laconic-console app with laconicd (#75) 2023-01-11 13:06:42 +05:30
indexer Sync from fork (#74) 2023-01-10 10:20:57 +05:30
networks/local Sync from fork (#74) 2023-01-10 10:20:57 +05:30
nix Sync from fork (#74) 2023-01-10 10:20:57 +05:30
proto Add new record types ApplicationRecord, WebAppDeploymentRecord, GeneralRecord (#113) 2023-11-20 22:01:03 +00:00
rpc Sync from fork (#74) 2023-01-10 10:20:57 +05:30
scripts chain id (#73) 2023-01-11 10:52:29 +05:30
server Sync from fork (#74) 2023-01-10 10:20:57 +05:30
testnet update validator doc for v0.8.0 and laconic_81337-6 2023-03-10 06:35:33 +00:00
tests Add new record types ApplicationRecord, WebAppDeploymentRecord, GeneralRecord (#113) 2023-11-20 22:01:03 +00:00
testutil fix error in testutil/network/util.go 2022-10-11 15:43:38 +05:30
tools update fork 2022-10-10 16:08:33 +05:30
types Sync from fork (#74) 2023-01-10 10:20:57 +05:30
utils replace CIDFromJSONBytes (#97) 2023-03-14 11:21:23 +05:30
version ignore gosec 2022-10-18 15:36:34 +05:30
x 122: Fix attribute index key collision (#123) 2023-11-29 00:05:56 +00:00
.clang-format Sync from fork (#74) 2023-01-10 10:20:57 +05:30
.dockerignore build: fix docker setup (#337) 2021-08-04 09:30:13 +00:00
.flake8 Sync from fork (#74) 2023-01-10 10:20:57 +05:30
.gitattributes add gitattributes file (#567) 2021-09-16 08:36:08 +00:00
.gitignore All test stuff (#88) 2023-01-30 16:59:13 -05:00
.gitleaks.toml Sync from fork (#74) 2023-01-10 10:20:57 +05:30
.golangci.yml Fix lint errors (which are actually bugs in linting dependencies) (#114) 2023-11-21 04:57:52 +00:00
.goreleaser.yml ci: fix goreleaser (#708) 2021-10-29 15:56:09 +02:00
.markdownlint.yml Sync from fork (#74) 2023-01-10 10:20:57 +05:30
.markdownlintignore Sync from fork (#74) 2023-01-10 10:20:57 +05:30
.mergify.yml Sync from fork (#74) 2023-01-10 10:20:57 +05:30
.protolint.yml Sync from fork (#74) 2023-01-10 10:20:57 +05:30
.semgrepignore change comment 2023-03-20 11:18:13 +05:30
.solhint.json Sync from fork (#74) 2023-01-10 10:20:57 +05:30
.yamllint Sync from fork (#74) 2023-01-10 10:20:57 +05:30
buf.work.yaml Sync from fork (#74) 2023-01-10 10:20:57 +05:30
CHANGELOG.md Sync from fork (#74) 2023-01-10 10:20:57 +05:30
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2018-07-17 11:52:20 -04:00
codecov.yml all: linter (#532) 2021-09-05 11:03:06 +00:00
CONTRIBUTING.md update fork 2022-10-10 16:08:33 +05:30
default.nix ethermintd->laconicd 2022-10-13 11:23:17 +05:30
docker-compose.yml update fork 2022-10-10 16:08:33 +05:30
Dockerfile All test stuff (#88) 2023-01-30 16:59:13 -05:00
go.mod Fix lint errors (which are actually bugs in linting dependencies) (#114) 2023-11-21 04:57:52 +00:00
go.sum Fix lint errors (which are actually bugs in linting dependencies) (#114) 2023-11-21 04:57:52 +00:00
gometalinter.json Sync from fork (#74) 2023-01-10 10:20:57 +05:30
gomod2nix.toml Sync from fork (#74) 2023-01-10 10:20:57 +05:30
init.bat chain id (#73) 2023-01-11 10:52:29 +05:30
init.sh Make init.sh re-runnable safely. (#117) 2023-11-22 17:31:15 +00:00
LICENSE docs: re-license to LGPLv3 (#800) 2021-11-30 09:22:21 +01:00
Makefile Fix lint errors (which are actually bugs in linting dependencies) (#114) 2023-11-21 04:57:52 +00:00
mlc_config.json Sync from fork (#74) 2023-01-10 10:20:57 +05:30
README.md Update README.md 2023-01-11 09:11:37 -05:00
starport.yml chain id (#73) 2023-01-11 10:52:29 +05:30

Laconic Network

banner

The Source of Proof. Laconic is a next generation data availability & verifiability layer with cryptographic proofs, powering internet-scale Web3 applications, built on Proof-of-Stake with fast-finality using the Cosmos SDK which runs on top of Tendermint Core consensus engine.

Note: Requires Go 1.19+

Installation

make install

Usage

To quickly get started with a single node fixture, run:

./init.sh

Community

The following chat channels and forums are a great spot to ask questions about Ethermint:

Contributing

Looking for a good place to start contributing? Check out some good first issues.

For additional instructions, standards and style guides, please refer to the Contributing document.