Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chain sim interface update #6766

Closed
wants to merge 3,093 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3093 commits
Select commit Hold shift + click to select a range
ebc3fb1
fixes after review 2
axenteoctavian Nov 5, 2024
dbae082
fixes after review 3
axenteoctavian Nov 5, 2024
f4ba6ae
FIX: Do not request incoming headers upon receiving
mariusmihaic Nov 5, 2024
feac147
FEAT: Extend test case 3 for incoming header to not request other hea…
mariusmihaic Nov 5, 2024
bedd104
FIX: Unit test
mariusmihaic Nov 5, 2024
e6c4f53
Merge pull request #6555 from multiversx/MX-15951-update-mock-notifier
axenteoctavian Nov 6, 2024
3065fbc
FEAT: Filter out topics/shards when broadcasting
mariusmihaic Nov 6, 2024
ae13ca2
FEAT: Unit test filter out topics/shards
mariusmihaic Nov 6, 2024
9018342
FIX: After review
mariusmihaic Nov 6, 2024
fa4053f
Merge branch 'feat/sovereign-mainchain-header-sync' into MX-15953-cro…
mariusmihaic Nov 6, 2024
ab4e1ac
Merge pull request #6562 from multiversx/MX-15953-cross-chain-header-…
mariusmihaic Nov 6, 2024
a8ac19e
Merge branch 'feat/sovereign-mainchain-header-sync' into MX-15959-ext…
mariusmihaic Nov 6, 2024
41e5e2b
deploy observer before nodes
axenteoctavian Nov 6, 2024
9e65486
Merge branch 'MX-15959-extended-header-block-finality-to-zero' into M…
mariusmihaic Nov 6, 2024
8b55043
Merge branch 'feat/chain-go-sdk' into fix-metrics-on-block
axenteoctavian Nov 6, 2024
9537851
Merge branch 'MX-15962-chain-sim-test-incoming-header-finality' into …
mariusmihaic Nov 6, 2024
88c0d33
Merge branch 'MX-15963-disable-notifier-until-synced' into MX-15961-s…
mariusmihaic Nov 6, 2024
47378d2
Merge branch 'MX-15961-sov-node-trust-mode' into MX-15984-fix-request…
mariusmihaic Nov 6, 2024
c07277c
Merge pull request #6580 from multiversx/fix-metrics-on-block
axenteoctavian Nov 7, 2024
4e6a2de
Merge pull request #6542 from multiversx/MX-15929-preps-esdt-safe
axenteoctavian Nov 7, 2024
e02932e
Merge branch 'feat/esdt-prefix' into MX-15929-esdt-safe-tests
axenteoctavian Nov 7, 2024
7f5ffe3
Merge branch 'feat/chain-go-sdk' into sovereign-deploy-scripts-update…
axenteoctavian Nov 7, 2024
4e4724a
Merge pull request #6543 from multiversx/MX-15929-esdt-safe-tests
axenteoctavian Nov 7, 2024
587a74b
Merge branch 'feat/esdt-prefix' into esdt-safe-callback-problem
axenteoctavian Nov 7, 2024
91c8f13
Merge pull request #6564 from multiversx/esdt-safe-callback-problem
axenteoctavian Nov 7, 2024
239a949
Merge branch 'rc/v1.7.next1' into merge-rc-1-7-next-into-esdt-prefix-…
axenteoctavian Nov 7, 2024
eaae00c
Merge pull request #6586 from multiversx/merge-rc-1-7-next-into-esdt-…
axenteoctavian Nov 7, 2024
148a4f4
FIX: Quick and dirty fix resync cross chain mbs
mariusmihaic Nov 7, 2024
1ba8b22
FIX: Delete getBlockFinalityFunc and set variable to 0
mariusmihaic Nov 7, 2024
ff232c0
FIX: Delete getBlockFinalityFunc and set variable to 0
mariusmihaic Nov 7, 2024
8e14919
Merge branch 'feat/esdt-prefix' into merge-esdt-prefix-into-sovereign…
axenteoctavian Nov 7, 2024
04d3965
go mod tidy
axenteoctavian Nov 7, 2024
ba448b5
fixes after merge
axenteoctavian Nov 7, 2024
db6d194
Merge pull request #6568 from multiversx/MX-15959-extended-header-blo…
mariusmihaic Nov 7, 2024
fbc7ac7
Merge branch 'feat/sovereign-mainchain-header-sync' into MX-15962-cha…
mariusmihaic Nov 7, 2024
49c93d9
Merge pull request #6569 from multiversx/MX-15962-chain-sim-test-inco…
mariusmihaic Nov 7, 2024
3e62c38
Merge branch 'feat/sovereign-mainchain-header-sync' into MX-15963-dis…
mariusmihaic Nov 7, 2024
09bd972
Merge branch 'feat/chain-go-sdk' into sovereign-fix-broadcast-mainchain
mariusmihaic Nov 7, 2024
cc78eb4
FEAT: Stop node on channel if notifier bootstrapper fails
mariusmihaic Nov 7, 2024
deaafbd
Merge pull request #6571 from multiversx/MX-15963-disable-notifier-un…
mariusmihaic Nov 8, 2024
f2e7047
Merge branch 'feat/sovereign-mainchain-header-sync' into MX-15961-sov…
mariusmihaic Nov 8, 2024
5bdc041
FIX: After merge
mariusmihaic Nov 8, 2024
536725b
Merge pull request #6578 from multiversx/MX-15961-sov-node-trust-mode
mariusmihaic Nov 8, 2024
d477412
Merge branch 'feat/sovereign-mainchain-header-sync' into MX-15984-fix…
mariusmihaic Nov 8, 2024
b95eff1
Merge branch 'MX-15984-fix-request-incoming-header' into MX-16008-fix…
mariusmihaic Nov 8, 2024
a9dcce7
Merge pull request #6585 from multiversx/MX-15984-fix-request-incomin…
mariusmihaic Nov 8, 2024
c5f11d7
Merge branch 'feat/sovereign-mainchain-header-sync' into MX-16008-fix…
mariusmihaic Nov 8, 2024
cd563fb
FEAT: Intercepted sovereign block header with mb headers checker
mariusmihaic Nov 8, 2024
6b411cb
FEAT: interceptedShardSovereignHeaderDataFactory.go and integrate it
mariusmihaic Nov 8, 2024
9491d19
FEAT: interceptedMiniBlockSovereignDataFactory.go and integrate it
mariusmihaic Nov 8, 2024
05db19a
Merge pull request #6588 from multiversx/merge-esdt-prefix-into-sover…
axenteoctavian Nov 8, 2024
93e1238
Update chain-core-go dependency
axenteoctavian Nov 11, 2024
4c87cba
Update es-indexer-go dependency
axenteoctavian Nov 11, 2024
8c198d0
Merge pull request #6592 from multiversx/update-chain-core-go-mod
axenteoctavian Nov 11, 2024
0a7dbad
FIX: Intercepted miniblock check with interface
mariusmihaic Nov 11, 2024
673671f
Merge branch 'feat/chain-go-sdk' into sovereign-fix-broadcast-mainchain
mariusmihaic Nov 11, 2024
ab5d4eb
Update mx-chain-go dependency
axenteoctavian Nov 11, 2024
7c52836
FEAT: Unit tests intercepted sov header + mbs
mariusmihaic Nov 11, 2024
e67f280
Merge pull request #6573 from multiversx/sovereign-fix-broadcast-main…
mariusmihaic Nov 11, 2024
97aeea7
FEAT: Unit tests intercepted data factory for sov header + mbs
mariusmihaic Nov 11, 2024
a47a8a3
FIX: Revert RoundsPerEpoch config
mariusmihaic Nov 11, 2024
cbab784
Merge branch 'feat/chain-go-sdk' into go-mod-update-11-nov
axenteoctavian Nov 11, 2024
cf280ec
Merge pull request #6593 from multiversx/go-mod-update-11-nov
axenteoctavian Nov 11, 2024
8ab5c5c
skip tests for arm64 architecture
axenteoctavian Nov 12, 2024
b76a042
Refactor register functions to be usable in sovereign chain simulator
axenteoctavian Nov 12, 2024
4aac4a0
Merge pull request #6595 from multiversx/MX-16047-skip-tests-arm64
axenteoctavian Nov 12, 2024
ac2aa41
fixes after review
axenteoctavian Nov 12, 2024
691b005
fixes after review
axenteoctavian Nov 12, 2024
165248c
little refactor after review
axenteoctavian Nov 12, 2024
6e41277
Merge branch 'feat/chain-go-sdk' into sovereign-deploy-scripts-update…
axenteoctavian Nov 12, 2024
139e848
Merge pull request #6596 from multiversx/MX-16051-chain-sim-tests-ref…
axenteoctavian Nov 12, 2024
fadd7c2
Merge branch 'feat/esdt-prefix' into merge-esdt-prefix-into-sovereign…
axenteoctavian Nov 12, 2024
603554b
fixes after merge
axenteoctavian Nov 12, 2024
5f8e3b9
Sovereign bridge contracts wasm update and fixes
axenteoctavian Nov 12, 2024
f23df2a
Merge pull request #6531 from multiversx/sovereign-deploy-scripts-upd…
axenteoctavian Nov 13, 2024
465e77d
FEAT: Quick solution to not request peer miniblocks on epoch change
mariusmihaic Nov 13, 2024
e8d16e4
Merge branch 'feat/chain-go-sdk' into merge-esdt-prefix-into-sovereig…
axenteoctavian Nov 13, 2024
b1b5786
Merge pull request #6597 from multiversx/merge-esdt-prefix-into-sover…
axenteoctavian Nov 13, 2024
53f73a9
Merge branch 'feat/chain-go-sdk' into MX-16051-sov-bridge-contracts-u…
axenteoctavian Nov 13, 2024
1fd14c1
CLN: Create and save epoch change mbs
mariusmihaic Nov 13, 2024
ab8d698
Merge pull request #6598 from multiversx/MX-16051-sov-bridge-contract…
axenteoctavian Nov 13, 2024
e58efe9
FEAT: Unity test sov validator create mbs
mariusmihaic Nov 14, 2024
f5018fb
CLN: General cleanup + extend epoch change test
mariusmihaic Nov 14, 2024
5974d1c
CLN: General cleanup + extend epoch change test
mariusmihaic Nov 14, 2024
0e791cf
FEAT: Sov blockchain hook GetStorageData
mariusmihaic Nov 18, 2024
e36c953
FEAT: Remove sameShardID check from ProcessBuiltInFunction in one sha…
mariusmihaic Nov 18, 2024
084a185
FEAT: Extend test forProcessBuiltInFunction in one shard eei
mariusmihaic Nov 18, 2024
a9575fa
FEAT: TestSovereignBlockChainHook_GetStorageData
mariusmihaic Nov 18, 2024
0ab2dc1
FEAT: Unit test
mariusmihaic Nov 18, 2024
86fcc75
Merge pull request #6587 from multiversx/MX-16008-fix-resync-cross-ch…
mariusmihaic Nov 18, 2024
5c55f17
Merge branch 'feat/sovereign-mainchain-header-sync' into MX-16089-opt…
mariusmihaic Nov 18, 2024
4caf94b
FIX: Go imports
mariusmihaic Nov 18, 2024
23c73cd
Merge pull request #6600 from multiversx/MX-16089-optimize-epoch-chan…
mariusmihaic Nov 18, 2024
19d8ad2
FIX: Comment
mariusmihaic Nov 18, 2024
a729faa
Merge pull request #6618 from multiversx/fix-missed-review-comm
mariusmihaic Nov 18, 2024
e2fbfb1
Merge branch 'feat/chain-go-sdk' into merge-feat-sovereign-into-sov-m…
mariusmihaic Nov 18, 2024
af28d99
CLN: Update go mod in mock notifier
mariusmihaic Nov 18, 2024
de1d372
check native token validity
axenteoctavian Nov 18, 2024
cc27d64
go.mod after update
axenteoctavian Nov 18, 2024
b006777
updated token ids
axenteoctavian Nov 18, 2024
f32dc68
update go mod
axenteoctavian Nov 19, 2024
67d5584
Merge pull request #6619 from multiversx/merge-feat-sovereign-into-so…
mariusmihaic Nov 19, 2024
b923d41
FIX: Quick fix in isHeaderReceivedTooLate blockFinality to 0
mariusmihaic Nov 19, 2024
f1e3f19
update go.mod
axenteoctavian Nov 19, 2024
6c2d5cc
FEAT: Push bunch of changes to check if it works
mariusmihaic Nov 19, 2024
af99e96
Merge pull request #6621 from multiversx/MX-15294-token-ids-fix
axenteoctavian Nov 20, 2024
9645579
Merge branch 'feat/esdt-prefix' into merge-esdt-prefix-into-sovereign…
axenteoctavian Nov 20, 2024
0fb610c
vm-common and core-go for sovereign
axenteoctavian Nov 20, 2024
0989397
core-go sovereign in node
axenteoctavian Nov 20, 2024
a26cba4
CLN: General cleanup, clean solution clean tracked headers
mariusmihaic Nov 20, 2024
e6b41d9
Merge pull request #6623 from multiversx/merge-esdt-prefix-into-sover…
axenteoctavian Nov 20, 2024
9d5855a
Merge branch 'refs/heads/feat/chain-go-sdk' into MX-15294-check-nativ…
axenteoctavian Nov 20, 2024
ec1be6c
token IDs update
axenteoctavian Nov 20, 2024
e7887b9
unit test fix
axenteoctavian Nov 20, 2024
5e680c8
FEAT: Refactor notifier bootstrap to work with confidence threshold t…
mariusmihaic Nov 20, 2024
a4ad7f5
CLN: Logs + test for sov shard tracker
mariusmihaic Nov 20, 2024
c205d03
local testnet scripts update
axenteoctavian Nov 20, 2024
0b22144
local testnet scripts update
axenteoctavian Nov 20, 2024
b62056f
Merge pull request #6620 from multiversx/MX-15294-check-native-token-…
axenteoctavian Nov 21, 2024
880633d
fix after review
axenteoctavian Nov 21, 2024
1b40512
Merge branch 'feat/chain-go-sdk' into MX-15407-sovereign-proxy-scripts
axenteoctavian Nov 22, 2024
f17de55
fix after review
axenteoctavian Nov 22, 2024
06ec481
sovereign enable epochs handler components
axenteoctavian Nov 22, 2024
616fb58
enable epoch handler in run type core components
axenteoctavian Nov 22, 2024
cdf3af3
Revert "enable epoch handler in run type core components"
axenteoctavian Nov 22, 2024
8a7e049
Merge branch 'MX-16147-fix-sync-process-block-block-finality' into MX…
mariusmihaic Nov 25, 2024
4f0fdf4
Merge branch 'MX-15799-fix-separate-blockchain-hook-counters' into MX…
mariusmihaic Nov 25, 2024
d04e1f6
FEAT: MarkSnapshotDoneIPeerAccount
mariusmihaic Nov 25, 2024
dac0d27
FIX: After review
mariusmihaic Nov 25, 2024
624ae44
Merge pull request #6622 from multiversx/MX-16147-fix-sync-process-bl…
mariusmihaic Nov 25, 2024
397fa02
Merge branch 'feat/chain-go-sdk' into merge-feat-sovereign-into-feat-…
mariusmihaic Nov 25, 2024
910d464
Merge pull request #6630 from multiversx/merge-feat-sovereign-into-fe…
mariusmihaic Nov 25, 2024
c93b2a5
Merge pull request #6558 from multiversx/feat/sovereign-mainchain-hea…
mariusmihaic Nov 25, 2024
25e723d
Merge branch 'refs/heads/feat/chain-go-sdk' into MX-15702-sovereign-e…
axenteoctavian Nov 25, 2024
644d1d1
CLN: Comm + todo
mariusmihaic Nov 25, 2024
ea34a9d
FIX: Concurrent access in delayedBroadcast.go using mutex
mariusmihaic Nov 25, 2024
1ecbf3a
sovereign enable epoch handler in components
axenteoctavian Nov 25, 2024
640c6ca
Merge pull request #6633 from multiversx/fix-concurrent-access-delaye…
mariusmihaic Nov 25, 2024
9c7eccb
Merge branch 'feat/chain-go-sdk' into MX-15799-fix-separate-blockchai…
mariusmihaic Nov 25, 2024
39dd138
fixes and unit test files
axenteoctavian Nov 25, 2024
ae8c842
Merge branch 'feat/chain-go-sdk' into MX-15702-sovereign-enable-epoch…
axenteoctavian Nov 25, 2024
7d2a5b0
CLN: Move commitEpochStart in baseProcess.go
mariusmihaic Nov 25, 2024
4659f3f
FIX: Accounts db epoch start, integrate acc factory in disabled acc db
mariusmihaic Nov 26, 2024
4765300
Merge branch 'feat/chain-go-sdk' into MX-16184-fix-accounts-db-epoch-…
mariusmihaic Nov 26, 2024
1fb4d52
FIX: Unit tests Accounts db epoch start
mariusmihaic Nov 26, 2024
24f419a
mocks and other changes
axenteoctavian Nov 26, 2024
7e6cd66
FEAT: TestCreateEpochStartContainerFactoryArgs
mariusmihaic Nov 26, 2024
a0726b2
unit test fixes
axenteoctavian Nov 26, 2024
aaa1acb
Merge branch 'feat/chain-go-sdk' into MX-15407-sovereign-proxy-scripts
axenteoctavian Nov 26, 2024
82367c5
Merge pull request #6624 from multiversx/MX-15407-sovereign-proxy-scr…
axenteoctavian Nov 26, 2024
dfd199d
Merge branch 'feat/chain-go-sdk' into MX-15702-sovereign-enable-epoch…
axenteoctavian Nov 26, 2024
88553e4
FEAT: Index reward txs in sovereign
mariusmihaic Nov 26, 2024
35b4a1b
fixes after running long tests
axenteoctavian Nov 26, 2024
2987d1d
Merge remote-tracking branch 'origin/MX-15702-sovereign-enable-epochs…
axenteoctavian Nov 26, 2024
955e60f
CLN: Unintended line
mariusmihaic Nov 26, 2024
8277d45
fixes after running long tests
axenteoctavian Nov 26, 2024
08aaac2
unit test fix
axenteoctavian Nov 27, 2024
4495006
Merge branch 'feat/chain-go-sdk' into MX-16184-fix-accounts-db-epoch-…
mariusmihaic Nov 27, 2024
333f79a
Merge pull request #6635 from multiversx/MX-16184-fix-accounts-db-epo…
mariusmihaic Nov 27, 2024
640471c
Merge branch 'feat/chain-go-sdk' into MX-15799-fix-separate-blockchai…
mariusmihaic Nov 27, 2024
4351f3f
FIX: indexOfLastProcessed in miniblock headers for epoch change
mariusmihaic Nov 27, 2024
553fbb7
Merge pull request #6615 from multiversx/MX-15799-fix-separate-blockc…
mariusmihaic Nov 27, 2024
35576d6
Merge branch 'feat/chain-go-sdk' into MX-15470-remove-sameshard-check…
mariusmihaic Nov 27, 2024
aeeb072
FIX: Linter
mariusmihaic Nov 27, 2024
7c6cb87
Merge pull request #6617 from multiversx/MX-15470-remove-sameshard-ch…
mariusmihaic Nov 27, 2024
f7828ad
Merge branch 'feat/chain-go-sdk' into MX-15587-finish-update-state-so…
mariusmihaic Nov 27, 2024
392e646
fixes after self review
axenteoctavian Nov 27, 2024
3ecac02
fixes after self review
axenteoctavian Nov 27, 2024
5c8327f
fixes after self review
axenteoctavian Nov 27, 2024
246363d
Merge branch 'feat/chain-go-sdk' into MX-15702-sovereign-enable-epoch…
axenteoctavian Nov 27, 2024
194edaf
FEAT: Api rewards handler + sovereign api rewards handler
mariusmihaic Nov 27, 2024
7a8922f
fix sovereign genesis block creator
axenteoctavian Nov 28, 2024
368e17a
nodes setup mock updated
axenteoctavian Nov 28, 2024
8547f65
FEAT: Integrate APIRewardsTxHandler into RunTypeComponents
mariusmihaic Nov 28, 2024
c602c5e
FEAT: Extend epochChange_test.go to check reward mb + api txs
mariusmihaic Nov 28, 2024
7dab135
Merge pull request #6629 from multiversx/MX-15587-finish-update-state…
mariusmihaic Nov 29, 2024
7b957dc
Merge branch 'feat/chain-go-sdk' into MX-15708-sovereign-index-reward…
mariusmihaic Nov 29, 2024
72f660d
FEAT: Check rewards addresses in test
mariusmihaic Dec 2, 2024
931ca57
FIX: SetIndexOfLastTxProcessed(indexOfLastProcessed)
mariusmihaic Dec 2, 2024
cb5c895
FEAT: Tests api rewards handler
mariusmihaic Dec 2, 2024
8adeea3
FEAT: Add todo move delegated+staked factory in runType
mariusmihaic Dec 2, 2024
0c04227
FEAT: Integrate delegated+staked factory in runType comps
mariusmihaic Dec 3, 2024
481ffdc
FEAT: Unit tests and check subcomps directed staked factories
mariusmihaic Dec 3, 2024
c760842
FIX: Delete SetLastIndex + es indexer
mariusmihaic Dec 4, 2024
cf40302
FEAT: Sovereign outport data provider
mariusmihaic Dec 4, 2024
428bc9a
FEAT: Integrate outport data provider factory in runType
mariusmihaic Dec 4, 2024
fe57986
FEAT: Common tests for sovereignOutportDataProviderFactory
mariusmihaic Dec 4, 2024
8506673
FEAT: Unit tests sovereignOutportDataProvider_test.go
mariusmihaic Dec 5, 2024
8bd4c0a
Merge branch 'MX-15708-sovereign-index-reward-txs' into MX-16228-inje…
mariusmihaic Dec 6, 2024
fc63550
FIX: After merge
mariusmihaic Dec 6, 2024
c5a5e48
FEAT: Add sovereign shard header factory
mariusmihaic Dec 6, 2024
caba123
refactor the implementation
axenteoctavian Dec 6, 2024
7a6b7b5
Merge pull request #6638 from multiversx/MX-15708-sovereign-index-rew…
mariusmihaic Dec 9, 2024
3bbd697
Merge branch 'feat/chain-go-sdk' into MX-16228-inject-delegated-stake…
mariusmihaic Dec 9, 2024
a55cf33
Merge pull request #6646 from multiversx/MX-16228-inject-delegated-st…
mariusmihaic Dec 9, 2024
ae6b411
sovereign flag for indexer
axenteoctavian Dec 9, 2024
c5a4ca8
Merge branch 'feat/chain-go-sdk' into MX-16233-indexer-sovereign-flag
axenteoctavian Dec 9, 2024
5f9042c
Merge branch 'feat/chain-go-sdk' into MX-15702-sovereign-enable-epoch…
axenteoctavian Dec 9, 2024
b8fd2f8
fixes after review
axenteoctavian Dec 9, 2024
bcbce0e
fixes after review
axenteoctavian Dec 9, 2024
f79556a
FEAT: Start integrating header factory version in run type comps
mariusmihaic Dec 9, 2024
c9a45ee
FEAT: Start integrating header factory version in run type comps
mariusmihaic Dec 9, 2024
2ecebd4
FEAT: Integrate header factory in block proc + general cleanup
mariusmihaic Dec 10, 2024
a21f571
Merge branch 'feat/chain-go-sdk' into MX-15667-sovereign-header-versi…
mariusmihaic Dec 10, 2024
c532256
FEAT: createSovereignEmptyGenesisBlocks with version
mariusmihaic Dec 10, 2024
5206e86
update after indexer changes
axenteoctavian Dec 11, 2024
0f3affc
go.mod update
axenteoctavian Dec 11, 2024
27196b1
renaming
axenteoctavian Dec 11, 2024
af579d1
FIX: Sovereign version creation
mariusmihaic Dec 11, 2024
627510b
fixes after review
axenteoctavian Dec 11, 2024
1347abc
Merge pull request #6661 from multiversx/MX-16233-indexer-sovereign-flag
axenteoctavian Dec 11, 2024
e1a26f3
CLN: Incoming header processor argument and checks
mariusmihaic Dec 11, 2024
739d48e
added missing checks
axenteoctavian Dec 11, 2024
d2aac11
Merge branch 'feat/chain-go-sdk' into MX-15702-sovereign-enable-epoch…
axenteoctavian Dec 11, 2024
2cc653b
extra comment
axenteoctavian Dec 11, 2024
4a767eb
all flags with epoch 0
axenteoctavian Dec 11, 2024
2c0776e
sovereign epoch config unit test
axenteoctavian Dec 11, 2024
34df610
Merge branch 'feat/chain-go-sdk' into MX-15667-sovereign-header-versi…
mariusmihaic Dec 12, 2024
510397f
Merge pull request #6658 from multiversx/MX-15667-sovereign-header-ve…
mariusmihaic Dec 13, 2024
3b17995
Merge branch 'feat/chain-go-sdk' into MX-15513-incoming-header-proc-c…
mariusmihaic Dec 13, 2024
d699ffd
Merge pull request #6668 from multiversx/MX-15513-incoming-header-pro…
mariusmihaic Dec 13, 2024
f5dc173
Merge branch 'feat/chain-go-sdk' into MX-15702-sovereign-enable-epoch…
axenteoctavian Dec 13, 2024
a3798d0
fix testing component
axenteoctavian Dec 13, 2024
d7c0065
fix after review
axenteoctavian Jan 20, 2025
a0518b0
fixes after review
axenteoctavian Jan 20, 2025
f855349
sovereign wallet path in config
axenteoctavian Jan 20, 2025
0bfdee1
DestinationShardAsObserver default "0"
axenteoctavian Jan 20, 2025
ae1c426
deleted --chain parameter because it's taken from --proxy
axenteoctavian Jan 20, 2025
40d4e60
Revert "deleted --chain parameter because it's taken from --proxy"
axenteoctavian Jan 20, 2025
4537ce5
fix long tests
axenteoctavian Jan 21, 2025
dd1ca0f
Merge pull request #6720 from multiversx/fix-long-tests-21-ian
axenteoctavian Jan 21, 2025
9763762
Merge branch 'feat/chain-go-sdk' into MX-15702-sovereign-enable-epoch…
axenteoctavian Jan 21, 2025
065f0d9
Merge branch 'feat/chain-go-sdk' into sov-scripts-update
axenteoctavian Jan 21, 2025
45bfe6a
Merge branch 'feat/chain-go-sdk' into observer-shard-prefs-toml
axenteoctavian Jan 21, 2025
2c00d8a
Merge pull request #6626 from multiversx/MX-15702-sovereign-enable-ep…
axenteoctavian Jan 21, 2025
9306a8d
Merge branch 'feat/chain-go-sdk' into observer-shard-prefs-toml
axenteoctavian Jan 21, 2025
4a65267
Merge branch 'feat/chain-go-sdk' into sov-scripts-update
axenteoctavian Jan 21, 2025
d080d1a
update get funds in address sovereign
axenteoctavian Jan 21, 2025
aaf1f5a
Merge pull request #6714 from multiversx/sov-scripts-update
axenteoctavian Jan 21, 2025
3c0a0d5
Merge branch 'feat/chain-go-sdk' into observer-shard-prefs-toml
axenteoctavian Jan 21, 2025
4f7523e
comment update
axenteoctavian Jan 21, 2025
d9cafde
Merge remote-tracking branch 'origin/observer-shard-prefs-toml' into …
axenteoctavian Jan 21, 2025
b6038d1
Merge pull request #6715 from multiversx/observer-shard-prefs-toml
axenteoctavian Jan 21, 2025
f243b81
Merge remote-tracking branch 'origin/rc/spica-patch-relayedv3' into m…
axenteoctavian Jan 31, 2025
375fc20
Merge pull request #6761 from multiversx/merge-spica-relayed-into-esd…
axenteoctavian Jan 31, 2025
1909c75
Merge branch 'feat/esdt-prefix' into merge-esdt-prefix-into-sovereign…
axenteoctavian Jan 31, 2025
61368ea
sovereign go mod
axenteoctavian Jan 31, 2025
8fbcfd6
fixes after merge
axenteoctavian Jan 31, 2025
ddaa9da
Merge pull request #6763 from multiversx/merge-esdt-prefix-into-sover…
axenteoctavian Jan 31, 2025
e03eed0
chain simulator interface update
axenteoctavian Feb 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions cmd/logviewer/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ GLOBAL OPTIONS:
--use-wss Will use wss instead of ws when creating the web socket
--log-correlation Boolean option for enabling log correlation elements.
--log-logger-name Boolean option for logger name in the logs.
--with-tls Will use tls connection with the server
--cert value Certificate file for tls connection (default: "certificate.crt")
--cert-pk value Certificate pk file for tls connection (default: "private_key.pem")
--help, -h show help
--version, -v print the version

