MultiChain / multichain-explorer

Web-based explorer for MultiChain blockchains
GNU Affero General Public License v3.0
177 stars 138 forks source link

No native currency in address detail? #5

Closed reiven closed 8 years ago

reiven commented 8 years ago

Hi, on the address detail (ie: /Multichain Network/address/1exampleAddress) you can see the Permissions and Asset Balances of the address, but not the Native Currency balance

It is possible to add it?

Thanks

bitcartel commented 8 years ago

Done - change pushed and in commit https://github.com/MultiChain/multichain-explorer/commit/5a71b392681132abf26a502de7c10f2e5ac51557

reiven commented 8 years ago

@bitcartel i've pull the changed from the repo, but still cannot see any "native currency" balance:

On the "address detail" page i see

Address 1BTdpSPMdh8d8Nw3MSg1aobb6Le3sgRgKX Permissions Asset Balances None

But if i check the address balance via JsonAPI i see some balance

s.getaddressbalances('1BTdpSPMdh8d8Nw3MSg1aobb6Le3sgRgKX') [{u'raw': 89090000000, u'qty': 890.9, u'assetref': u''}]

bitcartel commented 8 years ago

Do you see a column "Raw Units". If not, please upload a screenshot. Thanks. image

reiven commented 8 years ago

Uhm no

multichain_no_native_currency

bitcartel commented 8 years ago

Stop the Python process, delete the .sqlite file where explorer data is stored (path is found in your explorer .conf file), double-check to see if the config file points to the correct blockchain and then restart the Python process. Does the log output show the blockchain being processed? Can you see the details of assets and their related transactions in the explorer?

reiven commented 8 years ago

Ok, the re-scan of the of the chain will take some time, i'll update this when it finish, but in the meantime i can tell you the explorer is poiting to the correct chain because i can see the transactions and the addresses involved in the transactions. Also if some new transaction are done in the chain, i can see them without any problem.

reiven commented 8 years ago

Ok, the re-scan of the of the chain will take some time, i'll update this when it finish, but in the meantime i can tell you the explorer is poiting to the correct chain because i can see the transactions and the addresses involved in the transactions. Also if some new transaction are done in the chain, i can see them without any problem.

reiven commented 8 years ago

@bitcartel after the network re-scan of the explorer, still none of the address of the network are showind native currency balance in the address page

bitcartel commented 8 years ago

Can you copy your explorer config file and your multichain params.dat file here? Thanks.

reiven commented 8 years ago

Ok, here is the explorer config removing comments

`dbtype = sqlite3

connect-args = poc.abe.sqlite port 2750 host 0.0.0.0 datadir += [{ "dirname": "~/.multichain/poc", # Path to chain's data folder "loader": "default", # See the comments for default-loader below. "chain": "Multichain Network", # Display name "policy": "MultiChain", "code3":"MMM" # Any 3 letter code for the native currency (if it exists) }]`

And the params.dat

