To build the proxy run:
make
If you have upgraded and you find FFI issues, try:
make gitclean
make
If you want to install the linter we use try:
make install_lint
make lint
Coinbase/Rosetta integration for Filecoin
License: Apache License 2.0
We are seeing the network/status endpoint returning almost time.Now timestamp when it's still in message sync
state. Do you mind looking into this since our health check depends on the timestamp we are getting to determine if the node is queryable
when querying VestingSchedule on a multisig, we should return a 0 amount, otherwise the rosetta asserter failed the api response validation.
grpcurl -insecure \
-d '{"identifier": {"address": "t2g2zx5s76r374nqaop4cb4dx3e2zvvezfxn4seby"}, "filecoinSubAccount": {"address":"VestingSchedule"}}' \
c3-chainstdio-filecoin-testnet-dev.cbhq.net:443 \
coinbase.chainstdio.Chainstdio/GetAccountBalance
{
"status": {
"code": "INTERNAL_ERROR",
"message": "client_error: could not get account balance for \u0026{Address:t2g2zx5s76r374nqaop4cb4dx3e2zvvezfxn4seby SubAccount:0xc00222ae80 Metadata:map[]}: assertion failed: /account/balance Amount.Value is missing: balance amounts are invalid"
}
}
I also want to report a bug
? regarding the fee estimation. The response I am getting indicates a higher GasEstimateGasPremium
than GasEstimateFeeCap
. According to the v0.5.0 release note, GasFeeCap should be larger than GasPremium
.
A sender will never be charged more than GasFeeCap * GasLimit.
A miner will typically earn GasPremium * GasLimit as a reward.
request
curl --location --request POST '{{node-url}}/construction/metadata' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "testnetnet"
},
"options": {
"idSender": "t1d5l22aypjpzvtjbjsalw3gauwdf2edeqn6h2lui"
}
}'
response
{
"metadata": {
"chainID": "testnetnet",
"gasFeeCap": "119",
"gasLimit": "10000000000",
"gasPremium": "122201",
"nonce": 1
}
}
Originally posted by @qiwu7 in #50 (comment)
Rosetta describes an operation as the struct:
type Operation struct {
OperationIdentifier *OperationIdentifier `json:"operation_identifier"`
RelatedOperations []*OperationIdentifier `json:"related_operations,omitempty"`
Type string `json:"type"`
Status string `json:"status"`
Account *AccountIdentifier `json:"account,omitempty"`
Amount *Amount `json:"amount,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
// OperationIdentifier The operation_identifier uniquely identifies an operation within a
// transaction.
type OperationIdentifier struct {
Index int64 `json:"index"`
NetworkIndex *int64 `json:"network_index,omitempty"`
}
// AccountIdentifier The account_identifier uniquely identifies an account within a network. All
// fields in the account_identifier are utilized to determine this uniqueness (including the
// metadata field, if populated).
type AccountIdentifier struct {
Address string `json:"address"`
SubAccount *SubAccountIdentifier `json:"sub_account,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
// Amount Amount is some Value of a Currency. It is considered invalid to specify a Value without a
// Currency.
type Amount struct {
// Value of the transaction in atomic units represented as an arbitrary-sized signed integer.
// For example, 1 BTC would be represented by a value of 100000000.
Value string `json:"value"`
Currency *Currency `json:"currency"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
// Currency Currency is composed of a canonical Symbol and Decimals. This Decimals value is used to
// convert an Amount.Value from atomic units (Satoshis) to standard units (Bitcoins).
type Currency struct {
Symbol string `json:"symbol"`
Decimals int32 `json:"decimals"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
Must check values mappings against FileCoin's.
Tracking issue for:
/construction/metadata
/construction/submit
Currently construction/metadata
is returning responses with the field keys in Pascal Case.
// ChainIDKey is the name of the key in the Options map inside a
// ConstructionMetadataRequest that specifies the current chain id
const ChainIDKey = "ChainID"
// OptionsIDKey is the name of the key in the Options map inside a
// ConstructionMetadataRequest that specifies the account ID
const OptionsIDKey = "Id"
// OptionsBlockInclKey is the name of the key in the Metadata map inside a
// ConstructionMetadataResponse determines on how many epochs message should included
// being 0 the fastest (and the most gas expensive one)
const OptionsBlockInclKey = "BlockIncl"
// NonceKey is the name of the key in the Metadata map inside a
// ConstructionMetadataResponse that specifies the next valid nonce.
const NonceKey = "Nonce"
// GasPriceKey is the name of the key in the Metadata map inside a
// ConstructionMetadataResponse that specifies tx's gas price
const GasPriceKey = "GasPrice"
// GasLimitKey is the name of the key in the Metadata map inside a
// ConstructionMetadataResponse that specifies tx's gas limit
const GasLimitKey = "GasLimit"
However, the filecoin-lib is taking params in Camel Case. Can we unify them so that they are consistent. I am leaning towards snake case. Or we can use camel case if that's preferred. But we want to have them to be consistent
I created a swap key transaction and it's landed on chain and executed successfully on block
106251
. See filfox. But when I query block 106251
(suppose to be 106252) it does not show the swap key transaction within the response
curl --location --request POST 'http://10.200.131.19:8080/block' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "ignition"
},
"block_identifier": {
"index": 106252
}
}'
{
"block": {
"block_identifier": {
"index": 106251,
"hash": "0171a0e40220f267e9310938076e93ba38464d39e8059071e71b8b24f5aeea8ee84e13acbfb2"
},
"parent_block_identifier": {
"index": 106250,
"hash": "0171a0e40220e2a5763f0e1f9f6cb156da988faebc5617c682cd222d9628a808905da104df58"
},
"timestamp": 1601493930000,
"transactions": [
{
"transaction_identifier": {
"hash": "bafy2bzacea5ljsf44bxpfjvekhrjy3tu2sivajg7zeuxk7wvqc6rrps2tmssi"
},
"operations": [
{
"operation_identifier": {
"index": 0
},
"type": "Send",
"status": "Ok",
"account": {
"address": "f020522"
},
"amount": {
"value": "-1570930883653067943",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 1
},
"related_operations": [
{
"index": 0
}
],
"type": "Send",
"status": "Ok",
"account": {
"address": "f099"
},
"amount": {
"value": "1570930883653067943",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 2
},
"related_operations": [
{
"index": 1
}
],
"type": "Send",
"status": "Ok",
"account": {
"address": "f016408"
},
"amount": {
"value": "-209457451153742392",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 3
},
"related_operations": [
{
"index": 2
}
],
"type": "Send",
"status": "Ok",
"account": {
"address": "f099"
},
"amount": {
"value": "209457451153742392",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 4
},
"related_operations": [
{
"index": 3
}
],
"type": "Send",
"status": "Ok",
"account": {
"address": "f016408"
},
"amount": {
"value": "-631737796978014767",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 5
},
"related_operations": [
{
"index": 4
}
],
"type": "Send",
"status": "Ok",
"account": {
"address": "f099"
},
"amount": {
"value": "631737796978014767",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
}
]
}
],
"metadata": {
"blockCIDs": [
"bafy2bzacedom3utiadx45hpfo2h336oxxgtbzfh64zrfd5lvbgqktgdih55ji",
"bafy2bzacecvyr35gkt3etcjw7ukab23oqvq3v5d7jjtsn7tyn3xki67pgrc6i",
"bafy2bzaceb5onlw334fgtc3otfeuszyz6drpvzzlx5crxzsfy5nohrhmkuh3g",
"bafy2bzacedzmqejthyhmt3wbndt2vp4rjph3ql5a4rke7v4yuesk3knsqkko4",
"bafy2bzaceahc4xdzjnpvwfrfftvethqi3zai3yuib4a6gjsua3bhjasq4owpm",
"bafy2bzacecee6xcn3gq3ozkf5rohfzhkqe7iapenokwdy6asuumrbzdcimfuk",
"bafy2bzacebzhqo2gauyrfkwd35sssoxxkdwlp56bfleur5duwkbzrvxugoyf6",
"bafy2bzaceb6psbihpalizwdwskwg4tzu5jqbzae2gljt7pjpggzs37cirv7xq"
]
}
}
}
When calling api.ChainGetTipSetByHeight()
, responses take an inadmissible amount of time (see below). On consequence, we're getting timeout errors:
2020-08-10T16:29:49.709-0300 ERROR RPC_Lotus tools/api_timeout.go:46 call to Lotus RPC timed out!
2020/08/10 16:29:49 POST /block 40.53727604s
2020-08-10T16:29:49.711-0300 ERROR RPC_Lotus tools/api_timeout.go:46 call to Lotus RPC timed out!
2020/08/10 16:29:49 POST /block 40.540039043s
2020-08-10T16:29:49.977-0300 ERROR RPC_Lotus tools/api_timeout.go:46 call to Lotus RPC timed out!
2020/08/10 16:29:49 POST /block 40.805194847s
2020-08-10T16:29:49.977-0300 ERROR RPC_Lotus tools/api_timeout.go:46 call to Lotus RPC timed out!
2020/08/10 16:29:49 POST /block 40.804773912s
For this mulsig actor, I have queried total balance, locked, and spendable but locked + spendable does not equal to total.
Total = 0.0999
Locked = 0.0819
Spendable = 0.00796
See details below.
curl --location --request POST 'http://10.200.129.214:8080/account/balance' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "ignition"
},
"account_identifier": {
"address": "t020406",
"metadata": {}
}
}'
total balance = 0.099999999999992679
{
"block_identifier": {
"index": 112421,
"hash": "0171a0e40220c8c2bb351445b2726f6eaf5908081f8e5df3217faa5adda5611e2c95ac3bd18e"
},
"balances": [
{
"value": "99999999999992679",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
]
}
Locked balance = 0.081926440328920288
curl --location --request POST 'http://10.200.129.214:8080/account/balance' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "ignition"
},
"account_identifier": {
"address": "t020406",
"sub_account": {
"address": "LockedBalance",
"metadata": {}
},
"metadata": {}
}
}'
{
"block_identifier": {
"index": 112432,
"hash": "0171a0e40220e192d18be72f39babd51eb9759d235be89b6251907d5da260d4288631446f0cb"
},
"balances": [
{
"value": "81926440328920288",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
]
}
Spendable balance = 0.007960873199915737
curl --location --request POST 'http://10.200.129.214:8080/account/balance' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "ignition"
},
"account_identifier": {
"address": "t020406",
"sub_account": {
"address": "SpendableBalance",
"metadata": {}
},
"metadata": {}
}
}'
{
"block_identifier": {
"index": 112434,
"hash": "0171a0e40220f2c374ee1c76250a7b3307678fe484c47f35ebdef80026d77b85eda625fe3c9c"
},
"balances": [
{
"value": "7960873199915737",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
]
}
As posted by @qiwu7
@jleni can we reopen this? The second issue I reported is not resolved.
the transaction_identifier.hsh is inconsistent with block explorer. Not sure which one is correct and which is not. /block endpoint shows bafy2bzaceazqvy2eudmkvch4noyzqdj55k65phxsstbemitzisw7diqqjw324 whereas block explorer shows bafy2bzaceasogrhjxosqmdjyp6lcfhiu2eg24twfszhmvrslg7hesc3ozkrmi.
Based on #77 (comment)
Details here https://coinbase.slack.com/archives/C015GL8NME2/p1601498107131700
In Summary, let's update the account/balance
endpoint to
Balance
, which is the total balance (spendable + locked), when querying by defaultLockedBalance
sub account (Already allowed)Spendable
sub account (Optional since we can calculate)I created a swap key transaction and it's landed on chain and executed successfully on block
106251
. See filfox. But when I query block 106252
but it does not show the swap key transaction within the response
curl --location --request POST 'http://10.200.131.19:8080/block' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "ignition"
},
"block_identifier": {
"index": 106252
}
}'
{
"block": {
"block_identifier": {
"index": 106252,
"hash": "0171a0e4022075f2cc55995f746ccbc1c9026014a18fd7e6af41e3ca0f7407a4734ad49cd723"
},
"parent_block_identifier": {
"index": 106251,
"hash": "0171a0e40220f267e9310938076e93ba38464d39e8059071e71b8b24f5aeea8ee84e13acbfb2"
},
"timestamp": 1601493960000,
"transactions": [
{
"transaction_identifier": {
"hash": "bafy2bzacect6vnqlbhv4uqclmozk3as6xntiu77lr77y3ddyfn2riab4r4j2c"
},
"operations": [
{
"operation_identifier": {
"index": 0
},
"type": "AddBalance",
"status": "Ok",
"account": {
"address": "t3qg6sp6q7axsf2lecx45atrxisfn67ykguihzlnh3jib4a6rhtu65p2mq3oxicrsz7tnkco7niely6thjiora"
},
"amount": {
"value": "-623973500000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 1
},
"related_operations": [
{
"index": 0
}
],
"type": "AddBalance",
"status": "Ok",
"account": {
"address": "t05"
},
"amount": {
"value": "623973500000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
}
]
},
{
"transaction_identifier": {
"hash": "bafy2bzacebhwm4qufmxa2ebxgcmecgr3qfsqdugxfsq2bencttgsabjxmh4le"
},
"operations": [
{
"operation_identifier": {
"index": 0
},
"type": "AddBalance",
"status": "Ok",
"account": {
"address": "t3qg6sp6q7axsf2lecx45atrxisfn67ykguihzlnh3jib4a6rhtu65p2mq3oxicrsz7tnkco7niely6thjiora"
},
"amount": {
"value": "-311945500000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 1
},
"related_operations": [
{
"index": 0
}
],
"type": "AddBalance",
"status": "Ok",
"account": {
"address": "t05"
},
"amount": {
"value": "311945500000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
}
]
}
],
"metadata": {
"blockCIDs": [
"bafy2bzaceam6ethvhivsvk647a3c5tmmtco44dmo4hm2h47ht57tzdtku3ccq",
"bafy2bzacebaicoytjbn6hbwwxmvar7jmdaqybypqt3uvvwg2csttrv6ftutwu",
"bafy2bzacedzpbbiqw37kckg5jazcbbngt5xzwv6tcpv2zqwstnufdusf2na5w",
"bafy2bzaceaekv3duvvyzsaqt3qj55zdykz4elzrbynzvavwj4tatakwxduv46"
]
}
}
}
โ rosetta-cli git:(master) โ rosetta-cli version
v0.5.8
rosetta-cli view:networks --configuration-file rosetta-cli/filecoin//filecoin-testnet-asserter-config.json
loaded configuration file: rosetta-cli/filecoin//filecoin-testnet-asserter-config.json
{
"blockchain": "Filecoin",
"network": "ignition"
}
Error: error details populated in /network/options: /network/options: unable to get network options
According to the asserter, we shall not populate errors.details. I think the following 2 errors populates details
{
"code": 15,
"message": "unable to submit transaction",
"retriable": false,
"details": {
"lotusErr": "not enough funds (required: 1.300794209895606336 FIL, balance: 1 FIL): not enough funds to execute transaction"
}
},
{
"code": 22,
"message": "unable to get tipset",
"retriable": true,
"details": {
"lotusErr": "looking for tipset with height greater than start point"
}
},
This is what I submitted to node
curl --location --request POST 'http://10.200.202.84:8080/construction/submit' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "mainnet"
},
"signed_transaction": "{\"Message\":{\"Version\":0,\"To\":\"f023232\",\"From\":\"f1u232mkcpzm2souuvx6s7unlvi2vrt6satkf6ssi\",\"Nonce\":6,\"Value\":\"0\",\"GasLimit\":2000000,\"GasFeeCap\":\"148541\",\"GasPremium\":\"148429\",\"Method\":2,\"Params\":\"hEQAwLUBQAdYLYJVAaa3pihPyzUnUpW/pfo1dUarGfpAVQEFtaNvyHfp9mvCG3f0Wkm1gSoB1w==\"},\"Signature\":{\"Type\":1,\"Data\":\"rppTE9hbwPhahg03n3V+3U7o0FtfY3YAeNKwoeD5c1QBx9lmz9ZrnN8GG5lkuAflLGb52OCtOGSTxZrIRBIsmAA=\"}}"
}'
This is the filfox link for the failed transaction on chain https://filfox.info/en/message/bafy2bzaceag3de66b5wr3tjf7chgcmglbhdr4y4fb5mvuuu5uzv7zwghucomq
We should clarify, document and if necessary correct this.
One question on the new release. I remember the messages that is included in Block height N is not executed until height N+1. The previous implementation is returning transactions that are included in block N in the response of a N+1 block request. However the new implementation (https://github.com/Zondax/rosetta-filecoin-proxy/releases/tag/v0.801.2) using trace api is returning the transaction that is included in Block N in the response of a Block N request.
Would appreciate some clarification on this
Related to #68 (comment)
Both operations[0] and operations[1] have positive amount. But it should be positive on the receiver and negative on the sender
curl --location --request POST 'http://10.200.70.104:8080/block' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "testnetnet"
},
"block_identifier": {
"index": 80608
}
}'
response
{
"block": {
"block_identifier": {
"index": 80608,
"hash": "0171a0e40220081fb855aeb0746360729437281c873dfd1d4e3a76a1786439373afab33472c9"
},
"parent_block_identifier": {
"index": 80607,
"hash": "0171a0e4022095efb8b3ca5bd4c2b906d1277dca2d48641a42c2249aefe30ca2b3caa1fd437d"
},
"timestamp": 1600724640000,
"transactions": [
{
"transaction_identifier": {
"hash": "bafy2bzacebz4sfmw44ubrdmbgcleeeitgdkbws7qy2pom3ddsk6rpapwdawyk"
},
"operations": [
{
"operation_identifier": {
"index": 0
},
"type": "Send",
"status": "Ok",
"account": {
"address": "t3v567rl6mqri3nebwsglfdser5ms6fbe2cscujl5klil2gs2ihkicnu7ksufd4haosm2gymj74bjklgvbtika"
},
"amount": {
"value": "10000000000000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 1
},
"related_operations": [
{
"index": 0
}
],
"type": "Send",
"status": "Ok",
"account": {
"address": "t08257"
},
"amount": {
"value": "10000000000000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
}
]
}
],
"metadata": {
"blockCIDs": [
"bafy2bzaceavjlozicecq5j7xpse6s5mwjkrle55iax5hnk3qtomatmivehkbe",
"bafy2bzacectpqmy6w2xigkks7yphpundwzp5bck2hjkucx5b6hxq4ytijm4ju",
"bafy2bzaceaeortqkz6lepuw6fx7nsce4kkpzelfb6ifxz5wjf4idopo4cmai2"
]
}
}
}
Using an external file like config.yml, to store current api version, rosetta version, or some other common (constant) config that cannot be obtained thorough the api.
Can we have /account/balance to return nonce as well in the response?
what /account/balance
needs to include the following information
why this is essential for our Custody team to be able to show the client their account details.
Note: we will followup with where exactly we want to place these information. But we will be leveraging SubAccounts to expose these information in the API
References: MsigGetAvailableBalance
returns the unlocked balance of a Msig
, the actual โbalanceโ of the Msig actor is the total balance (including locked). There isnโt an endpoint to get the actual vesting schedule, but StateReadState
will get you the StartEpoch and UnlockDuration (itโs always linear vesting).
Block endpoint should return robust address instead of actor id. Otherwise this is causing our system to fail...
For this specific transaction, it should return f2t7asbzcu3eigpriih74efxanz26q3qhd22zqx7a
instead of f034062
curl --location --request POST 'http://10.200.134.183:8080/block' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "mainnet"
},
"block_identifier": {
"index": 161600
}
}'
{
"transaction_identifier": {
"hash": "bafy2bzacedycj6hoa57l4ksy3r5zytbfvvuhlsgll2xlehmvju3czskytnseq"
},
"operations": [
{
"operation_identifier": {
"index": 0
},
"type": "Propose",
"status": "Ok",
"account": {
"address": "f1uwckdtbjdp4fimoxl2tqp3wpm2ztbrmryxh44wi"
},
"amount": {
"value": "0",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 1
},
"related_operations": [
{
"index": 0
}
],
"type": "Propose",
"status": "Ok",
"account": {
"address": "f2t7asbzcu3eigpriih74efxanz26q3qhd22zqx7a"
},
"amount": {
"value": "0",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 2
},
"type": "Send",
"status": "Ok",
"account": {
"address": "f034062"
},
"amount": {
"value": "-10000000000000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 3
},
"related_operations": [
{
"index": 2
}
],
"type": "Send",
"status": "Ok",
"account": {
"address": "f1bnzfqy6ml5ee75auabkkugn4jv24bk7y3v3k7ly"
},
"amount": {
"value": "10000000000000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 4
},
"type": "Fee",
"status": "Ok",
"account": {
"address": "f1uwckdtbjdp4fimoxl2tqp3wpm2ztbrmryxh44wi"
},
"amount": {
"value": "-986500000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
}
]
},
In order to put some information into rosetta about node's sync status, we temporarily (as workaround) added to the /network/status
response, specifically into current_block_identifier.index
, the height of the latest synced block.
Expect also in this case:
current_block_identifier.hash
= 0000000000000000000000000000000000000000
current_block_timestamp
= 0
Example response when node is syncing:
{"current_block_identifier":{"index":6838,"hash":"0000000000000000000000000000000000000000"},"current_block_timestamp":0,"genesis_block_identifier":{"index":0,"hash":"0171a0e402201c1fb0c2e62d1857e523ea79898051c91e4b042c2ed96c4995c5002789570a210000000000000000"},"peers":[{"peer_id":"12D3KooWHCtoCvWMFodJQsZWCtA1XqxQvtumLWqe1FGwU7PyhVD7"},,...
Seems that there are several empty (or null) tipsets like this one.
This breaks rosetta's consistency check since tipset 1249
doesn't exists and tipset 1250
has 1248
as parent.
Adding a workaround from proxy side could be quite a mess.
Related to Zondax/rosetta-filecoin-lib#43 (comment)
this is returning 500 for me after the upgrade to v.0.7.0
curl --location --request POST '{{url}}/construction/metadata' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "testnetnet"
},
"options": {
"idSender": "t1zdqprv6ryul3md3xiqpsczpui7xmqwjztvhirsy"
}
}'
{
"code": 44,
"message": "unable to estimate gas limit",
"retriable": false
}
Currently the options is required when querying construction/metadata
https://github.com/Zondax/rosetta-filecoin-proxy/blob/master/rosetta/services/construction.go#L60-L62
We should expand it to have options as optional. Since there are use cases where we just need to do fee estimation for the network, which does not need the address. Also as the fields suggested, options
should be an optional field not required
IMO.
request
curl --location --request POST '{NODE_URL}/construction/metadata' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "testnet"
}
}'
response
{
"code": 0,
"message": "ConstructionMetadataRequest.Options is nil",
"retriable": false
}
getting duplicated transaction hash error while trying to sync from 50000 to 120010
Error: unable to process blocks: unable to process block: unable to store transaction hash: duplicate transaction hash: duplicate transaction bafy2bzacea5ljsf44bxpfjvekhrjy3tu2sivajg7zeuxk7wvqc6rrps2tmssi found in block 0171a0e4022016e66e66ffe5a99520283fa5fa3a963470163c31db7804f55163cf14e903d7a0:50003: unable to add block to storage 0171a0e4022016e66e66ffe5a99520283fa5fa3a963470163c31db7804f55163cf14e903d7a0:50003: unable to sync to 120010
Lotus provides endpoints for getting:
This issue is mainly to clarify the case where "sender address" nor "receiver address" are provided, since those parameters are necessary for lotus to get a good gas estimate.
@qiwu7 - When /construction/metadata
is used as "gas fee tracker" (where the options
field is not present), would be ok to retrieve only gasPremium
? (seems this variable is the only candidate to be queried without actually passing a sender address).
Create a test 1) getting metadata, 2) creating a tx 3) submitting to the network 4) waiting for the tx to be accepted
I am getting incorrect related_operations
when querying this specific block. This could be an issue just for this block. But I am logging it here so we can investigate. Basically only the operations that are really related should be populated with related_operations
information. operation_identifier.index = 2
should not be related to operation_identifier.index = 1
since they are not related. Similarly, operation_identifier.index = 4
should not be related to operation_identifier.index = 3
curl --location --request POST 'http://10.200.34.109:8080/block' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "ignition"
},
"block_identifier": {
"index": 41281
}
}'
partial response
{
"transaction_identifier": {
"hash": "bafy2bzaced7fxmdwaz547lmf3jcolgcezicz6endgmvcm7enxez674ek4nriw"
},
"operations": [
{
"operation_identifier": {
"index": 0
},
"type": "Send",
"status": "Ok",
"account": {
"address": "f00"
},
"amount": {
"value": "0",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 1
},
"related_operations": [
{
"index": 0
}
],
"type": "Send",
"status": "Ok",
"account": {
"address": "f00"
},
"amount": {
"value": "0",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 2
},
"related_operations": [
{
"index": 1
}
],
"type": "Send",
"status": "Ok",
"account": {
"address": "f015907"
},
"amount": {
"value": "-22559994676983002583",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 3
},
"related_operations": [
{
"index": 2
}
],
"type": "Send",
"status": "Ok",
"account": {
"address": "f090"
},
"amount": {
"value": "22559994676983002583",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 4
},
"related_operations": [
{
"index": 3
}
],
"type": "Send",
"status": "Ok",
"account": {
"address": "f3wg6t62ncadxwfl4f6kk4opixfibcicgbm5iothhjsaimn5uhvuvgmuzgchit5kb73mlaj3bbo3wkpggfdyzq"
},
"amount": {
"value": "-59999996797237373642",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 5
},
"related_operations": [
{
"index": 4
}
],
"type": "Send",
"status": "Ok",
"account": {
"address": "f090"
},
"amount": {
"value": "59999996797237373642",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
I cannot seem to get block 106991
curl --location --request POST 'http://10.200.134.183:8080/block' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "mainnet"
},
"block_identifier": {
"index": 106991
}
}'
Move rosetta-cli tests to GitHub actions plus our own remote runner
Extend Makefile and inject build time information (git revision + mod version for rosetta)
rosetta-filecoin-proxy/Makefile
Line 2 in c84a60d
This will improve
References:
https://stackoverflow.com/a/59244274/157726
https://www.yellowduck.be/posts/injecting-build-time-variables/
https://blog.alexellis.io/inject-build-time-vars-golang/
getting 500 when trying to send 12345 attoFIL, which is much less than 1 FIL. Not sure why it's complaining about insufficient fund
curl --location --request POST 'http://10.200.133.57:8080/construction/submit' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "ignition"
},
"signed_transaction": "{\"Message\":{\"Version\":0,\"To\":\"t1jgj2tnvj3rgr4skcdr77bo4vdp577x4i6aubcpi\",\"From\":\"t1wzixphsh3sxmjp2rc33fcz34vg354tzpwzhky7a\",\"Nonce\":0,\"Value\":\"12345\",\"GasLimit\":1140523656,\"GasFeeCap\":\"1140523656\",\"GasPremium\":\"146259\",\"Method\":0,\"Params\":\"\"},\"Signature\":{\"Type\":1,\"Data\":\"BTFWZy8ppS8qc+Hq6J2SYvQnTuBuHyad/5scWpWDLmJYZBbUZ3FaehY4HbaQNQ/OOBUVGPUedAjqHxGe9aaNZQE=\"}}"
}'
{
"code": 15,
"message": "unable to submit transaction",
"retriable": false,
"details": {
"lotusErr": "not enough funds (required: 1.300794209895606336 FIL, balance: 1 FIL): not enough funds to execute transaction"
}
}
I recently found out that construction/metadata
returns different nonces for an address from 2 different nodes. Both of our nodes are at the tip and one is returning nonce as 10
and the other one is returning nonce as 11
for this address t1zdqprv6ryul3md3xiqpsczpui7xmqwjztvhirsy
we have been using to test.
Ideas?
we need to reopen this #61. I am getting empty operations now...
{
"block": {
"block_identifier": {
"index": 80608,
"hash": "0171a0e40220081fb855aeb0746360729437281c873dfd1d4e3a76a1786439373afab33472c9"
},
"parent_block_identifier": {
"index": 80607,
"hash": "0171a0e4022095efb8b3ca5bd4c2b906d1277dca2d48641a42c2249aefe30ca2b3caa1fd437d"
},
"timestamp": 1600724640000,
"transactions": [
{
"transaction_identifier": {
"hash": "bafy2bzacebz4sfmw44ubrdmbgcleeeitgdkbws7qy2pom3ddsk6rpapwdawyk"
},
"operations": []
}
],
"metadata": {
"blockCIDs": [
"bafy2bzaceavjlozicecq5j7xpse6s5mwjkrle55iax5hnk3qtomatmivehkbe",
"bafy2bzacectpqmy6w2xigkks7yphpundwzp5bck2hjkucx5b6hxq4ytijm4ju",
"bafy2bzaceaeortqkz6lepuw6fx7nsce4kkpzelfb6ifxz5wjf4idopo4cmai2"
]
}
}
}
Like all the other numeric fields, we should use string for gasLimit. https://github.com/Zondax/rosetta-filecoin-lib/blob/master/construction_api.go#L90
construction/metadata is actually returning gasLimit as string. so we need to be consistent.
curl --location --request POST 'http://10.200.200.103:8080/construction/metadata' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "ignition"
},
"options": {
"idSender": "t1zdqprv6ryul3md3xiqpsczpui7xmqwjztvhirsy",
"idReceiver": "f133w2y5kjs7kmnekx327c5uz4tar2ql47ljup4fy"
}
}'
{
"metadata": {
"chainID": "ignition",
"gasFeeCap": "339488886",
"gasLimit": "1943095",
"gasPremium": "105181",
"nonce": 33
}
}
construction/metadata endpoint needs to return everything that is needed to construct a transaction. We need to add destinationActorId
to the response so that we can pass that in when construction transaction
https://github.com/Zondax/rosetta-filecoin-lib/blob/master/construction_api.go#L38
We are seeing the network/status endpoint returning almost time.Now timestamp when it's still in message sync
state. Do you mind looking into this since our health check depends on the timestamp we are getting to determine if the node is queryable
curl --location --request POST '{{node-url}}/account/balance' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "testnetnet"
},
"account_identifier": {
"address": "t1jabfbjgax5kbexiwzxjiii6le5yxtu43ui4jcaq",
"metadata": {}
}
}'
response
{
"code": 38,
"message": "could not retrieve actor from address",
"retriable": false
}
This is a address that is not registered on chain I believe. we should return 0 balance for this. Or return a more granular error that we can add handle for
I found out that there is inconsistent info reported by the network/status
endpoint. current_block_identifier.idnex
is showing 169111
while the sync_status.current_index
is showing 169110
. I would expect that they should be the same?
"current_block_identifier": {
"index": 169111,
"hash": "0171a0e4022096f0deb0db0de5160d21429668b2a40d0df01b0afb646d52db8ddc96789c99df"
},
"current_block_timestamp": 1596752575000,
"genesis_block_identifier": {
"index": 0,
"hash": "0171a0e402201c1fb0c2e62d1857e523ea79898051c91e4b042c2ed96c4995c5002789570a21"
},
"sync_status": {
"current_index": 169110,
"target_index": 169111,
"stage": "Sync Complete"
},
"peers": [
{
"peer_id": "12D3KooWPdUquftaQvoQEtEdsRBAhwD6jopbF2oweVTzR59VbHEd"
},
{
"peer_id": "12D3KooWQUB7ZQ7qeD4TNa5LBwUckn1jL2ghFdgZb8Ds2dhpBq1Q"
},
{
"peer_id": "12D3KooWBFeogxbb4J1Bbyo8fQS547oxSdpsyJMmNowNzx3qszdw"
},
{
"peer_id": "Qmf9W7yXzmG1N44wvg2etKCHHEacVAkrBHwTKxkXadqiE8"
},
{
"peer_id": "12D3KooW9szZmKttS9A1FafH3Zc2pxKwwmvCWCGKkRP4KmbhhC4R"
},
{
"peer_id": "12D3KooWRx1aPKD89Le4GsYYotvaccrXWkWLRqf7eCewvQuuXHtT"
},
{
"peer_id": "12D3KooWQdSMwTyyTVj5jABpBwG1ZdD1e2d3CGEyZSxE7U4HfLcw"
},
{
"peer_id": "12D3KooWJy2UrEp6SgNVWG2guvPXZ8hpEHESHf3LycLTJCqC8m3L"
},
{
"peer_id": "12D3KooWBs9u9qK4ojJpgYX7xJtRXPwJXfGdPaixCEbi1PEHjGrX"
},
{
"peer_id": "12D3KooWLhiRxj84SzxrJ2scAGVqCU2D9MEjFqoy4omSMWXoYs2H"
},
{
"peer_id": "12D3KooWQQFUj2tQ7VF4gYxmo8em1bPuGxu9HJuNz62T7xgXtGC2"
},
{
"peer_id": "12D3KooWGwnj8kMpGbn18uMX5NC7MUcETNq1FDJNbR3xSWP43bZo"
},
{
"peer_id": "12D3KooWLirm8yGZizCiLfQ67nwwsS3LggDj14WGra9EXKVBETBv"
},
{
"peer_id": "12D3KooWMtY93KaQyj1pYArjd8woFVb1p5SYKPeZpkC4KrWb5hKP"
},
{
"peer_id": "12D3KooWL6ZdL6erzYctZpPPPXmMk59if2X1Vnufc2vhm4cWCiiX"
},
{
"peer_id": "12D3KooWS82Zaps2yNUpN7EjQDHEGBqWhZYfvCL2mjNkrgQQCeKF"
},
{
"peer_id": "12D3KooWMMhC64h7bNNwgkNZjoKAsWuY1De4SK8VG7mbqEqjnWCj"
},
{
"peer_id": "12D3KooWPn3dBAFtgjHq12zqbSvRGinZKhauWBnTUQdcTBugB23o"
},
{
"peer_id": "12D3KooWNdW9oAyRFid89uBZeotZ3yUkv2G134edYEeTDqzJZ6bF"
},
{
"peer_id": "12D3KooWQjR727j4qHLUSinWZ6anRgfyZDysJ8Nqs9iNciiM3bsJ"
},
{
"peer_id": "12D3KooWQSCkHCzosEyrh8FgYfLejKgEPM5VB6qWzZE3yDAuXn8d"
},
{
"peer_id": "12D3KooWHuRCgNHA5xkseCuN3hEQoKT7gDDLUrGp2JaRdskYvHvd"
},
{
"peer_id": "12D3KooWAhK3sfk1ZVjwqaNrSMWGgYQ1xNnztCwS72tB6mWUk8Cc"
},
{
"peer_id": "12D3KooWH7G9QTj513VKXWsqfkJAsP2qiSkWHXmubNi75HyhJSvh"
},
{
"peer_id": "12D3KooWHao8G41SWP145LpEFs7aXQuqi4EfPQVPitos162E6d55"
},
{
"peer_id": "12D3KooWQVb8FTW2ZeicMrrUA21jV58XV5fv1mioK4KjZRFmMULF"
},
{
"peer_id": "12D3KooWJD9RUMSnXoR5DzuVUv18NU5wie5NqcV3dnEW5nY7ti25"
},
{
"peer_id": "12D3KooWBvGBa3vPnMbraVh9j4pVEa5ytzs9Piq9KAcm5XaGKrFN"
},
{
"peer_id": "12D3KooWKU55pyeZV6QHbPthAmBHyV9C5DEXuLRtFqdcFV1iYBBf"
},
{
"peer_id": "12D3KooWGXLHjiz6pTRu7x2pkgTVCoxcCiVxcNLpMnWcJ3JiNEy5"
},
{
"peer_id": "12D3KooWEGwS2nCuVcCHQG9isxLraj7bL17Z56SYRXgRknGAHK51"
},
{
"peer_id": "12D3KooWLPs7mkaxszYRWbFkA1yBqzCDCrtMKw2a5TmDVDbLyicD"
},
{
"peer_id": "12D3KooWDZxEtXGBFC4GVYFbZJxNv67nkViUWws5GfQJgfPEKubF"
},
{
"peer_id": "12D3KooWQzhpDe1iTzZ97ukPmLJ5Z2DoqAkp6xujQg38yRiTZwYs"
},
{
"peer_id": "12D3KooWSQzvrpjP1AWERXQz3oKBCbYGZnKcsLzLFPbHY38wcGxA"
},
{
"peer_id": "12D3KooWKLfQs9VVG91C6k6GKxvk4kn4urbPqsBs1nvZDFhUjNwk"
},
{
"peer_id": "12D3KooWAZPyGd5N5RLifjvUk47u6EciZHhmb3Tz8fzhbD3nwLHT"
},
{
"peer_id": "12D3KooWCVcKvY5r1ATEaS612FdPAyPfzrgnWYFyw1WZimdXKhh9"
},
{
"peer_id": "12D3KooWCUkXCtxXNhoyi5xFBNMp1e646fRxrod6tRouJTCQmUDr"
},
{
"peer_id": "12D3KooWLmJkZd33mJhjg5RrpJ6NFep9SNLXWc4uVngV4TXKwzYw"
},
{
"peer_id": "12D3KooW9wr4k5DsFP2TVmH9MqtQb7fKj4tAyh2HYM9YymWT34UP"
},
{
"peer_id": "12D3KooWFGu3SavHFaknoo2QqddffJ3pNsMa2jzT6hCaMDpcM75s"
},
{
"peer_id": "12D3KooWLCFrh4MC955joXeqMdV8fMTRUAHNf7ddnPtTfbeCbdV2"
},
{
"peer_id": "12D3KooWLsEHxYi2HcL92bp26E7jr4JKH5AU2nKxnmgjxnkkSBmF"
},
{
"peer_id": "12D3KooWNVt9bwSy769p6MHPJmwY2RVjoQyQhRaxGCBuHesKg9KJ"
},
{
"peer_id": "12D3KooWDUhrkaob7cLz8jkQVBeHL571QLobW3A7MsKoE73mRHh5"
},
{
"peer_id": "12D3KooWC744CMY8CMxAyQ45j1gChKU7LdqTY6hnyXGgC6TVDMUh"
},
{
"peer_id": "12D3KooWMd7XvJ8gEYkz7ghsmE4eMbdmz5UvkiAcMxAjxioFfaJ8"
},
{
"peer_id": "12D3KooWENNWUR87XHFRiJcJb34kbAUYtV1HtBhknjYGPJnTC9pi"
},
{
"peer_id": "12D3KooWAGRND1gCSGqZT9FGKKu78v6fznSPA8e8Z7R4MsdGgFPJ"
},
{
"peer_id": "12D3KooWS6izp6VJNTS3i3oWW568tWdUxHGeVFtjLSXqr2m2vnBt"
},
{
"peer_id": "12D3KooWHnWPz7nLCXsPZUvNhZx7xSuwxzH5JkwWgmEVUt9dYmQb"
},
{
"peer_id": "12D3KooWAwfVCQQD1LKN3KGfgFuSbUHYTUgziAdmZi4pJFLG5Xi3"
},
{
"peer_id": "12D3KooWPhFkJ1VPpBNoFb9Syw1185f1qsFw9Dma5tWATSr1yKBg"
},
{
"peer_id": "12D3KooWGxdxn4NNmeSQAb2vd9Am72TpwBjhPe4QNFykRTTowq8D"
},
{
"peer_id": "12D3KooWQudj7qXYXkyegvMVsToWbphigzJQ5WH8tgM6fPhSg9JL"
},
{
"peer_id": "12D3KooWEXN2eQmoyqnNjde9PBAQfQLHN67jcEdWU6JougWrgXJK"
},
{
"peer_id": "12D3KooWDKiS84FndynmuogYhjj3jsFv5GnYEtpRpxbyzJhQGr2g"
},
{
"peer_id": "12D3KooWMqVqzZ4BJkbf8iW3TgtGHpxbvBZGYr37VS1GGLD8HFMe"
},
{
"peer_id": "12D3KooWRCyALAKv88WE8jy3HXWzrJS1PmU7PgCKssYARfZuTW1K"
},
{
"peer_id": "12D3KooWLoVLEt3PDDSk1kzyyZ29mqJuRdhrGUtrCZk7icFRwzr9"
},
{
"peer_id": "12D3KooWAwz1YT2MoaavwtPA8zueJV32DrJVqhVY73BGrjTkBHst"
},
{
"peer_id": "12D3KooWLSbxTrrjB5fWFNYj5RvTJ9kzB9oQajfJVYaRWxrZkTUS"
},
{
"peer_id": "12D3KooWHUugwRhzp9ZBMEnoCKoudRut9P7F2HqVbC4UJbZHq2Aw"
},
{
"peer_id": "12D3KooWAsT5CjEE3g3fQrvBcamPMHU95VsXTa4gaVMRKcNPwxAV"
},
{
"peer_id": "12D3KooWP3DAncu4TM9EMsNAmUhiuFAmQ4AZU1ksiUHg7mJscfyC"
},
{
"peer_id": "12D3KooWFvo3V9PKrfnRkE7vUeLz3m7bxVaF2XxKX2bu8TwRKobV"
},
{
"peer_id": "12D3KooWGR3z6WvZ7eNqp6gcCASVy79QMGwTVS44DmdJoDr78EiD"
},
{
"peer_id": "12D3KooWBuK89mK7e2RFGksphBBeiT36AstM5zGPMSFCn8zLaubD"
},
{
"peer_id": "12D3KooWN73Q7FiTMunyH4c6CwQdMwVHWxRMRbL9JLqcVQ7S6E5q"
},
{
"peer_id": "12D3KooWJSWwmAdDXxZajz1xjxRv3hdRrMULZ74QpN2XcYCqiEkA"
},
{
"peer_id": "12D3KooWN6Y7kt64ZjPF9ziwiWR1ZaJ11HF3n39SSGtoCsmBjiaW"
},
{
"peer_id": "12D3KooWBQBgS7MuZvYb7WnupsG4djMCUYc6hkvYgusqwhqgbD7h"
},
{
"peer_id": "12D3KooWNU77pMMcwBYqRMN8s7w5XTLDtZCQa8NmUndRGgVRHbsM"
},
{
"peer_id": "12D3KooWQSJMrfpXdPdr9s7N793Fqja1nHwbZzzi9qsi4DjRkEnn"
},
{
"peer_id": "12D3KooWK9k9qVJLaa2RNqG7M37gdScLb35wug88fWaNx5q6qSPZ"
},
{
"peer_id": "12D3KooWSt9hmaRRN8RqJLWSAtq17Q22qEeCR9fzfvMYToS92ykh"
},
{
"peer_id": "12D3KooWHtZRu7JhVbCZfw1KusgkRqyUgwWA5ptt1AmPQyqfYMrf"
},
{
"peer_id": "12D3KooWCrGa847ziE9d99AvtHAWjYRMERKBfLbS8toTSc7FqZbw"
},
{
"peer_id": "12D3KooWA7491jxF6UQ4ycKPut2K8kgW5k2mMr98spVD2AHDcawd"
},
{
"peer_id": "12D3KooWResJa4QGmY3DLoxsnwCUyWJMEJhZY5v1nU1HVVWM9SmJ"
},
{
"peer_id": "12D3KooWHbNc6BWDWWj9rbWLQ9iP3rMZjRUz7ppNYRbgjDXMNamH"
},
{
"peer_id": "12D3KooWQiFu2aRKqdhSa3acD5EAVspaDWJMHiZnj2Jg9nHDbfqF"
},
{
"peer_id": "12D3KooWQCDujyPh48L7YfXvCf8dM8Cnh3BAFMF9rWwmYMagnBmD"
}
]
}
There are 2 issues I am seeing with the /block
response using the latest release. These 2 issues were not seen from the previous release.
related_operations
field is populated incorrectly. The 2 send operations are supposed to be related, and the fee operation is not related to the send operation/block
endpoint shows bafy2bzaceazqvy2eudmkvch4noyzqdj55k65phxsstbemitzisw7diqqjw324
whereas block explorer shows bafy2bzaceasogrhjxosqmdjyp6lcfhiu2eg24twfszhmvrslg7hesc3ozkrmi
.curl --location --request POST 'http://10.200.76.54:8080/block' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "ignition"
},
"block_identifier": {
"index": 106233
}
}'
Current response
{
"block": {
"block_identifier": {
"index": 106233,
"hash": "0171a0e402209c6327544e2b193538e769282609d06393a5e4b4c7de5565af47cfc9c813ee25"
},
"parent_block_identifier": {
"index": 106232,
"hash": "0171a0e40220b77b44510e74a9e01522f41fae400d8b9ba2ec1b05ff55f5d67c6900490b1c93"
},
"timestamp": 1601493390000,
"transactions": [
{
"transaction_identifier": {
"hash": "bafy2bzaceazqvy2eudmkvch4noyzqdj55k65phxsstbemitzisw7diqqjw324"
},
"operations": [
{
"operation_identifier": {
"index": 0
},
"type": "Send",
"status": "Ok",
"account": {
"address": "t1zdqprv6ryul3md3xiqpsczpui7xmqwjztvhirsy"
},
"amount": {
"value": "-10000000000000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 1
},
"type": "Send",
"status": "Ok",
"account": {
"address": "t1u232mkcpzm2souuvx6s7unlvi2vrt6satkf6ssi"
},
"amount": {
"value": "10000000000000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 2
},
"related_operations": [
{
"index": 1
}
],
"type": "Fee",
"status": "Ok",
"account": {
"address": "t1zdqprv6ryul3md3xiqpsczpui7xmqwjztvhirsy"
},
"amount": {
"value": "-434268",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
}
]
},
...
],
"metadata": {
"blockCIDs": [
"bafy2bzacedcabkf4eoxcusla6eqah45t6nl2xvkxgcg2lyazobibpkaw5r2hu",
"bafy2bzacebkwu2eewwqk2fk5okzkyumhgihlosjblmbgq4rof2tzcrtbu6isy",
"bafy2bzacebvzxcfjlxmeqjtlwvphzzpy2gxto4dedc5bkemubff4rxowhu5ca",
"bafy2bzaced7wtjq3v5e676bu6yny2d652pvh3tyopx66kzmsp766yzqisxgmk",
"bafy2bzaceaujxcsty5qeiclapea2eo6pw2hkb5mog4bcm23tuzt2pydgsx5ki"
]
}
}
}
Correct response
...
"transactions": [
{
"transaction_identifier": {
"hash": "bafy2bzaceazqvy2eudmkvch4noyzqdj55k65phxsstbemitzisw7diqqjw324"
},
"operations": [
{
"operation_identifier": {
"index": 0
},
"type": "Send",
"status": "Ok",
"account": {
"address": "t1zdqprv6ryul3md3xiqpsczpui7xmqwjztvhirsy"
},
"amount": {
"value": "-10000000000000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 1
},
// This is related to the other Send Operation
"related_operations": [
{
"index": 0
}
],
"type": "Send",
"status": "Ok",
"account": {
"address": "t1u232mkcpzm2souuvx6s7unlvi2vrt6satkf6ssi"
},
"amount": {
"value": "10000000000000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 2
},
"type": "Fee",
"status": "Ok",
"account": {
"address": "t1zdqprv6ryul3md3xiqpsczpui7xmqwjztvhirsy"
},
"amount": {
"value": "-434268",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
}
]
},
...
The total message cost for this message is supposed to be 3217694000000
per lotus
lotus state msg-cost bafy2bzacebpiofy4wigkyifdrqajxzu3galf6yktsqbxsz3qfesmwcbey5yp2
Message CID: bafy2bzacebpiofy4wigkyifdrqajxzu3galf6yktsqbxsz3qfesmwcbey5yp2
Gas Used: 433268
Base Fee Burn: 634120213100
Overestimation Burn: 2293029786900
Miner Tip: 290544000000
Refund: 182170000000
Total Cost: 3217694000000
But Rosetta block endpoint is returning GasUsed 433268
{
"transaction_identifier": {
"hash": "bafy2bzacebpiofy4wigkyifdrqajxzu3galf6yktsqbxsz3qfesmwcbey5yp2"
},
"operations": [
{
"operation_identifier": {
"index": 0
},
"type": "Send",
"status": "Ok",
"account": {
"address": "f133w2y5kjs7kmnekx327c5uz4tar2ql47ljup4fy"
},
"amount": {
"value": "-10000000000000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 1
},
"related_operations": [
{
"index": 0
}
],
"type": "Send",
"status": "Ok",
"account": {
"address": "f1zdqprv6ryul3md3xiqpsczpui7xmqwjztvhirsy"
},
"amount": {
"value": "10000000000000000",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
},
{
"operation_identifier": {
"index": 2
},
"type": "Fee",
"status": "Ok",
"account": {
"address": "f133w2y5kjs7kmnekx327c5uz4tar2ql47ljup4fy"
},
"amount": {
"value": "-433268",
"currency": {
"symbol": "FIL",
"decimals": 18
}
}
}
]
}
So far, these are the accounts that failed the reconciliation process:
f3uoqutdycltbu4zq2p3rqlupujisnu3dlfmcj56bu7c5kdv4dq4hps7z3qjtk622hzr2ugicmrpccp3ha5ovq
f3vm4fwomf2wdtl3hrw627oonq6jox5lvoz5cfsmdxlyqfjpuyijh4ak3yweyjykeh7c6bi2k2ojwszvsgy53q
f3si2oqasvjfwl2pru4cfo3ya4v453colfcciw6oyonsur6vd5efqmbkof5i2cx7qjnwfezrlh7girqplj6j3a
f3w7zc2esxrf5hpogregdgq4asryne7l4mxzzutetiurrww2pvk62dylvlstag334sjy2b3n5km4qtbtulbflq
f3swvvsfqqalu2hthx3n36p65qdu2gby64i5coli6veswfbb6qecfpwbcr46plm3ne5loy6xqp24rnxylxs5ba
f3rfpoahexgfajmzjyth7jcknhfu34ylyrfhynaofaibqz26nxcuxicub2nno7pvxc57guulsxjpqikm4ejmhq
f3rjt5gk5ocmj56n3jpozaop5e2qjwbbqve7l2wsfk3h4xvei7seetqqs4kdvbiy52mwtcbzxqmzlfwddsd5ta
f1asufjje3fojogeaxp3gnrbze7lcjc4tawocewwa
f099
f02
f022374
f022820
f02528
f020330
f015932
f02425
f024031
Tested tipsets: from height 120000
to 120010
The proxy uses lotus StateCompute
endpoint to get the traces of the executed transactions.
Then it traverses all of the subcalls searching for methods that produce a balance state change:
Send
, AwardBlockReward
, OnDeferredCronEvent
and Fee
(gasUsed)
network list is returning ignition
when querying the network list.
curl --location --request POST 'http://10.200.75.175:8080/network/list' \
--header 'Content-Type: application/json' \
--data-raw '{}'
{
"network_identifiers": [
{
"blockchain": "Filecoin",
"network": "ignition"
}
]
}
But Construction/metadata and few other endpoints returns this for me.
curl --location --request POST 'http://10.200.75.175:8080/construction/metadata' \
--header 'Content-Type: application/json' \
--data-raw '{
"network_identifier": {
"blockchain": "Filecoin",
"network": "ignition"
},
"options": {
"idSender": "t1zdqprv6ryul3md3xiqpsczpui7xmqwjztvhirsy",
"idReceiver": "t1qf3zwo5i6wdcbbz6ym2gljesw47mzfj7culdabq"
}
}'
{
"code": 0,
"message": "requestNetwork not supported: &{Blockchain:Filecoin Network:ignition SubNetworkIdentifier:<nil>}",
"retriable": false
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.