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

Economics development merge #382

Merged
merged 257 commits into from Aug 20, 2019
Merged

Conversation

raduchis
Copy link
Contributor

No description provided.

bogdan-rosianu and others added 30 commits July 29, 2019 14:46
…N-3199-code-coverage-improvement

# Conflicts:
#	process/block/export_test.go
…solves-requests-with-bad-unused-headers' into development

# Conflicts:
#	process/block/export_test.go
#	process/block/preprocess/smartContractResults_test.go
…test for VM and smart contract. Can be run only when decommented as it takes a long time.
…agar-io

# Conflicts:
#	integrationTests/singleShard/block/executingMiniblocksSc_test.go
…-from-shardprocessor

# Conflicts:
#	integrationTests/singleShard/block/executingMiniblocksSc_test.go
sasurobert and others added 18 commits August 13, 2019 16:54
…ks-for-the-same-shard' into EN-3558/Create-multiple-miniblocks-for-the-same-shard
* refactor executingMiniblocks

* remove testInitializer from block subpackage

* refactor executingMiniblocksSc

* refactor multiShard->block

* small fixes

* refactored multiShard->metablock

* refactored first transaction integrationTest in multiShard

* refactored second transaction integrationTest in multiShard

* refactored third transaction integrationTest in multiShard

* refactored transaction subpackage from multiShard integrationTests

* small fixes

* fix after review 1

* fix after review 2

* merge with development

* fix imports
…niblocks-for-the-same-shard

En 3558/create multiple miniblocks for the same shard
#372)

* Added more checks on checkBlockValidity method in base processor (round index + random seed)
* Added check on doBlockJob to not create block with round lower than the one which is already committed
* Set error level to Debug for some prints
* Fixed unit tests
* Fixed integration tests
* Fixed after code review
* EN-3395 : Create a new branch for termui console implementation, start implementing on this feature

* EN-3395 : add more fields in termui console, add some setters to get data

* EN-3395 : add feature with big log display, fix unit tests that fails

* EN-3395 : add event when CTRl+c is pressed, add some unit tests, return error if termui console is nil, rename some methods

* EN-3395 : fix failing tests

* EN-3395 : renamed, and fixed some encapsulation problem

* EN-3395 : modify structure of termui console

* EN-3395 : fix after review not done yet

* Fixed termui on windows

* EN-3395 :continue to fix after review, modify failing tests

* EN-3395 :fix after review, add more unit test, fix failing tests

* EN-3395 :fix after review

* EN-3395 :fix after review

* Fixed termui on windows

* Fixed termui on windows

* added more metrics in app status handler
added local machine metrics

* fix after merge, reverted changes

* added for in go funcs in machineStatistics

* Fixed termui on windows

* refactored network gauge
changed termui render

* Fixed Uint64 and Int64

* removed machineStatistics.go file
updated main file.
machine statistics is done with the help of appStatusPolling struct
added guard checks for polling interval as to not fave cpu time leakage

* minor code changes: removed unused or faulty used mocks, updated tests, removed weak warnings and warnings, removed logRender

* Split PrettyBlock after \n for logging

* fixed log lines

* widgetsRender refactor

* Updated status

* fixed getting sync status
updated some texts in widgets
modified config.toml to poll each 2 seconds
added parameter name in interface definition

* fix after review

* fixed build

* fix after review, added interface is nil func on appStatusHandler
* Merge structs HeaderInterceptor, HeaderInterceptorBase and ShardHeaderInterceptor into one struct and remove HeaderInterceptorBase and ShardHeaderInterceptor

* Add some extra tests from headerInterceptorBase_test.go (WORK IN PROGRESS)

* Merge tests from headerInterceptorBase_test.go and shardHeaderInterceptor_test.go into headerInterceptor_test.go

* Unexport function CheckHeaderForCurrentShard()

* Fix failing test and update comment

* Add extra tests for the constructor NewHeaderInterceptor()
* updated gin to start in debug mode only if termui is not enabled
code refactoring in termui render
added version label in termui render

* minor code changes: renamed bool flag from elrond facade
…conomics

