Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit ce24844
Author: Daniel <[email protected]>
Date:   Wed Nov 2 14:59:23 2022 +0000

    Bump design.md

commit 8d465a9
Author: Daniel <[email protected]>
Date:   Wed Nov 2 14:51:33 2022 +0000

    Adds query.pb.go comment

commit aa57bff
Author: Daniel <[email protected]>
Date:   Wed Nov 2 14:49:12 2022 +0000

    revert whitespace

commit 2ecc545
Author: Daniel <[email protected]>
Date:   Wed Nov 2 14:36:52 2022 +0000

    improve design.md

commit dd5193b
Author: Daniel <[email protected]>
Date:   Wed Nov 2 14:13:32 2022 +0000

    Start improving design and api docs

commit bbc5424
Author: Daniel <[email protected]>
Date:   Wed Nov 2 13:42:11 2022 +0000

    Improve comment in relay

commit 87e5a9b
Author: Daniel <[email protected]>
Date:   Wed Nov 2 13:42:05 2022 +0000

    Remove comments in module

commit 6eef58a
Author: Daniel <[email protected]>
Date:   Wed Nov 2 13:42:00 2022 +0000

    Remove comment in codec

commit bf2211b
Author: Daniel <[email protected]>
Date:   Wed Nov 2 13:27:26 2022 +0000

    Impl UnpackInterfaces

commit ebc0290
Author: Daniel <[email protected]>
Date:   Wed Nov 2 13:24:40 2022 +0000

    Adds docstrings to keys.go

commit 8cdcef6
Author: Daniel <[email protected]>
Date:   Wed Nov 2 13:24:26 2022 +0000

    Adjust hardcoded string path in msg.go

commit 4869820
Author: Daniel <[email protected]>
Date:   Wed Nov 2 13:16:05 2022 +0000

    Bump num traces in in mem test

commit 76ebbfd
Author: Daniel <[email protected]>
Date:   Wed Nov 2 13:15:53 2022 +0000

    Move code block in core_test

commit 2496dfc
Author: Daniel <[email protected]>
Date:   Wed Nov 2 13:15:45 2022 +0000

    Better comment for internal computation

commit b95de07
Author: Daniel <[email protected]>
Date:   Wed Nov 2 13:15:34 2022 +0000

    TODO in msg_server

commit 92af9f5
Author: Daniel <[email protected]>
Date:   Wed Nov 2 13:15:27 2022 +0000

    Improve relay helper clarity

commit 47bc20d
Author: Daniel <[email protected]>
Date:   Wed Nov 2 13:15:19 2022 +0000

    Adjust query.proto

commit 05da157
Author: Daniel <[email protected]>
Date:   Wed Nov 2 13:02:09 2022 +0000

    Fix proposal TODO

commit ed10448
Author: Daniel <[email protected]>
Date:   Wed Nov 2 12:57:30 2022 +0000

    rename key assignment files with underscore

commit 31f0288
Author: Daniel <[email protected]>
Date:   Wed Nov 2 12:55:11 2022 +0000

    Revert "Try remove +100 in _test"

    This reverts commit 62c0f32.

commit 62c0f32
Author: Daniel <[email protected]>
Date:   Wed Nov 2 12:54:49 2022 +0000

    Try remove +100 in _test

commit a1fbf82
Author: Daniel <[email protected]>
Date:   Wed Nov 2 12:53:40 2022 +0000

    Move spec to docs, rename docs

commit 708089a
Author: Daniel <[email protected]>
Date:   Wed Nov 2 12:47:19 2022 +0000

    Make a naming improvement pass

commit 4bf4d84
Author: Daniel <[email protected]>
Date:   Wed Nov 2 12:41:53 2022 +0000

    Update keys.go names

commit 4730a8c
Author: Daniel <[email protected]>
Date:   Wed Nov 2 12:37:32 2022 +0000

    fmt keyassignment.go

commit efdee98
Author: Daniel <[email protected]>
Date:   Wed Nov 2 12:35:19 2022 +0000

    Renames km -> ka in test

commit 1c9db11
Author: Daniel <[email protected]>
Date:   Wed Nov 2 12:22:13 2022 +0000

    Squashed commit of the following:

    commit 80b751c
    Author: Marius Poke <[email protected]>
    Date:   Tue Nov 1 20:39:30 2022 +0100

        Channel initialization timeout (#406)

        * add provider-based timeout params

        * add InitTimeoutTimestamp to store

        * add init timeout logic

        * params boilerplate code & making tests pass

        * add TestInitTimeout* e2e tests

        * improve e2e tests; add test case to TestUndelegationDuringInit

        * remove VSC timeout

        * remove VSC timeout param

        * add testcase to TestValidateParams

        * handle StopConsumerChain error & gofmt

        * Fix init timeout conflicts (#409)

        * Importable e2e tests (#401)

        * fixes

        * add comment to GetInitTimeoutTimestamp

        * Update proto/interchain_security/ccv/provider/v1/provider.proto

        Co-authored-by: Aditya <[email protected]>

        * fix formatting in proto file

        * add comment to SetConsumerChain

        * fix typo

        * add comment re. EndBlock order

        * change name of testcase in TestUndelegationDuringInit

        Co-authored-by: Shawn Marshall-Spitzbart <[email protected]>
        Co-authored-by: Aditya <[email protected]>

    commit cfc4569
    Author: Shawn Marshall-Spitzbart <[email protected]>
    Date:   Tue Nov 1 08:10:52 2022 -0700

        Remove unneeded const variables (#418)

        * wip

        * diff test patch (#412)

        Patch

        Co-authored-by: Daniel <[email protected]>

        * add back setter

        * comment

        * remove compute consumer unbonding

        * Update params.go

        Co-authored-by: Daniel T <[email protected]>
        Co-authored-by: Daniel <[email protected]>

    commit 602b7ed
    Author: Shawn Marshall-Spitzbart <[email protected]>
    Date:   Fri Oct 28 08:34:26 2022 -0700

        Consumer Unbonding As Param (#410)

        Co-authored-by: Daniel T <[email protected]>
        Co-authored-by: Daniel <[email protected]>

commit eb501ca
Author: Daniel <[email protected]>
Date:   Wed Nov 2 12:12:53 2022 +0000

    Fix build errors

commit 8affd7b
Author: Daniel <[email protected]>
Date:   Wed Nov 2 12:06:21 2022 +0000

    Renam store methods

commit eaf08cd
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:52:56 2022 +0000

    Bring go.mod back to matching main

commit 2df5458
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:43:49 2022 +0000

    Fix core_test comment

commit 2c8b3c4
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:42:34 2022 +0000

    Mass rename to clear up tailing 'pings'

commit 888ec23
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:41:30 2022 +0000

    Fix method handles in core_test

commit cad0821
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:40:53 2022 +0000

    Rename method handle in keyassignment

commit c1239d9
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:39:22 2022 +0000

    Remove long todo

commit 17d216a
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:38:33 2022 +0000

    Rename map words to assignment words

commit 360ec22
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:22:27 2022 +0000

    mass rename keyMap -> keyAssignment

commit 1540f5a
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:19:04 2022 +0000

    RN docs

commit 24d4ea3
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:16:05 2022 +0000

    rename imports in keyassignment_test.go

commit 62ed143
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:15:33 2022 +0000

    Update key assignment imports

commit 881077e
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:14:13 2022 +0000

    Fix build errors due to proto rebuild

commit 87869c5
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:07:42 2022 +0000

    DEL keymap.pb.go

commit a1c47bf
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:06:40 2022 +0000

    Rename and rebuild proto

commit 747bef4
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:01:49 2022 +0000

    rename keymap.proto to keyassignment.proto

commit c504f45
Author: Daniel <[email protected]>
Date:   Wed Nov 2 11:01:24 2022 +0000

    rename files prefixed with keymap with keyassignment prefix

commit 2410cf7
Author: Daniel <[email protected]>
Date:   Wed Nov 2 10:59:47 2022 +0000

    Mass rename keymap -> keyassignment

commit 2daab1e
Author: Daniel <[email protected]>
Date:   Wed Nov 2 10:59:07 2022 +0000

    Mass rename KeyMap -> KeyAssignment

commit d7f8d44
Author: Daniel <[email protected]>
Date:   Wed Nov 2 10:30:28 2022 +0000

    Revert import name change  in grpc query

commit 6b4fc4b
Author: Daniel <[email protected]>
Date:   Wed Nov 2 10:27:53 2022 +0000

    Reach milestone in factoring out test keys

commit 80cb85a
Author: Daniel <[email protected]>
Date:   Wed Nov 2 10:08:34 2022 +0000

    Simplify keymap_test (did not run test)

commit fbd056b
Author: Daniel <[email protected]>
Date:   Wed Nov 2 10:08:19 2022 +0000

    Simplify grpc_query_test

commit 959dc45
Author: Daniel <[email protected]>
Date:   Wed Nov 2 09:50:54 2022 +0000

    Improve import names

commit f56196a
Author: Daniel <[email protected]>
Date:   Wed Nov 2 09:46:22 2022 +0000

    Slight improvement core_test keyAssignment

commit 89ddbac
Author: Daniel <[email protected]>
Date:   Wed Nov 2 09:43:24 2022 +0000

    Factor out messy validator creation code in diff core setup

commit f4ac5b4
Author: Daniel <[email protected]>
Date:   Wed Nov 2 09:32:15 2022 +0000

    Add staking validator helper to test validator

commit 0a73df1
Author: Daniel <[email protected]>
Date:   Wed Nov 2 09:32:00 2022 +0000

    Refactor TestDesignateConsensusKeyForConsumerChain handler test

commit f0cb3f1
Author: Daniel <[email protected]>
Date:   Wed Nov 2 09:20:55 2022 +0000

    rename import in core_test

commit b3c793a
Author: Daniel <[email protected]>
Date:   Wed Nov 2 09:19:59 2022 +0000

    Try revert useless diffs in helpers

commit 2708a47
Author: Daniel <[email protected]>
Date:   Wed Nov 2 09:18:20 2022 +0000

    Fix method name in setup

commit fdc95bd
Author: Daniel <[email protected]>
Date:   Wed Nov 2 09:16:36 2022 +0000

    (test-diff pass) refactor diff core to use common test val utils

commit f1cfae5
Author: Daniel <[email protected]>
Date:   Wed Nov 2 09:00:10 2022 +0000

    Make adjustment in core_test

commit 983c87c
Author: Daniel <[email protected]>
Date:   Wed Nov 2 08:59:58 2022 +0000

    Start factoring out duplicate test keys

commit 97abb29
Author: Daniel <[email protected]>
Date:   Tue Nov 1 20:08:50 2022 +0000

    Leave note for consumerPower

commit bdb995f
Author: Daniel <[email protected]>
Date:   Tue Nov 1 19:31:35 2022 +0000

    (make test-diff pass) DELETE find.py debug helper

commit b71fc9d
Author: Daniel <[email protected]>
Date:   Tue Nov 1 19:29:05 2022 +0000

    Strip down debug statements

commit e344959
Author: Daniel <[email protected]>
Date:   Tue Nov 1 19:15:53 2022 +0000

    Remove core test grey code

commit 899f6ca
Author: Daniel <[email protected]>
Date:   Tue Nov 1 19:09:44 2022 +0000

    (make test-diff pass) refactors

commit 944ee5a
Author: Daniel <[email protected]>
Date:   Tue Nov 1 19:05:39 2022 +0000

    Pre strip debugs

commit 18b255d
Author: Daniel <[email protected]>
Date:   Tue Nov 1 19:01:19 2022 +0000

    Partial refactors of driver

commit b8019ac
Author: Daniel <[email protected]>
Date:   Tue Nov 1 18:43:08 2022 +0000

    Checkpoint pre refactor driver

commit c72cd64
Author: Daniel <[email protected]>
Date:   Tue Nov 1 18:37:12 2022 +0000

    Tweak model generate new traces

commit c75a588
Author: Daniel <[email protected]>
Date:   Tue Nov 1 18:33:13 2022 +0000

    Add key assignment struct

commit 42c2593
Author: Daniel <[email protected]>
Date:   Tue Nov 1 18:31:22 2022 +0000

    Improve model clarity

commit bb9f65b
Author: Daniel <[email protected]>
Date:   Tue Nov 1 18:25:31 2022 +0000

    Partial refactor some model parts

commit a686ee3
Author: Daniel <[email protected]>
Date:   Tue Nov 1 18:14:04 2022 +0000

    Rename vscidToMapping

commit 48bbdfe
Author: Daniel <[email protected]>
Date:   Tue Nov 1 18:03:09 2022 +0000

    Squashed commit of the following:

    commit cfc4569
    Author: Shawn Marshall-Spitzbart <[email protected]>
    Date:   Tue Nov 1 08:10:52 2022 -0700

        Remove unneeded const variables (#418)

        * wip

        * diff test patch (#412)

        Patch

        Co-authored-by: Daniel <[email protected]>

        * add back setter

        * comment

        * remove compute consumer unbonding

        * Update params.go

        Co-authored-by: Daniel T <[email protected]>
        Co-authored-by: Daniel <[email protected]>

    commit 602b7ed
    Author: Shawn Marshall-Spitzbart <[email protected]>
    Date:   Fri Oct 28 08:34:26 2022 -0700

        Consumer Unbonding As Param (#410)

        Co-authored-by: Daniel T <[email protected]>
        Co-authored-by: Daniel <[email protected]>

commit 8227d0e
Author: Daniel <[email protected]>
Date:   Tue Nov 1 17:59:29 2022 +0000

    Make build

commit a88e916
Author: Daniel <[email protected]>
Date:   Tue Nov 1 16:29:10 2022 +0000

    Regen proto (no build)

commit 91bdabf
Author: Daniel <[email protected]>
Date:   Tue Nov 1 16:23:43 2022 +0000

    Adds query

commit ddce810
Author: Daniel <[email protected]>
Date:   Tue Nov 1 16:00:40 2022 +0000

    Trying to debug lost CachedValue

commit 6957163
Author: Daniel <[email protected]>
Date:   Tue Nov 1 14:28:40 2022 +0000

    Impl failing query test

commit 6ebc077
Author: Daniel <[email protected]>
Date:   Tue Nov 1 13:52:33 2022 +0000

    Checkpoint unfinished queries

commit b6d2c8c
Author: Daniel <[email protected]>
Date:   Tue Nov 1 13:30:57 2022 +0000

    Start working on query test

commit f27923b
Author: Daniel <[email protected]>
Date:   Tue Nov 1 13:20:26 2022 +0000

    Add error

commit a05c6ab
Author: Daniel <[email protected]>
Date:   Tue Nov 1 13:20:22 2022 +0000

    Impl grpc query handler

commit 6c7b6a0
Author: Daniel <[email protected]>
Date:   Tue Nov 1 13:20:07 2022 +0000

    Impl cli query logic

commit 8e6e978
Author: Daniel <[email protected]>
Date:   Tue Nov 1 13:19:56 2022 +0000

    Change query proto and compile

commit 5c6be16
Author: Daniel <[email protected]>
Date:   Mon Oct 31 20:13:17 2022 +0000

    API model tweaks

commit 6012965
Author: Daniel <[email protected]>
Date:   Mon Oct 31 20:13:12 2022 +0000

    Del unused fun

commit 59e81fc
Author: Daniel <[email protected]>
Date:   Mon Oct 31 19:16:53 2022 +0000

    Caps constant names

commit 9481d3d
Author: Daniel <[email protected]>
Date:   Mon Oct 31 19:12:59 2022 +0000

    Comment model

commit f57c6d0
Author: Daniel <[email protected]>
Date:   Mon Oct 31 19:08:01 2022 +0000

    checkpoint

commit 94a7036
Author: Daniel <[email protected]>
Date:   Mon Oct 31 18:57:10 2022 +0000

    Checkpoint

commit 37fab45
Author: Daniel <[email protected]>
Date:   Mon Oct 31 18:04:57 2022 +0000

    cp

commit 5dd8293
Author: Daniel <[email protected]>
Date:   Mon Oct 31 17:45:34 2022 +0000

    Adds todo

commit e691abd
Author: Daniel <[email protected]>
Date:   Mon Oct 31 17:45:28 2022 +0000

    Work on model

commit e693ec4
Author: Daniel <[email protected]>
Date:   Mon Oct 31 16:24:58 2022 +0000

    cp

commit 3f3e546
Author: Daniel <[email protected]>
Date:   Mon Oct 31 16:22:40 2022 +0000

    Start working on spec

commit 2c42f87
Author: Daniel <[email protected]>
Date:   Mon Oct 31 15:56:41 2022 +0000

    Impl tx, flags

commit 2e055c3
Author: Daniel <[email protected]>
Date:   Mon Oct 31 15:45:02 2022 +0000

    del unfinished tx_test.go

commit 5574ded
Author: Daniel <[email protected]>
Date:   Mon Oct 31 15:40:16 2022 +0000

    save tx_test before delete

commit 16a7870
Author: Daniel <[email protected]>
Date:   Mon Oct 31 15:37:02 2022 +0000

    Start adding tx

commit acec85d
Author: Daniel <[email protected]>
Date:   Mon Oct 31 15:29:38 2022 +0000

    Delete unused tx var init

commit 967050b
Author: Daniel <[email protected]>
Date:   Mon Oct 31 15:13:52 2022 +0000

    Comments

commit 109d2e8
Author: Daniel <[email protected]>
Date:   Mon Oct 31 15:11:39 2022 +0000

    Adds some tests

commit 8727c14
Author: Daniel <[email protected]>
Date:   Mon Oct 31 15:07:20 2022 +0000

    cp

commit e6cd49a
Author: Daniel <[email protected]>
Date:   Mon Oct 31 14:51:15 2022 +0000

    Simplify hander_test

commit c4f8937
Author: Daniel <[email protected]>
Date:   Mon Oct 31 14:42:56 2022 +0000

    Fix key types to create a happy path test

commit 7ea1a77
Author: Daniel <[email protected]>
Date:   Fri Oct 28 20:58:58 2022 +0100

    Adds TX handler test skeleton

commit f86122f
Author: Daniel <[email protected]>
Date:   Fri Oct 28 18:04:32 2022 +0100

    Return error in tx body if semantic fail

commit ecc9260
Author: Daniel <[email protected]>
Date:   Fri Oct 28 18:02:15 2022 +0100

    Implement DesignateConsensusKeyForConsumerChain body

commit 5d2dec9
Author: Daniel <[email protected]>
Date:   Fri Oct 28 18:02:03 2022 +0100

    Write New, ValidateBasic for Msg

commit a7e935a
Author: Daniel <[email protected]>
Date:   Fri Oct 28 18:01:50 2022 +0100

    Adds to codec.go

commit d00b337
Author: Daniel <[email protected]>
Date:   Fri Oct 28 18:01:41 2022 +0100

    Change designation msg proto

commit a605b24
Author: Daniel <[email protected]>
Date:   Fri Oct 28 18:01:27 2022 +0100

    Adds errors

commit 9cf39d1
Author: Daniel <[email protected]>
Date:   Fri Oct 28 17:00:22 2022 +0100

    Add handler boilerplat

commit 99f07ad
Author: Daniel <[email protected]>
Date:   Fri Oct 28 16:56:54 2022 +0100

    Start adding handler test

commit fe3a591
Author: Daniel <[email protected]>
Date:   Fri Oct 28 16:35:48 2022 +0100

    Renames tx func call

commit 617d7c4
Author: Daniel <[email protected]>
Date:   Fri Oct 28 15:08:51 2022 +0100

    Register Route() and RegisterServices() (use pointer deref)

commit 2ddb304
Author: Daniel <[email protected]>
Date:   Fri Oct 28 15:08:34 2022 +0100

    Fix missing line in handler.go

commit d23a709
Author: Daniel <[email protected]>
Date:   Fri Oct 28 15:08:27 2022 +0100

    strip down cli/flags, tx

commit b6e0335
Author: Daniel <[email protected]>
Date:   Fri Oct 28 15:08:17 2022 +0100

    Adds msg.go

commit e035271
Author: Daniel <[email protected]>
Date:   Fri Oct 28 14:41:16 2022 +0100

    Working on handler, msg server

commit b72acdd
Author: Daniel <[email protected]>
Date:   Fri Oct 28 14:41:03 2022 +0100

    tx proto change but dont rebuild

commit f888208
Author: Daniel <[email protected]>
Date:   Fri Oct 28 13:46:00 2022 +0100

    Adds tx, flags in provider/cli mimicking staking/tx

commit 63d0742
Author: Daniel <[email protected]>
Date:   Fri Oct 28 13:19:04 2022 +0100

    Add empty query handler

commit 48532e0
Author: Daniel <[email protected]>
Date:   Fri Oct 28 13:12:23 2022 +0100

    Add provider cli query

commit 7b02a94
Author: Daniel <[email protected]>
Date:   Fri Oct 28 13:12:16 2022 +0100

    Build query and tx proto go types

commit 14a0ec4
Author: Daniel <[email protected]>
Date:   Fri Oct 28 13:12:00 2022 +0100

    Define proto query and tx

commit 1cfe0d6
Author: Daniel <[email protected]>
Date:   Fri Oct 28 09:05:01 2022 +0100

    (diff tests pass (with no downtime slashes)) milestone

commit 3d0bb51
Author: Daniel <[email protected]>
Date:   Fri Oct 28 09:00:04 2022 +0100

    (Original diff test traces still pass)

commit 187fe36
Author: Daniel <[email protected]>
Date:   Thu Oct 27 12:35:22 2022 +0100

    cp

commit b8fb229
Author: Daniel <[email protected]>
Date:   Thu Oct 27 09:26:17 2022 +0100

    fix regression

commit 0ae42ed
Author: Daniel <[email protected]>
Date:   Thu Oct 27 09:22:58 2022 +0100

    cp

commit d2f971d
Author: Daniel <[email protected]>
Date:   Wed Oct 26 21:13:56 2022 +0100

    Add notes, need to add private key signers for diff test

commit 27b9ca6
Author: Daniel <[email protected]>
Date:   Wed Oct 26 20:28:32 2022 +0100

    (diff pass) use <val, vscid> metadata in consumer slash test
    Metadata is used to do a consumer initiated slash test, by looking up the consumer cons addr. The map has not yet been dynamically changed.

commit 39ca796
Author: Daniel <[email protected]>
Date:   Wed Oct 26 20:21:41 2022 +0100

    Del consumerGreatestVscID

commit b841f6c
Author: Daniel <[email protected]>
Date:   Wed Oct 26 20:21:29 2022 +0100

    Pre del consumerGreatestVscID

commit 34c52d9
Author: Daniel <[email protected]>
Date:   Wed Oct 26 19:50:28 2022 +0100

    cp

commit 1604f4f
Author: Daniel <[email protected]>
Date:   Wed Oct 26 18:54:32 2022 +0100

    Checkpoint debug

commit 49e579d
Author: Daniel <[email protected]>
Date:   Wed Oct 26 16:47:01 2022 +0100

    Confirm build

commit bfc1ba9
Author: Daniel <[email protected]>
Date:   Wed Oct 26 16:36:29 2022 +0100

    remove unbonded slash event from constants.ts

commit fb3619d
Author: Daniel <[email protected]>
Date:   Wed Oct 26 16:36:08 2022 +0100

    Pre move key gen test util

commit d4bd59c
Author: Daniel <[email protected]>
Date:   Wed Oct 26 16:26:19 2022 +0100

    Adds hacky infra to diff test key mapping

commit 682fe1f
Author: Daniel <[email protected]>
Date:   Wed Oct 26 16:03:48 2022 +0100

    Start working on diff test (unfinished) confirm all pass

commit 9cf0596
Author: Daniel <[email protected]>
Date:   Wed Oct 26 14:02:39 2022 +0100

    Reduce overapproximation for model consumer slashing

commit 80380f0
Author: Daniel <[email protected]>
Date:   Wed Oct 26 12:50:52 2022 +0100

    (go test ./... passes) fix string type

commit e44381a
Author: Daniel <[email protected]>
Date:   Wed Oct 26 12:43:22 2022 +0100

    Rollback extra diff

commit 6ed4d3c
Author: Daniel <[email protected]>
Date:   Wed Oct 26 12:41:47 2022 +0100

    Small refactor

commit eaac67b
Author: Daniel <[email protected]>
Date:   Wed Oct 26 12:39:31 2022 +0100

    Remove faulty line in genesis

commit 9607c62
Author: Daniel <[email protected]>
Date:   Wed Oct 26 12:39:24 2022 +0100

    Remove unused alias in keeper

commit fa666e4
Author: Daniel <[email protected]>
Date:   Wed Oct 26 12:36:18 2022 +0100

    Reduce diff in types change

commit 347bea3
Author: Daniel <[email protected]>
Date:   Wed Oct 26 12:34:21 2022 +0100

    del dummy excal

commit 780d218
Author: Daniel <[email protected]>
Date:   Wed Oct 26 12:12:17 2022 +0100

    Adds a validator removal unit test

commit 55ce4d3
Author: Daniel <[email protected]>
Date:   Wed Oct 26 12:02:41 2022 +0100

    Implement provider delete

commit b984717
Author: Daniel <[email protected]>
Date:   Wed Oct 26 11:52:40 2022 +0100

    Tweak proto field name, fix build issues

commit 9ac39fa
Author: Daniel <[email protected]>
Date:   Wed Oct 26 11:45:47 2022 +0100

    Make keymap_test build but untested

commit f53ae04
Author: Daniel <[email protected]>
Date:   Wed Oct 26 11:41:39 2022 +0100

    pre change keymap test mapping struct tyep

commit 15fb975
Author: Daniel <[email protected]>
Date:   Wed Oct 26 11:40:42 2022 +0100

    Change keymap

commit ddb7582
Author: Daniel <[email protected]>
Date:   Wed Oct 26 11:40:38 2022 +0100

    change proto names

commit d6dd825
Author: Daniel <[email protected]>
Date:   Wed Oct 26 11:36:26 2022 +0100

    Rebuild proto start manual renaming

commit a96bfbc
Author: Daniel <[email protected]>
Date:   Wed Oct 26 11:26:14 2022 +0100

    Start changing to use pca for key

commit 0de5df5
Author: Daniel <[email protected]>
Date:   Wed Oct 26 11:21:19 2022 +0100

    Pre use provider cons addr as forward direction key

commit 61a8d0f
Author: Daniel <[email protected]>
Date:   Tue Oct 25 21:57:12 2022 +0100

    Adds pk template

commit 4830e7e
Author: Daniel <[email protected]>
Date:   Tue Oct 25 21:23:04 2022 +0100

    Implement consumer removal

commit 8ef0e58
Author: Daniel <[email protected]>
Date:   Tue Oct 25 20:20:28 2022 +0100

    Slight refactor tests pass

commit 40c3e69
Author: Daniel <[email protected]>
Date:   Tue Oct 25 19:41:09 2022 +0100

    Revert "Start refactoring"

    This reverts commit a411131.

commit 8db1288
Author: Daniel <[email protected]>
Date:   Tue Oct 25 19:40:52 2022 +0100

    Start refactoring

commit 1aa33aa
Author: Daniel <[email protected]>
Date:   Tue Oct 25 19:26:06 2022 +0100

    Split main ComputeUpdates

commit 86a872a
Author: Daniel <[email protected]>
Date:   Tue Oct 25 19:18:38 2022 +0100

    pre refactor inner

commit 48ce93a
Author: Daniel <[email protected]>
Date:   Tue Oct 25 19:15:34 2022 +0100

    all tests (go test ./...) pass

commit a4f9765
Author: Daniel <[email protected]>
Date:   Tue Oct 25 19:09:07 2022 +0100

    Get,Del,Iter method renames

commit 231d934
Author: Daniel <[email protected]>
Date:   Tue Oct 25 19:07:13 2022 +0100

    rename setter

commit 9e6c82e
Author: Daniel <[email protected]>
Date:   Tue Oct 25 19:04:40 2022 +0100

    Del unused store methods

commit 4ab1956
Author: Daniel <[email protected]>
Date:   Tue Oct 25 19:01:27 2022 +0100

    Simplify internals internal tests pass

commit 0755b73
Author: Daniel <[email protected]>
Date:   Tue Oct 25 18:45:58 2022 +0100

    Recompile proto, all builds

commit 7f52e59
Author: Daniel <[email protected]>
Date:   Tue Oct 25 18:37:34 2022 +0100

    build keymap_*.go

commit c4a87e2
Author: Daniel <[email protected]>
Date:   Tue Oct 25 18:32:56 2022 +0100

    wip

commit 8b40bae
Author: Daniel <[email protected]>
Date:   Tue Oct 25 18:25:22 2022 +0100

    wip

commit 4582966
Author: Daniel <[email protected]>
Date:   Tue Oct 25 18:21:50 2022 +0100

    WIP

commit 4f8506f
Author: Daniel <[email protected]>
Date:   Tue Oct 25 16:11:40 2022 +0100

    (diff, short) tests pass, fix genesis test

commit 56a88bb
Author: Daniel <[email protected]>
Date:   Tue Oct 25 15:52:06 2022 +0100

    Adds chainID param in proposal_test

commit b54de67
Author: Daniel <[email protected]>
Date:   Tue Oct 25 15:47:10 2022 +0100

    Proposal, builds

commit 8c1f7d9
Author: Daniel <[email protected]>
Date:   Tue Oct 25 15:44:15 2022 +0100

    Changes provider relay

commit 4648ff1
Author: Daniel <[email protected]>
Date:   Tue Oct 25 15:43:19 2022 +0100

    Change consumer type

commit ccbfe18
Author: Daniel <[email protected]>
Date:   Tue Oct 25 15:42:05 2022 +0100

    Compile proto, fix build errs

commit 5ffe108
Author: Daniel <[email protected]>
Date:   Tue Oct 25 15:35:40 2022 +0100

    Adds genesis proto import

commit f90c942
Author: Daniel <[email protected]>
Date:   Tue Oct 25 15:35:33 2022 +0100

    Change keeper, keeper_test

commit af05cc7
Author: Daniel <[email protected]>
Date:   Tue Oct 25 15:35:08 2022 +0100

    Adds driver find.py

commit 7cc13c0
Author: Daniel <[email protected]>
Date:   Tue Oct 25 15:09:15 2022 +0100

    Add genesis changes

commit d46bcfb
Author: Daniel <[email protected]>
Date:   Tue Oct 25 15:07:17 2022 +0100

    Add change to difftest/setup

commit 57b50a7
Author: Daniel <[email protected]>
Date:   Tue Oct 25 15:07:12 2022 +0100

    Start adding keymap_*.go

commit 31ac0f5
Author: Daniel <[email protected]>
Date:   Tue Oct 25 15:07:06 2022 +0100

    Start adding proto

commit db04c2d
Author: Daniel <[email protected]>
Date:   Tue Oct 25 15:07:00 2022 +0100

    Start addings docs
  • Loading branch information
Daniel committed Nov 2, 2022
1 parent 80b751c commit f8f5bee
Show file tree
Hide file tree
Showing 48 changed files with 5,972 additions and 358 deletions.
11 changes: 11 additions & 0 deletions docs/key-assignment/api.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CONSTANTS
STORAGE_CONSTANT = 2
(*
Could be improved by using model value symmetries.
*)
PROVIDER_KEYS = {0, 1, 2}
CONSUMER_KEYS = {0, 1, 2, 3, 4, 5, 6, 7, 8}
INIT Init
NEXT Next
INVARIANT Invariant

178 changes: 178 additions & 0 deletions docs/key-assignment/api.tla
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
---- MODULE api ----

EXTENDS Integers, Naturals, FiniteSets, Sequences, TLC

CONSTANTS
STORAGE_CONSTANT,
PROVIDER_KEYS,
CONSUMER_KEYS

VARIABLES
assignments,
providerValSets,
committedProviderVSCID,
committedConsumerVSCID,
maturedConsumerVSCID

(***************************************************************************)
(** Model ******************************************************************)
(***************************************************************************)
(***************************************************************************)

(***************************************)
(** State at genesis *******************)
(***************************************)
(***************************************)

Init ==
\* Store the genesis assignment, and the current assignment
/\ assignments = [vscid \in 1..2 |-> [key \in PROVIDER_KEYS |-> key]]
\* One valset has been committed (genesis)
/\ \E valset \in SUBSET PROVIDER_KEYS:
providerValSets = [vscid \in {1} |-> valset]
\* Genesis block is committed
/\ committedProviderVSCID = 1
\* on consumer too.
/\ committedConsumerVSCID = 1
\* Nothing has matured yet.
/\ maturedConsumerVSCID = 0

(***************************************)
(** Public transaction (tx) API ********)
(***************************************)
(***************************************)

AssignKey ==
\E providerKey \in PROVIDER_KEYS, consumerKey \in CONSUMER_KEYS:
\* consumerKey is not in use
/\ ~(\E i \in DOMAIN assignments: \E k \in DOMAIN assignments[i] : assignments[i][k] = consumerKey)
\* Do assignment
/\ assignments' = [
assignments EXCEPT ![committedProviderVSCID + 1] =
[@ EXCEPT ![providerKey] = consumerKey] ]
\* The rest...
/\ UNCHANGED << providerValSets, committedProviderVSCID, committedConsumerVSCID, maturedConsumerVSCID >>

(***************************************)
(** Internal implemenation API *********)
(***************************************)
(***************************************)

ProviderEndAndCommitBlock ==
\E valset \in SUBSET PROVIDER_KEYS:
\* Create a new assignment entry
/\ assignments' = assignments @@ [vscid \in {committedProviderVSCID+2} |-> assignments[committedProviderVSCID]]
\* Get a new validator set from changes in voting power
/\ providerValSets' = providerValSets @@ [vscid \in {committedProviderVSCID+1} |-> valset]
\* Increment vscid
/\ committedProviderVSCID' = committedProviderVSCID + 1
\* The rest...
/\ UNCHANGED << committedConsumerVSCID, maturedConsumerVSCID >>

ConsumerDeliverUpdates ==
\* Fast forward the consumer
\E vscid \in (committedConsumerVSCID + 1)..committedProviderVSCID:
committedConsumerVSCID' = vscid
\* The rest...
/\ UNCHANGED <<committedProviderVSCID, assignments, providerValSets, maturedConsumerVSCID >>

ProviderDeliverMaturities ==
\* Fast forward the consumer maturities, and notify provider
\E vscid \in (maturedConsumerVSCID + 1)..committedConsumerVSCID:
/\ maturedConsumerVSCID' = vscid
/\ assignments' = [i \in {
j \in DOMAIN assignments : vscid < j \/ committedProviderVSCID <= j
} |-> assignments[i]]
\* The rest...
/\ UNCHANGED <<committedConsumerVSCID, committedProviderVSCID, providerValSets>>

Next ==
\/ AssignKey
\/ ProviderEndAndCommitBlock
\/ ConsumerDeliverUpdates
\/ ProviderDeliverMaturities

(***************************************************************************)
(** Invariants and properties **********************************************)
(***************************************************************************)
(***************************************************************************)

(***************************************)
(** Public query API *******************)
(***************************************)
(***************************************)

(*
The current consumer key assigned to a provider key is defined and
queryable.
True by construction: 'how' not explicitly modelled.
*)
AssignmentIsDefined ==
\A k \in PROVIDER_KEYS:
LET ConsumerKey == assignments[committedProviderVSCID + 1][k]
IN TRUE

(****************************************)
(** Internal implementation properties **)
(****************************************)
(****************************************)

(*
The consumer validator set at committedConsumerVSCID
is defined as the provider validator set at committedConsumerVSCID
mapped through the assignment at committedConsumerVSCID.
True by construction: 'how' not explicitly modelled.
*)
ConsumerValidatorSetIsDefined ==
LET
ConsumerValset == {assignments[committedConsumerVSCID][k] : k \in providerValSets[committedConsumerVSCID]}
IN TRUE

(*
For any unmatured consumer valset, it is always possible to retrieve a unique provider key
for any consumer key in the set.
*)
UniqueReverseQueryResultIsDefined ==
\A i \in (maturedConsumerVSCID + 1)..committedConsumerVSCID :
LET
\* The valset known to the consumer
ConsumerValset == {assignments[i][k] : k \in providerValSets[i]}
\* All the keys that are assigned to the consumerKey in stored assignments
Assigned(consumerKey) == {
providerKey \in PROVIDER_KEYS :
\E j \in DOMAIN assignments : assignments[j][providerKey] = consumerKey
}
\* The query for the providerKey is successful and the result is unique.
IN \A consumerKey \in ConsumerValset : Cardinality(Assigned(consumerKey)) = 1

(*
Storage cost grows linearly with committedProviderVSCID - maturedConsumerVSCID
*)
StorageIsBounded ==
Cardinality(DOMAIN(assignments)) <= STORAGE_CONSTANT * (1 + (committedProviderVSCID - maturedConsumerVSCID))


(*Check that the spec is written correctly.*)
Sanity == LET
Sanity0 == committedConsumerVSCID <= committedProviderVSCID
Sanity1 == maturedConsumerVSCID <= committedConsumerVSCID
Sanity2 == committedProviderVSCID \in DOMAIN assignments
Sanity3 == committedProviderVSCID + 1 \in DOMAIN assignments
Sanity4 == committedProviderVSCID \in DOMAIN providerValSets
IN
/\ Sanity0
/\ Sanity1
/\ Sanity2
/\ Sanity3
/\ Sanity4

Invariant ==
/\ Sanity
/\ AssignmentIsDefined
/\ ConsumerValidatorSetIsDefined
/\ UniqueReverseQueryResultIsDefined
/\ StorageIsBounded

(***************************************************************************)

====
86 changes: 86 additions & 0 deletions docs/key-assignment/design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# KeyAssignment

KeyAssignment is the name of the feature that allows validator operators to use different consensus keys for each consumer chain validator node that they operate.

Validators can improve their security by using different consensus keys for each chain. That way, different teams in an organization can operate a subset (can be size 1) of the total number of consumer chains associated to a provider chain. If one key leaks the other keys will not be at risk. It is possible to change the keys at any time by submitting a transaction.

## Overview

The KeyAssignment feature is available via a provider chain API (transactions and queries). The provider chain validator operator submits an assignment transaction to the provider chain with a consumer chain ID and desired consensus key as parameters. The over-IBC protocol used by Interchain Security takes care of forwarding the assignment to the specified consumer chain. When the consumer chain receives the key, it will immediately start using it with tendermint.

It is possible to start validating a consumer chain with the same key as used for the provider. This is the default behavior. It is also possible to specify another key to use when joining the validator set. Moreover it is possible to change the used key at any time, any multiple times, with some minor restrictions.

## External API (High Level)

**TXs**

```go
// Assign a new public consensus key to be used by a validator
// on the provider when it signs transactions on the consumer chain.
// The TX must be signed by the private key associated to the provider
// validator address.
//
// The assignment can fail if the consumer consensus key is already
// in use for the chain, currently, or in the recent past.
AssignConsensusPublicKeyToConsumerChain(
ChainId string, // consumer chain
ProviderValidatorAddress string, // must sign TX
ConsumerConsensusPubKey *types.Any
)
```

**Queries**

```go
// Returns the last consumer key associated to the provider key and
// the consumer chain by a call to AssignConsensusPublicKeyToConsumerChain.
QueryConsumerChainValidatorKeyAssignment (
ChainId string, // consumer chain
ProviderValidatorAddress string, // validator address for the provider chain
)
```

## Internal API (High Level)

TODO: write this section.

## API (Details)

The external API is specified in [api.tla](./api.tla). An 'internal' API is also specified. The external API supports the TXs and Queries listed above. The internal API documents the API that the implementation of KeyAssignment exposes for integration
in the implementation of the wider system.

## Implementation

### Algorithm idea


### System integration points


## External properties

KeyAssignment has some properties relevant to the external user:



1. Validator Set Replication\
When the Interchain Security property [Validator Set Replication](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/system_model_and_properties.md#system-properties) holds for an implementation without KeyAssignment, then the property holds when KeyAssignment is used.
2. Slashable Consumer Misbehavior\
When the Interchain Security property [Slashable Consumer Misbehavior](https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/system_model_and_properties.md#system-properties) holds for an implementation without KeyAssignment, then the property holds when KeyAssignment is used.

All Interchain Security properties still hold when KeyAssignment is used, the above are just the most relevant.

Additionally

3. When a `AssignConsensusPublicKeyToConsumerChain` operation succeeds for a given `(chainID, ProviderValidatorAddress, ConsumerConsensusPubKey)` tuple at block height `hp0`, and is not followed by a subsquent call for the same tuple before or during a height `hp1` (`hp0 <= hp1`), and at `hp1` a validator set update packet is committed at the provider chain, then at the next earliest height `hc2` on the consumer chain that the packet is received, the `ConsumerConsensusPubKey ` is passed as consensus key to tendermint. Thus tendermint will expect a signature from `ConsumerConsensusPubKey ` from height `hc2 + 1`.


## Internal properties

The internal properties section in [api.tla](./api.tla) specifies abstract but precise properties. In particular, at a high level:

1. The consumer validator set is always defined as per the validator set replication property.
2. It is always possible to lookup the provider consensus address, for a given consumer consensus public key, when the consumer has been sent that public key and that key is still liable for double signing or downtime slashing.
3. The storage requirements are reasonable.

Please see [api.tla](./api.tla) and [key_assignment_test.go::externalInvariants](../../x/ccv/provider/keeper/key_assignment_test.go) and [key_assignment.go::internalInvariants](../../x/ccv/provider/keeper/key_assignment.go) for precise formulations.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ replace (
github.com/cosmos/ibc-go/v3 => github.com/informalsystems/ibc-go/v3 v3.0.0-beta1.0.20220816140824-aba9c2f2b943
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
google.golang.org/grpc => google.golang.org/grpc v1.33.2
)
)
45 changes: 23 additions & 22 deletions proto/interchain_security/ccv/provider/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,32 @@ import "interchain_security/ccv/v1/ccv.proto";
import "interchain_security/ccv/provider/v1/provider.proto";
import "interchain_security/ccv/consumer/v1/consumer.proto";
import "interchain_security/ccv/consumer/v1/genesis.proto";

import "interchain_security/ccv/provider/v1/keyassignment.proto";

// GenesisState defines the CCV provider chain genesis state
message GenesisState {
// empty for a new chain
uint64 valset_update_id = 1;
uint64 valset_update_id = 1;
// empty for a new chain
repeated ConsumerState consumer_states = 2 [
repeated ConsumerState consumer_states = 2 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"consumer_states\""
];
// empty for a new chain
repeated interchain_security.ccv.v1.UnbondingOp unbonding_ops = 3
[ (gogoproto.nullable) = false ];
[ (gogoproto.nullable) = false ];
// empty for a new chain
interchain_security.ccv.v1.MaturedUnbondingOps mature_unbonding_ops = 4;
// empty for a new chain
// empty for a new chain
repeated ValsetUpdateIdToHeight valset_update_id_to_height = 5
[ (gogoproto.nullable) = false ];
[ (gogoproto.nullable) = false ];
// empty for a new chain
repeated ConsumerAdditionProposal consumer_addition_proposals = 6
[ (gogoproto.nullable) = false ];
[ (gogoproto.nullable) = false ];
// empty for a new chain
repeated ConsumerRemovalProposal consumer_removal_proposals = 7
[ (gogoproto.nullable) = false ];
Params params = 8
[ (gogoproto.nullable) = false ];
[ (gogoproto.nullable) = false ];
Params params = 8 [ (gogoproto.nullable) = false ];
}

// consumer chain
Expand All @@ -48,31 +47,33 @@ message ConsumerState {
string client_id = 3;
// InitalHeight defines the initial block height for the consumer chain
uint64 initial_height = 4;
// LockUnbondingOnTimeout defines whether the unbonding funds should be released for this
// chain in case of a IBC channel timeout
// LockUnbondingOnTimeout defines whether the unbonding funds should be
// released for this chain in case of a IBC channel timeout
bool lock_unbonding_on_timeout = 5;
// ConsumerGenesis defines the initial consumer chain genesis states
interchain_security.ccv.consumer.v1.GenesisState consumer_genesis = 6
[ (gogoproto.nullable) = false ];
// PendingValsetChanges defines the pending validator set changes for the consumer chain
repeated interchain_security.ccv.v1.ValidatorSetChangePacketData pending_valset_changes = 7
[ (gogoproto.nullable) = false ];
[ (gogoproto.nullable) = false ];
// PendingValsetChanges defines the pending validator set changes for the
// consumer chain
repeated interchain_security.ccv.v1.ValidatorSetChangePacketData
pending_valset_changes = 7 [ (gogoproto.nullable) = false ];
repeated string slash_downtime_ack = 8;
// UnbondingOpsIndex defines the unbonding operations on the consumer chain
repeated UnbondingOpIndex unbonding_ops_index = 9
[ (gogoproto.nullable) = false ];
[ (gogoproto.nullable) = false ];
KeyAssignment key_assignment = 10;
}

// UnbondingOpIndex defines the genesis information for each unbonding operations index
// referenced by chain id and valset udpate id
// UnbondingOpIndex defines the genesis information for each unbonding
// operations index referenced by chain id and valset udpate id
message UnbondingOpIndex {
uint64 valset_update_id = 1;
repeated uint64 unbonding_op_index = 2;
}

// ValsetUpdateIdToHeight defines the genesis information for the mapping
// ValsetUpdateIdToHeight defines the genesis information for the mapping
// of each valset udpate id to a block height
message ValsetUpdateIdToHeight {
uint64 valset_update_id = 1;
uint64 height = 2;
uint64 valset_update_id = 1;
uint64 height = 2;
}
Loading

0 comments on commit f8f5bee

Please sign in to comment.