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

hthuang - Chainlink Migration verification #38

Open
hthuang996 opened this issue Nov 5, 2021 · 12 comments · Fixed by #52
Open

hthuang - Chainlink Migration verification #38

hthuang996 opened this issue Nov 5, 2021 · 12 comments · Fixed by #52

Comments

@hthuang996
Copy link

hthuang996 commented Nov 5, 2021

Project Name:
Chainlink

Project repository:
https://github.com/smartcontractkit/chainlink

Development tools/resources used:
Remix,Truffle,MetaMask,Ethereum Web3.js, Yarn, Go

Scheduled completion date:
November 20, 2021

The expected content of delivery:
Document guides for Chainlink migration and code of Chainlink

Contact info:
https://t.me/hthuang996

LAT address (PlatON main network LAT account address for receiving rewards):
lat10tr4txfk8jvgme4g0hhey94w8nn8kkv68t9f6v

@hthuang996
Copy link
Author

[issue 1] Install platon-truffle failed
step 1: install nvm
step 2: install node 12.18 with command "nvm install 12.18"
step 3: install platon-truffle with command "npm install -g [email protected]"
Error:
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
/root/.nvm/versions/node/v12.18.4/bin/platon-truffle -> /root/.nvm/versions/node/v12.18.4/lib/node_modules/platon-truffle/build/cli.bundled.js

[email protected] postinstall /root/.nvm/versions/node/v12.18.4/lib/node_modules/platon-truffle
node ./scripts/postinstall.js

sh: 1: node: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] postinstall: node ./scripts/postinstall.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-11-18T09_00_56_335Z-debug.log

@dugusanfeng
Copy link

Please try it with a lower version of node, such as 10.18.1

@hthuang996
Copy link
Author

I feel there are no more issues with the contract migration, but there are still a lot of issues with the non-contract parts, including the use of infrastructure such as Remix, Hardhat, and SDK.

@hthuang996
Copy link
Author

Chainlink's node application uses Go-Ethereum, and when I completely replaced it with PlatON-Go, it didn't compile properly due to the following issues
1.Address
Ethereum uses EIP55 and PlatON uses Bech32, which is difficult to deal with and requires familiarity with the address principle.

2.The lack of code
Compared to Ethereum, PlatON removed some code, such as dynamic_fee_tx.go, access_list_tx.go, legacy_tx.go, these files could not be found. Also missing are functions and data structures such as ConvertType, MetaData, EncryptDataV3, and many others.

3.Data structure changes
GasFeeCap and GasTipCap fields are missing in CallMsg.
CryptoJSON was changed to cryptoJSON, causing external import to fail.
Ethereum's TxData is an interface, which PlatON does not have. Instead, it defines a structure named txdata. There is no func NewTx(inner TxData) *Transaction function.

I also found that a lot of code was not deleted, but was commented, I don't know why.

@biganxin
Copy link
Collaborator

Any incompatibility issues with the underlying tools can be raised.
Then try to fix these infrastructure issues and adapt them to PlatON|Alaya, and submit the fixed code along with the documentation. The more deliverables you have and the more usable they are, the more you will be rewarded.

@biganxin
Copy link
Collaborator

these questions make sense, please add the question tag [issue+N]
I can get someone to assist you in confirming and fixing them

@biganxin
Copy link
Collaborator

Please try it with a lower version of node, such as 10.18.1

[issue 1] Install platon-truffle failed step 1: install nvm step 2: install node 12.18 with command "nvm install 12.18" step 3: install platon-truffle with command "npm install -g [email protected]" Error: npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) /root/.nvm/versions/node/v12.18.4/bin/platon-truffle -> /root/.nvm/versions/node/v12.18.4/lib/node_modules/platon-truffle/build/cli.bundled.js

[email protected] postinstall /root/.nvm/versions/node/v12.18.4/lib/node_modules/platon-truffle
node ./scripts/postinstall.js

sh: 1: node: Permission denied npm ERR! code ELIFECYCLE npm ERR! syscall spawn npm ERR! file sh npm ERR! errno ENOENT npm ERR! [email protected] postinstall: node ./scripts/postinstall.js npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the [email protected] postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-11-18T09_00_56_335Z-debug.log

@hthuang996 [issue1] Is this problem solved?

@cheng762
Copy link

Chainlink's node application uses Go-Ethereum, and when I completely replaced it with PlatON-Go, it didn't compile properly due to the following issues 1.Address Ethereum uses EIP55 and PlatON uses Bech32, which is difficult to deal with and requires familiarity with the address principle.

2.The lack of code Compared to Ethereum, PlatON removed some code, such as dynamic_fee_tx.go, access_list_tx.go, legacy_tx.go, these files could not be found. Also missing are functions and data structures such as ConvertType, MetaData, EncryptDataV3, and many others.

3.Data structure changes GasFeeCap and GasTipCap fields are missing in CallMsg. CryptoJSON was changed to cryptoJSON, causing external import to fail. Ethereum's TxData is an interface, which PlatON does not have. Instead, it defines a structure named txdata. There is no func NewTx(inner TxData) *Transaction function.

I also found that a lot of code was not deleted, but was commented, I don't know why.

for question 1, we use bech32 in our address, relevant instructions are here .for specific usage, please refer to here.

for question2 and 3,These are the new features of Ethereum, PlatON not support yet, and we will consider supporting them in the future.

@hthuang996
Copy link
Author

Please try it with a lower version of node, such as 10.18.1

[issue 1] Install platon-truffle failed step 1: install nvm step 2: install node 12.18 with command "nvm install 12.18" step 3: install platon-truffle with command "npm install -g [email protected]" Error: npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) /root/.nvm/versions/node/v12.18.4/bin/platon-truffle -> /root/.nvm/versions/node/v12.18.4/lib/node_modules/platon-truffle/build/cli.bundled.js

[email protected] postinstall /root/.nvm/versions/node/v12.18.4/lib/node_modules/platon-truffle
node ./scripts/postinstall.js

sh: 1: node: Permission denied npm ERR! code ELIFECYCLE npm ERR! syscall spawn npm ERR! file sh npm ERR! errno ENOENT npm ERR! [email protected] postinstall: node ./scripts/postinstall.js npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the [email protected] postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-11-18T09_00_56_335Z-debug.log

@hthuang996 [issue1] Is this problem solved?

Solved, execute command:
npm config set unsafe-perm true

@hthuang996
Copy link
Author

[Issue 2]The lack of code
Compared to Ethereum, PlatON removed some code, such as dynamic_fee_tx.go, access_list_tx.go, legacy_tx.go, these files could not be found. Also missing are functions and data structures such as ConvertType, MetaData, EncryptDataV3, and many others.

@hthuang996
Copy link
Author

[Issue 3]Data structure changes
GasFeeCap and GasTipCap fields are missing in CallMsg.
CryptoJSON was changed to cryptoJSON, causing external import to fail.
Ethereum's TxData is an interface, which PlatON does not have. Instead, it defines a structure named txdata. There is no func NewTx(inner TxData) *Transaction function.

biganxin added a commit that referenced this issue Nov 29, 2021
hthuang - Chainlink Migration verification #38
@biganxin biganxin linked a pull request Nov 29, 2021 that will close this issue
@biganxin
Copy link
Collaborator

biganxin commented Feb 15, 2022

Project migration delivery(2000U)and issue feedback(600U) rewards have been issued (2021.12.29 Base Price 0.12)

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 a pull request may close this issue.

4 participants