# Conflicts:
#	cmd/node/factory/structs.go
#	cmd/node/main.go
#	integrationTests/frontend/wallet/testInitializer.go
#	integrationTests/frontend/wallet/txInterception_test.go
#	integrationTests/multiShard/block/executingMiniblocks_test.go
#	integrationTests/multiShard/block/interceptedBlocks_test.go
#	integrationTests/multiShard/block/testInitializer.go
#	integrationTests/multiShard/metablock/blocksDissemination_test.go
#	integrationTests/multiShard/metablock/testInitializer.go
#	integrationTests/multiShard/smartContract/executingSCCalls_test.go
#	integrationTests/multiShard/transaction/testInitializer.go
#	integrationTests/singleShard/block/interceptedRequestHdr_test.go
#	integrationTests/singleShard/block/interceptedRequestTxBlockBody_test.go
#	integrationTests/singleShard/block/testInitializer.go
#	integrationTests/singleShard/transaction/interceptedBulkTx_test.go
#	integrationTests/singleShard/transaction/interceptedBulkUnsignedTx_test.go
#	integrationTests/singleShard/transaction/interceptedResolvedTx_test.go
#	integrationTests/singleShard/transaction/interceptedResolvedUnsignedTx_test.go
#	integrationTests/singleShard/transaction/testInitializer.go
#	integrationTests/state/stateExecTransaction_test.go
#	integrationTests/state/stateTrie_test.go
#	integrationTests/testInitializer.go
#	integrationTests/testProcessorNode.go
#	process/block/interceptors/headerInterceptor.go
#	process/block/interceptors/headerInterceptorBase.go
#	process/block/interceptors/headerInterceptorBase_test.go
#	process/coordinator/process.go
#	process/errors.go
#	process/metablock/shardHeaderInterceptor.go
#	process/metablock/shardHeaderInterceptor_test.go
#	process/smartContract/process_test.go
#	process/transaction/process.go
#	process/transaction/process_test.go
# Conflicts:
#	cmd/node/main.go
#	integrationTests/mock/nodesCoordinatorMock.go
#	integrationTests/singleShard/block/interceptedRequestHdr_test.go
@raduchis raduchis marked this pull request as ready for review August 19, 2019 14:39
integrationTests/testInitializer.go Outdated Show resolved Hide resolved
integrationTests/testProcessorNode.go Outdated Show resolved Hide resolved
node/heartbeat/hearbeatMessageInfo_test.go Outdated Show resolved Hide resolved
@@ -58,7 +58,7 @@ func TestShardShouldNotProposeAndExecuteTwoBlocksInSameRound(t *testing.T) {

integrationTests.SyncBlock(t, nodes, []int{idxProposer}, nonce)

time.Sleep(stepDelay)
time.Sleep(20 * stepDelay)
Copy link
Contributor

Choose a reason for hiding this comment

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

why 20 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

was used for testing, changed back to stepDelay in a previous commit.

cp,
j,
)
n := NewTestProcessorNode(uint32(numOfShards), uint32(shardId), uint32(shardId), serviceID)
Copy link
Contributor

Choose a reason for hiding this comment

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

make shardId of type uint32 before, and you can delete the cast

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

return tReturned
}

assert.Equal(t, emptyTimestamp, hbmi.timeStamp)

// send heartbeat twice in order to calculate the duration between thm
hbmi.HeartbeatReceived(uint32(1), "v0.1", "undefined")
time.Sleep(10 * time.Millisecond)
Copy link
Contributor

Choose a reason for hiding this comment

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

why is the sleep needed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

on my machine the test failed because both heartbeatReceived were done in the same milisecond and the duration was 0.

@@ -72,6 +73,7 @@ func TestShardShouldNotProposeAndExecuteTwoBlocksInSameRound(t *testing.T) {
mockTestingT := &testing.T{}
integrationTests.SyncBlock(mockTestingT, nodes, []int{idxProposer}, nonce)

runtime.Gosched()
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this needed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was removed. It was a test to see if this fixed the failing tests on windows

@raduchis raduchis merged commit 5fb7a1a into feat/economics Aug 20, 2019
@raduchis raduchis deleted the Economics-Development-Merge branch August 20, 2019 07:58
@raduchis raduchis restored the Economics-Development-Merge branch August 21, 2019 13:22
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.

None yet

10 participants