Awesome work @spnrapp! As @PaulLiu mentioned, the error you’re seeing here is an error from the demo canister that I had published, which was meant to be for demo purposes only and not production use.
Instead of using that, you should instead use the management canister API directly, just like I’m doing in the source code of that example, and that API doesn’t have the 1,000-byte limit.
The API itself poses no limit. However, there is a practical limit of 2MiB, since that is the maximum size of an inter-canister request on the IC currently.
Not sure I follow. Are you referring to the thread above about signed transactions? Maybe I’m misreading something, but you can see the issue was resolved (3rd party developer accidentally misread something… something we have all done) and then dev fixed it.
Can someone familiar with Stacks (https://stacks.org/) explain how it is different (not technically, but rather practically) from the IC native integration? It seems eerily similar…
Stacks, as far as I can recall, uses over-collateralisation bring BTC on chain. So every BTC on the network should be backed by an equal amount of STX.
Practically also, I am not sure if the smart contracts can send real BTC. STX can read the BTC blockchain but it doesn’t have anything like the threshold ECDSA needed to send BTC transactions, so the applications using BTC seem to be more limited to things like atomic swaps.
From what I know, ThorChain is closest of all chains out there to what the IC is doing in terms of integration with other chains. It uses also a native integration where they run a full node of the target blockchain per node to do the protocol level integration which we did with an adapter and a lightweight node. They also use threshold ECDSA, but they use a scheme that has the following drawbacks in contrast to ours:
Their protocol relies on a synchronous network assumption, which does not reflect reality of communication networks
A dishonest node can make the signing protocol fail, while the IC protocol degrades gracefully in such a case
In addition to what @Severin mentioned, you need dfx 0.11.1-beta.2 or later. I’d suggest you look at the sample code to see how to set up your project.
@dfisher
I briefly looked into Stacks to provide a response to your question, and the result is pretty underwhelming considering the current situation of Stacks.
Stacks accounts cannot hold bitcoins. The best way to obtain corresponding BTC balances is to derive the BTC address from the Stacks address (using c32check) and query the Bitcoin network.
Decidable language - Clarity contracts have direct visibility into Bitcoin state.(1)
(1) More work needed to realize the future vision. In particular, Clarity contract can’t write back to Bitcoin (yet)
If this 3rd-party information is correct, this would mean that Stacks does not have true Bitcoin smart contracts, at least not yet. And there is no information to be found on how they would do it. The main point where Bitcoin comes in is that Stacks uses Bitcoin as a base layer for securing its own chain, which means they suffer from the same finality times as Bitcoin, but at least have much greater throughout thanks to microblocks in between the anchor blocks that correspond to Bitcoin blocks. But this means major implications on how to write smart contracts as you don’t have the 1s finality as on the IC, but that of Bitcoin. Their mechanism of using Bitcoin as a base layer to secure their chain gives their smart contracts visibility into the Bitcoin state, but without write access, so they can trigger actions based on what happens on Bitcoin, but that’s it.
To me, this is pretty underwhelming in terms of Bitcoin DeFi, essentially, there’s no true Bitcoin smart contracts at this time in Stacks, but they can only use Bitcoin information to trigger actions in the smart contracts on Stacks.