Commit 31752f2
Update 1.10: London and Berlin forks (#4953)
* Add Docker support for Go tests with new Makefile target and Dockerfile
* Refactor Dockerfile for Go tests: remove unnecessary commands and ensure proper dependency installation
* update 1.9.25
* update 1.9.25
* update 1.9.25
* update 1.9.25
* Fixed code
* Fixed StructLog
* compiled
* BlockContext
* Fixed interpreter.
* Fixed tests partially.
* Passed unit tests.
* Fixed imports
* Removed commented block
* Fixed StructLog initialization
* Fixed formatting
* Removed unused
* Fixed code generation
* Removed intpool
* Fixed rpc override.go
* Fixed rpc override_test.go
* Add gas prices for BLS12-381 elliptic curve operations
* Add gas discount table for BLS12-381 G1 and G2 multi exponentiation operations
* Refactor CaptureStart method to remove unused EVM parameter
* Fix chain rules check in readonly mode to use Byzantium instead of S3
* Update gas calculations to reflect EIP-150 and EIP-158 rules
* Add EIP flags for gas calculations in config
* Refactor precompiled contracts to use WriteCapablePrecompiledContract interface and add BLS12-381 precompile implementations
* Refactor precompiled contract tests to use RequiredGas method with updated parameters
* Add readOnly parameter to RunPrecompiledContract and implement IsWrite method for precompiled contracts
* Update RunPrecompiledContract calls in tests to include readOnly parameter
* Update RunPrecompiledContract calls in tests to include gas parameter
* Add BLS12-381 failure test cases and implement IsWrite method for dummy precompile
* Fix code hash retrieval in contract execution for precompiled contracts
* Handle validator addresses in EVM to avoid using code and codeHash fields
* Fixed issue with tests running.
* Remove commented-out test data for bn256 addition and scalar multiplication precompiled contracts
* Refactor precompiled contracts to use wrapper for write capability and remove unused gas parameters
* Refactor precompiled contracts to use wrapper for write capability and remove unused gas parameters
* Update EVM initialization in TestEIP2537Precompile to include BlockContext and TxContext
* Skip tests for EIP 2565 precompiled modexp implementation
* Fix gas calculation in precompiled contract tests to ensure accurate error handling
* Update IsWrite method in precompiled contracts to reflect correct write capability and add tests for validation
* Refactor precompiled contract tests to remove unused variables and improve error handling
* Fix read-only write protection check and enhance precompiled contract tests
* Reorder precompiled contract mappings for improved readability
* Uncomment execution reverted error in errors.go and update related comments
* update 1.9.25
* BlockContext
* Fixed imports
* Added access list.
* Provided eips.
* Add EIP implementations and Harmony-specific support to EVM
Enhanced the EVM with support for EIPs 3855, 3529, and 3198, including new opcodes and gas optimizations. Integrated Harmony-specific functionalities such as validator checks, staking-related operations, and cross-shard transfer support. Refactored gas calculation logic to accommodate both EIP and Harmony enhancements, ensuring extensibility and improved maintenance.
* Add new function signatures for validator and staking precompiles in EVM
* Add RosettaLogAddressItem struct and RosettaTracer interface to EVM
* Remove obsolete error definitions and add new error types for EVM execution
* Refactor opcode definitions for clarity and consistency in opcodes.go
* Refactor contract code by removing unused validJumpSubdest function and simplifying GetByte method
* Add TODO comment to check precompiles in EVM precompile method
* Refactor gas calculations and update function names for clarity in gas_table.go
* Refactor EVM context by removing unused BlockContext and TxContext types in evm.go
* Refactor EVM code by updating chain configuration and simplifying contract execution logic
* Uncomment execution reverted error and clean up commented code in EVM
* Add WithDataCopyFix field to contract struct for EVM execution
* Use ErrWriteProtection constant for error handling in contracts.go
* Refactor EVM contract handling by updating precompile execution logic and improving code structure
* Update chain configuration to include London hard fork in precompiles
* Refactor opAdd function to use ScopeContext for stack operations
* Update EVM instruction handling for S3 chain rules and adjust difficulty operation
* Fix EVM configuration reference for debugging in evm.go
* Add gas parameters for KECCAK256 operations in protocol_params.go
* Rename memorySha3 function to memoryKeccak256 for clarity
* Rename memorySha3 function to memoryKeccak256 for clarity
* Update SetCode method call to include 'false' parameter for state database
* Refactor gas usage validation in interpreter to simplify logic
* Comment out StateDB.Prepare() calls in runtime and state_transition for EIP 1153
* Add SetTxContext method to reset EVM with new transaction context
* Remove unnecessary return statement in CaptureEnd method of ParityBlockTracer
* Implement stubs for transaction capture methods in ParityBlockTracer
* Refactor ParityBlockTracer to replace uint256.Int with big.Int for value handling
* Update Tracer methods to include EVM context in state capture
* Fix CaptureFault method to include memory and stack in fault logging
* Enhance state capture in interpreter by including memory, stack, and contract details
* Fix logger to use big.Int for stack logging and remove unused PaddedBytes function
* Refactor RosettaBlockTracer to use big.Int for value initialization
* Refactor RosettaLogItem to use uint256 for value representation
* Update CaptureStart method to return an error for improved error handling
* Refactor tracer to use uint256 for stack representation
* Add CaptureEnter and CaptureExit methods to Tracer for enhanced tracing functionality
* Add CaptureEnter method to StructLogger and refactor stack logging to use uint256
* Refactor JSONLogger methods and improve stack logging functionality
* Refactor JSONLogger methods and improve stack logging functionality
* Refactor block tracer tests to replace uint256 with big.Int for value handling
* Refactor EVMInterpreter initialization to use env.Config instead of env.vmConfig
* Refactor EVMInterpreter initialization to use env.Config instead of env.vmConfig
* Refactor test utility functions to improve clarity and update file writing method
* Refactor test utility functions to improve clarity and update file writing method
* Refactor instructions tests to replace callCtx with ScopeContext and simplify stack handling
* Add storage field to StructLogger for improved state management
* Refactor TestStoreCapture to remove unused return stack parameter
* Fix TestBigToHash to dereference uint256.NewInt for correct comparison
* Update ChainConfig.Rules to accept isMerge parameter and adjust runtime usage
* Remove isMerge parameter from ChainConfig.Rules and clean up related code
* Fix uint256ToHash function to use common.BigToHash and enhance TestBigToHash with additional test cases
* Fix uint256ToHash function to use common.BigToHash and enhance TestBigToHash with additional test cases
* Refactor EVM contract initialization to streamline code execution flow
* Comment out Stack field in structLogMarshaling for clarity
* Rename variable for clarity in GetState method
* Skip TestStoreCapture due to misconfiguration
* Update go:generate directive to specify gencodec version
* Update go:generate directive to simplify command for AccessTuple
* Add JSON marshaling and unmarshaling for AccessTuple and StructLog
* Refactored consensus decider access and improved thread safety.
* Refactored consensus decider access and improved thread safety.
* Feature: transient storage (#4950)
* Transient storage functionality
* Commented code block in blockchain_test.go
* Refactor state transition rules and remove commented-out Prepare method
* Remove commented-out code block in chain_makers_test.go
* Remove unnecessary parameter from ChainConfig.Rules calls in runtime.go
* Refactor ActivePrecompiles function to use rules parameter instead of evm.chainRules
* Refactor state transition preparation to use statedb.Prepare method
* Feature: replaced duktape with goja (#4958)
* Refactor tracing implementation to replace duktape with goja and clean up unused code
* Update transaction context handling in tracer to use SetTxContext method
* Refactor tracing implementation to use hmyapi for state and block overrides
* Refactor trace event subscriptions to use events package and clean up unused code
* fix(ci): change if condition to build all RPs without checkin a base branch, previously only dev and main
* Refactor jsTracer methods to improve parameter handling and remove unused context
* Refactor logger_test.go to update import paths for Harmony package
* Refactor tracer_test.go to update import paths and improve state handling
* Refactor tracer_test.go to comment out a test case for bad arguments to stack peeks
* Refactor Makefile to run specific test for TestTracer in go-test target
* Refactor Makefile to run TestTracer specifically in the js tracer directory
* Refactor tracer_test.go to improve error handling and logging in test cases
* Refactor tracer_test.go to simplify error message formatting in test cases
* Refactor Makefile to enable verbose output for TestTracer tests
* Refactor tracer_test.go to enhance logging of tracer results during test execution
* Add logging for contract code in EVMInterpreter Run method
* Add debug logging for contract input in EVMInterpreter Run method
* Enable debug mode in EVM configuration for enhanced tracing during tests
* Refactor tracer_test.go to improve test case formatting and readability
* Refactor tracer_test.go to comment out unused test cases for clarity
* Refactor tracer_test.go to uncomment and enable relevant test cases for improved coverage
* Refactor tracer_test.go to add a test case for intrinsic gas calculation
* Refactor goja.go to store intrinsic gas calculation in context
* Refactor tracer_test.go to improve test case clarity and formatting
* Refactor goja.go to update gasUsed assignment and add time context
* Refactor goja.go to remove unused gasUsed assignment in CaptureTxEnd
* Refactor tracer_test.go to improve test case formatting and clarity
* Refactor tracer_test.go to simplify error reporting in test cases
* Refactor tracer_test.go to remove unnecessary debug print statements
* Refactor interpreter.go to remove unused debug print statement
* Refactor Makefile to enhance go test command with race detection and vetting
* Refactor gen_structlog.go to add omitempty for Memory and ReturnData fields and reorder CallerAddress and ContractAddress
* Refactor logger.go to simplify go:generate command for gencodec
* Refactor Makefile to run specific tracer tests and enhance tracer result logging
* Refactor tracer_test.go to comment out specific test cases for memory access and intrinsic gas
* Refactor Makefile to enable verbose output for tracer tests
* Refactor tracer_test.go to print tracer results as a string for better readability
* Refactor tracer_test.go to enhance logging of tracer results for improved debugging
* Refactor tracer.go to log trace results and errors for improved visibility
* Add debug logging for tracer type and configuration in tracer.go
* Add logging for execution results in logger.go for improved traceability
* Add logging for gas limit and remaining gas in CaptureTxEnd for better traceability
* Add debug tracing for transaction start and end in state_transition.go
* Add contract and caller address to StructLog for enhanced logging
* Add caller and contract addresses to structured logs for enhanced traceability
* Improve error message for tracer not found in tracers.go
* Enhance error message for tracer not found in tracers.go to include lookup count
* Add native tracers for transaction analysis: fourByteTracer, callTracer, prestateTracer, revertReasonTracer, and noopTracer
* Add debug log for lookup registration count in tracers.go
* Add panic message for unregistered JS tracer and implement RegisterLookupCount function
* Add panic message in init function for debugging purposes
* Update import path for tracers to use Harmony's package
* Import JS tracers package in hmy.go
* Refactor import paths to use Harmony's core and tracers packages
* Remove debug panic statements from init function in goja.go
* Add time field to callFrame struct in call.go
* Clean up tracer_test.go by removing unnecessary debug print statements
* Update contract code in tracer_test.go to use STOP instruction
* Update logger fields to be omitempty and adjust test expectations
* Remove rosetta checker from Travis CI configuration
* Update CallerAddress and ContractAddress fields to be omitempty in gen_structlog.go
---------
Co-authored-by: Uladzislau Muraveika <[email protected]>
* Refactor: remove unused function and clean up tracer code
* Refactor: remove unused testBackend struct and related functions
* Refactor: improve Makefile test command and enhance state transition logic
* Refactor: fix contract creation condition in state transition logic
* Transient storage additional tests. (#4967)
* Test: add transient storage opcodes test case
* Refactor: update go test command to run specific transient storage opcodes test
* Refactor: update go test command to run specific transient storage opcodes test
* Refactor: configure EVM with ExtraEips for transient storage opcodes
* Refactor: implement EIP-1153 for transient storage opcodes TLOAD and TSTORE
* Refactor: update contract code to use PUSH1 for transient storage opcodes
* Refactor: enhance TestTransientStorageOpcodes for opcode testing and update Makefile for improved test command
* Refactor: add support for EIP-1153 transient storage in ChainConfig and update instruction set
* Activation epoch for transient storage on devnet (#4968)
* Test: add transient storage opcodes test case
* Refactor: update go test command to run specific transient storage opcodes test
* Refactor: update go test command to run specific transient storage opcodes test
* Refactor: configure EVM with ExtraEips for transient storage opcodes
* Refactor: implement EIP-1153 for transient storage opcodes TLOAD and TSTORE
* Refactor: update contract code to use PUSH1 for transient storage opcodes
* Refactor: enhance TestTransientStorageOpcodes for opcode testing and update Makefile for improved test command
* Refactor: add support for EIP-1153 transient storage in ChainConfig and update instruction set
* Activation epoch for transient storage
---------
Co-authored-by: Uladzislau Muraveika <[email protected]>1 parent 922ec9f commit 31752f2
File tree
133 files changed
+18890
-5843
lines changed- consensus
- core
- events
- state
- types
- vm
- runtime
- testdata/precompiles
- hmy
- tracers
- js
- internal/tracers
- logger
- native
- internal
- hmyapi
- params
- registry
- node/harmony
- rosetta/services
- rpc/harmony
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
133 files changed
+18890
-5843
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | | - | |
20 | | - | |
| 18 | + | |
| 19 | + | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
| |||
147 | 146 | | |
148 | 147 | | |
149 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
150 | 153 | | |
151 | 154 | | |
152 | 155 | | |
| |||
217 | 220 | | |
218 | 221 | | |
219 | 222 | | |
220 | | - | |
| 223 | + | |
221 | 224 | | |
222 | 225 | | |
223 | 226 | | |
| |||
285 | 288 | | |
286 | 289 | | |
287 | 290 | | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
| |||
300 | 303 | | |
301 | 304 | | |
302 | 305 | | |
| 306 | + | |
303 | 307 | | |
304 | 308 | | |
305 | 309 | | |
| |||
338 | 342 | | |
339 | 343 | | |
340 | 344 | | |
341 | | - | |
| 345 | + | |
342 | 346 | | |
343 | 347 | | |
344 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
87 | | - | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | | - | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| |||
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
202 | | - | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
219 | | - | |
| 220 | + | |
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
| |||
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
307 | | - | |
| 308 | + | |
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
| |||
370 | 371 | | |
371 | 372 | | |
372 | 373 | | |
373 | | - | |
| 374 | + | |
374 | 375 | | |
375 | 376 | | |
376 | 377 | | |
377 | | - | |
378 | | - | |
| 378 | + | |
| 379 | + | |
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
| |||
448 | 449 | | |
449 | 450 | | |
450 | 451 | | |
451 | | - | |
| 452 | + | |
452 | 453 | | |
453 | 454 | | |
454 | 455 | | |
| |||
619 | 620 | | |
620 | 621 | | |
621 | 622 | | |
622 | | - | |
| 623 | + | |
623 | 624 | | |
624 | 625 | | |
625 | 626 | | |
| |||
643 | 644 | | |
644 | 645 | | |
645 | 646 | | |
646 | | - | |
| 647 | + | |
647 | 648 | | |
648 | 649 | | |
649 | 650 | | |
| |||
665 | 666 | | |
666 | 667 | | |
667 | 668 | | |
668 | | - | |
| 669 | + | |
669 | 670 | | |
670 | 671 | | |
671 | 672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
| 481 | + | |
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
| |||
788 | 788 | | |
789 | 789 | | |
790 | 790 | | |
791 | | - | |
| 791 | + | |
792 | 792 | | |
793 | | - | |
| 793 | + | |
794 | 794 | | |
795 | | - | |
| 795 | + | |
796 | 796 | | |
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
800 | 800 | | |
801 | 801 | | |
802 | | - | |
| 802 | + | |
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
0 commit comments