reject transaction filter working before approvefrom is executed

+2 votes

I tried to deploy the reject-all-transactions.js given in the code examples. The filter was compiled and then when I tried to run the approvefrom true for the filter it just doesn't allow it. The filter is working already for the approvefrom command only. It doesn't apply to other transactions. Attaching my code execution below.

 

testingsmartfilters: getfiltercode rejectfilter

{"method":"getfiltercode","params":["rejectfilter"],"id":"31237136-1540182035","chain_name":"testingsmartfilters"}

 

function filtertransaction() { return 'All transactions rejected' }

testingsmartfilters: listtxfilters

{"method":"listtxfilters","params":[],"id":"62675408-1540182044","chain_name":"testingsmartfilters"}

 

[

    {

        "name" : "firstfilter",

        "createtxid" : "a72e6bcb8e49cc07c81b694d22d85ffb4be591d27b09ae6581fb9eea18626718",

        "filterref" : "47-265-11943",

        "language" : "javascript",

        "codelength" : 139,

        "for" : [

        ],

        "compiled" : true,

        "approved" : true

    },

    {

        "name" : "rejectfilter",

        "createtxid" : "2aed8e513fc295af15010bd39409f26a7033017dfad98c5b53c4dc051959ba6d",

        "filterref" : "71-265-60714",

        "language" : "javascript",

        "codelength" : 67,

        "for" : [

        ],

        "compiled" : true,

        "approved" : false

    }

]

testingsmartfilters: approvefrom 1KHCUryUcu8MBcvwiF5zgxePbVfm18JJv4 rejectfilter false

{"method":"approvefrom","params":["1KHCUryUcu8MBcvwiF5zgxePbVfm18JJv4","rejectfilter",false],"id":"84112443-1540182070","chain_name":"testingsmartfilters"}

 

2e28c4b7d7d823d169183ca02194ebdab2c06b186004094436ef6680c4d3fa4d

testingsmartfilters: approvefrom 1KHCUryUcu8MBcvwiF5zgxePbVfm18JJv4 rejectfilter true

{"method":"approvefrom","params":["1KHCUryUcu8MBcvwiF5zgxePbVfm18JJv4","rejectfilter",true],"id":"47671806-1540182074","chain_name":"testingsmartfilters"}

 

error code: -26

error message:

Error: The transaction was rejected: 64: The transaction did not pass filter rejectfilter (txid 2aed8e513fc295af15010bd39409f26a7033017dfad98c5b53c4dc051959ba6d): All transactions rejected

testingsmartfilters:

asked Oct 22, 2018 by jeshocarmel
And the blocks are not getting generated anymore :(

testingsmartfilters: getmempoolinfo
{"method":"getmempoolinfo","params":[],"id":"47012738-1540183383","chain_name":"testingsmartfilters"}

{
    "size" : 7,
    "bytes" : 1849
}
I created a new chain and ran testxfilter on the limit-asset-transfer.js example given in github. The testtxfilter is working fine as expected but when approvefrom is executed the chain goes to a limbo and all transactions are stuck in the mempool. Is this due to the coinbase transaction issue which you guys had mentioned to me earlier?

1 Answer

0 votes
Yes, the problem is related to the coinbase issue that will be fixed in the next alpha. In the meantime, we've updated the smart filter examples so this should not be a problem.
answered Oct 22, 2018 by MultiChain
...