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
Refactored transaction simulation construction #5201
Refactored transaction simulation construction #5201
Conversation
# Conflicts: # factory/processing/blockProcessorCreator.go
# Conflicts: # factory/processing/blockProcessorCreator.go
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## rc/v1.6.0 #5201 +/- ##
=============================================
+ Coverage 79.69% 79.74% +0.04%
=============================================
Files 682 683 +1
Lines 88256 88348 +92
=============================================
+ Hits 70340 70453 +113
+ Misses 12789 12762 -27
- Partials 5127 5133 +6
☔ View full report in Codecov by Sentry. |
"github.com/multiversx/mx-chain-vm-common-go/parsers" | ||
) | ||
|
||
func (pcf *processComponentsFactory) createTxSimulatorProcessor() (factory.TransactionSimulatorProcessor, process.VirtualMachinesContainerFactory, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename this file to txSimulatorProcessComponents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
func (pr *ProcessorRunner) CreateDeploySCTx( | ||
tb testing.TB, | ||
owner []byte, | ||
pathToContract string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contractPath
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed
newConfigsPath := path.Join(tempDir, "config") | ||
|
||
// TODO refactor this cp to work on all OSes | ||
cmd := exec.Command("cp", "-r", originalConfigsPath, newConfigsPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need this copy? since you don't change the files, you could have used them as they are
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was also my first impression when I started constructing the first implementation of this function.
If you look at L28, I have this function correctTestPathInGenesisSmartContracts
that does a sort of sed
operation, replacing the string ./config
to the actually temporary directory. Without this change, the genesis process will always fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System test passed.
@@ Log scanner @@
tx-simulator-construction-refactor
================================================================================
- Known Warnings 10
- New Warnings 2
- Known Errors 0
- New Errors 1
- Panics 0
================================================================================ - block hash does not match 10033
- wrong nonce in block 3624
- miniblocks does not match 0
- num miniblocks does not match 0
- miniblock hash does not match 0
- block bodies does not match 0
- receipts hash missmatch 0
================================================================================ - No jailed nodes on the testnet
================================================================================
# Conflicts: # factory/processing/export_test.go # factory/processing/processComponents.go
aead785
20400d4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System test passed
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?