-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
add TRON integration #14783
base: develop
Are you sure you want to change the base?
add TRON integration #14783
Conversation
} | ||
|
||
func newFrom(reader io.Reader) (Key, error) { | ||
privKeyECDSA, err := ecdsa.GenerateKey(curve, reader) |
Check failure
Code scanning / CodeQL
Use of insufficient randomness as the key of a cryptographic algorithm High
random number
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 8 hours ago
To fix the problem, we need to ensure that the MustNewInsecure
function and any other functions that might use insecure randomness are clearly marked and restricted to testing environments. Additionally, we should provide a secure alternative for production use.
- Update the
MustNewInsecure
function to make it clear that it should only be used in testing. - Ensure that the
New
function uses a cryptographically secure random number generator. - Add comments and documentation to highlight the intended use of these functions.
-
Copy modified lines R52-R54
@@ -51,4 +51,5 @@ | ||
|
||
// MustNewInsecure return Key if no error | ||
// This insecure function is used for testing purposes only | ||
// MustNewInsecure returns Key if no error | ||
// This insecure function is used for testing purposes only. | ||
// It should never be used in production code. | ||
func MustNewInsecure(reader io.Reader) Key { |
-
Copy modified line R137
@@ -136,3 +136,3 @@ | ||
DefaultAptosKey = aptoskey.MustNewInsecure(keystest.NewRandReaderFromSeed(KeyBigIntSeed)) | ||
DefaultTronKey = tronkey.MustNewInsecure(keystest.NewRandReaderFromSeed(KeyBigIntSeed)) | ||
DefaultTronKey = tronkey.MustNewInsecure(keystest.NewRandReaderFromSeed(KeyBigIntSeed)) // For testing purposes only | ||
DefaultVRFKey = vrfkey.MustNewV2XXXTestingOnly(big.NewInt(KeyBigIntSeed)) |
782a261
to
ac8eace
Compare
AER Report: CI Coreaer_workflow , commit , Detect Changes , Clean Go Tidy & Generate , Core Tests (go_core_tests) , Core Tests (go_core_ccip_deployment_tests) , Core Tests (go_core_race_tests) , Core Tests (go_core_fuzz) , lint , SonarQube Scan 1. Struct field naming issue: Golang LintSource of Error:core/services/chainlink/relayer_chain_interoperators_test.go:224:3: var-naming: struct field expectedTronRelayerIds should be expectedTronRelayerIDs (revive)
expectedTronRelayerIds []types.RelayID
^ Suggested fix: Rename the struct field from 2. Uncommitted changes after generate: Ensure clean after generateSource of Error:Ensure clean after generate 2024-10-17T21:26:24.7408132Z core/services/chainlink/mocks/general_config.go | 54 ++++
Ensure clean after generate 2024-10-17T21:26:24.7409148Z core/services/keystore/mocks/master.go | 27 ++
Ensure clean after generate 2024-10-17T21:26:24.7410460Z core/services/keystore/mocks/tron.go | 362 +++++++++++++++++++-----
Ensure clean after generate 2024-10-17T21:26:24.7411409Z 3 files changed, 371 insertions(+), 72 deletions(-)
Ensure clean after generate 2024-10-17T21:26:24.9829369Z ##[error]Process completed with exit code 1. Suggested fix: Commit the changes made by the generate command to the repository. 3. Invalid configuration: Core Tests (go_core_tests)Source of Error:Print Filtered Test Results 2024-10-17T21:32:03.9988996Z Error running app: invalid configuration: 4 errors:
Print Filtered Test Results 2024-10-17T21:32:03.9989177Z - EVM: 4 errors:
Print Filtered Test Results 2024-10-17T21:32:03.9989595Z - 1.ChainID: invalid value (1): duplicate - must be unique
Print Filtered Test Results 2024-10-17T21:32:03.9990058Z - 1.Nodes.1.Name: invalid value (fake): duplicate - must be unique
Print Filtered Test Results 2024-10-17T21:32:03.9990604Z - 1.Nodes.1.WSURL: invalid value (wss://foo.bar/ws): duplicate - must be unique
Print Filtered Test Results 2024-10-17T21:32:03.9991176Z - 1.Nodes.1.HTTPURL: invalid value (https://foo.bar): duplicate - must be unique
Print Filtered Test Results 2024-10-17T21:32:03.9991375Z - Cosmos: 3 errors:
Print Filtered Test Results 2024-10-17T21:32:03.9991842Z - 1.ChainID: invalid value (Malaga-420): duplicate - must be unique
Print Filtered Test Results 2024-10-17T21:32:03.9992326Z - 1.Nodes.1.Name: invalid value (primary): duplicate - must be unique
Print Filtered Test Results 2024-10-17T21:32:03.9992954Z - 1.Nodes.1.TendermintURL: invalid value (http://tender.mint): duplicate - must be unique
Print Filtered Test Results 2024-10-17T21:32:03.9993150Z - Solana: 3 errors:
Print Filtered Test Results 2024-10-17T21:32:03.9993599Z - 1.ChainID: invalid value (mainnet): duplicate - must be unique
Print Filtered Test Results 2024-10-17T21:32:03.9994076Z - 1.Nodes.1.Name: invalid value (primary): duplicate - must be unique
Print Filtered Test Results 2024-10-17T21:32:03.9994628Z - 1.Nodes.1.URL: invalid value (http://solana.web): duplicate - must be unique
Print Filtered Test Results 2024-10-17T21:32:03.9994844Z - Starknet: 3 errors:
Print Filtered Test Results 2024-10-17T21:32:03.9995279Z - 1.ChainID: invalid value (foobar): duplicate - must be unique
Print Filtered Test Results 2024-10-17T21:32:03.9995882Z - 1.Nodes.1.Name: invalid value (primary): duplicate - must be unique
Print Filtered Test Results 2024-10-17T21:32:03.9996424Z - 1.Nodes.1.URL: invalid value (http://stark.node): duplicate - must be unique
Print Filtered Test Results 2024-10-17T21:32:03.9996600Z [exit status 1] Suggested fix: Ensure that all ChainID, Node names, and URLs in the configuration are unique. 4. Reflect slice index out of range: TestAuditLoggerConfigSource of Error:Print Filtered Test Results 2024-10-17T21:32:04.0016132Z ^[[0;31mpanic: reflect: slice index out of range [recovered] ^[[0m
Print Filtered Test Results 2024-10-17T21:32:04.0016327Z panic: reflect: slice index out of range
Print Filtered Test Results 2024-10-17T21:32:04.0016474Z goroutine 349 [running]:
Print Filtered Test Results 2024-10-17T21:32:04.0016695Z testing.tRunner.func1.2({0x3398100, 0x46f9750})
Print Filtered Test Results 2024-10-17T21:32:04.0017027Z /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1631 +0x24a
Print Filtered Test Results 2024-10-17T21:32:04.0017166Z testing.tRunner.func1()
Print Filtered Test Results 2024-10-17T21:32:04.0017487Z /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1634 +0x377
Print Filtered Test Results 2024-10-17T21:32:04.0017646Z panic({0x3398100?, 0x46f9750?})
Print Filtered Test Results 2024-10-17T21:32:04.0017948Z /opt/hostedtoolcache/go/1.22.8/x64/src/runtime/panic.go:770 +0x132
Print Filtered Test Results 2024-10-17T21:32:04.0018290Z reflect.Value.Index({0x33daea0?, 0xc000dd5f48?, 0xc00151cff8?}, 0x3508040?)
Print Filtered Test Results 2024-10-17T21:32:04.0018750Z /opt/hostedtoolcache/go/1.22.8/x64/src/reflect/value.go:1430 +0x167
Print Filtered Test Results 2024-10-17T21:32:04.0019604Z github.com/pelletier/go-toml/v2.(*decoder).handleArrayTableCollection(0xc001f4e500, {0x1, 0xc00151cff8}, {0x33daea0?, 0xc000dd5f48?, 0xc000074908?})
Print Filtered Test Results 2024-10-17T21:32:04.0020118Z /home/runner/go/pkg/mod/github.com/pelletier/go-toml/v2@v2.2.2/unmarshaler.go:423 +0x309
Print Filtered Test Results 2024-10-17T21:32:04.0020969Z github.com/pelletier/go-toml/v2.(*decoder).handleKeyPart(0xc001f4e500, {0x1, 0xc00151cff8}, {0x37eb5c0?, 0xc000dd5808?, 0xbf3005?}, 0xc000074a58, 0x43a2cd8)
Print Filtered Test Results 2024-10-17T21:32:04.0021468Z /home/runner/go/pkg/mod/github.com/pelletier/go-toml/v2@v2.2.2/unmarshaler.go:533 +0x78e
Print Filtered Test Results 2024-10-17T21:32:04.0022257Z github.com/pelletier/go-toml/v2.(*decoder).handleArrayTablePart(0xc00151cfc0?, {0x1, 0xc00151cff8}, {0x37eb5c0?, 0xc000dd5808?, 0xc001f4e500?})
Print Filtered Test Results 2024-10-17T21:32:04.0022750Z /home/runner/go/pkg/mod/github.com/pelletier/go-toml/v2@v2.2.2/unmarshaler.go:574 +0x66
Print Filtered Test Results 2024-10-17T21:32:04.0023478Z github.com/pelletier/go-toml/v2.(*decoder).handleArrayTable(0xc001f4e540?, {0x1, 0xc00151cff8}, {0x37eb5c0?, 0xc000dd5808?, 0x3011?})
Print Filtered Test Results 2024-10-17T21:32:04.0024079Z /home/runner/go/pkg/mod/github.com/pelletier/go-toml/v2@v2.2.2/unmarshaler.go:319 +0x65
Print Filtered Test Results 2024-10-17T21:32:04.0024814Z github.com/pelletier/go-toml/v2.(*decoder).handleRootExpression(0xc001f4e500, 0xc00151cfc0, {0x37eb5c0?, 0xc000dd5808?, 0x49bd36?})
Print Filtered Test Results 2024-10-17T21:32:04.0025307Z /home/runner/go/pkg/mod/github.com/pelletier/go-toml/v2@v2.2.2/unmarshaler.go:301 +0x156
Print Filtered Test Results 2024-10-17T21:32:04.0025906Z github.com/pelletier/go-toml/v2.(*decoder).fromParser(0xc001f4e500, {0x37eb5c0?, 0xc000dd5808?, 0xe6ec18?})
Print Filtered Test Results 2024-10-17T21:32:04.0026378Z /home/runner/go/pkg/mod/github.com/pelletier/go-toml/v2@v2.2.2/unmarshaler.go:257 +0xa5
Print Filtered Test Results 2024-10-17T21:32:04.0026922Z github.com/pelletier/go-toml/v2.(*decoder).FromParser(0xc001f4e500, {0x37467e0?, 0xc000dd5808?})
Print Filtered Test Results 2024-10-17T21:32:04.0027424Z /home/runner/go/pkg/mod/github.com/pelletier/go-toml/v2@v2.2.2/unmarshaler.go:242 +0x17d
Print Filtered Test Results 2024-10-17T21:32:04.0027922Z github.com/pelletier/go-toml/v2.(*Decoder).Decode(0xc000e6ecd0, {0x37467e0, 0xc000dd5808})
Print Filtered Test Results 2024-10-17T21:32:04.0028408Z /home/runner/go/pkg/mod/github.com/pelletier/go-toml/v2@v2.2.2/unmarshaler.go:135 +0x14f
Print Filtered Test Results 2024-10-17T21:32:04.0029122Z github.com/smartcontractkit/chainlink-common/pkg/config.DecodeTOML({0x4703aa0?, 0xc001fd3a40?}, {0x37467e0?, 0xc000dd5808?})
Print Filtered Test Results 2024-10-17T21:32:04.0029897Z /home/runner/go/pkg/mod/github.com/smartcontractkit/chainlink-common@v0.3.1-0.20241017135127-b283b1e14fa6/pkg/config/toml.go:14 +0x67
Print Filtered Test Results 2024-10-17T21:32:04.0030611Z github.com/smartcontractkit/chainlink/v2/core/services/chainlink.(*GeneralConfigOpts).parseConfig(0xc000dd5008, {0x3b24e20, 0x3045})
Print Filtered Test Results 2024-10-17T21:32:04.0031068Z /home/runner/work/chainlink/chainlink/core/services/chainlink/config_general.go:100 +0xcd
Print Filtered Test Results 2024-10-17T21:32:04.0031631Z github.com/smartcontractkit/chainlink/v2/core/services/chainlink.(*GeneralConfigOpts).parse(0xc000dd5008)
Print Filtered Test Results 2024-10-17T21:32:04.0032094Z /home/runner/work/chainlink/chainlink/core/services/chainlink/config_general.go:179 +0x9c
Print Filtered Test Results 2024-10-17T21:32:04.0032992Z github.com/smartcontractkit/chainlink/v2/core/services/chainlink.GeneralConfigOpts.New({{0xc001506250, 0x1, 0x1}, {0x0, 0x0, 0x0}, {{{0x0, 0x0, 0x0, 0x0, ...}, ...}, ...}, ...})
Print Filtered Test Results 2024-10-17T21:32:04.0033456Z /home/runner/work/chainlink/chainlink/core/services/chainlink/config_general.go:128 +0xae
Print Filtered Test Results 2024-10-17T21:32:04.0033998Z github.com/smartcontractkit/chainlink/v2/core/services/chainlink.TestAuditLoggerConfig(0xc0014e01a0)
Print Filtered Test Results 2024-10-17T21:32:04.0034519Z /home/runner/work/chainlink/chainlink/core/services/chainlink/config_audit_logger_test.go:13 +0xc5
Print Filtered Test Results 2024-10-17T21:32:04.0034708Z testing.tRunner(0xc0014e01a0, 0x43a1ed0)
Print Filtered Test Results 2024-10-17T21:32:04.0035024Z /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1689 +0xfb
Print Filtered Test Results 2024-10-17T21:32:04.0035219Z created by testing.(*T).Run in goroutine 1
Print Filtered Test Results 2024-10-17T21:32:04.0035667Z /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1742 +0x390 Suggested fix: Ensure that the slice being accessed has the expected length before attempting to access its elements. 5. Nil pointer dereference: TestKeyRing_Encrypt_DecryptSource of Error:Print Filtered Test Results 2024-10-17T21:32:04.0217725Z ^[[0;31mpanic: runtime error: invalid memory address or nil pointer dereference [recovered] ^[[0m
Print Filtered Test Results 2024-10-17T21:32:04.0218189Z panic: runtime error: invalid memory address or nil pointer dereference
Print Filtered Test Results 2024-10-17T21:32:04.0218763Z ^[[0;31m[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x148ba33] ^[[0m
Print Filtered Test Results 2024-10-17T21:32:04.0218946Z gor
</cicore>
<operatoruici>
## AER Report: [Operator UI CI](https://github.com/smartcontractkit/chainlink/actions/runs/11437170378) ran successfully :white_check_mark:
[aer_workflow](https://github.com/smartcontractkit/chainlink/actions/runs/11437194463/job/31816207307) , [commit](https://github.com/smartcontractkit/chainlink/commit/c8c8a8776ebb052bf473168f9b2b13b69034d9a3)
</operatoruici> |
AER Report: CI Coreaer_workflow , commit , Detect Changes , Clean Go Tidy & Generate , Scheduled Run Frequency , Flakeguard Root Project / Get Tests To Run , GolangCI Lint (.) , GolangCI Lint (deployment) , Core Tests (go_core_tests) , Core Tests (go_core_tests_integration) , Core Tests (go_core_ccip_deployment_tests) , Core Tests (go_core_fuzz) , Core Tests (go_core_race_tests) , test-scripts , Flakeguard Deployment Project / Get Tests To Run , Flakeguard Deployment Project / Run Tests , Flakeguard Deployment Project / Report , Flakeguard Root Project / Run Tests , Flakeguard Root Project / Report , lint , SonarQube Scan , Flakey Test Detection 1. Missing method for field "tronKeys" in resolver: [go_core_tests_integration]Source of Error:Run tests 2024-12-23T06:18:59.6560403Z panic: *resolver.Resolver does not resolve "Query": missing method for field "tronKeys" [recovered]
Run tests 2024-12-23T06:18:59.6561330Z panic: *resolver.Resolver does not resolve "Query": missing method for field "tronKeys"
Run tests 2024-12-23T06:18:59.6561798Z
Run tests 2024-12-23T06:18:59.6561988Z goroutine 396 [running]:
Run tests 2024-12-23T06:18:59.6562611Z testing.tRunner.func1.2({0x5ec5f60, 0xc0022e2790})
Run tests 2024-12-23T06:18:59.6563321Z /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1632 +0x230
Run tests 2024-12-23T06:18:59.6563953Z testing.tRunner.func1()
Run tests 2024-12-23T06:18:59.6564516Z /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1635 +0x35e
Run tests 2024-12-23T06:18:59.6565519Z panic({0x5ec5f60?, 0xc0022e2790?})
Run tests 2024-12-23T06:18:59.6566143Z /opt/hostedtoolcache/go/1.23.4/x64/src/runtime/panic.go:785 +0x132
Run tests 2024-12-23T06:18:59.6566872Z github.com/graph-gophers/graphql-go.MustParseSchema(...)
Run tests 2024-12-23T06:18:59.6567626Z /home/runner/go/pkg/mod/github.com/graph-gophers/graphql-go@v1.5.0/graphql.go:67
Run tests 2024-12-23T06:18:59.6568445Z github.com/smartcontractkit/chainlink/v2/core/web.graphqlHandler({0x76f8e90, 0xc001e7f380})
Run tests 2024-12-23T06:18:59.6569300Z /home/runner/work/chainlink/chainlink/core/web/router.go:118 +0x1ea Why: The GraphQL resolver does not have a method to resolve the "tronKeys" field in the "Query" type, causing a panic during test execution. Suggested fix: Implement the missing "tronKeys" method in the GraphQL resolver to handle the "Query" type properly. 2. Missing method for field "tronKeys" in resolver: [go_core_tests]Source of Error:Run tests 2024-12-23T06:24:16.1490533Z panic: *resolver.Resolver does not resolve "Query": missing method for field "tronKeys" [recovered]
Run tests 2024-12-23T06:24:16.1491192Z panic: *resolver.Resolver does not resolve "Query": missing method for field "tronKeys"
Run tests 2024-12-23T06:24:16.1491513Z
Run tests 2024-12-23T06:24:16.1491636Z goroutine 379 [running]:
Run tests 2024-12-23T06:24:16.1491969Z testing.tRunner.func1.2({0x422c920, 0xc0019c64a0})
Run tests 2024-12-23T06:24:16.1492446Z /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1632 +0x230
Run tests 2024-12-23T06:24:16.1492822Z testing.tRunner.func1()
Run tests 2024-12-23T06:24:16.1493214Z /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1635 +0x35e
Run tests 2024-12-23T06:24:16.1494011Z panic({0x422c920?, 0xc0019c64a0?})
Run tests 2024-12-23T06:24:16.1494452Z /opt/hostedtoolcache/go/1.23.4/x64/src/runtime/panic.go:785 +0x132
Run tests 2024-12-23T06:24:16.1494944Z github.com/graph-gophers/graphql-go.MustParseSchema(...)
Run tests 2024-12-23T06:24:16.1495491Z /home/runner/go/pkg/mod/github.com/graph-gophers/graphql-go@v1.5.0/graphql.go:67
Run tests 2024-12-23T06:24:16.1496188Z github.com/smartcontractkit/chainlink/v2/core/web.graphqlHandler({0x599d0b0, 0xc001c8d380})
Run tests 2024-12-23T06:24:16.1496812Z /home/runner/work/chainlink/chainlink/core/web/router.go:118 +0x1ea Why: The GraphQL resolver does not have a method to resolve the "tronKeys" field in the "Query" type, causing a panic during test execution. Suggested fix: Implement the missing "tronKeys" method in the GraphQL resolver to handle the "Query" type properly. 3. Missing method for field "tronKeys" in resolver: [go_core_tests]Source of Error:Run tests 2024-12-23T06:24:16.1542842Z panic: *resolver.Resolver does not resolve "Query": missing method for field "tronKeys" [recovered]
Run tests 2024-12-23T06:24:16.1543510Z panic: *resolver.Resolver does not resolve "Query": missing method for field "tronKeys"
Run tests 2024-12-23T06:24:16.1543833Z
Run tests 2024-12-23T06:24:16.1543951Z goroutine 373 [running]:
Run tests 2024-12-23T06:24:16.1544280Z testing.tRunner.func1.2({0x42cb880, 0xc001968b90})
Run tests 2024-12-23T06:24:16.1544756Z /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1632 +0x230
Run tests 2024-12-23T06:24:16.1545131Z testing.tRunner.func1()
Run tests 2024-12-23T06:24:16.1545519Z /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1635 +0x35e
Run tests 2024-12-23T06:24:16.1545917Z panic({0x42cb880?, 0xc001968b90?})
Run tests 2024-12-23T06:24:16.1546322Z /opt/hostedtoolcache/go/1.23.4/x64/src/runtime/panic.go:785 +0x132
Run tests 2024-12-23T06:24:16.1546811Z github.com/graph-gophers/graphql-go.MustParseSchema(...)
Run tests 2024-12-23T06:24:16.1547356Z /home/runner/go/pkg/mod/github.com/graph-gophers/graphql-go@v1.5.0/graphql.go:67
Run tests 2024-12-23T06:24:16.1548044Z github.com/smartcontractkit/chainlink/v2/core/web.graphqlHandler({0x5ad8d50, 0xc0018aeea0})
Run tests 2024-12-23T06:24:16.1548662Z /home/runner/work/chainlink/chainlink/core/web/router.go:118 +0x1ea Why: The GraphQL resolver does not have a method to resolve the "tronKeys" field in the "Query" type, causing a panic during test execution. Suggested fix: Implement the missing "tronKeys" method in the GraphQL resolver to handle the "Query" type properly. 4. Missing method for field "tronKeys" in resolver: [go_core_tests]Source of Error:Run tests 2024-12-23T06:24:16.1590708Z panic: *resolver.Resolver does not resolve "Query": missing method for field "tronKeys" [recovered]
Run tests 2024-12-23T06:24:16.1591448Z panic: *resolver.Resolver does not resolve "Query": missing method for field "tronKeys"
Run tests 2024-12-23T06:24:16.1591764Z
Run tests 2024-12-23T06:24:16.1591879Z goroutine 413 [running]:
Run tests 2024-12-23T06:24:16.1592211Z testing.tRunner.func1.2({0x42ccde0, 0xc0012cab80})
Run tests 2024-12-23T06:24:16.1592682Z /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1632 +0x230
Run tests 2024-12-23T06:24:16.1593069Z testing.tRunner.func1()
Run tests 2024-12-23T06:24:16.1593465Z /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1635 +0x35e
Run tests 2024-12-23T06:24:16.1593872Z panic({0x42ccde0?, 0xc0012cab80?})
Run tests 2024-12-23T06:24:16.1594280Z /opt/hostedtoolcache/go/1.23.4/x64/src/runtime/panic.go:785 +0x132
Run tests 2024-12-23T06:24:16.1594761Z github.com/graph-gophers/graphql-go.MustParseSchema(...)
Run tests 2024-12-23T06:24:16.1595317Z /home/runner/go/pkg/mod/github.com/graph-gophers/graphql-go@v1.5.0/graphql.go:67
Run tests 2024-12-23T06:24:16.1596010Z github.com/smartcontractkit/chainlink/v2/core/web.graphqlHandler({0x5ace090, 0xc00283d520})
Run tests 2024-12-23T06:24:16.1596629Z /home/runner/work/chainlink/chainlink/core/web/router.go:118 +0x1ea Why: The GraphQL resolver does not have a method to resolve the "tronKeys" field in the "Query" type, causing a panic during test execution. Suggested fix: Implement the missing "tronKeys" method in the GraphQL resolver to handle the "Query" type properly. 5. Missing method for field "tronKeys" in resolver: [go_core_tests]Source of Error:Run tests 2024-12-23T06:24:16.1636127Z panic: *resolver.Resolver does not resolve "Query": missing method for field "tronKeys" [recovered]
Run tests 2024-12-23T06:24:16.1636787Z panic: *resolver.Resolver does not resolve "Query": missing method for field "tronKeys"
Run tests 2024-12-23T06:24:16.1637103Z
Run tests 2024-12-23T06:24:16.1637220Z goroutine 386 [running]:
Run tests 2024-12-23T06:24:16.1637703Z testing.tRunner.func1.2({0x42d3b00, 0xc001da7180})
Run tests 2024-12-23T06:24:16.1638183Z /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1632 +0x230
Run tests 2024-12-23T06:24:16.1638565Z testing.tRunner.func1()
Run tests 2024-12-23T06:24:16.1638965Z /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1635 +0x35e
Run tests 2024-12-23T06:24:16.1639374Z panic({0x42d3b00?, 0xc001da7180?})
Run tests 2024-12-23T06:24:16.1639782Z /opt/hostedtoolcache/go/1.23.4/x64/src/runtime/panic.go:785 +0x132
Run tests 2024-12-23T06:24:16.1640276Z github.com/graph-gophers/graphql-go.MustParseSchema(...)
Run tests 2024-12-23T06:24:16.1640900Z /home/runner/go/pkg/mod/github.com/graph-gophers/graphql-go@v1.5.0/graphql.go:67
Run tests 2024-12-23T06:24:16.1641601Z github.com/smartcontractkit/chainlink/v2/core/web.graphqlHandler({0x5b19ab8, 0xc001971860})
Run tests 2024-12-23T06:24:16.1642210Z /home/runner/work/chainlink/chainlink/core/web/router.go:118 +0x1ea Why: The GraphQL resolver does not have a method to resolve the "tronKeys" field in the "Query" type, causing a panic during test execution. Suggested fix: Implement the missing "tronKeys" method in the GraphQL resolver to handle the "Query" type properly. 6. Missing method for field "tronKeys" in resolver: [go_core_tests]Source of Error:Run tests 2024-12-23T06:24:16.1778237Z panic: *resolver.Resolver does not resolve "Query": missing method for field "tronKeys" [recovered]
Run tests 2024-12-23T06:24:16.1778914Z panic: *resolver.Resolver does not resolve "Query": missing method for field "tronKeys"
Run tests 2024-12-23T06:24:16.1779227Z
Run tests 2024-12-23T06:24:16.1779343Z goroutine 672 [running]:
Run tests 2024-12-23T06:24:16.1779675Z testing.tRunner.func1.2({0x431e040, 0xc001d0a930})
Run tests 2024-12-23T06:24:16.1780159Z /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1632 +0x230
Run tests 2024-12-23T06:24:16.1780539Z testing.tRunner.func1()
Run tests 2024-12-23T06:24:16.1780939Z /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1635 +0x35e
Run tests 2024-12-23T06:24:16.1781337Z panic({0x431e040?, 0xc001d0a930?})
Run tests 2024-12-23T06:24:16.1781743Z /opt/hostedtoolcache/go/1.23.4/x64/src/runtime/panic.go:785 +0x132
Run tests 2024-12-23T06:24:16.1782232Z github.com/graph-gophers/graphql-go.MustParseSchema(...)
Run tests 2024-12-23T06:24:16.1782777Z /home/runner/go/pkg/mod/github.com/graph-gophers/graphql-go@v1.5.0/graphql.go:67
Run tests 2024-12-23T06:24:16.1783484Z github.com/smartcontractkit/chainlink/v2/core/web.graphqlHandler({0x5b06058, 0xc001df2680})
Run tests 2024-12-23T06:24:16.1784092Z /home/runner/work/chainlink/chainlink/core/web/router.go:118 +0x1ea Why: The GraphQL resolver does not have a method to resolve the "tronKeys" field in the "Query" type, causing a panic during test execution. Suggested fix: Implement the missing "tronKeys" method in the GraphQL resolver to handle the "Query" type properly. 7. Missing method for field "tronKeys" in resolver: [go_core_tests]Source of Error:
|
Quality Gate passedIssues Measures |
Flaky Test Detector for
|
44f490e
to
8d45d7f
Compare
Flakeguard Summary
Found Flaky Tests ❌
|
Flakeguard Summary
Found Flaky Tests ❌
|
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
8b5bea7
to
ab60f01
Compare
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
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.
should we add the tronKeys to the graphql too? Example for Aptos
Yeah let's do that, it'll make integration in the UI/JD config possible |
added to graphql |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
core/services/keystore/tron.go
Outdated
|
||
// TronLoopKeystore implements the [github.com/smartcontractkit/chainlink-common/pkg/loop.Keystore] interface and | ||
// handles signing for Tron messages. | ||
type TronLoopKeystore struct { |
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.
type TronLoopKeystore struct { | |
type TronLOOPKeystore struct { |
// Address represents the 21 byte address of an Tron account. | ||
type Address []byte |
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.
If it is fixed at 21 bytes, did you consider using an array for the underlying type?
// Address represents the 21 byte address of an Tron account. | |
type Address []byte | |
// Address represents the 21 byte address of an Tron account. | |
type Address [21]byte |
} | ||
|
||
// HexToAddress returns Address with byte values of s. | ||
// If s is larger than len(h), s will be cropped from the left. |
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.
I don't think this is true currently
// If s is larger than len(h), s will be cropped from the left. | |
// If s is larger than len(h), s will be cropped from the left. |
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.
changed the implementation of this slightly, although not sure if its actually used at the moment
// Tron address should should have 20 bytes + 4 checksum + 1 Prefix | ||
AddressLength = 20 | ||
) | ||
|
||
// Address represents the 21 byte address of an Tron account. |
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.
So are addresses 20, 21, or 25 (20+4+1)?
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.
should be 21 bytes including the prefix, i believe the 4 checksum bytes are relevant for base58 conversion. have updated the comments and values to reflect this better
Flakeguard SummaryRan new or updated tests between View Flaky Detector Details | Compare Changes Found Flaky Tests ❌
ArtifactsFor detailed logs of the failed tests, please refer to the artifact failed-test-results-with-logs.json. |
Quality Gate failedFailed conditions See analysis details on SonarQube Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
No description provided.