Code Monkey home page Code Monkey logo

concordium-scan's Introduction

CCDScan

CCDScan is a full blockchain explorer on Concordium.

It consists of two main parts:

Docker Compose

The project ships a Docker Compose spec for deploying a CCDScan Backend with a TimescaleDB (v14) instance.

Parameters

  • CCDSCAN_BACKEND_IMAGE (default: concordium/ccdscan:test): Image to use for the backend. The default value is not an existing public image: Using it will make Compose build the image from local sources. Note that to use an existing public image, the image must already have been pulled (using e.g. docker-compose pull) before running up. Otherwise, Compose will proceed to build the image without first checking if the image can be pulled.
  • CCDSCAN_BACKEND_PORT (default: 5000): Port on which to expose the backend. Mac users should set this to another value as the port might already be used by the system.
  • CCDSCAN_NODE_GRPC_ADDRESS (default: http://172.17.0.1:10000): URL of the gRPC (APIv1) interface of a Concordium Node. The default value is the default address of a Node running on the host.
  • CCDSCAN_DOMAIN (default: testnet.concordium.com): URL of the network's domain (mainnet.concordium.software for mainnet and <network>.concordium.com for the other official networks). Used as part of the URL for fetching data from the public network dashboard.

Example

Run backend on port 5001 from public image concordium/ccdscan:<tag> against a local mainnet node:

export CCDSCAN_BACKEND_IMAGE=concordium/ccdscan:<tag>
export CCDSCAN_BACKEND_PORT=5001
export CCDSCAN_DOMAIN=mainnet.concordium.software
docker-compose pull
docker-compose up

See the description of CCDSCAN_BACKEND_PORT for an explanation of why Mac users in particular might want to set this value.

Database restore

In ./timescaledb-restore a description is given how to spin up and restore CCD scan database locally from Stage- or Testnet backups.

This is only needed to be done once. They will be recompiled on later changes as part of dotnet build.

Unstable features

  • GraphQL endpoints for contracts and modules should currently be seen as unstable, indicating that the query models are likely to undergo changes.

concordium-scan's People

Contributors

abizjak avatar bisgardo avatar falkenflyver avatar gilden avatar gitguillebetis avatar lassemand avatar nixstrom avatar parv0888 avatar shjortconcordium avatar soer8647 avatar soerenbf avatar stefanbookbites avatar thahara avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

concordium-scan's Issues

Contract Token Count Not Updating

Bug Description
The total Tokens minted on a particular tab is not updating in real time.

Steps to Reproduce
Mint a token on any available / deployed CIS2 contract and check the contracts page Ex. Contract 9456

Expected Result
The tokens counts should update

Actual Result
The tokens counts area the last total no of tokens minted

Account statement exported file not formatted properly, difficult to read the contents

Bug Description
Account statement exported file (.csv format) is not formatted properly and its difficult to read contents in default format. Attaching default exported file for Testnet account, 4YxRxWHnKHJBbHJieRJe6gbVW2ryCf3JYufyyUPGGHkq2S34an
Steps to Reproduce
Open Testnet Account 4YxRxWHnKHJBbHJieRJe6gbVW2ryCf3JYufyyUPGGHkq2S34an in CCDScan - export account statement - open exported file
Expected Result
The contents in the exported file should be readable as default without needing to make adjustments.
Actual Result
The contents are difficult to read as default.
Versions

CCDScan Account Statement Export

[statement-4YxRxWHnKHJBbHJieRJe6gbVW2ryCf3JYufyyUPGGHkq2S34an_20230412100050-20230412101308.csv](https://github.com/Concordium/concordium-scan/files/11210278/statement-4YxRxWHnKHJBbHJieRJe6gbVW2ryCf3JYufyyUPGGHkq2S34an_20230412100050-20230412101308.csv)

Couldn't display account info on CCDScan - Testnet

Something went wrong after select to show specific address.

To reproduce

  1. Paste the address 45Dp7jhi7kmQbapb7LHnDju1y4R3u4YXYusPBcw8cmZw7MgTeU into CCDScan.
  2. After found, select to open it.

Result:

image.png

Expected
Account info should open as on other accounts.

Version
version 0.1.0/1.0.1

Improve performance metrics on Staking page

Add a better measure of performance for delegators to judge baker pool performance.

The best one would be the ratio between expected blocks and produced blocks in a time period (e.g., payday), and if the pool is a finalizer, the ratio between the number of finalizations and the number of finalization records the pool signed.

Remove decimals from Backend API when unit is CCD

Bug Description
Upon calling backend REST API Ex http://localhost:5000/rest/balance-statistics/latest?field=totalamountunlocked&unit=ccd
The values returned have decimal places. When it should have any decimals.

Steps to Reproduce
Use postman to call the api
http://localhost:5000/rest/balance-statistics/latest?field=totalamountunlocked&unit=ccd
Or
https://api-ccdscan.mainnet.concordium.software/rest/balance-statistics/latest?field=totalamountunlocked&unit=ccd

Expected Result
7514470077

Actual Result
7514470077.45811

Versions

  • Software Version
  • OS
  • Browser
  • Mobile device, if applicable

CCDScan: Change "Finalization Time"

Update how "Finalization time" is calculated and displayed in CCD scan using the following formula:

  • take the block slot time for the last finalized block (i.e., highest finalized block we have in the network)
  • take the reported finalization time for this block for all the nodes that have it and take the median or average
  • display the difference

Search field unusable at ~1400px breakpoint

Bug Description
At a certain scale, the search field in the nav bar is very slim:

Screenshot 2024-02-07 at 09 37 41

This makes the search bar, and especially the search result selection very hard to use. The width of the page in the screenshot is 1440px.

It looks like this is mainly an issue due to the version tag which seems to include a checksum locally, but even on ccdscan.io, the search field width could be improved. Probably due to more items being added to the nav bar. I think it would activate the layout for the breakpoint below earlier.

ccdscan.io
Screenshot 2024-02-07 at 09 43 26

Steps to Reproduce

  • Scale website to 1440px width

Expected Result
Search field has a width which makes it possible to read the contents

Actual Result
Search field is accessible, but the contents are unreadable

What does Rec. length represent?

Bug Description
It is not really clear what the value Rec.length represents?

Looking at the number and comparing it to numbers on https://dashboard.mainnet.concordium.software/ this is is not last block received, neither last finalized, neither number of messages sent/received

Steps to Reproduce
Follow the link https://ccdscan.io/nodes and look at Rec.length column.

Expected Result
I assume, we first have to clarify what is it that this number represents.

Actual Result
Maybe a tooltip that explains what the value is.

Versions

  • Software Version: version 0.1.2/1.0.2

Account Balance In Genesis Blocks Is not Correct

Bug Description
During Catchup all Account Balances are 0.

Steps to Reproduce
DROP the database and catchup from Testnet

Expected Result
Accounts should have balances equal to their genesis balances

Actual Result
All the account balances are zero

Versions

  • Software Version
  • OS
  • Browser
  • Mobile device, if applicable

Incorrect spelling of finalization

Finalization is spelled with the British English spelling with "s" instead of the American English spelling. The American English spelling is used in the wallets and in the documentation, so CCDScan should be consistent with that. Therefore, it should be changed to Finalization all places in the UI.

Contract index is not shown in transaction tab

If user has updated contract and looks up the transaction, it only says ``

updated smart contract instance

Expected:

Contract index of an instance updated would be very useful information.

Actual:

image.png

CCDScan - pagination feature improvements

Description
Applies to all sidebars e.g. Transactions, Account Statement, Token etc. options in CCDScan,
add these improvements for pagination (when number of entries are high) e.g. https://ccdscan.io/accounts?dcount=1&dentity=account&daddress=3kKn2kz9YHrkrKUcBZF9NUJbg8LqGzcBbLwzH1VPE5g2fTbY9z

  1. Add pagination numbers to highlight which particular page user is viewing currently.
  2. Put some spacing between Previous and Next buttons, right now it appears as same button.
  3. Add "Last" button (on right most side) to allow user to navigate to the last page directly.

Steps to Reproduce
https://ccdscan.io/accounts?dcount=1&dentity=account&daddress=3kKn2kz9YHrkrKUcBZF9NUJbg8LqGzcBbLwzH1VPE5g2fTbY9z
Expected Result

Actual Result

Versions

  • Software Version
  • OS
  • Browser
  • Mobile device, if applicable

Pagination_Tokens

CIS2 token display page

The token display now is per-account, e.g., http://ethbridge.testnet.concordium.com/assets/USDC.json

There is a link to token metadata http://ethbridge.testnet.concordium.com/assets/USDC.json as well.

However this link just has to be copied and in any case leads to a JSON object, not very readable.

it would be useful to also have a page that can display just the token. This would ideally include

  • token metadata rendered as nicely as possible
  • date of creation of the token (i.e., when the first was minted)
  • things like total supply, whether it is fungible or not

A more complex thing would then be to add all owners of the token with their balances.

/contracts endpoint uses excessive resources

Bug Description

When navigating to the /contracts endpoint on mainnet the frontend displays an empty list, and the reason for that is that the the database query fails with an out of resource error

The error trace is attached, but it is not much more informative other than showing the query that is made and the out of memory exception.

contracts-error.txt

APY seems to big

Bug Description
Looking at some bakers, APY is in thousands or even millions percent.

Steps to Reproduce
Look at CCDScan on Testnet.

Actual Result
image

Versions

  • Software Version: v.
  • Browser: Chrome

Fix Year View on CCDscan

When someone wants to see the transactions for the last year, takes a lot of time to fetch the data and it prints nothing. See the screenshot attached.

Screenshot 2024-05-07 at 11.10.04.png

Ingester crashes on stagenet

Logs:

2022-11-03 11:05:47.606 [INFO] [Program] Application starting...
2022-11-03 11:05:47.645 [INFO] [Program] Using Postgres connection string: Host=timescaledb-alpha.default.svc.cluster.local;Port=5432;Database=ccscan;User ID=postgres;Password==****************;Include Error Detail=true;
2022-11-03 11:05:47.647 [INFO] [Program] Feature flag [MigrateDatabasesAtStartup]: True
2022-11-03 11:05:47.648 [INFO] [Program] Feature flag [ConcordiumNodeImportEnabled]: True
2022-11-03 11:05:47.648 [INFO] [Program] Feature flag [ConcordiumNodeImportValidationEnabled]: False
2022-11-03 11:05:47.721 [INFO] [DatabaseMigrator] Starting database migration...
2022-11-03 11:05:47.747 [INFO] [DatabaseMigrator] Master ConnectionString => Host=timescaledb-alpha.default.svc.cluster.local;Port=5432;Database=postgres;Username=postgres;Password=****************;Include Error Detail=True
2022-11-03 11:05:48.115 [INFO] [DatabaseMigrator] Beginning transaction
2022-11-03 11:05:48.120 [INFO] [DatabaseMigrator] Checking whether journal table exists..
2022-11-03 11:05:48.123 [INFO] [DatabaseMigrator] Fetching list of already executed scripts.
2022-11-03 11:05:48.133 [INFO] [DatabaseMigrator] Beginning transaction
2022-11-03 11:05:48.133 [INFO] [DatabaseMigrator] Checking whether journal table exists..
2022-11-03 11:05:48.134 [INFO] [DatabaseMigrator] Fetching list of already executed scripts.
2022-11-03 11:05:48.136 [INFO] [DatabaseMigrator] Database does not require upgrade.
2022-11-03 11:05:48.136 [INFO] [DatabaseMigrator] Master ConnectionString => Host=timescaledb-alpha.default.svc.cluster.local;Port=5432;Database=postgres;Username=postgres;Password=****************;Include Error Detail=True
2022-11-03 11:05:48.157 [INFO] [DatabaseMigrator] Beginning transaction
2022-11-03 11:05:48.157 [INFO] [DatabaseMigrator] Checking whether journal table exists..
2022-11-03 11:05:48.159 [INFO] [DatabaseMigrator] Fetching list of already executed scripts.
2022-11-03 11:05:48.159 [INFO] [DatabaseMigrator] Beginning transaction
2022-11-03 11:05:48.159 [INFO] [DatabaseMigrator] Checking whether journal table exists..
2022-11-03 11:05:48.160 [INFO] [DatabaseMigrator] Fetching list of already executed scripts.
2022-11-03 11:05:48.161 [INFO] [DatabaseMigrator] Database does not require upgrade.
2022-11-03 11:05:48.161 [INFO] [DatabaseMigrator] Database migration finished successfully
2022-11-03 11:05:48.375 [INFO] [ImportReadController] Awaiting initial import state...
2022-11-03 11:05:48.382 [INFO] [ImportWriteController] Reading initial import state...
2022-11-03 11:05:49.986 [INFO] [ImportWriteController] Initial import state read
2022-11-03 11:05:49.987 [INFO] [ImportReadController] Checking preconditions for importing data from Concordium node...
2022-11-03 11:05:49.988 [INFO] [ImportReadController] Database contains genesis block hash '38bf770b4c247f09e1b62982bb71000c516480c5a2c5214dadac6da4b1ad50e5' which is not one of the known Concordium networks.
2022-11-03 11:05:50.060 [INFO] [NodeSummaryImportController] Starting reading data from Concordium Collector backend...
2022-11-03 11:05:50.127 [INFO] [ImportReadController] Concordium Node says genesis block hash is '38bf770b4c247f09e1b62982bb71000c516480c5a2c5214dadac6da4b1ad50e5' which is not one of the known Concordium networks.
2022-11-03 11:05:50.127 [INFO] [ImportReadController] Genesis block hash of Concordium Node and Database are identical
2022-11-03 11:05:50.130 [INFO] [ImportReadController] Starting reading data from Concordium node...
2022-11-03 11:05:50.623 [DBUG] [AccountLookup] Cache-miss for 71 accounts
2022-11-03 11:05:50.874 [INFO] [BakerImportHandler] Baker with id 33 will have its stake reduced to 1998004730352.
2022-11-03 11:05:50.874 [INFO] [BakerImportHandler] Baker with id 31 will have its stake reduced to 1998004806254.
2022-11-03 11:05:50.874 [INFO] [BakerImportHandler] Baker with id 64 will have its stake reduced to 1998006341059.
2022-11-03 11:05:50.874 [INFO] [BakerImportHandler] Baker with id 71 will have its stake reduced to 1998002549714.
2022-11-03 11:05:50.874 [INFO] [BakerImportHandler] Baker with id 47 will have its stake reduced to 1998005943513.
2022-11-03 11:05:50.874 [INFO] [BakerImportHandler] Baker with id 46 will have its stake reduced to 1997999923642.
2022-11-03 11:05:50.874 [INFO] [BakerImportHandler] Baker with id 77 will have its stake reduced to 1998001753276.
2022-11-03 11:05:50.874 [INFO] [BakerImportHandler] Baker with id 40 will have its stake reduced to 1998006796604.
2022-11-03 11:05:50.874 [INFO] [BakerImportHandler] Baker with id 52 will have its stake reduced to 1998006582866.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 37 will have its stake reduced to 1998005804869.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 32 will have its stake reduced to 1998006926915.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 78 will have its stake reduced to 1998005242764.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 68 will have its stake reduced to 1998005747821.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 80 will have its stake reduced to 1998007077583.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 76 will have its stake reduced to 1998005660957.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 42 will have its stake reduced to 1998004000401.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 59 will have its stake reduced to 1998005920872.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 41 will have its stake reduced to 1998006272804.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 54 will have its stake reduced to 1998005493849.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 36 will have its stake reduced to 1998005273130.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 53 will have its stake reduced to 1998003840622.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 70 will have its stake reduced to 1998005246276.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 45 will have its stake reduced to 1998000184938.
2022-11-03 11:05:50.875 [INFO] [BakerImportHandler] Baker with id 75 will have its stake reduced to 1998006323490.
2022-11-03 11:05:50.926 [INFO] [BakerImportHandler] NextPendingBakerChangeTime set to 11/03/2022 12:16:34 +00:00
2022-11-03 11:05:59.052 [INFO] [ImportWriteController] Stopped
2022-11-03 11:05:59.056 [EROR] [Host] BackgroundService failed
System.InvalidOperationException: Baker did not exist in database
   at Application.Api.GraphQL.Import.BakerWriter.<>c__5`1.<UpdateBaker>b__5_0(TSource _) in /src/Application/Api/GraphQL/Import/BakerWriter.cs:line 54
   at Application.Api.GraphQL.Import.BakerWriter.AddOrUpdateBaker[TSource](TSource item, Func`2 bakerIdSelector, Func`2 createNew, Action`2 updateExisting) in /src/Application/Api/GraphQL/Import/BakerWriter.cs:line 43
   at Application.Api.GraphQL.Import.BakerWriter.AddOrUpdateBaker[TSource](TSource item, Func`2 bakerIdSelector, Func`2 createNew, Action`2 updateExisting) in /src/Application/Api/GraphQL/Import/BakerWriter.cs:line 49
   at Application.Api.GraphQL.Import.BakerImportHandler.UpdateCurrentPaydayStatusOnAllBakers(BlockDataPayload payload) in /src/Application/Api/GraphQL/Import/BakerImportHandler.cs:line 201
   at Application.Api.GraphQL.Import.BakerImportHandler.ApplyBakerChanges(BlockDataPayload payload, RewardsSummary rewardsSummary, ChainParametersState chainParameters, IPendingBakerChangeStrategy pendingChangeStrategy, ImportState importState, BakerUpdateResultsBuilder resultBuilder, Boolean isFirstBlockAfterPayday) in /src/Application/Api/GraphQL/Import/BakerImportHandler.cs:line 171
   at Application.Api.GraphQL.Import.BakerImportHandler.HandleBakerUpdates(BlockDataPayload payload, RewardsSummary rewardsSummary, ChainParametersState chainParameters, BlockImportPaydayStatus importPaydayStatus, ImportState importState) in /src/Application/Api/GraphQL/Import/BakerImportHandler.cs:line 49
   at Application.Api.GraphQL.Import.ImportWriteController.HandleCommonWrites(BlockDataPayload payload, ImportState importState) in /src/Application/Api/GraphQL/Import/ImportWriteController.cs:line 174
   at Application.Api.GraphQL.Import.ImportWriteController.WriteData(BlockDataPayload payload) in /src/Application/Api/GraphQL/Import/ImportWriteController.cs:line 141
   at Application.Api.GraphQL.Import.ImportWriteController.ExecuteAsync(CancellationToken stoppingToken) in /src/Application/Api/GraphQL/Import/ImportWriteController.cs:line 90
   at Application.Api.GraphQL.Import.ImportWriteController.ExecuteAsync(CancellationToken stoppingToken) in /src/Application/Api/GraphQL/Import/ImportWriteController.cs:line 84
   at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2022-11-03 11:05:59.069 [FATL] [Host] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.InvalidOperationException: Baker did not exist in database
   at Application.Api.GraphQL.Import.BakerWriter.<>c__5`1.<UpdateBaker>b__5_0(TSource _) in /src/Application/Api/GraphQL/Import/BakerWriter.cs:line 54
   at Application.Api.GraphQL.Import.BakerWriter.AddOrUpdateBaker[TSource](TSource item, Func`2 bakerIdSelector, Func`2 createNew, Action`2 updateExisting) in /src/Application/Api/GraphQL/Import/BakerWriter.cs:line 43
   at Application.Api.GraphQL.Import.BakerWriter.AddOrUpdateBaker[TSource](TSource item, Func`2 bakerIdSelector, Func`2 createNew, Action`2 updateExisting) in /src/Application/Api/GraphQL/Import/BakerWriter.cs:line 49
   at Application.Api.GraphQL.Import.BakerImportHandler.UpdateCurrentPaydayStatusOnAllBakers(BlockDataPayload payload) in /src/Application/Api/GraphQL/Import/BakerImportHandler.cs:line 201
   at Application.Api.GraphQL.Import.BakerImportHandler.ApplyBakerChanges(BlockDataPayload payload, RewardsSummary rewardsSummary, ChainParametersState chainParameters, IPendingBakerChangeStrategy pendingChangeStrategy, ImportState importState, BakerUpdateResultsBuilder resultBuilder, Boolean isFirstBlockAfterPayday) in /src/Application/Api/GraphQL/Import/BakerImportHandler.cs:line 171
   at Application.Api.GraphQL.Import.BakerImportHandler.HandleBakerUpdates(BlockDataPayload payload, RewardsSummary rewardsSummary, ChainParametersState chainParameters, BlockImportPaydayStatus importPaydayStatus, ImportState importState) in /src/Application/Api/GraphQL/Import/BakerImportHandler.cs:line 49
   at Application.Api.GraphQL.Import.ImportWriteController.HandleCommonWrites(BlockDataPayload payload, ImportState importState) in /src/Application/Api/GraphQL/Import/ImportWriteController.cs:line 174
   at Application.Api.GraphQL.Import.ImportWriteController.WriteData(BlockDataPayload payload) in /src/Application/Api/GraphQL/Import/ImportWriteController.cs:line 141
   at Application.Api.GraphQL.Import.ImportWriteController.ExecuteAsync(CancellationToken stoppingToken) in /src/Application/Api/GraphQL/Import/ImportWriteController.cs:line 90
   at Application.Api.GraphQL.Import.ImportWriteController.ExecuteAsync(CancellationToken stoppingToken) in /src/Application/Api/GraphQL/Import/ImportWriteController.cs:line 84
   at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2022-11-03 11:05:59.077 [INFO] [ImportReadController] Stopped
2022-11-03 11:05:59.083 [INFO] [Program] Exiting application!

CCDScan account sidebar has issues with accounts with many transactions

Bug Description
If you try to display an account in the sidebar that has a lot of transactions it doesn't work, in Chrome the UI presents ans error:
image

And in firefox the ui loads but is completely unresponsive:
image

Steps to Reproduce

Goto: https://stagenet.ccdscan.io/accounts?dcount=1&dentity=account&daddress=4ZXndsiRAtHFpKZeKpHS5xDyGrMHy9oYfCKQmf9VmRATx4GTzY

(link not working anymore see https://ccdscan.io/?dcount=1&dentity=account&daddress=35CJPZohio6Ztii2zy1AYzJKvuxbGG44wrBn7hLHiYLoF2nxnh instead)

Expected Result
A paginated view of transactions.

Actual Result
Nothing

Versions

  • Windows 11
  • Chrome/Firefox

Governance transaction details are not shown

Bug Description
I have noticed that updates to pool parameters are described incompletely on the dashboard.
For example, if Capital Bound is changed from 10% to 5%, if one lookup for the specific transaction, what one can see is that it was Governance transaction and not what was exactly change and to what parameter.

I am not sure whether the behavior is the same for all transactions of a Governance type.

Steps to Reproduce
Change pool parameter, lookup transaction on the dashboard.

Expected Result
Include what was exactly changed and to what value.

Actual Result
Pool parameter update - Governance transaction.

Versions

  • Software Version: 1.0.8

Transaction URL cant be seen in the browser

Description
When a user navigates block by clicking its hash value its possible to see, and copy the URL from the browser however, the behavior for transactions is not the same. The URL is not produced therefore user cant copy&paste etc.

Steps to Reproduce
Click a transaction and observe the URL in the browser.
Screenshot 2024-03-27 at 14 58 10

Expected Result
Generation of the URL something like https://ccdscan.io/transactions?dentity=transaction&dhash=892491e576e18b9161467eb8f4bf6555a7e6b7c344ec9a092daedb7e65ca66fe

Actual Result
It opens up a window, but doesnt update the URL when a transaction hash is clicked to see the details https://ccdscan.io/transactions

Versions

  • Browser

Amounts in contracts are "double"

Bug Description

Amounts in contracts, for example the GetAmount method of COntract class, or the graphql amount property of the contract Type are modeled as floating point numbers.

This is quite wrong and will lead to problems with precision since CCD amounts are not accurately representable with floats.

TotalAmountReleased Api Endpoint should work

Description
Coin Gecko Currently uses following api endpoint to get total circulating supply and show on their web page
https://mainnet.api.ccdscan.io/rest/balance-statistics/latest?field=TotalAmountReleased

The above API endpoint currently responds with a 500 Error.

Steps to Reproduce
a GET request on the described endpoint responds with 500 error.

Expected Result
The api endpoint should return Total Circulating Supply in Micro CCD by default. ie a number without decimal points.

Actual Result
500 Error

Final height of the chain not visible

Bug Description
There is no one value that is pointing to the final height of the chain.
One could filter for how many blocks were produced in the last period with max of 1 year.

Steps to Reproduce
Open CCDScan on Home page.

Expected Result
Total length of the chain should be shown.

Actual Result
Total length is not show.

Note:
I think this is useful to know if ones node is up to a final height by comparing its own node height with the total length. I think that it is also good to just show for how long (how many blocks) the chain exists.

Versions

  • Software Version: version 0.1.2/1.0.2

It is not easy to copy token ID

In the scenario where I look up token by token address and want to add the token to my wallet, I would need token ID. On all the pages where Token ID is visible, it is not easy to just press a button to copy it as it is in the case of token address.

Validate baker ID before adding it next to the node

Description
It is possible that CCDScan shows baker ID that doesn't exist. Ideally, we would validate baker ID before adding it next to the node name. This information can be verified on chain.

Steps to Reproduce

  • Alter baker ID manually in baker-credentials.json file
  • Restart the node

Expected Result
Invalid ID would not be added.

Actual Result
Anything within 64-bit int is accepted as baker id and added next to the node name.

image

Versions

  • Software Version: 0.1.0/1.0.1

CCDSCAN calculates baker removal time wrong

Bug Description
When deregistering a baker the time is 0 when 3 weeks have gone by, where the baker is actually removed when the payday event passes (10am CEST on mainnet). After that CCDSCAN starts counting the time up agian until the payday actually passes

Steps to Reproduce
Deregister a baker sometime except at 10am CEST

Expected Result
The baker is removed on the first payday that passes after 3 weeks.

Actual Result
CCDSCAN apparently thinks the baker is removed after exactly 3 weeks.

CIS2 Tokens of Some Accounts not being listed in Account Details Sidebar

Bug Description
Tokens Listing Bug.
CIS2 Tokens of some of the account are not being listed on CCD Scan

Steps to Reproduce
Check tokens of the Account
https://testnet.ccdscan.io/?dcount=1&dentity=account&daddress=36Z8i8wkGbA2tKmrRgXrofvbTbV68KCfJD1nAVSMYJJBKPo7mw

Expected Result
The Interface should list tokens associated with the account

Actual Result
No Tokens are being listed

Versions

  • Software Version
  • OS
  • Browser
  • Mobile device, if applicable

Version backend and frontend and make version number accessible

Both the frontend and backend components should be versioned and the version should be changed whenever changes are released/deployed.

The version of the frontend should be displayed somewhere in the frontend, and the version of the backend should be accessible. Ideally it would also be displayed in the frontend somewhere.

Not able to read it completely after clicking '?' on ccdscan.io

Bug Description

Found out an error after clicking the ‘?’ In front of total CCD in existence, total unlocked ccd and total circulating supply of CCD. We can’t read it completely.

Steps to Reproduce

Expected Result

Actual Result

Versions

  • Software Version
  • OS
  • Browser
  • Mobile device, if applicable

Token display does not work when there are many tokens.

Task description

The CCDScan account display does not work when an account owns many tokens. The entire set of tokens is returned to the frontend by the looks of it, and sometimes that leads to "error", sometimes to a frozen frontend.

An example is here https://stagenet.ccdscan.io/accounts?dcount=1&dentity=account&daddress=4ZXndsiRAtHFpKZeKpHS5xDyGrMHy9oYfCKQmf9VmRATx4GTzY

I tried in firefox and after loading for 20s or so I get to the account display. But then no actions work, and the site/tab is using 780MB of memory.

Transfer is counted twice in the account balance

Bug Description
It seems in some instances a transaction is added twice.
Looking at the "Account Statement" the first transaction transfers 15,000 ccd to the account after which the balance is somehow 30,000 ccd.
image

A guess could be that it is because the account and the 15,000 ccd transfer happened in the same block.

CCDScan: autoreload any new data for the sidebar options

Description
Currently user has to reload CCDScan page in-order to upload any new data e.g. new transaction or new token added/removed from an account. This should happen automatically or at max. on collapsing & re-expanding the particular sidebar.

Steps to Reproduce
Make an account transaction - open account in CCDScan - view transaction - make new account transaction using wallet

Expected Result
The new transaction should auto-reload in CCDScan without user needing to reload CCDScan page.

Actual Result
User has to reload CCDScan page and search again for the account to view the new transaction.

Versions

  • Software Version
  • OS
  • Browser
  • Mobile device, if applicable

Add support for protocol version 5

Task description

Protocol version 5 changes the node api a bit, and these changes need to be accounted for in concordium-scan.
The following changes are made

  • There is a new protocol version 5 that appears in queries where the protocol version is recorded, such as ConsensusStatus
  • There is a new transaction event Upgraded that indicates that a smart contract instance has been upgraded. The JSON representation of this event is
{
    "tag": "Upgraded",
    "address": $ContractAddress,
    "from": $ModuleRef,
   "to": $ModuleRef,
}

where the meaning is that an instance has been upgraded from the module from to to. The effect is that from then on the contract instance will execute the code in the new module.

The handling of these must be added.

Payday rewards for some of the bakers are not visible

Bug Description
Payday rewards for bakers 1880 and 1004 are not visible.

Steps to Reproduce
Select baker id -> Payday Rewards

Expected Result

image

Actual Result
image

Note, for some other bakers payday rewards are visible as for example 1 or 5.
Versions

  • Software Version: Testnet v?
  • OS: Windows
  • Browser: Chrome

Unify terminology

Looking at the tooltip for total circulating supply it seems that we are providing term total supply while on the top of the first value we call it Total CCD in existence. We might want to unify this terms so that we are just using one term (maybe total supply).

image.png

Account Statement section show wrong cost for type Fee

Bug Description

The Account Statement section shows an incorrect Amount for entries with type Fee

Steps to Reproduce

Go to Account Statement for account 4HDCQr, for the Fee from Apr 12, 2023, 10:05 AM, it shows an Amount of -2.857428, but the difference in Balance is only -1.142572

image

The difference in Balance of -1.142572 corresponds to the cost shown on transaction f9149b.

image

Expected Result

The Amount should show -1.142572

Actual Result

The Amount actually shows -2.857428

Versions
Chrome

Change to total circulating supply, New Endpoint

There is a need of some changes in handling circulating supply and additional endpoint for Coinmarketcap and Coingeko consumption. Explanation as follows:

image.png

  1. change the header from "Total circulating supply of CCD" to "Total unlocked CCD"
  2. We need a new data point on CCDScan.io and more importantly an additional API endpoint.
    It should show numbers = "Total supply of CCD minus 6 specific wallets" AND it should include punctuation, for example: 6836607809.123456.
    Perhaps it would make sense to make two version of it. One with punctuation and one without?

Here are the accounts that are NOT circulating:
3ofwYFAkgV59BsHqzmiWyRmmKRB5ZzrPfbmx5nup24cE53jNX5
4MPJybKC9Kz7kw9KNyLHhuAEt4ZTxLsd3DBDbxtKdUiv4fXqVN
44bxoGippBqpgseaiYPFnYgi5J5q58bQKfpQFeGbY9DHmDPD78
4d13WVDNKVGDUxRUb1PRQAJyTwWSVcjWS7uwZ1oqmDm5icQEPT
3EctbG8WaQkTqZb1NTJPAFnqmuhvW62pQbywvqb9VeyqaFZdzN
47xTHwtFra1d4Mq4DYZuZYJEYrDXY34C4CGkTTzT6eiwjEczuT

Step 1. Build the new endpoint
Step 2. Get Coin Market Cap to Access it
Step 3. Update CCDScan UI with the third data point
Step 4. Get Coin Geko to consume it.

CCDScan: auto refresh in CCDScan Account's sidebar info. doesn't happen, user has to reload CCDScan again in order to view changes

CCDScan: auto refresh in CCDScan Account's sidebar info. doesn't happen, user has to reload CCDScan again in order to view changes

https://stagenet.ccdscan.io/

Change in Account sidebar related info. e.g. new transactions etc. doesn't reflect unless CCDScan page is reloaded again and then account page is reopened. This doesn't look to be a good user experience. New info. should refresh automatically without having to reload CCDScan site.

Commission rate is represented in float

If user makes a change to the commission rates, CCDScan shows a change in float. This is wrong.

To reproduce:

  1. Use MW to add validator and set the commission rate to 17.289 using slider.
  2. Send transaction and inspect it with CCDScan.

Result:

Tx hash: ab2bfdb6672c3be685a43f477947f205862d764c3382b77c32c6d3a449ba7a85

image.png

Expected:

Commission rate in CCDScan should be consistent with what is shown in the wallet.

CCDScan does not handle CBOR encoded memos well

Bug Description

It is a convention that our tools encode memos and registered data as CBOR.
CCDScan does not seem to handle that correctly. Witness

https://ccdscan.io/?dcount=2&dentity=transaction&dhash=aafb60e3dc9c884de1acc8a5557b20cedd1a572a4b5d2fd7ca5d41192c845d8d
and
https://dashboard.mainnet.concordium.software/lookup/aafb60e3dc9c884de1acc8a5557b20cedd1a572a4b5d2fd7ca5d41192c845d8d

Steps to Reproduce

See links above.

Expected Result

Memo is displayed as here https://dashboard.mainnet.concordium.software/lookup/aafb60e3dc9c884de1acc8a5557b20cedd1a572a4b5d2fd7ca5d41192c845d8d

Actual Result

Hex encoding of the memo is displayed.

Versions

  • Software Version: Unclear, the one currently on mainnet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.