`chain-protocol = multichain # Chain protocol: multichain (permissions, native assets) or bitcoin

chain-description = MultiChain poc # Chain description, embedded in genesis block coinbase, max 256 chars. chain-is-testnet = false # Content of the 'testnet' field of API responses, for compatibility. target-block-time = 15 # Target time between blocks (transaction confirmation delay), seconds. (5 - 86400) maximum-block-size = 1000000 # Maximum block size in bytes. (1000 - 1000000000) anyone-can-connect = false # Anyone can connect, i.e. a publicly readable blockchain. anyone-can-send = true # Anyone can send, i.e. transaction signing not restricted by address. anyone-can-receive = true # Anyone can receive, i.e. transaction outputs not restricted by address. anyone-can-issue = false # Anyone can issue new native assets. anyone-can-mine = false # Anyone can mine blocks (confirm transactions). anyone-can-activate = false # Anyone can grant or revoke connect, send and receive permissions. anyone-can-admin = false # Anyone can grant or revoke all permissions. allow-p2sh-outputs = true # Allow pay-to-scripthash (P2SH) scripts, often used for multisig. allow-multisig-outputs = true # Allow bare multisignature scripts, rarely used but still supported. setup-first-blocks = 60 # Length of initial setup phase in blocks, in which mining-diversity,

admin-consensus-* and mining-requires-peers are not applied. (1 - 31536000)

mining-diversity = 0.3 # Miners must wait between blocks. (0 - 1) admin-consensus-admin = 0.5 # needed to change admin perms. (0 - 1) admin-consensus-activate = 0.5 # to change activate perms. (0 - 1) admin-consensus-mine = 0.5 # to change mining permissions. (0 - 1) admin-consensus-issue = 0.0 # _ to change issue permissions. (0 - 1) mining-requires-peers = false # Default for whether nodes only mine blocks if connected to other nodes. initial-block-reward = 0 # Initial block mining reward in raw native currency units. (0 - 1000000000000000000) first-block-reward = 100000000000000 # Different mining reward for first block only, ignored if negative. (-1 - 1000000000000000000) reward-halving-interval = 52560000 # Interval for halving of mining rewards, in blocks. (60 - 4294967295) reward-spendable-delay = 1 # Delay before mining reward can be spent, in blocks. (1 - 100000) minimum-per-output = 0 # Minimum native currency per output (anti-dust), in raw units.

If set to -1, this is calculated from minimum-relay-fee. (-1 - 1000000000)

maximum-per-output = 100000000000000 # Maximum native currency per output, in raw units. (0 - 1000000000000000000) minimum-relay-fee = 0 # Minimum transaction fee, in raw units of native currency. (0 - 1000000000) native-currency-multiple = 100000000 # Number of raw units of native currency per display unit. (0 - 1000000000) skip-pow-check = false # Skip checking whether block hashes demonstrate proof of work. pow-minimum-bits = 16 # Initial and minimum proof of work difficulty, in leading zero bits. (1 - 32) target-adjust-freq = 86400 # Interval between proof of work difficulty adjustments, in seconds. (3600 - 4294967295) allow-min-difficulty-blocks = false # Allow lower difficulty blocks if none after 2_. only-accept-std-txs = true # Only accept and relay transactions which qualify as 'standard'. max-std-tx-size = 100000 # Maximum size of standard transactions, in bytes. (1024 - 10000000) max-std-op-return-size = 4096 # Maximum size of OP_RETURN metadata in standard transactions, in bytes. (0 - 1048576) max-std-op-drops-count = 5 # Maximum number of OP_DROPs per output in standard transactions. (0 - 100) max-std-element-size = 600 # Maximum size of data elements in standard transactions, in bytes. (128 - 32768) default-network-port = 7343 # Default TCP/IP port for peer-to-peer connection with other nodes. default-rpc-port = 7342 # Default TCP/IP port for incoming JSON-RPC API requests. chain-name = poc # Chain name, used as first argument for multichaind and multichain-cli. protocol-version = 10003 # Protocol version at the moment of blockchain genesis. network-message-start = f3d6f5fb # Magic value sent as the first 4 bytes of every peer-to-peer message. address-pubkeyhash-version = 00 # Version bytes used for pay-to-pubkeyhash addresses. address-scripthash-version = 05 # Version bytes used for pay-to-scripthash addresses. private-key-version = 80 # Version bytes used for exporting private keys. address-checksum-value = 00000000 # Bytes used for XOR in address checksum calculation. genesis-pubkey = 03f2e62e801f23ab42d86f5c7a4271454085475bb4ebe12a4ec04f4bac97597125 # Genesis block coinbase output public key. genesis-version = 1 # Genesis block version. genesis-timestamp = 1458756694 # Genesis block timestamp. genesis-nbits = 520159231 # Genesis block difficulty (nBits). genesis-nonce = 52968`

bitcartel commented 8 years ago

Hi, thanks for the info, it's been helpful. What version of multichaind and multichain-cli are you running You should see something like "build 1.0 alpha 19 protocol 10005" when you launch the tools on the command-line e.g. multichaind -version

reiven commented 8 years ago

We're using "version" : "1.0 alpha 18", "protocolversion" : 10003

bitcartel commented 8 years ago

If you upgrade the multichain tools to 1.0 alpha 19 it should work. I believe the issue is related to a RPC parameter used by the explorer which older versions don't support.

If this doesn't work, try creating a new chain with alpha 19 as well as a new explorer config file to point to this chain. Use the latest version of the explorer. There shouldn't be any problems showing the address page. Let me know how things go.

reiven commented 8 years ago

Hi @bitcartel , today i've created a new chain with alpha-23 and latest explorer, transfered some native currency coins and still, on address detail page, no native currency balance was shown

multichain_native_transfer

multichain_native_account_balance

Current version: MultiChain Core Daemon build 1.0 alpha 23 protocol 10005

reiven commented 8 years ago

ping

bitcartel commented 8 years ago

@reiven Merged. Thanks.

agramajo commented 6 years ago

Hi Following with this, reported issue #36 Regards

miozzz commented 6 years ago

I recently forked this repository and i was wondering if this is still working? Or how i can activate it?