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

Feature/triggerConstantContract & clearContractABI #2125

Merged
merged 54 commits into from Apr 16, 2019

Conversation

@llwslc
Copy link
Member

commented Apr 12, 2019

What does this PR do?

  1. To provide a new interface, which bypass ABI checking and triggers the constant contracts at the evm layer.
  2. To provide a new interface, which clear contract ABI.

Why are these changes required?

  1. Developers need to bypass the ABI checking and trigger the constant contract directly.
  2. Developers can delete ABI of existing contracts.

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details
tronprotocol/TIPs#31
tronprotocol/TIPs#32

ithinker1991 and others added some commits Mar 11, 2019

ithinker1991 and others added some commits Mar 25, 2019

refactor constant check
1. Use variable `isStaticCall` instead of `isRootCallConstant` in class `Program`
2. Remove useless constant-check of tx from P2P
Merge branch 'develop' into feature/trigger_constant_contract
# Conflicts:
#	src/main/java/org/tron/common/runtime/config/VMConfig.java
#	src/main/java/org/tron/common/runtime/vm/DataWord.java
#	src/main/java/org/tron/common/runtime/vm/OpCode.java
#	src/main/java/org/tron/core/Wallet.java
#	src/main/java/org/tron/core/actuator/ProposalCreateActuator.java
#	src/main/java/org/tron/core/config/Parameter.java
#	src/main/java/org/tron/core/db/DynamicPropertiesStore.java
#	src/main/java/org/tron/core/db/TransactionTrace.java
#	src/main/java/org/tron/core/witness/ProposalController.java
#	src/main/protos/core/Tron.proto
#	src/test/java/org/tron/common/runtime/vm/DataWordTest.java
#	src/test/java/org/tron/core/actuator/ProposalCreateActuatorTest.java
#	src/test/java/stest/tron/wallet/common/client/utils/AbiUtil.java
@codecov-io

This comment has been minimized.

Copy link

commented Apr 12, 2019

Codecov Report

Merging #2125 into develop will increase coverage by 0.31%.
The diff coverage is 38.62%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2125      +/-   ##
=============================================
+ Coverage      42.28%   42.59%   +0.31%     
- Complexity      4245     4317      +72     
=============================================
  Files            536      539       +3     
  Lines          32172    32419     +247     
  Branches        3512     3532      +20     
=============================================
+ Hits           13603    13810     +207     
- Misses         17273    17290      +17     
- Partials        1296     1319      +23
Impacted Files Coverage Δ Complexity Δ
...java/org/tron/core/capsule/TransactionCapsule.java 19.32% <0%> (-0.92%) 26 <0> (-2)
...ain/java/org/tron/core/services/RpcApiService.java 5.54% <0%> (+0.28%) 8 <0> (+1) ⬆️
...org/tron/core/actuator/ProposalCreateActuator.java 35.71% <0%> (-0.29%) 23 <0> (+1)
src/main/java/org/tron/core/db/Manager.java 42.15% <0%> (-0.04%) 122 <0> (-1)
...c/main/java/org/tron/core/db/TransactionTrace.java 44.64% <0%> (-4.38%) 18 <0> (ø)
...ron/core/services/http/FullNodeHttpApiService.java 3.19% <0%> (-0.07%) 2 <0> (ø)
...g/tron/common/runtime/vm/PrecompiledContracts.java 7.19% <0%> (+0.01%) 2 <0> (ø) ⬇️
...java/org/tron/core/witness/ProposalController.java 44.53% <0%> (-0.77%) 14 <0> (ø)
...n/java/org/tron/core/actuator/ActuatorFactory.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...in/java/org/tron/core/capsule/ContractCapsule.java 71.42% <100%> (-4.33%) 12 <1> (+1)
... and 45 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44ae0ab...e731b68. Read the comment docs.

ithinker1991 and others added some commits Apr 15, 2019

Merge branch 'develop' into feature/trigger_constant_contract
# Conflicts:
#	src/main/java/org/tron/core/Wallet.java
#	src/main/java/org/tron/core/actuator/ProposalCreateActuator.java
#	src/main/java/org/tron/core/config/Parameter.java
@ithinker1991
Copy link
Contributor

left a comment

LGTM

@ithinker1991 ithinker1991 merged commit b1cbad5 into develop Apr 16, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@jeancky

This comment has been minimized.

Copy link
Contributor

commented May 24, 2019

refer to #2242

@llwslc llwslc changed the title Feature/trigger constant contract Feature/triggerConstantContract & clearContractABI May 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.