Expand Down
36 changes: 35 additions & 1 deletion cmd/logviewer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ type config struct {
workingDir string
address string
logLevel string
certFile string
certPkFile string
logSave bool
useWss bool
logWithCorrelation bool
logWithLoggerName bool
withTLS bool
}

var (
Expand Down Expand Up @@ -100,6 +103,23 @@ VERSION:
Value: "",
Destination: &argsConfig.workingDir,
}
withTLS = cli.BoolFlag{
Name: "with-tls",
Usage: "Will use tls connection with the server",
Destination: &argsConfig.withTLS,
}
certFile = cli.StringFlag{
Name: "cert",
Usage: "Certificate file for tls connection",
Value: "certificate.crt",
Destination: &argsConfig.certFile,
}
certPkFile = cli.StringFlag{
Name: "cert-pk",
Usage: "Certificate pk file for tls connection",
Value: "private_key.pem",
Destination: &argsConfig.certPkFile,
}

argsConfig = &config{}

Expand Down Expand Up @@ -140,6 +160,9 @@ func initCliFlags() {
useWss,
logWithCorrelation,
logWithLoggerName,
withTLS,
certFile,
certPkFile,
}
cliApp.Authors = []cli.Author{
{
Expand Down Expand Up @@ -258,7 +281,18 @@ func openWebSocket(address string) (*websocket.Conn, error) {
Path: wsLogPath,
}

conn, _, err := websocket.DefaultDialer.Dial(u.String(), nil)
dialer := websocket.DefaultDialer

if argsConfig.withTLS {
cert, err := loadTLSClientConfig(argsConfig.certFile, argsConfig.certPkFile)
if err != nil {
return nil, err
}

dialer.TLSClientConfig = cert
}

conn, _, err := dialer.Dial(u.String(), nil)
if err != nil {
return nil, err
}
Expand Down
35 changes: 35 additions & 0 deletions cmd/logviewer/tls.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package main

import (
"crypto/tls"
"crypto/x509"
)

func loadTLSClientConfig(certFile string, keyFile string) (*tls.Config, error) {
cert, err := tls.LoadX509KeyPair(certFile, keyFile)
if err != nil {
return nil, err
}

certPool, err := createCertPool(cert)
if err != nil {
return nil, err
}

return &tls.Config{
Certificates: []tls.Certificate{cert},
RootCAs: certPool,
}, nil
}

func createCertPool(cert tls.Certificate) (*x509.CertPool, error) {
certLeaf, err := x509.ParseCertificate(cert.Certificate[0])
if err != nil {
return nil, err
}

certPool := x509.NewCertPool()
certPool.AddCert(certLeaf)

return certPool, nil
}
1 change: 1 addition & 0 deletions cmd/node/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@
MinSizeInBytes = 104857 # 104857 is 10% from 1MB
MaxSizeInBytes = 943718 # 943718 is 90% from 1MB

# TODO MX-14985 resolve after override structs branch is merged
[VirtualMachine]
[VirtualMachine.Execution]
TimeOutForSCExecutionInMilliseconds = 10000 # 10 seconds = 10000 milliseconds
Expand Down
3 changes: 3 additions & 0 deletions cmd/node/config/enableEpochs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@
# RelayedTransactionsV3EnableEpoch represents the epoch when the relayed transactions v3 will be enabled
RelayedTransactionsV3EnableEpoch = 2

# ConsensusModelV2EnableEpoch represents the epoch when the consensus model V2 is enabled
ConsensusModelV2EnableEpoch = 2

# BLSMultiSignerEnableEpoch represents the activation epoch for different types of BLS multi-signers
BLSMultiSignerEnableEpoch = [
{ EnableEpoch = 0, Type = "no-KOSK" },
Expand Down
1 change: 1 addition & 0 deletions cmd/node/config/systemSmartContractsConfig.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
[ESDTSystemSCConfig]
BaseIssuingCost = "5000000000000000000" #5 eGLD
OwnerAddress = "erd1fpkcgel4gcmh8zqqdt043yfcn5tyx8373kg6q2qmkxzu4dqamc0swts65c"
ESDTPrefix = ""

[GovernanceSystemSCConfig]
OwnerAddress = "erd1vxy22x0fj4zv6hktmydg8vpfh6euv02cz4yg0aaws6rrad5a5awqgqky80" #should use a multisign contract instead of a wallet address
Expand Down
60 changes: 60 additions & 0 deletions cmd/sovereignnode/CLI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

# Node CLI

The **MultiversX Sovereign Node** exposes the following Command Line Interface:

```
$ sovereignNode --help

NAME:
MultiversX Sovereign Node CLI App - This is the entry point for starting a new MultiversX sovereign node - the app will start after the genesis timestamp
USAGE:
sovereignNode [global options]

AUTHOR:
The MultiversX Team <[email protected]>

GLOBAL OPTIONS:
--genesis-file [path] The [path] for the genesis file. This JSON file contains initial data to bootstrap from, such as initial balances for accounts. (default: "./config/genesis.json")
--smart-contracts-file [path] The [path] for the initial smart contracts file. This JSON file contains data used to deploy initial smart contracts such as delegation smart contracts (default: "./config/genesisSmartContracts.json")
--nodes-setup-file [path] The [path] for the nodes setup. This JSON file contains initial nodes info, such as consensus group size, round duration, validators public keys and so on. (default: "./config/nodesSetup.json")
--config [path] The [path] for the main configuration file. This TOML file contain the main configurations such as storage setups, epoch duration and so on. (default: "./config/config.toml")
--config-api [path] The [path] for the api configuration file. This TOML file contains all available routes for Rest API and options to enable or disable them. (default: "./config/api.toml")
--config-economics [path] The [path] for the economics configuration file. This TOML file contains economics configurations such as minimum gas price for a transactions and so on. (default: "./config/economics.toml")
--config-systemSmartContracts [path] The [path] for the system smart contracts configuration file. (default: "./config/systemSmartContractsConfig.toml")
--config-ratings value The ratings configuration file to load (default: "./config/ratings.toml")
--config-preferences [path] The [path] for the preferences configuration file. This TOML file contains preferences configurations, such as the node display name or the shard to start in when starting as observer (default: "./config/prefs.toml")
--config-external [path] The [path] for the external configuration file. This TOML file contains external configurations such as ElasticSearch's URL and login information (default: "./config/external.toml")
--p2p-config [path] The [path] for the p2p configuration file. This TOML file contains peer-to-peer configurations such as port, target peer count or KadDHT settings (default: "./config/p2p.toml")
--gas-costs-config [path] The [path] for the gas costs configuration file. This TOML file contains gas costs used in SmartContract execution (default: "./config/gasSchedule.toml")
--sk-index value The index in the PEM file of the private key to be used by the node. (default: 0)
--validator-key-pem-file filepath The filepath for the PEM file which contains the secret keys for the validator key. (default: "./config/validatorKey.pem")
--port [p2p port] The [p2p port] number on which the application will start. Can use single values such as `0, 10230, 15670` or range of ports such as `5000-10000` (default: "0")
--profile-mode Boolean option for enabling the profiling mode. If set, the /debug/pprof routes will be available on the node for profiling the application.
--use-health-service Boolean option for enabling the health service.
--storage-cleanup Boolean option for starting the node with clean storage. If set, the Node will empty its storage before starting, otherwise it will start from the last state stored on disk..
--gops-enable Boolean option for enabling gops over the process. If set, stack can be viewed by calling 'gops stack <pid>'.
--display-name value The user-friendly name for the node, appearing in the public monitoring tools. Will override the name set in the preferences TOML file.
--keybase-identity value The keybase's identity. If set, will override the one set in the preferences TOML file.
--rest-api-interface address and port The interface address and port to which the REST API will attempt to bind. To bind to all available interfaces, set this flag to :8080 (default: "localhost:8080")
--rest-api-debug Boolean option for starting the Rest API in debug mode.
--disable-ansi-color Boolean option for disabling ANSI colors in the logging system.
--log-level level(s) This flag specifies the logger level(s). It can contain multiple comma-separated value. For example, if set to *:INFO the logs for all packages will have the INFO level. However, if set to *:INFO,api:DEBUG the logs for all packages will have the INFO level, excepting the api package which will receive a DEBUG log level. (default: "*:INFO ")
--log-save Boolean option for enabling log saving. If set, it will automatically save all the logs into a file.
--log-correlation Boolean option for enabling log correlation elements.
--log-logger-name Boolean option for logger name in the logs.
--use-log-view Boolean option for enabling the simple node's interface. If set, the node will not enable the user-friendly terminal view of the node.
--bootstrap-round-index index This flag specifies the round index from which node should bootstrap from storage. (default: 18446744073709551615)
--working-directory directory This flag specifies the directory where the node will store databases, logs and statistics.
--destination-shard-as-observer value This flag specifies the shard to start in when running as an observer. It will override the configuration set in the preferences TOML config file.
--keep-old-epochs-data Boolean option for enabling a node to keep old epochs data. If set, the node won't remove any database and will have a full history over epochs.
--num-epochs-to-keep value This flag represents the number of epochs which will kept in the databases. It is relevant only if the full archive flag is not set. (default: 2)
--num-active-persisters value This flag represents the number of databases (1 database = 1 epoch) which are kept open at a moment. It is relevant even if the node is full archive or not. (default: 2)
--start-in-epoch Boolean option for enabling a node the fast bootstrap mechanism from the network.Should be enabled if data is not available in local disk.
--no-key Boolean flag for enabling the node to generate a signing key when it starts (if the validatorKey.pem file is present, setting this flag to true will overwrite the BLS key used by the node)
--help, -h show help
--version, -v print the version


```

39 changes: 39 additions & 0 deletions cmd/sovereignnode/chainSimulator/common/common.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package common

import (
"github.com/multiversx/mx-chain-core-go/data"
"github.com/multiversx/mx-chain-go/config"
"github.com/multiversx/mx-chain-go/factory"
"github.com/multiversx/mx-chain-go/factory/runType"
"github.com/multiversx/mx-chain-go/node/chainSimulator/process"
sovRunType "github.com/multiversx/mx-chain-go/sovereignnode/runType"
)

// GetCurrentSovereignHeader returns current sovereign chain block handler from blockchain hook
func GetCurrentSovereignHeader(nodeHandler process.NodeHandler) data.SovereignChainHeaderHandler {
return nodeHandler.GetChainHandler().GetCurrentBlockHeader().(data.SovereignChainHeaderHandler)
}

// CreateSovereignRunTypeComponents will create sovereign run type components
func CreateSovereignRunTypeComponents(args runType.ArgsRunTypeComponents, sovereignExtraConfig config.SovereignConfig) (factory.RunTypeComponentsHolder, error) {
argsSovRunType, err := sovRunType.CreateSovereignArgsRunTypeComponents(args, sovereignExtraConfig)
if err != nil {
return nil, err
}

sovereignComponentsFactory, err := runType.NewSovereignRunTypeComponentsFactory(*argsSovRunType)
if err != nil {
return nil, err
}

managedRunTypeComponents, err := runType.NewManagedRunTypeComponents(sovereignComponentsFactory)
if err != nil {
return nil, err
}
err = managedRunTypeComponents.Create()
if err != nil {
return nil, err
}

return managedRunTypeComponents, nil
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package process

import (
"time"

chainSimulatorProcess "github.com/multiversx/mx-chain-go/node/chainSimulator/process"
"github.com/multiversx/mx-chain-go/process"

"github.com/multiversx/mx-chain-core-go/core/check"
"github.com/multiversx/mx-chain-core-go/data"
)

type sovereignBlockProcessorFactory struct {
}

// NewSovereignBlockProcessorFactory creates a new block processor factory for sovereign chain simulator
func NewSovereignBlockProcessorFactory() chainSimulatorProcess.BlocksProcessorFactory {
return &sovereignBlockProcessorFactory{}
}

// ProcessBlock will create and process a block in sovereign chain simulator
func (sbpf *sovereignBlockProcessorFactory) ProcessBlock(blockProcessor process.BlockProcessor, header data.HeaderHandler) (data.HeaderHandler, data.BodyHandler, error) {
if check.IfNil(blockProcessor) {
return nil, nil, process.ErrNilBlockProcessor
}
if check.IfNil(header) {
return nil, nil, process.ErrNilHeaderHandler
}

header, block, err := blockProcessor.CreateBlock(header, func() bool {
return true
})
if err != nil {
return nil, nil, err
}

return blockProcessor.ProcessBlock(header, block, func() time.Duration {
return time.Second
})
}

// IsInterfaceNil returns true if there is no value under the interface
func (sbpf *sovereignBlockProcessorFactory) IsInterfaceNil() bool {
return sbpf == nil
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package process

import (
"testing"
"time"

"github.com/multiversx/mx-chain-go/process"
"github.com/multiversx/mx-chain-go/testscommon"

"github.com/multiversx/mx-chain-core-go/data"
"github.com/stretchr/testify/require"
)

func TestNewSovereignBlockProcessorFactory(t *testing.T) {
t.Parallel()

fact := NewSovereignBlockProcessorFactory()

require.False(t, fact.IsInterfaceNil())
require.IsType(t, new(sovereignBlockProcessorFactory), fact)
}

func TestNewSovereignBlockProcessorFactory_ProcessBlock(t *testing.T) {
t.Parallel()

t.Run("nil block processor should error", func(t *testing.T) {
fact := NewSovereignBlockProcessorFactory()
header, block, err := fact.ProcessBlock(nil, &testscommon.HeaderHandlerStub{})
require.ErrorIs(t, err, process.ErrNilBlockProcessor)
require.Nil(t, header)
require.Nil(t, block)
})
t.Run("nil header handler should error", func(t *testing.T) {
fact := NewSovereignBlockProcessorFactory()
header, block, err := fact.ProcessBlock(&testscommon.BlockProcessorStub{}, nil)
require.ErrorIs(t, err, process.ErrNilHeaderHandler)
require.Nil(t, header)
require.Nil(t, block)
})
t.Run("should work", func(t *testing.T) {
fact := NewSovereignBlockProcessorFactory()

createWasCalled := false
processWasCalled := false
bp := &testscommon.BlockProcessorStub{
CreateBlockCalled: func(initialHdrData data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error) {
createWasCalled = true
return nil, nil, nil
},
ProcessBlockCalled: func(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) (data.HeaderHandler, data.BodyHandler, error) {
processWasCalled = true
return nil, nil, nil
},
}

_, _, err := fact.ProcessBlock(bp, &testscommon.HeaderHandlerStub{})
require.Nil(t, err)
require.Equal(t, true, createWasCalled)
require.Equal(t, true, processWasCalled)
})
}
25 changes: 25 additions & 0 deletions cmd/sovereignnode/chainSimulator/sovereignChainHandlerFactory.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package chainSimulator

import (
"github.com/multiversx/mx-chain-go/node/chainSimulator"
"github.com/multiversx/mx-chain-go/node/chainSimulator/process"
sovProcess "github.com/multiversx/mx-chain-go/sovereignnode/chainSimulator/process"
)

type sovereignProcessorFactory struct {
}

// NewSovereignChainHandlerFactory creates a new chain handler factory for sovereign chain simulator
func NewSovereignChainHandlerFactory() chainSimulator.ChainHandlerFactory {
return &sovereignProcessorFactory{}
}

// CreateChainHandler creates a new chain handler for sovereign chain simulator
func (spf *sovereignProcessorFactory) CreateChainHandler(nodeHandler process.NodeHandler) (chainSimulator.ChainHandler, error) {
return process.NewBlocksCreator(nodeHandler, sovProcess.NewSovereignBlockProcessorFactory())
}

// IsInterfaceNil returns true if there is no value under the interface
func (spf *sovereignProcessorFactory) IsInterfaceNil() bool {
return spf == nil
}
Loading
Loading