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

Ticket 828/add ima api #1556

Merged
merged 5 commits into from
Aug 16, 2023
Merged

Ticket 828/add ima api #1556

merged 5 commits into from
Aug 16, 2023

Conversation

sergiy-skalelabs
Copy link
Contributor

New features:

  • Added skale_getCachedSNB, skale_historySNB, skale_refreshSNB JSON RPC APIs
  • The skale_imaVerifyAndSign now prints node IP in logs
    Testing example, get currently last cached S-Chains connected to this S-Chain and saved in SNB:
    curl -X POST --data '{ "jsonrpc": "2.0", "id": 1, "method": "skale_getCachedSNB", "params": {} }' -H 'Content-type:application/json; charset=utf-8' http://127.0.0.1:2171
    Testing example, get recent SNB history:
    curl -X POST --data '{ "jsonrpc": "2.0", "id": 1, "method": "skale_historySNB", "params": {} }' -H 'Content-type:application/json; charset=utf-8' http://127.0.0.1:2171
    Testing example, make SNB refresh from geth node inside running IMA Agent:
    curl -X POST --data '{ "jsonrpc": "2.0", "id": 1, "method": "skale_refreshSNB", "params": {} }' -H 'Content-type:application/json; charset=utf-8' http://127.0.0.1:2171

@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Merging #1556 (69fe09d) into develop (605f539) will increase coverage by 4.37%.
Report is 1 commits behind head on develop.
The diff coverage is n/a.

❗ Current head 69fe09d differs from pull request most recent head fbbb5bb. Consider uploading reports for the commit fbbb5bb to get more accurate results

@@             Coverage Diff             @@
##           develop    #1556      +/-   ##
===========================================
+ Coverage    85.79%   90.16%   +4.37%     
===========================================
  Files           26       26              
  Lines         1464     1322     -142     
  Branches       401      348      -53     
===========================================
- Hits          1256     1192      -64     
  Misses          33       33              
+ Partials       175       97      -78     

see 23 files with indirect coverage changes

@sergiy-skalelabs sergiy-skalelabs marked this pull request as ready for review August 15, 2023 17:21
@@ -929,6 +929,8 @@ export function mergeSChainsArrayFromTo( arrSrc, arrDst, arrNew, arrOld, opts )
}

let gArrSChainsCached = [];
const gArrCacheHistory = [];
let nMaxSizeOfArrCacheHistory = 20;

export async function cacheSChains( strChainNameConnectedTo, addressFrom, opts ) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Propose to remove addressFrom parameter from cacheSchains - it is unnecessary parameter

@sergiy-skalelabs sergiy-skalelabs merged commit ecaeb1b into develop Aug 16, 2023
15 checks passed
@sergiy-skalelabs sergiy-skalelabs deleted the ticket-828/add-ima-api branch August 16, 2023 17:00
@github-actions github-actions bot locked and limited conversation to collaborators Aug 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants