I changed my deserializing code to use the above, but I'm getting the same exception. I also tried to call isInitialized on the instance given to me, and the instance is not initialized. That is, isInitialized returned false. I'm plugging in to a large framework that I'm not entirely familiar with (Hadoop), so I can only speculate what's going on here. I think that the Message instance given to me was created with reflection and is not a valid Message. I'm making this claim because isInitialized is returning false.Is there any other way to deserialize?
Parse FIX Protocol Message and log files directly in browser without sending data across the Internet. Multiple FIX dialects support. Message Filtering.
Can you provide any other good approaches to debugging this? In the meantime, I'm going to take my example out of the large framework in hopes of better understanding the problem I'm having. The protocol compiler would not allow you to use tag zero anyway. It looks like your input data is not identical to the data written by the sender.I'm confident that the sender data is the same data that is created when I serialize. Perhaps I'm serializing incorrectly? I'm creating a CodedOutputStream given an OutputStream and passing that to writeTo. However, I'm not using a CodedInputStream to deserialize.
Now isInitialized is returning true, though I'm still having problems deserializing. Now that I'm using OutputStream and InputStream, I'm getting the following exception:com.google.protobuf.InvalidProtocolBufferException: Protocol message tag had invalid wire type.I'm going to take my code out of Hadoop to see if Hadoop is causing these issues. I'm still weary of that, though, because other serialization frameworks such as Facebook's Thrift seem to work in the framework that I am using.Thanks for your help, Kenton! I'll check back soon with my progress.Alex Loddengaard08.09.08 19:47. I have a follow-up question:Will using messageInstance.newBuilderForType.mergeFrom(input).build; work for a stream that contains trailing binary information?I'm asking this question for the following reason: I'm using a very simple example where my Message just contains a single String.
When I print the serialized message with a value of 'mystring', I get 'mystring'. Now, when I see the stream coming in on the deserialization side, I get 'mystring' The leading binary is the same as the original, however the trailing binary is something new entirely. The trailing binary is probably being created by Hadoop.Kenton, you have made it very clear that messageInstance.newBuilderForType.mergeFrom(input).build; is the correct approach. What could possibly be going wrong if the stream I'm trying to deserialize from contains trailing binary data?Thanks ahead of time for your help.AlexAlex Loddengaard08.09.08 22:52. On more follow-up (sorry for all these follow-ups):I should revise my problem slightly. I had said that I am given an instance of a Message class when deserializing.
This is true, though sometimes that instance is null. In the cases when it's null, I'm not able to call newBuilderForType on it. I'm not able to call getDefaultInstance, either. This is now problematic, though there may be a work around. Also given to me is a Class instance of the Message. I'm using Reflection to instantiate a new Message instance, then getDefaultInstance to get the default instance, and then I'm calling newBuilderForType.
Is this problematic?Thanks again. Sorry for all the spam!AlexKenton Varda09.09.08 9:56.
I should revise my problem slightly. I had said that I am given an instance of a Message class when deserializing.
This is true, though sometimes that instance is null. In the cases when it's null, I'm not able to call newBuilderForType on it. I'm not able to call getDefaultInstance, either. This is now problematic, though there may be a work around. Also given to me is a Class instance of the Message. I'm using Reflection to instantiate a new Message instance, then getDefaultInstance to get the default instance, and then I'm calling newBuilderForType. Is this problematic?
I have a follow-up question:Will using messageInstance.newBuilderForType.mergeFrom(input).build; work for a stream that contains trailing binary information?I'm asking this question for the following reason: I'm using a very simple example where my Message just contains a single String. When I print the serialized message with a value of 'mystring', I get 'mystring'. Now, when I see the stream coming in on the deserialization side, I get 'mystring' The leading binary is the same as the original, however the trailing binary is something new entirely. The trailing binary is probably being created by Hadoop.Kenton, you have made it very clear that messageInstance.newBuilderForType.mergeFrom(input).build; is the correct approach. What could possibly be going wrong if the stream I'm trying to deserialize from contains trailing binary data?Thanks ahead of time for your help.Alex. Hi Alex,Kenton Varda wrote: On Mon, Sep 8, 2008 at 9:11 PM, Alex Loddengaard wrote: I have a follow-up question: Will using /messageInstance.newBuilderForType.mergeFrom(input).build;/ work for a stream that contains trailing binary information?
No, it won't work. Protocol buffers are not self-delimiting. They assume that the input you provide is supposed to be one complete message, not a message possibly followed by other stuff. You will need to somehow communicate the size of the message and make sure to limit the input to that size.Aha.
This message case is one of the heretoforehypothetical use cases I am discussing in the adjacent thread on thismailing list / group. The thread is online atand was spawned fromThis is mainly myself, Jon, and Kenton slowly forming a consensus on theright API for delimited messages.
I had proposed simply adding thelength (varint) before the message, and Kenton demonstrated c code forthis. Jon proposed adding a field number / wiretype tag before thelength and message, which makes it look much more like a protocol-bufferfield on the wire.What do you need Alex?-ChrisAlex Loddengaard11.09.08 1:40. Hi Chris,Once I learned that Messages are not self-delimiting (thanks, Kenton!), I started working with Hadoop's source to stop the trailing bits from being included in the InputStream. I've since fixed this issue, kind of at least;).Perhaps a good general solution is to allow a user to put an option in a.proto file or a Message declaration that makes Messages self-delimiting. That way users who want speed don't need to us it, and users who want convenience can use it. The implementation of this would probably be tricky, I'm sure.Thanks for the follow up, Chris.
For now I'm good to go! Let me know if I can provide any other [email protected] 20:20.
At Google, we have lots of various container formats, for streaming, record-based files, database tables, etc., where each record is a protocol buffer. All of these formats store the size of the message before the message itself. Our philosophy is that because we have protocol buffers, all of these.other. formats and protocols can be designed to pass around arbitrary byte blobs, which greatly simplifies them. An arbitrary byte blob is not necessarily self-delimiting, so it's up to these container formats to keep track of the size separately.
Bitcoin is the currency of the Internet: a distributed, worldwide, decentralized digital money. Unlike traditional currencies such as dollars, bitcoins are issued and managed without any central authority whatsoever: there is no government, company, or bank in charge of Bitcoin. As such, it is more resistant to wild inflation and corrupt banks. With Bitcoin, you can be your own bank.If you are new to Bitcoin, check out. You can also explore the:.Community guidelines. Do not use URL shortening services: always submit the real link. Begging/asking for bitcoins is absolutely not allowed, no matter how badly you need the bitcoins.
Only requests for donations to large, recognized charities are allowed, and only if there is good reason to believe that the person accepting bitcoins on behalf of the charity is trustworthy. News articles that do not contain the word 'Bitcoin' are usually off-topic.
This subreddit is not about general financial news. Submissions that are mostly about some other cryptocurrency belong elsewhere. For example, is a good place to discuss all cryptocurrencies. Promotion of client software which attempts to alter the Bitcoin protocol without overwhelming consensus is not permitted. No referral links in submissions. No compilations of free Bitcoin sites.
Trades should usually not be advertised here. For example, submissions like 'Buying 100 BTC' or 'Selling my computer for bitcoins' do not belong here. Is primarily for news and discussion. Please avoid repetition — is a subreddit devoted to new information and discussion about Bitcoin and its ecosystem. New merchants are welcome to announce their services for Bitcoin, but after those have been announced they are no longer news and should not be re-posted.
Aside from new merchant announcements, those interested in advertising to our audience should consider. Do not post your Bitcoin address unless someone explicitly asks you to. Be aware that Twitter, etc. Is full of impersonation.Related communitiesSorted roughly by decreasing popularity.
(NSFW).Non-Bitcoin communities.Join us on IRCOther Bitcoin sitesDownload Bitcoin Coreis the. Almost all Bitcoin wallets rely on Bitcoin Core in one way or another. If you have a fairly powerful computer that is almost always online, you can help the network by running Bitcoin Core. You can also use Bitcoin Core as a very secure Bitcoin wallet.
Latest stable version:. You MUST before running it.Style sheet creditsThe CSS used by this subreddit is the Erdune Theme modified. Check out his other work.Ad campaign:We previously collected donations to fund Bitcoin advertising efforts, but we no longer accept donations. The funds already donated will be spent on some sort of advertising, as intended. As of now, 7 BTC was spent out of 4.
If you have ideas for the remaining BTC,. I opened Multibit and all my wallets were gone. I have them in a folder on my desktop though so I began loading them all back in. I'm on Mac, using the second newest version of Multibit.The software errors out and says: Protocol Message Had Invalid Wire Typeand thats it. I can't load them or reset them or anything. I have hundred of bitcoins in the balance here and I'm at a complete loss at how to fix this. My life will essentially crumble if I cannot recover the coins.I found a link to what appears to be a similar problem but the response was that the keys were damaged due to a computer shut down and thats it:My Macbook crashed a day ago but I don't think I had multibit open.
If I'm not using it I shut it down. Even still how should a computer shut down damage wallet files?I posted on Github because I didn't know what else to doI've reached out to reddit before, to the knowledgeable people here and they have always helped and come through.
If you have any constructive advice please take the time to respond. Thank you so much for your help in advance:(. If is using a Mac, it's possible his files were backed up automatically by Time Machine. I'm torn between saying he should check the backups, and saying he should stop using the computer completely to avoid doing more damage before a professional can try to recover it.And this should go without saying, but if you do try anything yourself to fix this, make five copies of all your data first, and store them in five different safe places. There's a good chance that whatever error you're running into hasn't messed with your private keys. I'm on a mac but i'm not using time machine. How do i even allow a professional to try and help recover it when if i send them the wallet or info files for the wallet it essentially gives them access to my bitcoins??i didn't export my wallet's.wallet or.info files or export my private keys.
I didn't know to do any of those things. I've just been using the software, creating new wallets and storing those files in a folder on my desktop. Thats all i've got. I don't understand why they won't just load up into the software. Those bitcoins are all still there. When i made a new wallet i saved it to a folder where it created a.wallet and a.info file. I thought those were the backups:(i just looked and saw that i could export private keys but i don't know what thats about.
So no i don't have them.are you telling me that without those i just lost 500 bitcoins because of a multibit error? Can the.wallet and.info files not be repaired somehow??? Is there no way i can still export my wallet private key using the.wallet files i have not using multibit?
This has to work somehow. The software itself is working fine.