invalid zcash address while rawtransaction - blockchain

I am looking to perform raw transaction between t-address and z-addresses of zcash
I have tried the following things
when i use createrawtransaction it is throwing "invalid zcash address"
error
~/zcash$ ./src/zcash-cli createrawtransaction
'[{"txid":"f7e04b684ee10c3c8e7aacdcd11454e7f21d91c5a8b27ae6cbbbca93efa57ddd","vout":0}]'
'{"ztJTQ72v68ZddM4vmJg77K1mdBXHWQPS8GXN4Yb7A8e48JUo3tNzLgej1yqFPFeNkVUL1CMeg62qHMr7joaYK35A86neMNM":7,"tmNHNUV56LiEyb8cSrrAgupHXnrxhbN1H6v":2.9999}'
error code: -5 error message: Invalid Zcash address:
ztJTQ72v68ZddM4vmJg77K1mdBXHWQPS8GXN4Yb7A8e48JUo3tNzLgej1yqFPFeNkVUL1CMeg62qHMr7joaYK35A86neMNM

In the RPC call above :
the address format you are using ztJTQ72v68ZddM4vmJg77K1mdBXHWQPS8GXN4Yb7A8e48JUo3tNzLgej1yqFPFeNkVUL1CMeg62qHMr7joaYK35A86neMNM is not in the acceptable format, please use an acceptable encoded format public address.
Your second parameter tmNHNUV56LiEyb8cSrrAgupHXnrxhbN1H6v is the correct format used while calling this RPC method.
Rest all looks good.

Related

Vulkan image incompatibility, is there a nice way to check which parameters are incompatible?

My validation errors are returning the following error:
Message ID name: VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251
Message: Validation Error: [ VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251 ] Object 0: handle = 0x1867f53a780, name = Logical device: NVIDIA GeForce GTX 1070, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xbebcae79 | vkCreateImage(): Format VK_FORMAT_R8G8B8A8_SRGB is not supported for this combination of parameters and VkGetPhysicalDeviceImageFormatProperties returned back VK_ERROR_FORMAT_NOT_SUPPORTED. The Vulkan spec states: Each of the following values (as described in Image Creation Limits) must not be undefined : imageCreateMaxMipLevels, imageCreateMaxArrayLayers, imageCreateMaxExtent, and imageCreateSampleCounts (https://vulkan.lunarg.com/doc/view/1.2.198.1/windows/1.2-extensions/vkspec.html#VUID-VkImageCreateInfo-imageCreateMaxMipLevels-02251)
Severity: VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT
I know exactly the place in the code that's causing this, however I don't know which combination of parameters is at fault. Is there a way to get the driver to indicate:
"Your image is format x which is incompatible with usage type y" or something like that?
If some parameters are clashing, then ask https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues for improved error reporting. There should ideally be appropriate error message.
But if the GPU simply does not support given combination of parameters, then there is nothing that can be done. It is meaningles to ask "why don't you support X". They simply don't, because it is not implemented or not implementable on given GPU\driver.

A Regex that search for lines that contains a string, and not contains another string

I want to analyze an error log. So I decided to search for all the error header in the error log using Notepad++ so I can get all the first line of the errors on search result (which contains short description about the error) to determine if I need to look deeper into it. But the error log apparently is full of 'useless' error log from one kind of event, like 90% of it, so it kinds of hide the real error, like searching a needle in haystack.
So from this example made up error log:
ERROR on Server1: Network connection reset.
DETAIL: The client is gone.
ERROR on Server2: Network connection reset.
DETAIL: The client is gone.
ERROR on Server1: Network connection reset.
DETAIL: The client is gone.
ERROR on Server1: Null Pointer Error.
DETAIL: Object 'Cart' does not exists.
STACKTRACE:
at UpdateCart function
at AddProducttoCart function
ERROR on Server2: Network connection reset.
DETAIL: The client is gone.
ERROR on Server2: IO Error
DETAIL: The resource on URL (www.example.com/data.xls) does not exists.
ERROR on Server2: Network connection reset.
DETAIL: The client is gone.
I want to create a regex on Notepad++ search that search for line that contains string "ERROR on" but does not contain "Network connection reset", so the search result will only contain:
ERROR on Server1: Null Pointer Error.
ERROR on Server2: IO Error
How can I do that? I've read somewhere that inverse matching on regex is somewhat hard and unusual, but it's possible. Thanks.
Btw, I've tried some other way to do this, like finding for "ERROR on" + (.*) + "Network connection reset", then replace it with empty string, so that next time I search for "ERROR on", they will not appear. But the error log becomes scrambled with weird symbols after the search and replace, and Notepad++ kinda crashing after that. I don't know. I never have any luck search and replace on Notepad++ using regex.
I would use negative lookahead.
^(?!.*?\bNetwork connection reset\b).*\bERROR on\b.*
^ERROR on (?:(?!Network connection reset).)*$
You can use a lookahead in your regex.See demo.
https://regex101.com/r/pV0fH2/1

How to get a C++ perror(errno) message without printing it.

If you use 'perror(errno)' it automatically prints the error to the standard error output-stream. Is there a way to get the value that would be printed without printing it?
You can use one of the strerror functions for that. They'll retrieve the error message without printing it.

Why this o/P...Server Upload Failed

Please tell me why iam always getting "Server Upload Failed!" in the code
given below.
int rval = 28;
char *return_str=NULL;
return_str = strdup((rval!=28) ? ("Server Upload Failed!") : ("Server TimeOut Reached!"));
printf(" return_str : %s\n", return_str);
Output that iam getting is ====> Server Upload Failed! . I want to know why it is not giving
"Server TimeOut Reached!" as output .
Platform : Linux , gcc-compiler
It looks correct to me, once I read it a couple of extra times. It should generate the latter string ("Server TimeOut Reached").
Not sure why you would ever need to call strdup() on a static string, instead of just using the literal directly. One case would be if there sometimes a need for a more dynamic string I guess, so whoever receives the value assumes it's dynamic and takes ownership.

what is the deal with Facebook API error: Could not parse into a date or time

Im getting group wall posts , just fine in the end of the json response , im getting the paging object
when i take the previous value and try to http request it:
https://graph.facebook.com/175923872448029/feed?access_token=**********13c0fd29b9-557002013|N-oGZ6q2sNDNg1I3leS0v9U-TDw&limit=25&since=2011-01-25T1100253A3400253A2100252B0000
im getting this error :
{
"error": {
"type": "InvalidArgumentException",
"message": "Could not parse '2011-01-25T1100253A3400253A2100252B0000' into a date or time."
}
}
what is wrong with the date ?
when you open https://graph.facebook.com/175923872448029/feed in your browser you'll notice that the paging link consists of utf numeric codes which have to be decoded prior to using them [edit].
However, when I requested the same object using the PHP SDK I got an encoded URL which works fine.
The reason for that behaviour is explained, I believe, in this post.
In summary, you have to check what the returned string looks like and decode it adequately before you proceed.