Skip to content

Conversation

@AnnaShaleva
Copy link
Member

@AnnaShaleva AnnaShaleva commented Jan 22, 2024

A part of #64, add a genesis configuration for T2 NeoX testnet.

WIP, need to agree on network parameters:

  • network ID (12227330 is taken from ID-related Discord conversation)
  • consensus nodes addresses
  • the desired initial Eth balance for consensus nodes (or maybe for some other accounts)
  • hardforks enabling heights
  • dBFT's Coinbase setting (the address to send validators' reward to)
  • dBFT's Period setting (10 seconds per block)
  • compiled Bridge native contract and desired ID for it (0x1212100000000000000000000000000000000004 is proposed for now to follow notation of Add governance and policy contracts #7)

@AnnaShaleva AnnaShaleva added config Issues related to the node configuration and removed config Issues related to the node configuration labels Jan 22, 2024
@mialbu
Copy link
Member

mialbu commented Jan 22, 2024

Just to maintain what's been written in Discord here in GitHub.

For this PR, we need the following info from @steven1227:

  • Neo X validator addresses
  • desired block's coinbase
  • desired block's emission period
  • desired CN balances

@AnnaShaleva AnnaShaleva requested review from nicolegys and roman-khimov and removed request for nicolegys and roman-khimov January 22, 2024 15:34
@mialbu
Copy link
Member

mialbu commented Jan 22, 2024

I think 0x1212000000000000000000000000000000000004 works fine.

I've seen that in #7 the common pattern is 0x12120 is for the proxy and 0x12121 is used for the implementation. Since, we'll likely have a proxy contract for the bridge as well in the future, we can use this "proxy" address (0x12120) as the one to interact with. Once we have the proxy in the future, we'll move the bridge implementation to 0x12121 and use 0x12120 for the bridge proxy. That way, we can keep the address 0x12120 as entry.

@AnnaShaleva
Copy link
Member Author

Once we have the proxy in the future, we'll move the bridge implementation to 0x12121 and use 0x12120 for the bridge proxy.

Then let's use 0x12121 prefix for the implementation from the very beginning, for better user experience. Then we don't have to perform any address modifications in future for Bridge itself, it's good.

@AnnaShaleva AnnaShaleva force-pushed the testnet-config branch 4 times, most recently from b9a211e to fa2c5ab Compare January 23, 2024 15:20
Copy link
Member Author

@AnnaShaleva AnnaShaleva left a comment

Choose a reason for hiding this comment

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

LGTM (can't approve my own PR). Same config is tested on 7-nodes privnet, works OK (at least blocks are accepted, genesis is initialized in a normal way):

2024-01-24T11:36:35.695+0300	DEBUG	[email protected]/dbft.go:214	received message	{"type": "Commit", "from": 0, "height": 14, "view": 0, "my_height": 14, "my_view": 0}
2024-01-24T11:36:35.695+0300	INFO	[email protected]/dbft.go:507	received Commit	{"validator": 0}
2024-01-24T11:36:35.697+0300	INFO	[email protected]/check.go:66	approving block	{"height": 14, "hash": "e641c915ea6d8bfcb052dd9db829d43f9e7ba487569082ebe0b752df92a67aa2", "tx_count": 0, "merkle": "6dd7a46883900b452aaa01bccdda0f1f3431eba7181f3a0000432986d45f6c8f", "prev": "ea92e4fd32665032af99367e340c8761c8085b9d6cb585626650cf95a7ca81e9"}
INFO [01-24|11:36:35.702] Chain reorg detected                     number=12 hash=40631a..077d75 drop=1 dropfrom=d29548..e0412e add=2 addfrom=27e156..8bf122
INFO [01-24|11:36:35.705] Imported new chain segment               number=14 hash=27e156..8bf122 blocks=1 txs=0 mgas=0.000 elapsed=6.993ms     mgasps=0.000 triedirty=0.00B
INFO [01-24|11:36:35.705] New block in the chain                   "dbft index"=14 "chain index"=14 hash=0x27e156f1d0fc415097afef59852649f2e154fceac6c4b6e2377a3773528bf122 "parent hash"=0xea92e4fd32665032af99367e340c8761c8085b9d6cb585626650cf95a7ca81e9 primary=0 coinbase=0x1212100000000000000000000000000000000003
INFO [01-24|11:36:35.705] Fetching latest sealing proposal         "desired number"=15
INFO [01-24|11:36:35.705] Commit new sealing work                  number=15 sealhash=8b5ff8..14f6db etherbase=0x1212100000000000000000000000000000000003 txs=0 gas=0 fees=0 elapsed="278.784µs"

@chenquanyu, @roman-khimov, @mialbu please review&approve.

@AnnaShaleva AnnaShaleva force-pushed the testnet-config branch 2 times, most recently from e7d565a to 23db725 Compare January 24, 2024 11:48
@AnnaShaleva AnnaShaleva added this to the v0.0.1 milestone Jan 24, 2024
@roman-khimov roman-khimov merged commit 81ea1ce into bane-main Jan 29, 2024
@roman-khimov roman-khimov deleted the testnet-config branch January 29, 2024 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants