Skip to content

Conversation

@AnnaShaleva
Copy link
Member

@AnnaShaleva AnnaShaleva commented Dec 5, 2024

In the end, there's no functional changes in fact. But decryption is checked and threshold signatures work us expected even for WatchOnly node that only has a shared PublicKey available. Here's an example of logs for WatchOnly after NeoXAMEV fork is enabled.

INFO [12-05|17:55:38.335] New block in the chain                   "dbft index"=7 "chain index"=7 hash=0x60ed240da6d7ce0a03be82f301bd0a542e93dea2f2afb2774b78a06ee942a25c "parent hash"=0x3a0e950908b4cc4ff45c904ba5d49bbeaca1a136d7fcdd661ce923369ee7e723 primary=0 coinbase=0x1212000000000000000000000000000000000003 "mix digest"=0x719da1d566c38df3e89e79147d284a26cee6355b89071ba58af7caac0882d38b
INFO [12-05|17:55:38.335] Fetching latest sealing proposal         "desired number"=8
INFO [12-05|17:55:38.335] Commit new sealing work                  number=8 sealhash=b9f016..1ae838 "parent hash"=60ed24..42a25c etherbase=0x1212000000000000000000000000000000000003 txs=1 gas=30000 fees=0.0006 elapsed="511.766µs"
INFO [12-05|17:55:39.335] Sealing proposal updated                 number=8 sealhash=b9f016..1ae838 "parent hash"=60ed24..42a25c txs=1
2024-12-05T17:55:39.337+0300	INFO	[email protected]/dbft.go:112	initializing dbft	{"height": 8, "view": 0, "index": -1, "role": "WatchOnly"}
...
2024-12-05T17:55:48.388+0300	INFO	[email protected]/dbft.go:545	received PreCommit	{"validator": 0}
2024-12-05T17:55:48.390+0300	INFO	[email protected]/check.go:66	processing PreBlock	{"height": 8, "view": 0, "tx_count": 1, "preCommit_count": 5}
INFO [12-05|17:55:48.396] Envelope data decrypted                  "envelope hash"=5312be..a52d44 "envelope index"=0 data=f869808509502f90008252089474f4effb0b538baec703346b03b6d9292f53a4cd0180850113a4538ea09f03664a56ae11cd9cfb5efedc1648c374d51ae91982f7b836893383e4c52f0aa067c4771d614d7c296aecddfd25aae6fab3276e8a48114f87953b5c03c75bad76
...
2024-12-05T17:55:48.411+0300	INFO	[email protected]/dbft.go:595	received Commit	{"validator": 5}
2024-12-05T17:55:48.411+0300	DEBUG	[email protected]/check.go:111	not enough to commit	{"count": 4}
2024-12-05T17:55:48.411+0300	DEBUG	[email protected]/dbft.go:231	received message	{"type": "Commit", "from": 2, "height": 8, "view": 0, "my_height": 8, "my_view": 0}
2024-12-05T17:55:48.412+0300	INFO	[email protected]/dbft.go:595	received Commit	{"validator": 2}
2024-12-05T17:55:48.412+0300	INFO	[email protected]/check.go:118	approving block	{"height": 8, "hash": "0xeaf0019b9b518c2fc82f5c597c9dd37c6292f1b730bd5ac5b56454bb6ffec10c", "tx_count": 1, "merkle": "0x245bb90704b3b326b1fe937cf6b726630a3e7e41caf516c8a99b5a9483f925d0", "prev": "0x60ed240da6d7ce0a03be82f301bd0a542e93dea2f2afb2774b78a06ee942a25c"}
INFO [12-05|17:55:48.472] Successfully wrote new block with state  number=8 hash=d457e2..5c030b
INFO [12-05|17:55:48.473] New block in the chain                   "dbft index"=8 "chain index"=8 hash=0xd457e2ebb8bea29a378c5c383b567c914430b171800d191f63bb6808235c030b "parent hash"=0x60ed240da6d7ce0a03be82f301bd0a542e93dea2f2afb2774b78a06ee942a25c primary=1 coinbase=0x1212000000000000000000000000000000000003 "mix digest"=0x719da1d566c38df3e89e79147d284a26cee6355b89071ba58af7caac0882d38b
INFO [12-05|17:55:48.473] Fetching latest sealing proposal         "desired number"=9

@txhsl, please, take a look, this PR will be useful for #332 testing. I generated antimev keystore for WatchOnly node and setup it manually (if needed, then I can share the code, it's based on our TPKE tests), so that WatchOnly keystore doesn't have private key share, and only has access to global public key.

WatchOnly node is added to every privnet configuration. WatchOnly node
has both simple keystore and anti-MEV keystor with public key setup in
alignment with CNs antimev keystores.

Signed-off-by: Anna Shaleva <[email protected]>
Fetch nspcc-dev/dbft#139.

Signed-off-by: Anna Shaleva <[email protected]>
@AnnaShaleva AnnaShaleva added dBFT Everything related to dBFT module integration antimev Everything related to anti-mev features labels Dec 5, 2024
@AnnaShaleva AnnaShaleva added this to the v0.3.0 milestone Dec 5, 2024
@AnnaShaleva AnnaShaleva changed the title dBFT: ensure WatchOnly is able to properly handle threshold signing scheme dBFT: ensure WatchOnly is able to properly handle threshold block signing scheme Dec 5, 2024
Copy link
Contributor

@txhsl txhsl left a comment

Choose a reason for hiding this comment

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

Seems good, but I have to replace the new keystore file in #332, and change the privnet genesis a bit.

@AnnaShaleva AnnaShaleva merged commit a2e8f6c into bane-main Dec 6, 2024
2 checks passed
@AnnaShaleva AnnaShaleva deleted the watch-only branch December 6, 2024 05:45
AnnaShaleva added a commit that referenced this pull request Jan 15, 2025
Reflect the following changes:
1. `make privnet_init` was removed in #236.
2. Watch-only CN was added to privnet in #359.

Signed-off-by: Anna Shaleva <[email protected]>
AnnaShaleva added a commit that referenced this pull request Jan 15, 2025
Reflect the following changes:
1. `make privnet_init` was removed in #236.
2. Watch-only CN was added to privnet in #359.

Signed-off-by: Anna Shaleva <[email protected]>
AnnaShaleva added a commit that referenced this pull request Jan 15, 2025
Reflect the following changes:
1. `make privnet_init` was removed in #236.
2. Watch-only CN was added to privnet in #359.

Signed-off-by: Anna Shaleva <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

antimev Everything related to anti-mev features dBFT Everything related to dBFT module integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants