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/new excodehash #2166

Merged
merged 7 commits into from
May 7, 2019
Merged

Feature/new excodehash #2166

merged 7 commits into from
May 7, 2019

Conversation

ithinker1991
Copy link
Contributor

@ithinker1991 ithinker1991 commented Apr 28, 2019

What does this PR do?
save codehash when deploying a contract and query the codehash of contract without codehash firstly

Why are these changes required?
saving codehash can reduce time of getting codehash of a contract

This PR has been tested by:

  • Unit Tests : ExtCodeHashTest.java
  • Manual Testing

Follow up

Extra details
tronprotocol/tips#30

@ithinker1991 ithinker1991 requested a review from llwslc April 28, 2019 09:02
@codecov-io
Copy link

codecov-io commented Apr 28, 2019

Codecov Report

Merging #2166 into develop will increase coverage by <.01%.
The diff coverage is 72.22%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2166      +/-   ##
=============================================
+ Coverage      41.94%   41.94%   +<.01%     
- Complexity      4348     4350       +2     
=============================================
  Files            549      549              
  Lines          33085    33107      +22     
  Branches        3600     3603       +3     
=============================================
+ Hits           13876    13888      +12     
- Misses         17878    17885       +7     
- Partials        1331     1334       +3
Impacted Files Coverage Δ Complexity Δ
...ntime/vm/program/invoke/ProgramInvokeMockImpl.java 17.85% <100%> (+2%) 3 <0> (ø) ⬇️
...in/java/org/tron/core/capsule/ContractCapsule.java 82.35% <100%> (+10.92%) 14 <2> (+2) ⬆️
.../tron/common/runtime/vm/program/ContractState.java 23.68% <25%> (+0.71%) 12 <1> (+1) ⬆️
...va/org/tron/common/runtime/vm/program/Program.java 49.79% <57.14%> (-0.14%) 128 <3> (+1)
...main/java/org/tron/common/storage/DepositImpl.java 55.76% <92.85%> (+1.36%) 76 <7> (+3) ⬆️
...rg/tron/common/net/udp/handler/MessageHandler.java 89.65% <0%> (-10.35%) 7% <0%> (-1%)
...g/tron/common/overlay/discover/DiscoverServer.java 72.88% <0%> (-8.48%) 6% <0%> (-2%)
src/main/java/org/tron/common/utils/ByteArray.java 53.33% <0%> (-3.34%) 15% <0%> (-1%)
...tron/common/overlay/discover/node/NodeManager.java 51.57% <0%> (-0.63%) 23% <0%> (-2%)
... and 2 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 3a124d1...5a5f9c8. Read the comment docs.

Copy link
Contributor

@llwslc llwslc left a comment

Choose a reason for hiding this comment

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

review

@ithinker1991 ithinker1991 merged commit 51df34b into develop May 7, 2019
Sh11thead added a commit that referenced this pull request Aug 15, 2019
5bb3c12 Merge pull request #104 from tronprotocol/feature/v3.6.5_addSolidityCallConstant
0f3a7bc add call constant in soliditynode
f08aa0c create2 new storage-key
78d80b0 remove cancel deferred transaction
5de24f9 Merge branch 'develop' of https://github.com/tronprotocol/java-tron into revertCode
32ceb81 revert deferred transaction
396ab10 Merge pull request #2166 from tronprotocol/feature/new_excodehash
1ce5c31 revert deferred transaction
ce5ca40 add receipt result `TransferException`
4688892 set codeHash when deploying contract or trigger extcodehash firstly
4e1ee46 Merge branch 'develop' into feature/trigger_constant_contract
36472f2 merge clear abi feature
a8485ea add triggerConstantContract
a023449 rebase develop
5f98d2e remove unused line
66f095c revert update deferred transaction
369673b add update deferred transaction
c73885f fix sonar problem
861e3f4 remove hard code
3c3eae5 add http endpoint
16b437e add deferred stage into proto
90b455d Merge branch 'develop' of https://github.com/tronprotocol/java-tron into deferred_transaction
a826388 Merge branch 'master' into fast-sync-use-cpdb
19ce8a2 merge master
1188b28 get deferred transaction by trxId
06f0475 broadcast raw trx id at the first time; add delaySeconds in deferred transaction.
b86c0d6 fix type name error
adbd279 add deferred transaction delay time no more than 45 days
ea77a9f move transaction delay time to raw data
9ad71e9 change delay second to transaction capsule
a6e22c6 add get deffertransaction api
ea11ee5 put cancel deffer transaction into chain
3bb11f1 Merge branch 'develop' of https://github.com/tronprotocol/java-tron into deferred_transaction
b78a760 Merge branch 'develop' into fast-sync-use-cpdb
040c2ca add new rpc interface to cancel deferred transaction
53a6de3 execute deffered transaction
15f3349 remove senderid from tron.proto, use transaction id instead
c4040b1 add deferred store
11160ff use new proposal instead of hard fork to upgrade tvm
315ba55 protobuf for deferred transaction
74b573f Merge pull request #1972 from tronprotocol/feature/add_new_vm_exception
e292a87 add bytecodeexecution exception to transaction
9d70f3f add http api easytranferasset
23bbd1a add rpc api : easyTransferAssert
9da9d5e Merge branch 'develop' into fast-sync-use-cpdb
6b714c6 delete contract
77452f9 Remove redundant contracts
e4a14bd mdf AccountPermissionUpdateActuator
2c408b3 mdf proto change account and permission
c4a2a14 fix conflict
ff66a6e remove seteventfilter/seteventpluginconfig for security issue
b337e3a Merge branch 'develop' into feature/develop_event_subscribe
65e2791 add getApprovedList
fb4bc1a fix conflict
bc3d2ae mdf api.proto, add GetTransactionApprovedList
6a96055 optimize event filter query, add response code
4140e1d update trigger config
88a0a83 add http api for set event filter and event plugin config
26ac24e merge master to develop
73b0c6d fix conflict
0ba3584 fix conflict
7e74329 implement the account state root
3b432b5 fast sync support: 1、command support for fast sync; 2、add GetNodeData and NodeData message; 3、add stateRoot in blockheader, refer to Tron.proto;
62ac79a add broadcastTransaction error type
80e50ae the conflict files when merge master to develop
05c70dd feat(solidity_api): added solidity http&rpc api getAssetIssueByName, getAssetIssueById, getAssetIssueListByName
aa740c5 add ExchangeId into transactionInfo
64f1659 add assetissueid in transactionresule and transactionInfo
44fd7d7 feat(exchange_api): add rpc&http of getexchangebyid and listexchanges on solidity
0d3ab01 Merge remote-tracking branch 'origin/Odyssey_v3.2' into refine_transfer_logic_use_assetmapv2
76fc36e implement msg tokenvalue and msg tokenid
d7bc9f4 Merge branch 'Odyssey_v3.2' of github.com:tronprotocol/java-tron into Odyssey_v3.2
a6f6851 add exchange_inject_another_amount、exchange_withdraw_another_amount
091049e add exchangeReceivedAmount into transactionInfo
bb75fb0 Merge branch 'feature/update_token_v1' of https://github.com/tronprotocol/java-tron into feature/update_token_v1
8bcf9cb add precision in AssetIssueContract
3992ba4 Merge branch 'feature/update_token_v1' of ssh://github.com/tronprotocol/java-tron into feature/update_token_v1
347b3c0 feat(asset_api): getassetissuebyname accept token_id as parameter, added new getassetissuelistbyname api
4dfd5fd Merge pull request #1715 from tronprotocol/feature/delegate_resource_api
afa5071 Merge branch 'feature/update_token_v1' of ssh://github.com/tronprotocol/java-tron into feature/update_token_v1
1a04340 feat(get_asset_api): update get assetxxx api
4b77181 update desc about asset_name in proto
7876c11 add asset_issued_ID
5240789 add asset netusage V2
82bcc2b add AssetUpdateHelper
107e758 add assetV2 into account proto
125b5fe null message
82d1fd2 feat(delegate_resource_solidity): add solidity http and rpc for GetDelegatedResource and GetDelegatedResourceAccountIndex
bfb3485 Merge branch 'Odyssey_v3.2' of https://github.com/tronprotocol/java-tron into Odyssey_v3.2
d043475 add allowAdaptiveEnergy in NodeInfo
0beba85 refine token id type in internal transaction protobuf
bca7b49 merge 3.2 into impl trc10
0906d0f implement transfer token when use triggercontract and createsmartcontract
289d0dd Merge branch 'develop' into multi_sign
7b19bad Merge pull request #1670 from tronprotocol/add_energy_limit
444c587 Change OriginEnergyLimit.
b101120 Merge branch 'energy_limit_fork' into Odyssey_v3.2
60bf9f7 refactor code
2b92ab2 fix conflicts
604b408 add grpc interface
fa51ccd Merge remote-tracking branch 'origin/Odyssey_v3.2' into add_energy_limit
48f4a8a Merge branch 'feature/delegate_resource' into Odyssey_v3.2
05075e4 Merge commit 'dcac7e9c32d6dd503ec4b920033cb22a2b7af171' into add_energy_limit
4b1d41a update UpdateSettingForEnergyLimitContract.
efa6e42 Merge branch 'Odyssey_v3.2' of https://github.com/tronprotocol/java-tron into Odyssey_v3.2
23b8057 add energy limit.
6d1d2af add GetDelegatedResourceAccountIndex
4e72d9a add DelegatedResourceAccountIndex
1e8453d Merge branch 'feature/delegate_resource' of https://github.com/tronprotocol/java-tron into feature/delegate_resource
f1de42c rm to_address in Frozen
ffcc915 Merge remote-tracking branch 'origin/feature/delegate_resource' into feature/delegate_resource
ef55dd2 remove to_address in Freeze and Unfreeze contract
8b78644 add expire_time_for_energy in message DelegatedResource
9e9b709 Merge branch 'develop' into feature/delegate_resource
a221a07 fix merge develop conflicts
84df192 Merge branch 'develop' into feature/delegate_resource
91a8b0e add note and reject info to transactioninfo db
75c2945 Merge branch 'develop' into feature/delegate_resource
a2fc2d6 add note and reject info to transactioninfo db
b1d89b2 refine code
fcb0b84 Merge branch 'develop' into multi_sign
67e5344 add internaltransactioni list to transactionInfo
16827f2 update proto
54951d0 add function named getPaginatedProposalList
d558109 add proto
b5b2f52 feat: add permissionaddkey http api
5c29de8 fix conflict
8e24227 Merge branch 'develop' into feature/delegate_resource
a95c078 merge conflict in Contract
c6c4a96 fix the comment
f25811c add comments for account proto.
2037ab4 Merge commit 'dba3ca75d92c008f66b720a26fd71c7a7364338c' into feature/new_exchange_transaction
2ad7cd1 Merge branch 'develop' into multi_sign
6a6498d alter parent type from bytes to string
5df54b6 update Tron.proto
6161179 update config-test-net.conf
e903b8a fix conflict
a2584d0 modify UnfreezeBalanceActuator
56829d8 modify verification in UnfreezeBalanceActuator
1633bbb add acquired_delegated Field
143410a modify freezeBalanceActuator
99a0164 add DelegatedResource related
6ab5423 minor change for protocol
1787add change protocol
8c97e3c Merge commit 'fd8f26942698302f212324b5f6da9212ab1f7016' into feature/delegate_resource
7154e05 Merge commit '0fb2ac261e3d5adecaef83fdb10dd438a1b7d456' into feature/delegate_resource

git-subtree-dir: src/main/protos
git-subtree-split: 5bb3c12
@shydesky shydesky deleted the feature/new_excodehash branch November 13, 2019 10:36
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.

4 participants